PDA

View Full Version : How to write text on OpenGL?



wzhao53
11-27-2003, 06:59 PM
How to write numbers or characters on the graphic?

Thanks!

mikael_aronsson
11-27-2003, 10:45 PM
Hi !

It depnds on your platform, glut has built in functionality to handle text, on windows you could use wglUseFontOutlines or wglUseFontBitmaps to create a displaylist of bitmap or outline/filled characters font a font.

If you want a more platform independent way there are a number of libraris based on freetype that can help you (do a search on www.sourceforge.net) (http://www.sourceforge.net))

Mikael

Obli
11-28-2003, 02:32 AM
OpenGL.org has a review of some methods under the "documentation" section and at the right of the main page if I am not wrong.