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