int DrawGLScene(GLvoid) // Here's Where We Do All The Drawing
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer
glLoadIdentity(); // Reset The Current Modelview Matrix
glTranslatef(0.0f,0.0f,-1.0f); // Move One Unit Into The Screen
glColor3f(100,25,100);
// Position The Text On The Screen
glRasterPos2f(-0.45f,0.05f);
glColor3f(0.5f,0.5f,1.0f);
glBegin(GL_QUADS); // Draw A Quad
glVertex3f(-0.5f, 0.5f, 0.0f); // Top Left
glVertex3f( 0.5f, 0.5f, 0.0f); // Top Right
glVertex3f( 0.5f,-0.5f, 0.0f); // Bottom Right
glVertex3f(-0.5f,-0.5f, 0.0f); // Bottom Left
glEnd();
glPrint("Heeeeelllo world with a polygon!"); // Print GL Text To The Screen
return TRUE; // Everything Went OK
}
Problems with nehe lesson 13 (bitmap fonts)
The following code makes the quad enormous (in comparison to how it is in the other tutorials). Is there a perspective setting that is different from his other lessons or something? Or is there something I just can't see. :p
Any insight appreciated :p
The reason is that the quad, as small as it is, is right upon the camera. You only translate -1 down the z axis. The quad is right in your face. Try this, look at your hand from a distance. Then look at it covering your eye. It looks huge like that was all there is. That is what happens with the quad.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement