[osg-users] Explicitly synchronize all viewer cameras?

Robert Osfield robert.osfield at gmail.com
Tue Jul 5 00:32:09 PDT 2016


Hi Philipp,

The osg::Stats class can be used to collect stats on all the
traversals.  Have a look how the StatsHandler gets the stats, see
src/osgViewer/StatsHander.cpp.

Robert.

On 5 July 2016 at 08:29, Philipp Meyer <philipp.meyer at fh-bielefeld.de> wrote:
> Hi,
>
> thanks for your (as always) really quick response!
> I'm trying to achieve various things. As a simple example, I want to measure the time it takes to render 1 frame (CPU and GPU time).
> For that, I used something along the lines of:
>
>
>> //..
>>         start = highPrecisionTimer.now();
>>         viewer->advance();
>>       viewer->eventTraversal();
>>       viewer->updateTraversal();
>>       viewer->renderingTraversals();
>>
>> //at this point, I would need some sort of barrier (like joining all threads?)
>>
>> glFinish() //make sure GPU is done, too.
>> end = highPrecisionTimer.now();
>> //...
>
>
> But since I switched to ThreadPerCamera, to my understanding, this will no longer work. How would I go about something simple like this? Is there any example code I could look at regarding the graphicsOperation and barrier?
>
> Thank you!
>
> Cheers,
> Philipp
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=68003#68003
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list