Merge remote branch 'origin/7.8'
[mesa.git] / progs / tests / multipal.c
index 54483afa3b22f7af19f4814b0586b844658bb1e4..4a940169780bcb30c026ec5a18dd9ed090e3a911 100644 (file)
@@ -1,4 +1,3 @@
-/* $Id: multipal.c,v 1.3 2002/10/18 13:23:19 brianp Exp $ */
 
 /*
  * Test multitexture and paletted textures.
@@ -9,10 +8,12 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stddef.h>    /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
 #ifdef _WIN32
 #include <windows.h>
 #endif
 #define GL_GLEXT_LEGACY
+#include <GL/glew.h>
 #include <GL/glut.h>
 
 #include "../util/readtex.c"   /* I know, this is a hack. */
@@ -213,7 +214,7 @@ static void SpecialKey( int key, int x, int y )
 static void load_tex(const char *fname, int channel)
 {
    GLubyte *image;
-   GLenum format, type;
+   GLenum format;
    GLint w, h;
    GLubyte *grayImage;
    int i;
@@ -350,6 +351,7 @@ int main( int argc, char *argv[] )
    glutInitWindowPosition( 0, 0 );
    glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
    glutCreateWindow(argv[0] );
+   glewInit();
 
    Init( argc, argv );