Hi Gordon, On Sun, Mar 16, 2008 at 4:22 PM, Gordon Tomlinson <[EMAIL PROTECTED]> wrote: > Could not wait until Monday so I came in to work test your suggestion ;) > > Setting the data variance to dynamic seems to have fix the issue, one to > remember
The requirement for setting Drawables and StateSets DataVariance to DYNAMIC when modifying them during the frame (i.e. via update or event callback) has been introduced as a means controlling the overlap between the rendering of the previous frame and the update,cull and draw traversals of the next so that rendering objects aren't modified at the same times as they are read from. This is only required in DrawThreadPerContex and CullThreadPerCameraDrawThreadPerContext threading models. Prior to osgViewer/2.x the scene graph + Producer never allowed this level of parallelism so the frames never overlapped - and there was never an issue with the scene graph being modified at the same time as its been read from. You can still use the old Producer style threading model by select CullDrawTheadPerContext which is equivalent to Producer's ThreadPerCamera. One thing to note is that Producer only did ThreadPerCamera when there was one Camera per RenderSurface, so in effect its ThreadPerRenderSurface or in OSG 2.x speak is (CullDraw)ThreadPerContext, however if you have more than one Camera per RenaderSurface in Producer it drops down to SingleThreaded, which osgViewer still keeps threading CullDrawThreadPerContext. The upshot of these different threading models is that 2.x/osgViewer by default more multi-threaded than the conterpart of 1.x/osgProducer, and as a consequence one does have to take care about the rules of modification have enhanced with it. There has been lots of discussion about osgViewer and its threading model over the past year so I'd recommend doing a search for some of the above threading models in the osg-users archives. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org