Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Khorn

Normal text in front of the window

This topic is 6916 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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... )

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
or you could disable depth testing, write the text, then enable depth testing again.. same thing really

Share this post


Link to post
Share on other sites
Thanx a lot!.
I''ll try it as soon i''ll get my rotation-sensor work allright.
I''ll be back...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!