From c2e79a2d89195023f1f2f6152e7a2d5cf6fe4741 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 7 Feb 2007 16:27:48 +0000 Subject: [PATCH] Set the DataVariance to DYNAIMC for the StateSet of with the dynamically updating Uniform --- examples/osgparametric/osgparametric.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/osgparametric/osgparametric.cpp b/examples/osgparametric/osgparametric.cpp index 252d41918..8ac767d40 100644 --- a/examples/osgparametric/osgparametric.cpp +++ b/examples/osgparametric/osgparametric.cpp @@ -114,6 +114,7 @@ osg::Node* createModel(const std::string& shader, const std::string& textureFile osg::Uniform* coeff = new osg::Uniform("coeff",osg::Vec4(1.0,-1.0f,-1.0f,1.0f)); coeff->setUpdateCallback(new UniformVarying); stateset->addUniform(coeff); + stateset->setDataVariance(osg::Object::DYNAMIC); } else if (shader=="matrix") {