i965g: Remove unnecessary headers.
[mesa.git] / progs / trivial / vp-tri-cb-pos.c
index eb3aa0a8dc6cab5483241600fd0f510dbfeb2955..9cbc4d1193a0bd2d1ea690bba9916ae08f8d15d3 100644 (file)
@@ -5,7 +5,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
 #include <GL/glut.h>
 
 
@@ -81,7 +81,7 @@ static void Key(unsigned char key, int x, int y)
       case 27:
        exit(1);
       default:
-       return;
+       break;
     }
 
     glutPostRedisplay();
@@ -142,15 +142,17 @@ int main(int argc, char **argv)
     type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
     glutInitDisplayMode(type);
 
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
+    if (glutCreateWindow(*argv) == GL_FALSE) {
        exit(1);
     }
 
+    glewInit();
+
     Init();
 
     glutReshapeFunc(Reshape);
     glutKeyboardFunc(Key);
     glutDisplayFunc(Draw);
     glutMainLoop();
-       return 0;
+    return 0;
 }