diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-03-23 16:18:19 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-03-30 20:48:07 +0000 |
commit | 2266f519225eebca724dd658d185f96bc9ad086c (patch) | |
tree | 3824fcff1fd510ae5489647ec8eee2ce22777451 /src/gui/kernel/qopenglcontext_p.h | |
parent | 2c1d597b653f16dc80a87d637c94213120f32d90 (diff) |
Fix incorrect FBO bindings with QOpenGLWidget
QOpenGLContext::defaultFramebufferObject() knows nothing about QOpenGLWidget
and QQuickWidget. The problem is that this function (and others that rely on it)
is expected to give the widget's backing FBO in paintGL() and friends.
To overcome this, we have to provide a way for such widgets that indicate what is
the expected "default fbo".
Task-number: QTBUG-43269
Change-Id: I43f439f8609382b9f7004707ab0ef9f091952b4f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/gui/kernel/qopenglcontext_p.h')
-rw-r--r-- | src/gui/kernel/qopenglcontext_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h index 5004ed6a8e..f9f3ce2c5f 100644 --- a/src/gui/kernel/qopenglcontext_p.h +++ b/src/gui/kernel/qopenglcontext_p.h @@ -204,6 +204,7 @@ public: , workaround_missingPrecisionQualifiers(false) , active_engine(0) , qgl_current_fbo_invalid(false) + , defaultFboRedirect(0) { requestedFormat = QSurfaceFormat::defaultFormat(); } @@ -242,6 +243,7 @@ public: bool qgl_current_fbo_invalid; QVariant nativeHandle; + GLuint defaultFboRedirect; static QOpenGLContext *setCurrentContext(QOpenGLContext *context); |