Advertisement

Problems with nehe lesson 13 (bitmap fonts)

Started by September 29, 2005 04:33 PM
1 comment, last by MrLeap 19 years, 2 months ago
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

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
}

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.


Advertisement
ah, I gotcha.

I think that the z coordinate is the same from the other tutorial, so i'm going to go out on a limb and say that the camera is actually closer than normal. hehe.

Woo it's so simple.

Thank you sir.

This topic is closed to new replies.

Advertisement