Normal text in front of the window
Hi.
Anyonw knows how to put text over your 3d-image!?
Lets say that i do someting like a VR-system and wants to put coordinates and angles and stuff in front of the window.
I have managed to write text, but when walls comes to close they hide my text. Anyone having some ideas?
Me....!? What more can I say?
If you doesn''t hate it, I suggest a common window GDI like
TextOut(..) do a very good job.
I''m using it to show rotation angle and position,too.
As long as you don''t draw very much text on screen, the lack of speed of GDI isn''t very serious problem.(I think... )
TextOut(..) do a very good job.
I''m using it to show rotation angle and position,too.
As long as you don''t draw very much text on screen, the lack of speed of GDI isn''t very serious problem.(I think... )
The only drawback to use GDI functions in your OpenGL apps, is that they have to be single-buffered, instead of double. (I, personally, would rather whip up my own text handling routine).
Just my $0.02.
Tristan ''Jherax'' Blease
jherax@planetquake.com
Just my $0.02.
Tristan ''Jherax'' Blease
jherax@planetquake.com
Tristan ''Jherax'' Bleasejherax@planetquake.com
Oh yes, and if you want stuff (like text) to stay on top of everything while rendering - before rendering the text, make a call to DepthFunc() and change the mode to GL_ALWAYS. This will make sure your text is rendered in front of everything else. When you are finished rendering the text, just use DepthFunc() to change back to GL_LEQUAL.
That might be a bit more usefull than my last post .
Tristan ''Jherax'' Blease
jherax@planetquake.com
That might be a bit more usefull than my last post .
Tristan ''Jherax'' Blease
jherax@planetquake.com
Tristan ''Jherax'' Bleasejherax@planetquake.com
or you could disable depth testing, write the text, then enable depth testing again.. same thing really
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement