From 5325653f300077aece1e6199c71be826b9c7dc99 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 25 Apr 2007 10:32:28 +0000 Subject: [PATCH] Cleaned up numToTop method --- include/osgUtil/StateGraph | 2 +- src/osgUtil/RenderBin.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/osgUtil/StateGraph b/include/osgUtil/StateGraph index 66df68b8d..8922a9c16 100644 --- a/include/osgUtil/StateGraph +++ b/include/osgUtil/StateGraph @@ -279,7 +279,7 @@ class OSGUTIL_EXPORT StateGraph : public osg::Referenced } - inline static int numToPop(osg::State& state,StateGraph* sg_curr) + inline static int numToPop(StateGraph* sg_curr) { int numToPop = 0; // need to pop back all statesets and matrices. diff --git a/src/osgUtil/RenderBin.cpp b/src/osgUtil/RenderBin.cpp index aead4906f..23ab70c88 100644 --- a/src/osgUtil/RenderBin.cpp +++ b/src/osgUtil/RenderBin.cpp @@ -377,7 +377,7 @@ void RenderBin::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& prev // osg::notify(osg::NOTICE)<<"begin RenderBin::drawImplementation "<_parent) : 0); + unsigned int numToPop = (previous ? StateGraph::numToPop(previous->_parent) : 0); if (numToPop>1) --numToPop; unsigned int insertStateSetPosition = state.getStateSetStackSize() - numToPop;