diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2000-12-07 21:50:39 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2000-12-07 21:50:39 +0000 |
commit | 83886a5a7f416b4a8c9dc8ef3a587d9b3fab9c59 (patch) | |
tree | 1ec83adfecca5d7fcda8c98f3fcfd613cb808f4b /progs/demos | |
parent | ab9e273c75e2d752e5027f7790480120c672ce01 (diff) |
call glFinish() before getting t1 time
Diffstat (limited to 'progs/demos')
-rw-r--r-- | progs/demos/clearspd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/progs/demos/clearspd.c b/progs/demos/clearspd.c index e135bf1b95..e06a28e08f 100644 --- a/progs/demos/clearspd.c +++ b/progs/demos/clearspd.c @@ -1,4 +1,4 @@ -/* $Id: clearspd.c,v 1.2 2000/04/10 16:25:15 brianp Exp $ */ +/* $Id: clearspd.c,v 1.3 2000/12/07 21:50:39 brianp Exp $ */ /* * Simple GLUT program to measure glClear() and glutSwapBuffers() speed. @@ -7,6 +7,9 @@ /* * $Log: clearspd.c,v $ + * Revision 1.3 2000/12/07 21:50:39 brianp + * call glFinish() before getting t1 time + * * Revision 1.2 2000/04/10 16:25:15 brianp * fixed visual selection and reporting results * @@ -71,14 +74,15 @@ static void Display( void ) glClear( BufferMask ); glutSwapBuffers(); } + glFinish(); t1 = glutGet(GLUT_ELAPSED_TIME) * 0.001; } else { t0 = glutGet(GLUT_ELAPSED_TIME) * 0.001; for (i=0;i<Loops;i++) { glClear( BufferMask ); - glFlush(); } + glFinish(); t1 = glutGet(GLUT_ELAPSED_TIME) * 0.001; glutSwapBuffers(); } |