Sorry to ask stoopid questions but could someone help me here? I have an assignment for Thursday and I’ve just noticed that when I resize my window the objects seems to move further away or something and since the lecturer gave me the code I really don’t have a clue what to do with it. I’d ask him but he has gone away until the assignment is due in so I had to come here:
void Resize(int width, int height)
{
Width = width;
Height = height;
// Reset the viewport
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(22.5, (float)width / (float)height, 0.1, 1000.0);
glMatrixMode(GL_MODELVIEW);
}
I’m assuming it’s something to do with gluPerspective but that’s it. Any help would be muchly appreciated.