Mesa (master): progs: add fflushes for cygwin
Keith Whitwell
keithw at kemper.freedesktop.org
Tue Apr 28 17:17:40 UTC 2009
Module: Mesa
Branch: master
Commit: fd402791f909371d8f1c1381f0e16a0f08bd78e6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fd402791f909371d8f1c1381f0e16a0f08bd78e6
Author: Keith Whitwell <keithw at vmware.com>
Date: Tue Apr 28 11:49:55 2009 +0100
progs: add fflushes for cygwin
---
progs/demos/dinoshade.c | 2 ++
progs/redbook/polyoff.c | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/progs/demos/dinoshade.c b/progs/demos/dinoshade.c
index 451da2e..41b19d5 100644
--- a/progs/demos/dinoshade.c
+++ b/progs/demos/dinoshade.c
@@ -624,6 +624,7 @@ redraw(void)
glFinish();
end = glutGet(GLUT_ELAPSED_TIME);
printf("Speed %.3g frames/sec (%d ms)\n", 1000.0/(end-start), end-start);
+ fflush(stdout);
}
glutSwapBuffers();
@@ -878,6 +879,7 @@ main(int argc, char **argv)
polygonOffsetVersion = MISSING;
printf("\ndinoshine: Missing polygon offset.\n");
printf(" Expect shadow depth aliasing artifacts.\n\n");
+ fflush(stdout);
}
}
diff --git a/progs/redbook/polyoff.c b/progs/redbook/polyoff.c
index 2017b4d..de34b2e 100644
--- a/progs/redbook/polyoff.c
+++ b/progs/redbook/polyoff.c
@@ -153,6 +153,7 @@ static void Benchmark( float xdiff, float ydiff )
double seconds, fps;
printf("Benchmarking...\n");
+ fflush(stdout);
draws = 0;
startTime = glutGet(GLUT_ELAPSED_TIME);
@@ -169,6 +170,7 @@ static void Benchmark( float xdiff, float ydiff )
seconds = (double) (endTime - startTime) / 1000.0;
fps = draws / seconds;
printf("Result: fps: %g\n", fps);
+ fflush(stdout);
}
@@ -263,6 +265,7 @@ void keyboard (unsigned char key, int x, int y)
default:
break;
}
+ fflush(stdout);
}
static void
More information about the mesa-commit
mailing list