return FALSE;
}
- glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+// glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix ();
+ glLoadIdentity ();
glColor3f (1.0, 1.0, 1.0);
+ glBegin(GL_TRIANGLES);
+ glVertex3f( 0.0f, 1.0f, 0.0f); // Top
+ glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left
+ glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
+ glEnd();
glPopMatrix ();
gtk_widget_end_gl (widget, TRUE);
GLfloat width = 0;
/* Current page height */
GLfloat height = 0;
- /* Current page */
- struct order_page *page = NULL;
+ /* Aspect ratio */
+ GLfloat aspect = 0;
gtk_widget_get_allocation (widget, &allocation);
w = allocation.width;
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
- /* Code was here */
+// if (w > h) {
+ aspect = w / h;
+// glFrustum (-aspect, aspect, -1.0, 1.0, 5.0, 60.0);
+// }
+// else {
+// aspect = h / w;
+ glFrustum (-1.0, 1.0, -aspect, aspect, 5.0, 60.0);
+// }
glMatrixMode (GL_MODELVIEW);