qt5base-lts/tests/auto/gui/qopengl
Alexandru Croitor cd1d114140 Unset qgl_current_fbo when the default FBO is bound
Previously when a new QOpenGLFramebufferObject was bound, the
QOpenGLContextPrivate::qgl_current_fbo member was also updated to point
to this new object.
But if a user called QOpenGLFramebufferObject::bindDefault(),
qgl_current_fbo was not unset, meaning that if the FBO object would be
deleted at some point, qgl_current_fbo would be a dangling pointer.

This patch makes sure to clear the value of qgl_current_fbo when
bindDefault() is called. It is cleared, and not set to point to another
object because the default platform OpenGL FBO is not backed by a
QOpenGLFramebufferObject.

Task-number: QTBUG-56296
Change-Id: I68b53d8b446660accdf5841df3d168ee2f133a90
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-10-13 15:38:08 +00:00
..
BLACKLIST Blacklist and skip various tests that are flakey 2015-06-14 10:50:45 +00:00
qopengl.pro Add support for glMapBufferRange in the wrappers and resolvers 2014-08-08 07:29:53 +02:00
tst_qopengl.cpp Unset qgl_current_fbo when the default FBO is bound 2016-10-13 15:38:08 +00:00