PDA

View Full Version : writing on opengl window



asdfwe
01-11-2008, 02:20 AM
how can we write a word to an opengl window

thanks in advance

Matthias Thurau
01-11-2008, 03:49 AM
OpenGL has no Font Support. You can see some way to do it on your own over here: http://www.opengl.org/resources/features/fontsurvey/

asdfwe
01-11-2008, 05:49 AM
for me there is no requirement of a specific font
i just want to display a word on screen (in no matter what format)

is there a way

Matthias Thurau
01-11-2008, 05:54 AM
Maybe you dont need a specific font, but you need a font! And as i said OpenGL doesn t have any font support. So do it on your own. The link above descripes some techniqes to do it.

If you just want to print one static word or text on the screen, the easiest method would be to just create a texure with black background maybe and some white text on it. And then in Your OpenGL Application you open the Imagefile and create a Texture from it. After that you can display a Quad with that Texture on it. Then you have the Text on the Screen.

Mark Shaxted
01-11-2008, 06:43 AM
Try here...

http://nehe.gamedev.net

And look through the tutorials.