diff options
author | Keith Whitwell <[email protected]> | 2009-09-23 17:37:28 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-09-23 17:37:28 +0100 |
commit | 890679d4322e7ba4f12f32532a3fdd277edff886 (patch) | |
tree | 37df5e8a53f7da9fdcaf2e9660c694e28e14b5bc /progs | |
parent | a1fa770c01d913658900de1c267fb4c41bc6300d (diff) | |
parent | 75276ea316610a5737f2115326482024aa09d02a (diff) |
Merge branch 'softpipe-opt'
Conflicts:
progs/demos/cubemap.c
src/gallium/drivers/softpipe/sp_tex_sample.c
src/gallium/drivers/softpipe/sp_texture.c
Diffstat (limited to 'progs')
-rw-r--r-- | progs/demos/cubemap.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/progs/demos/cubemap.c b/progs/demos/cubemap.c index 015d50d86be..20332b1d960 100644 --- a/progs/demos/cubemap.c +++ b/progs/demos/cubemap.c @@ -59,6 +59,8 @@ static GLboolean supportFBO = GL_FALSE; static GLboolean supportSeamless = GL_FALSE; static GLboolean seamless = GL_FALSE; static GLuint TexObj = 0; +static GLint T0 = 0; +static GLint Frames = 0; static struct { @@ -283,6 +285,20 @@ static void draw( void ) glPopMatrix(); glutSwapBuffers(); + + Frames++; + + { + GLint t = glutGet(GLUT_ELAPSED_TIME); + if (t - T0 >= 5000) { + GLfloat seconds = (t - T0) / 1000.0; + GLfloat fps = Frames / seconds; + printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps); + fflush(stdout); + T0 = t; + Frames = 0; + } + } } |