Set the DataVariance to DYNAIMC for the StateSet of with the dynamically updating Uniform

This commit is contained in:
Robert Osfield
2007-02-07 16:27:48 +00:00
parent 945faf0133
commit c2e79a2d89

View File

@@ -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")
{