Thanks for your reply ::- ). In your code I see “glPushMatrix” twice. I guess you meant “glPopMatrix” the second time ::- ). Anyway. It doesn’t seem to be working. Here are my InitGL and Draw functions. These are the most important ones, the rest is pretty standard. This, by the way, is taken from a NEHE tutorial, lesson 14 from his website. The PrintGlText is made by him but all that is pretty standard. My problem is not drawing. My problem is perspective.
Thanks a lot for your help. Maybe we can shed some light in this matter. I am a begginer in OPEN GL but I did read some documentation about these functions. However, whatever I do, when I increase the OPEN GL viewport, the text’s height increases. Most annoying.
Here is how the font is declared (no matter what height I give it, it will still increase with the window, probably because it’s an outline font.)
font = CreateFont( -12, // Height Of Font
0, // Width Of Font
0, // Angle Of Escapement
0, // Orientation Angle
FW_BOLD, // Font Weight
FALSE, // Italic
FALSE, // Underline
FALSE, // Strikeout
ANSI_CHARSET, // Character Set Identifier
OUT_TT_PRECIS, // Output Precision
CLIP_DEFAULT_PRECIS, // Clipping Precision
ANTIALIASED_QUALITY, // Output Quality
FF_DONTCARE|DEFAULT_PITCH, // Family And Pitch
"CopprplGoth Bd BT"); // Font Name
I don't want to use bitmap fonts since they are too rigid. Outline fonts rule, if only I could get them working right ::- D.
void InitGL ()
{
glShadeModel(GL_SMOOTH);
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glEnable(GL_LIGHT0);
glEnable(GL_LIGHTING);
glEnable(GL_COLOR_MATERIAL);
BuildGLFont();
}
void DrawGLScene ()
{
glPushMatrix();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(-1.8f,-0.3f,-1.7f);
glRotatef(25.0f,1.0f,0.0f,0.0f);
PrintGLText("Testing.");
glPopMatrix();
}
Thanks in advance for all your help!