progs/glsl: new shtest program, a simple shader test harness app
[mesa.git] / progs / trivial / readpixels.c
index 783468ae2f63467b571b4bcc3de9cb8f43c75c37..5671618446a05ee8b399752f1a552689a27dd395 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -17,6 +17,7 @@ static void Init(void)
    fprintf(stderr, "GL_RENDERER   = %s\n", (char *) glGetString(GL_RENDERER));
    fprintf(stderr, "GL_VERSION    = %s\n", (char *) glGetString(GL_VERSION));
    fprintf(stderr, "GL_VENDOR     = %s\n", (char *) glGetString(GL_VENDOR));
+   fflush(stderr);
    glClearColor(0.3, 0.1, 0.3, 0.0);
 }
 
@@ -91,6 +92,8 @@ int main(int argc, char **argv)
    if (argc > 1)
       Zoom = atof(argv[1]);
 
+   glewInit();
+
    Init();
 
    glutReshapeFunc(Reshape);