Skip to main content
gamedev.net
🔒 Locked

texts

Started by Shade37337 0 replies 500+ views
Original Post
Shade37337
Shade37337
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
A Programmer is Just a Tool which converts Coffeine into Code.
blizzard999
blizzard999
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)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.