View Full Version : Displaying text

08-08-2003, 01:33 PM
I am sure this questions has been asked before but im tired of searching http://www.opengl.org/discussion_boards/ubb/smile.gif I am displaying my axis and would like to display which axis corresponds to x,y,z. So basically I need to display the letter "x", "y", and "z" near the lines. Any help is appreciated

08-09-2003, 01:18 AM
There is no particular way of displaying text in OpenGL. There are no functions designed to do that. Although you can do it yourslef (with use of OGL, of course) very easily. What's more, there are plenty of ways of doing that. If displayig 3 letters is all you need about text in your application you can just draw X, Y and Z signs as a textured quad. That's all.

But if it isn't enough (if you planned to display moe text) I recommend creating your own (really simple) text-drawing commands. Check out NeHe Tutorials.

08-09-2003, 03:10 AM
Hi !

Most OpenGL implementations (actually it's not part of OpenGL itself) have support for generating text (wglUseFontBitmaps and wglUseFontOutlines on Windows, GLX has similair functions, if you just need simple letters you might as well do it yourself, if you need more flexible and more platform independent text I would suggest you have a look at FreeType, there are libraries that allows you to use FreeType to create polygons out of TT fonts.


08-10-2003, 06:23 AM
thanks for your help http://www.opengl.org/discussion_boards/ubb/smile.gif