PDA

View Full Version : URGENT !!! Text in OpenGL window (Nehe)



nix
05-14-2001, 03:41 AM
Howdy hooo!!!

I use the glPrint function which is on the Nehe site:
http://nehe.gamedev.net/tutorials/lesson14.asp

Why doesn´t the text size change ???

Another question:
I should print some text in a OpenGL window and when I used windows API the text flickered like hell.

Please help me print some text in an OpenGL window !!!!

/nix

chennes
05-14-2001, 05:13 AM
The flickering was probably because you use double-buffering...

As for the font size - are you sure that you are re-creating the display lists? You're using bitmapped fonts, I think... I don't remember which tut is which. You need to re-create the DLs for a different font size.

Chris

nix
05-14-2001, 05:29 AM
I just use one size in my program. I just Build the font once....

/nix

ipo
05-14-2001, 08:14 AM
Calls to wglUseFontOutlines() and wglUseFontBitmaps() always map the currently selected font in Windows to a glyph whose cell is 1.0 x 1.0. This is regardless of the size of the current font.

What this means is that to change the size of the font you should use glScalef() after drawing the text.