[osg-users] Explicitly synchronize all viewer cameras?

Philipp Meyer philipp.meyer at fh-bielefeld.de
Mon Jul 4 07:25:31 PDT 2016


I'm using multiple cameras and want them to render the scene in parallel to increase GPU load. For that, I set the threading model of my Viewer to "ThreadPerCamera".

That all works fine, however, I'm facing the issue that the viewer seems to begin the next frame before the current frame is completed. (Or with other words: viewer.renderingTraversals() does not seem to block long enough for my needs).

I can not have that happen because of some additional logic I'm performing in my program main loop. Is there any way I can wait until all cameras have completed their frame? Ive messed with the viewers end barrier and frame policies with no success. Some older tutorials also mention a "sync()" method, however it does not seem to exist any longer. I also cant find any other methods within the viewer related to synchronization.

Thank you!


Read this topic online here:

More information about the osg-users mailing list