Hello guys, I finally get to my other windows laptop and run the testcase on that system too. Both compiled in release, using osg as a shared lib; the results: WIN32: *** test using GLUT *** cpu time: 1641 milliseconds effective time: 1.64645 seconds average fps: 607.367 *** test using osgviewer class only *** cpu time: 1656 milliseconds effective time: 1.66006 seconds average fps: 602.389 OSX: *** test using GLUT *** cpu time: 391.799 milliseconds effective time: 2.70822 seconds average fps: 369.246 *** test using osgviewer class only *** cpu time: 943.835 milliseconds effective time: 16.8232 seconds average fps: 59.4417
beside the performance difference (I guess because of the integrated intel graphics on my macbook), what I feel strange is that on win32 the osgviewer class is not bound to the 60Hz refresh rate, and the performances are consistent in GLUT/nonGLUT "mode" (607 vs 602 fps), while in OSX there is a huge difference between the two (369 vs 60 fps). Maybe this is already known, or it's simply a matter of better setting up the application. If the testcase is needed I can attach it (is it possible to this mailing list?) or paste the source code the the email, it's a single file. Or you can reproduce it using the standard "osgviewer" application distributed with osg. The calls I'm doing to create the viewer are basically: osgViewer::Viewer* viewer = new osgViewer::Viewer(); viewer->setSceneData( ****myscenenode*** ); viewer->setCameraManipulator(new osgGA::TrackballManipulator); viewer->addEventHandler(new osgViewer::StatsHandler); viewer->realize(); while (true) { // update the viewer viewer->frame(); (...) } thanks again! Davide > > Robert, > I set up a simple test, with only a rotating cube displayed with: > 1) osgviewer using GLUT > 2) osgviewer standalone class > > in both I used double-buffered 800x600 window. > I only tested on my mac yet, but tomorrow I will test on windows too. > The results are: > ** standalone ** > cpu time: 1001.35 milliseconds > effective time: 16.796 seconds > average fps: 59.538 > ** using glut ** > cpu time: 458.949 milliseconds > effective time: 2.71029 seconds > average fps: 368.964 > > I think that you were right and I was misinterpreting the results: it is > evident that the standalone osgviewer version is fixed on 60Hz, which is my > laptop display refresh rate. > The glut version seems not to be bound to the display refresh but the > doublebuffering is enabled... > Probably there is something I still ignore just under the hood, on how the > refresh is handled. > > The same difference appears with the standard "osgviewer" and > "osgviewerGLUT" applications built with cmake (in both 2.4.0 and 2.6.0) > > Tomorrow I will try on windows, with the same code. For what I observed, I > expect to have a fps higher to 60Hz there, I will let you know. > Just in case, is it possible to attach the testcase to a message directed > to > the mailing list? > > > thanks! >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org