How to display character with opengl?

Is there any fuction?

Nope,OpenGL just renders primitves to the framebuffer.Not directly that is.If you take a look at the right side of the page though you’ll come across this link:
You’ll find all the information you need in there(propably more).

There are a few diffent ways to display charactors with opengl.

One is with GLUT and the function:
glutBitmapCharacter and glutStrokeCharacter

Aother is the use texture maped fonts,
examples of this at

Also you can draw characters, built from glprimitives.

Originally posted by twins_online:
Is there any fuction?

There is a tutorial i remember looking through and the programmer wrote up a ‘glPrintF(“what ever you want to type”);’ function.

So i basically that function in my code.

Remember that the glPrintF function was defined in the tutorial and i just copy pasted. There is no glPrintF function in OpenGL it self.

None the less you could do the same from the nehe tutorials. Just figure out how the text is being draw (its not hard, but its a pain to keep coding for each project) and then do what the smart programmer did and rename it as a generic printf function you have in C which you can use afterwards for any code.

If you like Quake 3 characters (and if you have the game) try :