void
myReshape(int w, int h)
{
GLfloat aspect = (GLfloat) w
/ (GLfloat) h;
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if (w <= h) /* aspect <= 1 */
glOrtho(-2.0, 2.0,
-2.0/aspect, 2.0/aspect, -10.0, 10.0);
else /* aspect > 1 */
glOrtho(-2.0*aspect,
2.0*aspect, -2.0, 2.0, -10.0, 10.0);
glMatrixMode(GL_MODELVIEW);
}