diff --git a/src/osgViewer/View.cpp b/src/osgViewer/View.cpp index 255a31cde..f9966d0cf 100644 --- a/src/osgViewer/View.cpp +++ b/src/osgViewer/View.cpp @@ -23,6 +23,7 @@ #include #include +#include #include using namespace osgViewer; @@ -275,7 +276,12 @@ void View::setSceneData(osg::Node* node) } if (getSceneData()) - { + { + #if defined(OSG_GLES2_AVAILABLE) + osgUtil::ShaderGenVisitor sgv; + getSceneData()->accept(sgv); + #endif + // now make sure the scene graph is set up with the correct DataVariance to protect the dynamic elements of // the scene graph from being run in parallel. osgUtil::Optimizer::StaticObjectDetectionVisitor sodv;