diff options
author | Samuel Rødal <srodal@gmail.com> | 2014-10-31 16:56:25 +0100 |
---|---|---|
committer | Samuel Rødal <srodal@gmail.com> | 2014-11-11 19:24:29 +0100 |
commit | a4428d480b96d51f9979d45044f26c99fa82f465 (patch) | |
tree | 6b028915378463615bb1ea2cc5a9ad9b25186183 /src/opengl/qgl_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 <laszlo.agocs@digia.com>
Diffstat (limited to 'src/opengl/qgl_p.h')
-rw-r--r-- | src/opengl/qgl_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index c4151a3d34..4cf656fd86 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -238,6 +238,8 @@ public: bool ownContext; void setupSharing(); + void refreshCurrentFbo(); + void setCurrentFbo(GLuint fbo); QGLFormat glFormat; QGLFormat reqFormat; |