[osg-users] Explicitly synchronize all viewer cameras?

Philipp Meyer philipp.meyer at fh-bielefeld.de
Tue Jul 5 00:29:42 PDT 2016


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!


Read this topic online here:

More information about the osg-users mailing list