From 53b8c12813f0c393dd8cfb7e07f15553277b2187 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 9 Mar 2011 11:22:20 +0000 Subject: [PATCH] From Dietmar Funck, "I've noticed an issue with osgUtil::RenderStage::runCameraSetUp() if the number of buffer attachments of the camera decreases according to privous calls. This happens because RenderStage::_bufferAttachmentMap is updated only for the number of buffers the camera has when runCameraSetUp is called. For example if there were 4 attachments and now only 3, only the first three elements of _bufferAttachmentMap are changed. The fourth is just as before - however it shouldn't be there. Calling _bufferAttachmentMap.clear() before resolves this problem. " --- src/osgUtil/RenderStage.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osgUtil/RenderStage.cpp b/src/osgUtil/RenderStage.cpp index 2bdd86fb2..642b77deb 100644 --- a/src/osgUtil/RenderStage.cpp +++ b/src/osgUtil/RenderStage.cpp @@ -234,6 +234,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) osg::Camera::BufferAttachmentMap& bufferAttachments = _camera->getBufferAttachmentMap(); + _bufferAttachmentMap.clear(); // compute the required dimensions int width = static_cast(_viewport->x() + _viewport->width());