i am using the following code to handle reshaping in window view:
if(h == 0)
h = 1;
float ratio = 1.0* (float)w / (float)h;
// Reset the coordinate system before modifying
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
// Set the viewport to be the entire window
glViewport(0, 0, w, h);
// Set the correct perspective.
gluPerspective(90, ratio, 1, 30);
glMatrixMode(GL_MODELVIEW);
This works to keep the right proportion on the objects that i am displaying, but when the window is really skinny and tall, parts of the objects are clipped out of the picture. Any idea why this could be happening?