From Farshid Lashakari, fixed popStateSet.

This commit is contained in:
Robert Osfield 2006-07-18 13:05:26 +00:00
parent 9790d15f30
commit 6b2d32baae

View File

@ -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;
}