From 66274a632a9f999a4b05c8a22c4dd453b41fed30 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 13 Feb 2007 09:38:07 +0000 Subject: [PATCH] Changed the BlendFunction StateSet to DYNAMIC --- examples/osgblendequation/osgblendequation.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/examples/osgblendequation/osgblendequation.cpp b/examples/osgblendequation/osgblendequation.cpp index 9fa647a14..26acb8398 100644 --- a/examples/osgblendequation/osgblendequation.cpp +++ b/examples/osgblendequation/osgblendequation.cpp @@ -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 );