4 // Set the clear colour to black
5 glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
8 void resize_stage(GLsizei width, GLsizei height) {
12 // Set device viewport dimensions
13 glViewport(0, 0, width, height);
14 // Switch to projection matrix
15 glMatrixMode(GL_PROJECTION);
16 // Reset the projection matrix
19 GLfloat aspect_ratio = (GLfloat)width / (GLfloat)height;
21 glOrtho(-10.0f, 10.0f, -10.0f/aspect_ratio, 10.0f/aspect_ratio, 128.0, -128.0);
23 glRotatef(45.0f, 1.0f, 0.0f, 0.0f);
24 glRotatef(45.0f, 0.0f, 1.0f, 0.0f);
26 glMatrixMode(GL_MODELVIEW);