I am updating my scene graph in response to user input and the network. What is the best way to do this? The updating threads are separate. Some approaches I am thinking about:
double buffer. There are 2 copies of the scene graph, one is used for rendering and the other for updates. The rendering graph is updated at the end of the render loop. This update can be expensive for a large graph,
synchronization objects, like mutices, probably unsuitable,
dumping updating functors into a FIFO queue while rendering, then executing the functors at the end of the rendering loop. Updating the queue may block.
Is there something better and which approach is best?