summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qwindowsurface_gl.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index d602000..e84bc29 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -574,7 +574,9 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
const int ty1 = parent->height() - rect.top();
if (window() == parent || d_ptr->fbo->format().samples() <= 1) {
- // glBindFramebuffer(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ if (ctx->d_ptr->current_fbo != 0)
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER_EXT, 0);
+
glBindFramebuffer(GL_READ_FRAMEBUFFER_EXT, d_ptr->fbo->handle());
glBlitFramebufferEXT(sx0, sy0, sx1, sy1,
@@ -607,6 +609,8 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
qgl_fbo_pool()->release(temp);
}
+
+ ctx->d_ptr->current_fbo = 0;
}
#if !defined(QT_OPENGL_ES_2)
else {