🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Normal text in front of the window

Started by
4 comments, last by Khorn 24 years, 1 month ago
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?
Advertisement
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... )
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
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
Tristan ''Jherax'' Bleasejherax@planetquake.com
or you could disable depth testing, write the text, then enable depth testing again.. same thing really
Thanx a lot!.
I''ll try it as soon i''ll get my rotation-sensor work allright.
I''ll be back...
Me....!? What more can I say?

This topic is closed to new replies.

Advertisement