Added support for osg::State::DynamicObjectCount into the RTT codes

This commit is contained in:
Robert Osfield
2007-02-14 20:44:17 +00:00
parent 87ff8e2b55
commit 1eea407ee0

View File

@@ -853,6 +853,8 @@ void RenderStage::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous)
// syncronize the frame stamps
useState->setFrameStamp(const_cast<osg::FrameStamp*>(state.getFrameStamp()));
useState->setDynamicObjectCount(state.getDynamicObjectCount());
useState->setDynamicObjectRenderingCompletedCallback(state.getDynamicObjectRenderingCompletedCallback());
if (!useThread) useContext->makeCurrent();
}
@@ -878,6 +880,12 @@ void RenderStage::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous)
}
if (useState != &state)
{
state.setDynamicObjectCount(useState->getDynamicObjectCount());
useState->setDynamicObjectRenderingCompletedCallback(0);
}
// now copy the rendered image to attached texture.
if (_texture.valid() && !doCopyTexture)