diff --git a/examples/osgsimplegl3/osgsimplegl3.cpp b/examples/osgsimplegl3/osgsimplegl3.cpp index c1385d5d9..6a35b1fb6 100644 --- a/examples/osgsimplegl3/osgsimplegl3.cpp +++ b/examples/osgsimplegl3/osgsimplegl3.cpp @@ -16,7 +16,7 @@ #include #include #include - +#include void configureShaders( osg::StateSet* stateSet ) { @@ -73,6 +73,10 @@ int main( int argc, char** argv ) osg::notify( osg::FATAL ) << "Unable to load model from command line." << std::endl; return( 1 ); } + + osgUtil::Optimizer optimizer; + optimizer.optimize(root.get(), osgUtil::Optimizer::ALL_OPTIMIZATIONS | osgUtil::Optimizer::TESSELLATE_GEOMETRY); + configureShaders( root->getOrCreateStateSet() ); const int width( 800 ), height( 450 );