Changed the BlendFunction StateSet to DYNAMIC

This commit is contained in:
Robert Osfield
2007-02-13 09:38:07 +00:00
parent 264d69e0c9
commit 66274a632a

View File

@@ -132,8 +132,11 @@ int main( int argc, char **argv )
root->addChild(loadedModel);
osg::StateSet* stateset = new osg::StateSet;
osg::StateSet* stateset = new osg::StateSet;
stateset->setDataVariance(osg::Object::DYNAMIC);
osg::BlendEquation* blendEquation = new osg::BlendEquation(osg::BlendEquation::FUNC_ADD);
blendEquation->setDataVariance(osg::Object::DYNAMIC);
stateset->setAttributeAndModes(blendEquation,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
@@ -144,11 +147,6 @@ int main( int argc, char **argv )
viewer.addEventHandler(new TechniqueEventHandler(blendEquation));
// run optimization over the scene graph
osgUtil::Optimizer optimzer;
optimzer.optimize(root);
// add a viewport to the viewer and attach the scene graph.
viewer.setSceneData( root );