Set the DataVariance to DYNAIMC for the StateSet of with the dynamically updating Uniform
This commit is contained in:
@@ -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")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user