diff --git a/src/osgUtil/RenderStage.cpp b/src/osgUtil/RenderStage.cpp index da456235e..53314ff9d 100644 --- a/src/osgUtil/RenderStage.cpp +++ b/src/osgUtil/RenderStage.cpp @@ -989,8 +989,10 @@ void RenderStage::drawInner(osg::RenderInfo& renderInfo,RenderLeaf*& previous, b // framebuffer is multisampled then the dimension arguments are ignored // and the whole framebuffer is always copied. fbo_ext->glBlitFramebuffer( - 0, 0, static_cast(_viewport->width()), static_cast(_viewport->height()), - 0, 0, static_cast(_viewport->width()), static_cast(_viewport->height()), + static_cast(_viewport->x()), static_cast(_viewport->y()), + static_cast(_viewport->x() + _viewport->width()), static_cast(_viewport->y() + _viewport->height()), + static_cast(_viewport->x()), static_cast(_viewport->y()), + static_cast(_viewport->x() + _viewport->width()), static_cast(_viewport->y() + _viewport->height()), blitMask, GL_NEAREST); } @@ -1008,8 +1010,10 @@ void RenderStage::drawInner(osg::RenderInfo& renderInfo,RenderLeaf*& previous, b glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT + (attachment - osg::Camera::COLOR_BUFFER0)); fbo_ext->glBlitFramebuffer( - 0, 0, static_cast(_viewport->width()), static_cast(_viewport->height()), - 0, 0, static_cast(_viewport->width()), static_cast(_viewport->height()), + static_cast(_viewport->x()), static_cast(_viewport->y()), + static_cast(_viewport->x() + _viewport->width()), static_cast(_viewport->y() + _viewport->height()), + static_cast(_viewport->x()), static_cast(_viewport->y()), + static_cast(_viewport->x() + _viewport->width()), static_cast(_viewport->y() + _viewport->height()), GL_COLOR_BUFFER_BIT, GL_NEAREST); } }