diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2010-09-09 15:31:28 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2010-09-09 15:47:50 (GMT) |
commit | 7670e34120843c08de70f3a5db0816aeeff9dcc8 (patch) | |
tree | db1ebd636877e58b93330bd1565f4ee8b5d7f82d /src/opengl | |
parent | 6b7f0bb52f10a03758b5625bd7112d214627812a (diff) | |
download | Qt-7670e34120843c08de70f3a5db0816aeeff9dcc8.zip Qt-7670e34120843c08de70f3a5db0816aeeff9dcc8.tar.gz Qt-7670e34120843c08de70f3a5db0816aeeff9dcc8.tar.bz2 |
Make sure we blit to the correct FBO in the GL window surface.
Reviewed-by: Trond
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qwindowsurface_gl.cpp | 6 |
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 { |