diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-09-11 14:09:47 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-09-11 14:42:56 (GMT) |
commit | 3fed939e82e4946546775602f4898c363871c3f2 (patch) | |
tree | 7ae06261c354289783747704fc5e4129837c31c2 /src/opengl/qglframebufferobject.cpp | |
parent | 33d1c616d8d4085ba6fa848bafaec66576eba224 (diff) | |
download | Qt-3fed939e82e4946546775602f4898c363871c3f2.zip Qt-3fed939e82e4946546775602f4898c363871c3f2.tar.gz Qt-3fed939e82e4946546775602f4898c363871c3f2.tar.bz2 |
Made GL window surface work better with native child widgets.
Need to unbind the window surface FBO and re-bind it in the child
widget's context before doing a blit.
Reviewed-by: Kim
Diffstat (limited to 'src/opengl/qglframebufferobject.cpp')
-rw-r--r-- | src/opengl/qglframebufferobject.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index f15aa01..81f2aa9 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -854,6 +854,7 @@ bool QGLFramebufferObject::bind() d->valid = d->checkFramebufferStatus(); const QGLContext *context = QGLContext::currentContext(); if (d->valid && context) { + Q_ASSERT(QGLContextPrivate::contextGroup(context) == ctx); // Save the previous setting to automatically restore in release(). if (context->d_ptr->current_fbo != d->fbo) { d->previous_fbo = context->d_ptr->current_fbo; @@ -885,6 +886,7 @@ bool QGLFramebufferObject::release() const QGLContext *context = QGLContext::currentContext(); if (context) { + Q_ASSERT(QGLContextPrivate::contextGroup(context) == ctx); // Restore the previous setting for stacked framebuffer objects. if (d->previous_fbo != context->d_ptr->current_fbo) { context->d_ptr->current_fbo = d->previous_fbo; |