Hi Nick, On 6 November 2017 at 00:56, Trajce Nikolov NICK <trajce.nikolov.n...@gmail.com> wrote: > I am trying to measure the time needed to process a frame. My first and > somewhat naïve approach is to init the timer at the beginning of the frame > and get the result after the renderingTraversal. But, it seams (and that is > what I believe it is happening) the rendering traversal is containing the > swap buffers which is synced with the refresh rate (please correct me if I > am wrong). Is there something like preswap callback or something like this?
Are you aware of the osg::Stats data structure and support built into osgViewer? The StatsHandler.cpp that provides the on-screen stats enables stats collection and then gets the stats from the osg::Stats objects. Various parts of the OSG check for the osg::Stats objects and then fill in the details when required. The osg::Stats objects are designed to queried by users. Just have a look at how src/osgViewer/StatsHandler.cpp sets things up. Robert _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org