how to update my scene graph? 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?
A few more options:


don't use a scenegraph. They don't map well to the data a gpu needs for rendering. A flat array of object tends to work much better for the cache as well
separate the scenegraph into render-related data and non-render-related data. Then only double buffer the render-related data. 

The render related data would end up in a flat array containing per rendered object: reference to the mesh, the final model matrix, a reference to the texture


Flat arrays are much easier to double buffer than node-based data structures.