Jump to content
  • Advertisement
Sign in to follow this  
Shade37337

OpenGL texts

This topic is 5184 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

dod manyone know who i could use a text (e.g. "hello world")in a simple opengl app? i mean that the text is written over the object(a cube)to describe it

Share this post


Link to post
Share on other sites
Advertisement
In general I suggest you to use bitmap fonts.
A bitmap character is simply a quad, texture mapped and rendered in 2D. The texture (ALPHA) contains the image of your char and via GL_BLEND you can control the foreground color.
If you want a sort of 'text-hud' that follows the 3D object when you move it (or change the view) you need to compute the 2D position where place the text; in this case use something like gluProject.
You can find a lot of tutorials about bitmap fonts...(see also NeHe)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!