Avoiding conflicting modifications

We have discussed OSG's multithread implementation and thread safety in a very simple and easy way. The theory of the processing architecture is really out of the scope of this book. But in order to show the importance of maintaining data variance of scene objects, we need to briefly talk about the threading model.

OSG can make the draw traversal, which transfers data to the OpenGL pipeline run in a separated thread. It must be synchronized with other draw traversals in every frame, but part of the draw traversal can usually overlap the update traversal coming from the next frame, which improves the rendering efficiency and reduces frame latency. That means that the frame() method of osgViewer::Viewer will return ...

Get OpenSceneGraph 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.