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.
"
This commit is contained in:
Robert Osfield
2011-03-09 11:22:20 +00:00
parent 03886147ad
commit 53b8c12813

View File

@@ -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<int>(_viewport->x() + _viewport->width());