3 void resizeStage(GLsizei width, GLsizei height) {
7 // Set device viewport dimensions
8 glViewport(0, 0, width, height);
9 // Switch to projection matrix
10 glMatrixMode(GL_PROJECTION);
11 // Reset the projection matrix
14 GLfloat aspectRatio = (GLfloat) width / (GLfloat) height;
16 glOrtho(-8.0, 24.0, -16.0/aspectRatio, 16.0/aspectRatio, -128.0, 128.0);
18 glRotatef(45.0f, 1.0f, 0.0f, 0.0f);
19 glRotatef(45.0f, 0.0f, 1.0f, 0.0f);
21 glMatrixMode(GL_MODELVIEW);