diff options
-rw-r--r-- | src/gui/opengl/qopenglframebufferobject.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index c4deeea4c9..8d298496df 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -1484,8 +1484,10 @@ void QOpenGLFramebufferObject::blitFramebuffer(QOpenGLFramebufferObject *target, const int ty0 = targetRect.top(); const int ty1 = targetRect.top() + targetRect.height(); - extensions.glBindFramebuffer(GL_READ_FRAMEBUFFER, source ? source->handle() : 0); - extensions.glBindFramebuffer(GL_DRAW_FRAMEBUFFER, target ? target->handle() : 0); + const GLuint defaultFboId = ctx->defaultFramebufferObject(); + + extensions.glBindFramebuffer(GL_READ_FRAMEBUFFER, source ? source->handle() : defaultFboId); + extensions.glBindFramebuffer(GL_DRAW_FRAMEBUFFER, target ? target->handle() : defaultFboId); extensions.glBlitFramebuffer(sx0, sy0, sx1, sy1, tx0, ty0, tx1, ty1, |