bruno0, what programming language are you using?
Can't find any tutorials directly explaining how to do it for Mac.
(My experience with OpenGL is limited to Java+LWJGL, so... yeah.)
Cirno-chan: hmm in java how works?
- texture mapped quads... http://developer.apple.com/mac/library/samplecode/CocoaGL/Introduction/Intro.html#//apple_ref/doc/uid/DTS10004501-Intro-DontLinkElementID_2
- as one such example of this
- you can render (Quartz) texture directly though GL via this approach
bruno0, getting the width of each letter, drawing it into a BufferedImage, loading that into OpenGL, and drawing those textures to the screen.
Don't know what the equivalent, if existent would be for Mac's graphical libraries.
- 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, care to tell me what exactly you searched for?
- another good link (concerning performance): http://developer.apple.com/mac/library/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_intro/opengl_intro.html
- 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
- 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
- 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
- there ARE tools out there (for all platforms) which (a) generate glyph textures and (b) the resulting coordinate mapping required for OGL
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?
you don't erase, you change start so when you render it doesn't show up
change the coords?
RTFM_FTW: I draw the text using glutBitmapCharacter one char pointer and pass it into a loop, drawing step by step
- well GLUT bitmaps aren't viable for a shipping application... for that I'd recommend using the approaches I noted earlier
RTFM_FTW: I had draw a dotted line but all lines now are dotted
how I draw one dotted line and change back to a solid line?
- stipple (which I don't recommend) OR a 1D texture and the programmable pipeline
but when I try draw a solid line without stipple set
- ugh use the second approach I mentioned... this *is* the way forward
it's cames dotted like stipple has set
- a simple 1D lookup texture and a fragment < program, shader >
- all of the crap one has to do with < stipple, non-stipple > state disappears with that approach
i work with opengl the first time and i have some strange problems...
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..
sometimes there is some shaddow like thing but in the same color as the plane that always points to one of the other planes
and sometimes its pointing to the camera
how can this happen when i have only meshes with 6 points
a screenshot would be helpful
i use it on a smartphone..atm
you're using GL ES then
- what platform, what ES version?
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: grab a screenshot
Smirnov: are you using nearest filtering?
HuntsMan ill try to run it on the emulator and take a shot
- rule #1: use the device :)
that yellow thing should only be a square..
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
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
i cant seem to get it to work here
- umm SAMPLE_TO_ALPHA doesn't eliminate the Z sort... not sure why you would think that it would :P
- there are ways to do that tho... this isn't one of them :P
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 :|
- umm no it doesn't :P
blah, margarita for lunch makes typing hard
- in any case it sounds like you want OIT
the cube in that example is nor sorted
yea , but thats not supported on OS X is it ?
- umm you have everything you need for OIT on that platform...
- and interaction with OGL
- per fragment sorts + atomic operations... all of that is supportable
- of course depth peeling would be another approach to this problem...
- one which is completely supported through OGL
- in any case for more information on OIT I'd start here: http://diaryofagraphicsprogrammer.blogspot.com/2009/11/order-independent-transparency.html