Fix buffer age implementaion bug.
[mesa.git] / progs / fp / tri-tex.c
index 87f63894ce9aef74bd5dea01921d63dd88b8e368..1dbbb201cef2e48f2a20a5efc983e26521839604 100644 (file)
@@ -3,7 +3,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
 #include <GL/glut.h>
 
 #include "readtex.c"
@@ -23,7 +23,7 @@ static void Init( void )
    GLuint modulateProg;
    GLuint Texture;
 
-   if (!glutExtensionSupported("GL_ARB_fragment_program")) {
+   if (!GLEW_ARB_fragment_program) {
       printf("Error: GL_ARB_fragment_program not supported!\n");
       exit(1);
    }
@@ -120,6 +120,8 @@ int main(int argc, char **argv)
        exit(1);
     }
 
+    glewInit();
+
     Init();
 
     glutReshapeFunc(Reshape);