| Cirno-chan | bruno0, what programming language are you using? |
| bruno0 | Cirno-chan: c |
| Cirno-chan | bruno0, Windows? |
| bruno0 | mac os x |
| Cirno-chan | =c |
| bruno0 | how I do that? |
| Cirno-chan | Let me check. |
| Cirno-chan | Can't find any tutorials directly explaining how to do it for Mac. |
| Cirno-chan | (My experience with OpenGL is limited to Java+LWJGL, so... yeah.) |
| bruno0 | Cirno-chan: hmm in java how works? |
| RTFM_FTW | - texture mapped quads... http://developer.apple.com/mac/library/samplecode/CocoaGL/Introduction/Intro.html#//apple_ref/doc/uid/DTS10004501-Intro-DontLinkElementID_2 |
| RTFM_FTW | - as one such example of this |
| RTFM_FTW | - you can render (Quartz) texture directly though GL via this approach |
| RTFM_FTW | - *text |
| Cirno-chan | bruno0, getting the width of each letter, drawing it into a BufferedImage, loading that into OpenGL, and drawing those textures to the screen. |
| Cirno-chan | Don't know what the equivalent, if existent would be for Mac's graphical libraries. |
| RTFM_FTW | - specifically note these files: http://developer.apple.com/mac/library/samplecode/CocoaGL/Listings/GLString_h.html#//apple_ref/doc/uid/DTS10004501-GLString_h-DontLinkElementID_9 http://developer.apple.com/mac/library/samplecode/CocoaGL/Listings/GLString_m.html#//apple_ref/doc/uid/DTS10004501-GLString_m-DontLinkElementID_10 |
| RTFM_FTW | - read what I linked :) |
| Cirno-chan | RTFM_FTW, care to tell me what exactly you searched for? |
| RTFM_FTW | - another good link (concerning performance): http://developer.apple.com/mac/library/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_intro/opengl_intro.html |
| RTFM_FTW | - also note that the above approach is NOT what I'd use if you need a optimal text rendering path... there are MANY ways to make that faster |
| RTFM_FTW | - if you are rendering large batches of text (which are relatively static) you can blit those into a FBO (via RTT) and display that as a single texture mapped primitive |
| RTFM_FTW | - depending upon your needs you could also go for a lower level approach... i.e. generate one or more glyph textures (texture atlases would be handy for this if you need multiple fonts...) and use VA+VBO to generate the vertex / texture coordinate content used for per character indexing |
| RTFM_FTW | - there ARE tools out there (for all platforms) which (a) generate glyph textures and (b) the resulting coordinate mapping required for OGL |
| bruno0 | changing the focus of question, I have a DS that I list my lines in scene, but I have created dashed lines to make an effect, when I set this lines with null value it's still drawed on screen, how I erase it? |
| NoobFukaire | you don't erase, you change start so when you render it doesn't show up |
| NoobFukaire | *change state |
| bruno0 | change the coords? |
| bruno0 | RTFM_FTW: I draw the text using glutBitmapCharacter one char pointer and pass it into a loop, drawing step by step |
| RTFM_FTW | - well GLUT bitmaps aren't viable for a shipping application... for that I'd recommend using the approaches I noted earlier |
| bruno0 | RTFM_FTW: I had draw a dotted line but all lines now are dotted |
| bruno0 | how I draw one dotted line and change back to a solid line? |
| RTFM_FTW | - stipple (which I don't recommend) OR a 1D texture and the programmable pipeline |
| bruno0 | yep |
| bruno0 | I used stipple |
| bruno0 | but when I try draw a solid line without stipple set |
| RTFM_FTW | - ugh use the second approach I mentioned... this *is* the way forward |
| bruno0 | it's cames dotted like stipple has set |
| RTFM_FTW | - a simple 1D lookup texture and a fragment < program, shader > |
| bruno0 | hmm |
| RTFM_FTW | - all of the crap one has to do with < stipple, non-stipple > state disappears with that approach |
| chroos | hello |
| HuntsMan | hi |
| chroos | i work with opengl the first time and i have some strange problems... |
| chroos | for example i have a class for a mesh.. i extend it to be a plane.. then i have an array of planes that i move around the screen.. |
| chroos | sometimes there is some shaddow like thing but in the same color as the plane that always points to one of the other planes |
| chroos | and sometimes its pointing to the camera |
| chroos | how can this happen when i have only meshes with 6 points |
| HuntsMan | a screenshot would be helpful |
| chroos | i use it on a smartphone..atm |
|
|
| HuntsMan | you're using GL ES then |
| chroos | yes |
| RTFM_FTW | - what platform, what ES version? |
| chroos | android glesv1 |
| chroos | http://pastebin.com/rXfW26Vv |
| Smirnov | are there supposed to various texture rendering qualities, because im drawing a texture flat to the screen (shouldnt be minifying/magnifying) 1:1 and yet the rendering looks incorrect |
| chroos | http://pastebin.com/qaRStQNB |
| HuntsMan | chroos: grab a screenshot |
| HuntsMan | Smirnov: are you using nearest filtering? |
| chroos | HuntsMan ill try to run it on the emulator and take a shot |
| RTFM_FTW | - rule #1: use the device :) |
| chroos | http://img691.imageshack.us/i/photo2st.jpg/ |
| chroos | that yellow thing should only be a square.. |
| Smirnov | HuntsMan: yes |
| Smirnov | i'm drawing a quad to the corners though [-1,1,0] [1,-1,0] etc and the window size is the same as the texture size |
| vade | does GL_SAMPLE_TO_ALPHA_COVERAGE actually work for non sorted transparency ? http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=237854&page=2 |
| vade | i cant seem to get it to work here |
| RTFM_FTW | - umm SAMPLE_TO_ALPHA doesn't eliminate the Z sort... not sure why you would think that it would :P |
| RTFM_FTW | - there are ways to do that tho... this isn't one of them :P |
| vade | well, that doc seems like thread has examples that say, and work for others that not doing z-sort, but with depth enable, make it work :| |
| RTFM_FTW | - umm no it doesn't :P |
| vade | blah, margarita for lunch makes typing hard |
| RTFM_FTW | - in any case it sounds like you want OIT |
| vade | the cube in that example is nor sorted |
| vade | er not. fuck :D |
| RTFM_FTW | - see above |
| vade | yea , but thats not supported on OS X is it ? |
| RTFM_FTW | - umm you have everything you need for OIT on that platform... |
| RTFM_FTW | - OCL for example... |
| RTFM_FTW | - and interaction with OGL |
| vade | fuck that noise :P |
| RTFM_FTW | - per fragment sorts + atomic operations... all of that is supportable |
| RTFM_FTW | - on the right HW |
| RTFM_FTW | - of course depth peeling would be another approach to this problem... |
| RTFM_FTW | - one which is completely supported through OGL |
| RTFM_FTW | - in any case for more information on OIT I'd start here: http://diaryofagraphicsprogrammer.blogspot.com/2009/11/order-independent-transparency.html |
| --- Tue Jun 1 2010 |
Popular searches: