Merge branch 'mesa_7_6_branch'
[mesa.git] / progs / demos / gloss.c
index 9974f0dab2e99eb5439ee153d843421561b012a2..69694b23a09bc5cb44782a435da30761a39214fa 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include <string.h>
+#include <GL/glew.h>
 #include <GL/glut.h>
 
 #include "readtex.h"
@@ -131,6 +132,7 @@ static void Display( void )
          GLfloat seconds = (t - T0) / 1000.0;
          GLfloat fps = Frames / seconds;
          printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
+         fflush(stdout);
          T0 = t;
          Frames = 0;
       }
@@ -438,6 +440,7 @@ int main( int argc, char *argv[] )
    glutInitWindowSize(WinWidth, WinHeight);
    glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
    glutCreateWindow(argv[0] );
+   glewInit();
    glutReshapeFunc( Reshape );
    glutKeyboardFunc( Key );
    glutDisplayFunc( Display );