unsigned int DepthPeelBin::drawInit( osg::State& state, osgUtil::RenderLeaf*& previous ) { TRACEDUMP("DepthPeelBin::drawInit"); unsigned int numToPop = (previous ? osgUtil::StateGraph::numToPop(previous->_parent) : 0); if (numToPop>1) --numToPop; unsigned int insertStateSetPosition = state.getStateSetStackSize() - numToPop; if (_stateset.valid()) { state.insertStateSet(insertStateSetPosition, _stateset.get()); } return( insertStateSetPosition ); }