Archived

This topic is now archived and is closed to further replies.

Help with gluPerspective Tutorial ONE

This topic is 5149 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey ive been trying to fingure out what (GLfloat) does in this code?
GLvoid ResizeGLScene(GLsizei width, GLsizei height)
{
	if (height==0)
	{
		height=1;
	}

	glViewport(0,0,width,height);

	glMatrixMode(GL_Projection);
	glLoadIdentity();

	gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f);//THIS LINE!!!


	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();

}
THANKS!

Share this post


Link to post
Share on other sites