"Martin Beckett" writes:

> I am modifying the scene, adding geometries, vertices etc and i have no 
> control over when a draw traversal takes place.
>
> I am being carefull to ensure the geometry is always valid, eg. by adding 
> vertices first then updating the PrimitiveSet but none of these operations 
> are really atomic.
>
> Is there some lock/unlock mechanism in OSG or I is it happening by magic?

This is done through the method Object::setDataVariance(), setting it to
STATIC or DYNAMIC. In your case, you should mark that object DYNAMIC in
order to prevent OSG accesing it while you are modifying the mesh.

--
Alberto
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to