diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-04-20 10:23:48 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-04-20 10:23:48 (GMT) |
commit | 4b4d4b3d7ae4ad019963d957831c46daacba62f7 (patch) | |
tree | 541d078fc2c5ee9ee3dbe99c310e9d96efd9e89e /src/opengl/qpixmapdata_gl.cpp | |
parent | 8027a669e31d2fc96f9ffdfc0771034571dd583e (diff) | |
download | Qt-4b4d4b3d7ae4ad019963d957831c46daacba62f7.zip Qt-4b4d4b3d7ae4ad019963d957831c46daacba62f7.tar.gz Qt-4b4d4b3d7ae4ad019963d957831c46daacba62f7.tar.bz2 |
Prevent copy back from FBO when initializing render FBO from texture.
Diffstat (limited to 'src/opengl/qpixmapdata_gl.cpp')
-rw-r--r-- | src/opengl/qpixmapdata_gl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index 1c5056d..1fa5b47 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -301,7 +301,7 @@ void QGLPixmapData::copyBackFromRenderFbo(bool keepCurrentFboBound) const GL_NEAREST); if (keepCurrentFboBound) - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_ctx->d_ptr->current_fbo); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, ctx->d_ptr->current_fbo); } void QGLPixmapData::swapBuffers() @@ -394,9 +394,9 @@ QPaintEngine* QGLPixmapData::paintEngine() const return m_engine; } -GLuint QGLPixmapData::bind() const +GLuint QGLPixmapData::bind(bool copyBack) const { - if (m_renderFbo) + if (m_renderFbo && copyBack) copyBackFromRenderFbo(true); else ensureCreated(); |