From def04324a453813b586f03e6cabc5eefccc05804 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 10 Nov 2009 11:34:57 +0000 Subject: [PATCH] Added the default usage of ShaderGenVisitor to help with GLES2 testing. --- src/osgViewer/View.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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;