There are two general scenarios for using multiple threads with Open Inventor:
So the critical issue for worker threads is how to safely modify the scene graph from a separate thread. This is accomplished using the methods SoDB::writelock() and SoDB::writeunlock() as described in Modifying the Scene Graph.
Render threads are used for multi-pipe rendering. Although one thread can render to multiple pipes (sequentially), it is more efficient to render to each pipe with a separate thread. All the render threads traverse the scene graph simultaneously so that rendering can occur in parallel. So the critical issue for render threads is how to ensure that multiple threads can safely traverse the same scene graph, even the same node, simultaneously. For the standard Open Inventor nodes this is handled automatically. An application using custom nodes or SoCallback nodes may need to be modified as described in Custom Nodes Introduction. Open Inventor is “multi-pipe capable” without any additional software, but it is convenient to delegate creation and management of the render threads to add-on software such as CAVELib from VRCO, and others. Examples of using Open Inventor with these products can be found in the Open Inventor SDK installation as follows:
$OIVHOME/src/Inventor/contrib/ImmersiveVR/CAVELib