Robert, thanks again.

Now it is clear what's happening and I try to work on forcing the frame rate
to 60 fps somehow.
Thanks again for helping me figuring out everything!

Davide

P.S.
I'm thinking about using a multithreaded approach, one thread for updating
the graphics, and one (or more) threads for the calculations (it's a physics
engine b.t.w.). Is there documentation or any good example of usage of
OpenThreads somewhere?


> Message: 18
> Date: Wed, 4 Feb 2009 09:55:45 +0000
> From: Robert Osfield <robert.osfi...@gmail.com>
> Subject: Re: [osg-users] OSX issue with the osgviewer class
> To: OpenSceneGraph Users <osg-users@lists.openscenegraph.org>
> Message-ID:
>        <7ffb8e9b0902040155i599422d7q56c814501adf4...@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Davide,
>
> The osgViewer will attempt by default to enable vysnc, but.. OpenGL
> drivers can override this.  Go have a look at you OpenGL driver
> settings for vysnc.
>
> BTW, it's perfectly ordinary and correct to expect a difference
> between vsync on/off.  For graphics development often you'll switch
> vsync off to get a feel for performance scaling, but for delivery of
> the application you almost always should enable vysnc as visual
> quality is far higher, and the compute system is more well balanced,
> and in terms of user interaction a frame rate higher than vsync is
> absolutely no use whatsoever.
>
> For my own work I almost always have vysnc on, only occasionally when
> I want to do some particular type of benchmarking do I disable vsync.
> When you have vsync on it's still possible to look at performance, for
> instance have a look at the on screen stats that the OSG provides -
> just run osgviewer on few different models and press 's' a couple of
> times to see the different types of stats available.
>
> You need to get over this present hurdle of understanding what is
> actually going on, once you have you'll know exactly why you are
> getting the results you are, and why there isn't anything at all to
> worry about, and finally you start looking at the real metrics that
> mean something.
>
> Robert.
>
> On Wed, Feb 4, 2009 at 9:35 AM, Davide Bacchet <davide.bacc...@gmail.com>
> wrote:
> > 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
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to