[Jahshaka-cvs] openlibraries/test/openpluginlib/gpu_timer_query gpu_timer_query.cpp, 1.7, 1.8
Status: Beta
Brought to you by:
jahshaka
From: Goncalo N. M. de C. <gl...@us...> - 2006-11-13 17:44:14
|
Update of /cvsroot/openlibraries/openlibraries/test/openpluginlib/gpu_timer_query In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6592/test/openpluginlib/gpu_timer_query Modified Files: gpu_timer_query.cpp Log Message: + Oooooooops. It was broken again....! Index: gpu_timer_query.cpp =================================================================== RCS file: /cvsroot/openlibraries/openlibraries/test/openpluginlib/gpu_timer_query/gpu_timer_query.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- gpu_timer_query.cpp 13 Sep 2006 13:55:26 -0000 1.7 +++ gpu_timer_query.cpp 13 Nov 2006 17:44:08 -0000 1.8 @@ -31,7 +31,7 @@ namespace opl = olib::openpluginlib; -#ifdef GLEW_EXT_timer_query +#ifdef GL_EXT_timer_query namespace { @@ -43,7 +43,7 @@ static void display( void ) { -#ifdef GLEW_EXT_timer_query +#ifdef GL_EXT_timer_query r.start( ); glDisable( GL_DEPTH_TEST ); @@ -130,10 +130,16 @@ glewInit( ); -#ifdef GLEW_EXT_timer_query - r.reset( ); - std::cout << "gpu: ticks per microsecond " << r.ticks( ) << ".\n"; -#endif +#ifdef GL_EXT_timer_query + if( r.reset( ) ) + { + std::cout << "gpu: ticks per microsecond " << r.ticks( ) << ".\n"; - glutMainLoop( ); + glutMainLoop( ); + } + else +#endif + { + std::cout << "gpu: no timer available.\n"; + } } |