Fixed warning of RenderLeaf's having multiple references in CullVisitor::createOrReuseRenderLeaf() but forcing a clean up of the StateGraph at the end of RenderStage::draw()

This commit is contained in:
Robert Osfield 2018-05-23 14:13:27 +01:00
parent f2012eeeb8
commit a6ef1cd66b

View File

@ -1314,6 +1314,9 @@ void RenderStage::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous)
// pop the render stages camera.
if (_camera.valid()) renderInfo.popCamera();
// clean up state graph to make sure RenderLeaf etc, can be reused
if (_rootStateGraph.valid()) _rootStateGraph->clean();
}
void RenderStage::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& previous)