diff --git a/src/osgUtil/RenderStage.cpp b/src/osgUtil/RenderStage.cpp index 1da89cfba..cff65ccc9 100644 --- a/src/osgUtil/RenderStage.cpp +++ b/src/osgUtil/RenderStage.cpp @@ -853,6 +853,8 @@ void RenderStage::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous) // syncronize the frame stamps useState->setFrameStamp(const_cast(state.getFrameStamp())); + + // map the DynamicObjectCount across to the new window useState->setDynamicObjectCount(state.getDynamicObjectCount()); useState->setDynamicObjectRenderingCompletedCallback(state.getDynamicObjectRenderingCompletedCallback()); @@ -882,6 +884,7 @@ void RenderStage::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous) if (useState != &state) { + // reset the local State's DynamicObjectCount state.setDynamicObjectCount(useState->getDynamicObjectCount()); useState->setDynamicObjectRenderingCompletedCallback(0); }