From ce79b7efd50e7b086c12f8e16f97f771224bbbe1 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 2 Oct 2007 20:55:33 +0000 Subject: [PATCH] Added a #ifdef 0 code block to test setting of the StateSetManipulator's DataVariance to DYNAMIC to solve a threading issue relating to mixing of StateSetManipulator and DrawThreadPerContext. --- src/osgGA/StateSetManipulator.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/osgGA/StateSetManipulator.cpp b/src/osgGA/StateSetManipulator.cpp index a126b1284..30b56f900 100644 --- a/src/osgGA/StateSetManipulator.cpp +++ b/src/osgGA/StateSetManipulator.cpp @@ -33,6 +33,13 @@ StateSetManipulator::~StateSetManipulator() void StateSetManipulator::setStateSet(StateSet *stateset) { _stateset = stateset; +#if 0 + // specify that this stateset is dynamic so it prevents + // the draw and update phase from overlapping - good for + // stability but breaks all the performance advantage of + // DrawThreadPerContex. + _stateset->setDataVariance(osg::Object::DYNAMIC); +#endif } StateSet *StateSetManipulator::getStateSet()