diff options
| author | Samuel Rødal <[email protected]> | 2014-10-31 16:56:25 +0100 |
|---|---|---|
| committer | Samuel Rødal <[email protected]> | 2014-11-11 19:24:29 +0100 |
| commit | a4428d480b96d51f9979d45044f26c99fa82f465 (patch) | |
| tree | 6b028915378463615bb1ea2cc5a9ad9b25186183 /src/gui/kernel/qopenglcontext_p.h | |
| parent | 459a32e39b45de7f857c090427f29749bf801c49 (diff) | |
Fix for current_fbo getting out of sync in QtOpenGL
When using QGLWidget in combination with QOpenGLFramebufferObject from
QtGui, instead of QGLFramebufferObject from QtOpenGL, the current_fbo
variable doesn't get updated when framebuffer object bindings change.
To ensure that the QGLWidget correctly releases the currently bound
framebuffer object when using a QPainter, we keep track of whether
QOpenGLFramebufferObject has modified the current FBO binding, and if
that's the case we need to read the OpenGL state directly instead of
relying on a cached value.
Change-Id: If7e0bd936e202cad07365b5ce641ee01d2251930
Reviewed-by: Laszlo Agocs <[email protected]>
Diffstat (limited to 'src/gui/kernel/qopenglcontext_p.h')
| -rw-r--r-- | src/gui/kernel/qopenglcontext_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h index d5a31261766..975553e7cda 100644 --- a/src/gui/kernel/qopenglcontext_p.h +++ b/src/gui/kernel/qopenglcontext_p.h @@ -203,6 +203,7 @@ public: , workaround_brokenTexSubImage(false) , workaround_missingPrecisionQualifiers(false) , active_engine(0) + , qgl_current_fbo_invalid(false) { requestedFormat = QSurfaceFormat::defaultFormat(); } @@ -237,6 +238,8 @@ public: QPaintEngineEx *active_engine; + bool qgl_current_fbo_invalid; + QVariant nativeHandle; static QOpenGLContext *setCurrentContext(QOpenGLContext *context); |
