Hi Emmanuel,

I strongly recommend that you using osgViewer's support for
multi-threading, it will manage multiple views onto one or more scene
graphs safely.

The only time that it isn't safe to modify the scene graph is when
Viewer::renderingTraversals is running.

One things I've considering is adding a read/writre mutex
osgViewer::Scene which would facilate the types of operations that you
wish to do.

Robert.

On 4/5/07, Emmanuel Roche <[EMAIL PROTECTED]> wrote:
Hello again,

I have another question concerning multithreading issues:

for example, is it possible to :

1) lock a scene graph in thread 1
2) perform cull() with a sceneView
3) unlock the graph

4) lock the graph in thread 2
5) modify somthing (could be anything: a nodemask, an osgText::Text color,
an attitude, etc...)
6) unlock the graph

7) lock the graph again in thread 1
8) perform draw() with the previous sceneView
9) unlock the graph


... this is the whole story of my life in fact... So any explanation on why
this is safe or unsafe would be really helpful :-)


regards,
Emmanuel.

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to