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!
Help with gluPerspective Tutorial ONE
Hey ive been trying to fingure out what (GLfloat) does in this code?
Ut o not me again:) lol
It prevents truncation due to integer division.
[twitter]warrenm[/twitter]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement