diff --git a/src/osgUtil/RenderBin.cpp b/src/osgUtil/RenderBin.cpp index a36c64fea..aead4906f 100644 --- a/src/osgUtil/RenderBin.cpp +++ b/src/osgUtil/RenderBin.cpp @@ -370,9 +370,6 @@ void RenderBin::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous) else drawImplementation(renderInfo,previous); } -#define NEW_STATECODE -//#define OLD_STATECODE - void RenderBin::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& previous) { osg::State& state = *renderInfo.getState(); @@ -380,10 +377,6 @@ void RenderBin::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& prev // osg::notify(osg::NOTICE)<<"begin RenderBin::drawImplementation "<_parent) : 0); if (numToPop>1) --numToPop; unsigned int insertStateSetPosition = state.getStateSetStackSize() - numToPop; @@ -393,23 +386,6 @@ void RenderBin::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& prev state.insertStateSet(insertStateSetPosition, _stateset.get()); } -#else - - unsigned int stateSetStackSize = state.getStateSetStackSize(); - - previous = 0; - - if (_stateset.valid()) - { - // first need to flush the stack - - // now its safe to push RenderBin's StateSet as we now know its the root. - state.pushStateSet(_stateset.get()); - state.apply(); - } - -#endif -#endif // draw first set of draw bins. RenderBinList::iterator rbitr; @@ -479,25 +455,12 @@ void RenderBin::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& prev rbitr->second->draw(renderInfo,previous); } -#ifndef OLD_STATECODE -#ifdef NEW_STATECODE - if (_stateset.valid()) { state.removeStateSet(insertStateSetPosition); - state.apply(); + // state.apply(); } -#else - if (stateSetStackSize!=state.getStateSetStackSize()) - { - state.popStateSetStackToSize(stateSetStackSize); - } - - previous = 0; -#endif -#endif - // osg::notify(osg::NOTICE)<<"end RenderBin::drawImplementation "<