From 9076fba7ad1f8c4bde69169d3a91d7fa77a34d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 18 Sep 2009 13:41:07 +0200 Subject: Fixed bug in GL pixmap backend (causing missing rendering in lance). Since copyBackFromRenderFbo() manually changes the framebuffer object binding, we also need to update the context's current_fbo member. Reviewed-by: Kim --- src/opengl/qpixmapdata_gl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index 3bc0d4f..8cb6c8d 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -486,8 +486,12 @@ void QGLPixmapData::copyBackFromRenderFbo(bool keepCurrentFboBound) const GL_COLOR_BUFFER_BIT, GL_NEAREST); - if (keepCurrentFboBound) + if (keepCurrentFboBound) { glBindFramebuffer(GL_FRAMEBUFFER_EXT, ctx->d_ptr->current_fbo); + } else { + glBindFramebuffer(GL_DRAW_FRAMEBUFFER_EXT, m_renderFbo->handle()); + ctx->d_ptr->current_fbo = m_renderFbo->handle(); + } } bool QGLPixmapData::useFramebufferObjects() -- cgit v0.12