From 4f684d16f25e5208a75df799ea375ba4422c54a2 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 7 Oct 2008 15:41:47 +0000 Subject: [PATCH] From Jean-Sebastien Guay and Robert Osfield, added setDataVariance(osg::DYNAMIC) to avoid problems to optimization. --- src/osgManipulator/Dragger.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osgManipulator/Dragger.cpp b/src/osgManipulator/Dragger.cpp index eb206e1d1..16a81c30e 100644 --- a/src/osgManipulator/Dragger.cpp +++ b/src/osgManipulator/Dragger.cpp @@ -42,6 +42,7 @@ bool PointerInfo::projectWindowXYIntoObject(const osg::Vec2& windowCoord, osg::V Dragger::Dragger() : _commandManager(0) { _parentDragger = this; + getOrCreateStateSet()->setDataVariance(osg::Object::DYNAMIC); } Dragger::~Dragger() @@ -142,6 +143,7 @@ void osgManipulator::setMaterialColor(const osg::Vec4& color, osg::Node& node) if (! mat) { mat = new osg::Material; + mat->setDataVariance(osg::Object::DYNAMIC); node.getOrCreateStateSet()->setAttribute(mat); } mat->setDiffuse(osg::Material::FRONT_AND_BACK, color);