Merge branch 'mesa_7_5_branch'
[mesa.git] / progs / tests / packedpixels.c
index 94f0a887c46331d041230e502d4c58bf9a75d067..1703b271cb03011f40ff27ce072160cea78e1953 100644 (file)
@@ -8,6 +8,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include <string.h>
+#include <GL/glew.h>
 #include <GL/glut.h>
 
 
@@ -256,6 +257,15 @@ Draw(void)
    PrintString(s);
    glPopMatrix();
 
+   glPushMatrix();
+   glTranslatef(2, (i + 2) * (h + 2), 0);
+   glRasterPos2i(8, 6);
+   if (Test3D)
+      PrintString("Target [2/3]: GL_TEXTURE_3D");
+   else
+      PrintString("Target [2/3]: GL_TEXTURE_2D");
+   glPopMatrix();
+
    glutSwapBuffers();
 }
 
@@ -291,11 +301,9 @@ Key(unsigned char key, int x, int y)
          break;
       case '2':
          Test3D = GL_FALSE;
-         printf("Using 2D textures\n");
          break;
       case '3':
          Test3D = GL_TRUE;
-         printf("Using 3D textures\n");
          break;
       case 27:
          exit(0);
@@ -326,6 +334,7 @@ main(int argc, char *argv[])
    glutInitWindowSize(700, 800);
    glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
    glutCreateWindow(argv[0]);
+   glewInit();
    glutReshapeFunc(Reshape);
    glutKeyboardFunc(Key);
    glutDisplayFunc(Draw);