Hi, just to clarify some points for me. This means:
- setDataVariance is a no-op for osg::Node and derived classes - with all ThreadingModels, I am allowed to modify all scene graph data except non-DYNAMIC Drawables and StateSet's after Viewer::frame() has returned - for best performance, I should try to put all DYNAMIC Drawables and StateSets in a special RenderBin which has a very low number - the OSG Quick Start Guide (section 3.2.1/pages 88/89) is a bit more conservative than necessary in its explanation when it is allowable to modify the scene graph: there, even classes derived from Nodes are marked as DYNAMIC and they are only modified during the update traversal via an update callback Thank you for clearing this up, Martin On Friday 18 May 2007, Robert Osfield wrote: > Hi Ewe, > > If you are modifying Drawables and StateSet's and use > CullThreadPerCameraDrawThreadPerContext or DrawThreadPerContext then > you must set the DataVariance to DYNAMIC on these Drawables and > StateSet's so that the draw traversals can sync properly with the > barrier in Viewer::renderingTraversals(). > > Robert. > > On 5/18/07, Uwe Woessner <[EMAIL PROTECTED]> wrote: > > Hi Robert, > > > > I want to use osgViewer with CullThreadPerCameraDrawThreadPerContext. > > when is a safe time to: > > change text > > add nodes > > remove nodes > > change a transformation matrix > > > > Do I have to add a separate threading model which adds a synchronization > > point between the cull, draw and application threads? So that I have a > > possibility to safely modify the scenegraph? > > > > Uwe > > > > Robert Osfield wrote: > > > Hi Ewe, > > > > > > The OSG is designed so that you don't modify the scene at the same > > > time as its being read, if you are doing this then this isn't legal > > > OSG usage. > > > > > > The use of mutexes to allow to you to modify at the same time as > > > objects are begin read really isn't 100% either, as this can lead to > > > data being in an inconsistent state - i.e. cull traversal has rejected > > > or accepted a text based on its bounding volume, then you go an > > > changed it during the draw. The only safe way to this type of > > > operation is to multi-buffer, and this is another whole can of worms. > > > > > > There is also the performance aspect of have lots of mutexes that need > > > to be locked on extra draw, this is really bad for performance on not > > > something I'm going to merge. > > > > > > So.... please work out why you are trying to modify the scene graph > > > while its been drawn and fix this. > > > > > > Robert. > > > > > > On 5/18/07, Uwe Woessner <[EMAIL PROTECTED]> wrote: > > >> Hello Robert, > > >> > > >> we had occasional coredumps when we dynamically changed text. > > >> When changing text with setText, the font's _ _glyphs list has been > > >> extended while at the same time it has been read during apply in the > > >> draw thread. I protected the list access through a mutex. > > >> See attached Font and Font.cpp. > > >> It should not be too much of a performance issue. > > >> I did not have any more coredumps with Multithreading enabled, > > >> fingers crossed, I hope this will stay that way. > > >> > > >> Uwe > > >> > > >> > > >> -- > > >> > > >> \\\|/// *HLRS, High Performance Computing Center > > >> Stuttgart* _I_ ( o o ) *Visualization/VR* > > >> _I_ > > >> ([EMAIL > > >> PROTECTED])--oo0O--(_)--O0oo------------------------------------------([EMAIL > > >> PROTECTED]) > > >> > > >> | | Uwe Woessner [EMAIL PROTECTED] | | > > >> | | .ooo0 http://www.hlrs.de/people/woessner/ | | > > >> | > > >> |_| ( ) Oooo. Phone: +49-711-6856-5790 or ...-5970 |_| > > >> > > >> ([EMAIL PROTECTED])-------\ (---( > > >> )-----------------------------------------([EMAIL PROTECTED]) > > >> I \_) ) / I > > >> (_/ > > >> > > >> _______________________________________________ > > >> 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/ > > > > -- > > > > \\\|/// *HLRS, High Performance Computing Center Stuttgart* > > _I_ ( o o ) *Visualization/VR* _I_ > > ([EMAIL > > PROTECTED])--oo0O--(_)--O0oo------------------------------------------([EMAIL > > PROTECTED]) > > > > | | Uwe Woessner [EMAIL PROTECTED] | | > > | | .ooo0 http://www.hlrs.de/people/woessner/ | | > > | > > |_| ( ) Oooo. Phone: +49-711-6856-5790 or ...-5970 |_| > > > > ([EMAIL PROTECTED])-------\ (---( > > )-----------------------------------------([EMAIL PROTECTED]) > > I \_) ) / I > > (_/ > > _______________________________________________ > > 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/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
