Hi Robert,

Robert Osfield wrote:
Hi Alexander,

Are you dynamically modifying the text?  If so then just set the
DataVariance of the Text objects to DYNAMIC.

Explanation : When running in DrawThreadPerContext, and
CullThreadPerCameraDrawThreadPerContext the update,cull of the next
frame is allowed to overlap with rendering of the previous frame.
This also means that their is potential for the update phase to be
modifying the scene graph at the same time that its being read - which
causes crashes.  The mechinism for prevent these read/write collisions
is to set the dynamically modified Drawables and
StateSet/StateAttribute to have a DataVariance of DYNAMIC, and then
the rendering traversal then holds back the next frame till all
DYNAMIC objects have been drawn.

This topic has been written about lots of time on osg-users over the
past year, and also mentioned in the Quick Start Guide.

yes, I dynamically modify text a lot in my application and setting the DataVariance correctly completely resolved the issue for now. I've used DataVariance a lot, but saw it more as an optimization device and didn't know that setting it wrong could cause such problems.

Thanks a lot for your immediate help,
Alex.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to