Merge branch 'width0'
[mesa.git] / progs / trivial / clear-fbo-tex.c
index 68f1ab3d77e5879b93f38371a7145d274dbebf98..238f634bf59242484002c5bb3040d715d8cd5956 100644 (file)
@@ -5,7 +5,7 @@
 #include <math.h>
 #include <string.h>
 
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
 #include <GL/glut.h>
 
 
@@ -27,6 +27,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);
 
 
    if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
@@ -87,7 +88,7 @@ static void Key(unsigned char key, int x, int y)
       case 27:
        exit(1);
       default:
-       return;
+       break;
     }
 
     glutPostRedisplay();
@@ -210,6 +211,8 @@ main( int argc, char *argv[] )
        exit(1);
     }
 
+    glewInit();
+
     Init();
 
     glutReshapeFunc(Reshape);