HI Stephan,

Any Drawable or StateSet that is modified needs to have its
DataVariance set to DYNAMIC when you take advantage of the
DrawThreadPerContext and CullThreadPerCameraDrawThreadPerContext
threading models.

This prevents the next frame from starting till all the dynamic bits
of the scene graph being drawn are dispatched into the OpenGL fifo,
and therefore prevents you from modifying things at the same time they
are being read from.

Robert.

On 11/1/07, Stephan Maximilian Huber <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am updating to osg2.2 and wnat to use the new threading models, but I
> am experiencing problems when using a threading model different to
> SingleThreaded.
>
> So when it is safe to modify the scenegraph? My scenegraph is very
> dynamic, lots of geometries get added, recomputed or removed.
>
> my run-loop looks something like this
>
> while(!_done) {
>
>   // do my animations
>   af->animate();
>
>   advance();
>   eventTraversal();
>   updateTraversal();
>   renderingTraversal();
> }
>
> One of the observed problems is a crash, when I dirty the displaylist of
> a geometry (inside animate()) and when this geometry get drawn at the
> same time. My code Crashes with threading-model
> cullThreadPerCameraDrawThreadPerContext, all other seem to work.
>
> So, when it is safe to modify the scenegraph?
>
> thanks,
> Stephan
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to