From 6deefe0646c6aa426371042a4951ba58d30e0f98 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 3 Feb 2017 18:10:37 +0100 Subject: [PATCH] Remove seemingly redundant handling of Geode in GLObjectsVisitor --- include/osgUtil/GLObjectsVisitor | 5 ----- src/osgUtil/GLObjectsVisitor.cpp | 22 ---------------------- 2 files changed, 27 deletions(-) diff --git a/include/osgUtil/GLObjectsVisitor b/include/osgUtil/GLObjectsVisitor index e2a075145..b9a130f3e 100644 --- a/include/osgUtil/GLObjectsVisitor +++ b/include/osgUtil/GLObjectsVisitor @@ -94,11 +94,6 @@ class OSGUTIL_EXPORT GLObjectsVisitor : public osg::NodeVisitor /** Simply traverse using standard NodeVisitor traverse method.*/ virtual void apply(osg::Node& node); - /** For each Geode visited set the display list usage according to the - * _displayListMode. - */ - virtual void apply(osg::Geode& node); - void apply(osg::Drawable& drawable); void apply(osg::StateSet& stateset); diff --git a/src/osgUtil/GLObjectsVisitor.cpp b/src/osgUtil/GLObjectsVisitor.cpp index 3731cfd34..b194b7990 100644 --- a/src/osgUtil/GLObjectsVisitor.cpp +++ b/src/osgUtil/GLObjectsVisitor.cpp @@ -53,28 +53,6 @@ void GLObjectsVisitor::apply(osg::Node& node) } } -void GLObjectsVisitor::apply(osg::Geode& node) -{ - bool programSetBefore = _lastCompiledProgram.valid(); - - if (node.getStateSet()) - { - apply(*(node.getStateSet())); - } - - traverse(node); - - bool programSetAfter = _lastCompiledProgram.valid(); - if (!programSetBefore && programSetAfter) - { - osg::State* state = _renderInfo.getState(); - osg::GLExtensions* extensions = state->get(); - extensions->glUseProgram(0); - state->setLastAppliedProgramObject(0); - _lastCompiledProgram = 0; - } -} - void GLObjectsVisitor::apply(osg::Drawable& drawable) { if (_drawablesAppliedSet.count(&drawable)!=0) return;