View Full Version : How to display text

03-02-2002, 10:15 AM

how can i display some text with OpenDL commands? I creating an application that plots some graphics and i need to label the axis. But i couldn't see any commands like glPrint or glText.

Anyway, thanks in advance.

03-02-2002, 10:23 AM
OpenGL has no built in text functions. You need to render text as textures or as proper geometry.

There are a few tutorials out there that can help you with that, I'd suggest this one:

The last three tutorials on this page deal with text in OpenGL.

You might also want to check out the rest (http://nehe.gamedev.net) http://www.opengl.org/discussion_boards/ubb/smile.gif

03-02-2002, 10:40 AM
Thank you. It's really sad it doesn't have commands for text.

Anyway, now i'm on way to that tutorial. Hope that works.

03-02-2002, 01:45 PM
You can alwats design you own font class if you want, without using wgl functions and stuff. What you have to do is basically create a display list for every letter and make it inot a textured polygon. So every letter is just a texured polygon with blending.