void reshape(int w, int h) { glViewport( 0, 0, static_cast<GLsizei>(w), static_cast<GLsizei>(h) ); aspect = static_cast<GLfloat>(w) / static_cast<GLfloat>(h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45.0, aspect, 1.0e-2, 1.0e+2); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); tb.reshape(w,h); }