i965: add support for ARB_half_float_vertex
[mesa.git] / progs / demos / arbfslight.c
index d6363eafeb25c6fa58891d4907584ec6a38bb32c..a0ce7f3f5bce3de68597f0d293b04b86e8d500e6 100644 (file)
@@ -105,6 +105,7 @@ static void Redisplay (void)
                        GLfloat seconds = (GLfloat) (t - t0) / 1000.0f;
                        GLfloat fps = frames / seconds;
                        printf ("%d frames in %6.3f seconds = %6.3f FPS\n", frames, seconds, fps);
+                        fflush(stdout);
                        t0 = t;
                        frames = 0;
                }
@@ -208,7 +209,7 @@ static void Init (void)
       "   // Compute dot product of light direction and normal vector\n"
       "   float dotProd = max (dot (lightPos, normalize (normal)), 0.0);\n"
       "   // Compute diffuse and specular contributions\n"
-#if 0
+#if 1
       "   gl_FragColor = diffuse * dotProd + specular * pow (dotProd, 20.0);\n"
 #elif 1 /* test IF/ELSE/ENDIF */
       "   if (normal.y > 0.0) { \n"
@@ -310,9 +311,8 @@ static void Init (void)
 
 int main (int argc, char *argv[])
 {
-       glutInit (&argc, argv);
-       glutInitWindowPosition ( 0, 0);
        glutInitWindowSize (200, 200);
+       glutInit (&argc, argv);
        glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
        glutCreateWindow (argv[0]);
        glutReshapeFunc (Reshape);