Added osg::RenderInfo::pushRenderBin()/popRenderBin() and RenderInfo::getRenderBinStack() and getCameraStack() access methods for getting access to the current RenderBin/RenderStage.

This commit is contained in:
Robert Osfield
2013-08-01 07:19:45 +00:00
parent 364e2765e7
commit 07365c1073
2 changed files with 27 additions and 7 deletions

View File

@@ -421,11 +421,15 @@ RenderBin* RenderBin::find_or_insert(int binNum,const std::string& binName)
void RenderBin::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous)
{
renderInfo.pushRenderBin(this);
if (_drawCallback.valid())
{
_drawCallback->drawImplementation(this,renderInfo,previous);
}
else drawImplementation(renderInfo,previous);
renderInfo.popRenderBin();
}
void RenderBin::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& previous)