From 6b2d32baaef5110db6f07e8defcc13220d162bb7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 18 Jul 2006 13:05:26 +0000 Subject: [PATCH] From Farshid Lashakari, fixed popStateSet. --- include/osgUtil/CullVisitor | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/osgUtil/CullVisitor b/include/osgUtil/CullVisitor index ab4a5194d..0b7f231b6 100644 --- a/include/osgUtil/CullVisitor +++ b/include/osgUtil/CullVisitor @@ -109,6 +109,10 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac inline void popStateSet() { const osg::StateSet* ss = _currentStateGraph->_stateset; + if (ss->getRenderBinMode()==osg::StateSet::OVERRIDE_RENDERBIN_DETAILS) + { + --_numberOfEncloseOverrideRenderBinDetails; + } if (_numberOfEncloseOverrideRenderBinDetails==0 && ss->useRenderBinDetails() && !ss->getBinName().empty()) { if (_currentRenderBin->getParent()) @@ -116,10 +120,6 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac _currentRenderBin = _currentRenderBin->getParent(); } } - if (ss->getRenderBinMode()==osg::StateSet::OVERRIDE_RENDERBIN_DETAILS) - { - --_numberOfEncloseOverrideRenderBinDetails; - } _currentStateGraph = _currentStateGraph->_parent; }