diff options
Diffstat (limited to 'progs/demos')
| -rw-r--r-- | progs/demos/readpix.c | 9 | ||||
| -rw-r--r-- | progs/demos/textures.c | 2 | 
2 files changed, 6 insertions, 5 deletions
| diff --git a/progs/demos/readpix.c b/progs/demos/readpix.c index 05f89bb53e..cc4e490269 100644 --- a/progs/demos/readpix.c +++ b/progs/demos/readpix.c @@ -219,7 +219,7 @@ Display( void )        GLint reads = 0;        GLint endTime;        GLint startTime = glutGet(GLUT_ELAPSED_TIME); -      GLdouble seconds, pixelsPerSecond; +      GLdouble seconds, mpixels, mpixelsPerSecond;        printf("Benchmarking...\n");        do {           glReadPixels(APosX, APosY, ImgWidth, ImgHeight, @@ -228,9 +228,10 @@ Display( void )           endTime = glutGet(GLUT_ELAPSED_TIME);        } while (endTime - startTime < 4000);   /* 4 seconds */        seconds = (double) (endTime - startTime) / 1000.0; -      pixelsPerSecond = reads * ImgWidth * ImgHeight / seconds; -      printf("Result:  %d reads in %f seconds = %f pixels/sec\n", -             reads, seconds, pixelsPerSecond); +      mpixels = reads * (ImgWidth * ImgHeight / (1000.0 * 1000.0)); +      mpixelsPerSecond = mpixels / seconds; +      printf("Result:  %d reads in %f seconds = %f Mpixels/sec\n", +             reads, seconds, mpixelsPerSecond);        Benchmark = GL_FALSE;     }     else { diff --git a/progs/demos/textures.c b/progs/demos/textures.c index 773d7378b1..1415ef1c43 100644 --- a/progs/demos/textures.c +++ b/progs/demos/textures.c @@ -57,7 +57,7 @@ Idle(void)  {     Xrot = glutGet(GLUT_ELAPSED_TIME) * 0.02;     Yrot = glutGet(GLUT_ELAPSED_TIME) * 0.04; -   /*Zrot += 2.0;*/ +   /* Zrot += 2.0; */     glutPostRedisplay();  } | 
