qt6-bb10/src/gui/opengl
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
..
opengl.pri Expose GLES 3.0 and 3.1 functions 2015-07-23 07:59:07 +00:00
qopengl.cpp QOpenGLExtensionMatcher: Fix possible use of unintialized memory 2016-02-17 04:57:21 +00:00
qopengl.h QOpenGL: Fix GLhandleARB redefinition on OS X 2016-03-22 23:04:17 +00:00
qopengl2pexvertexarray.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopengl2pexvertexarray_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopengl_p.h Added QVersionNumber to QtCore's public API 2015-07-10 00:47:03 +00:00
qopenglbuffer.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglbuffer.h QtGui: Use Q_NULLPTR instead of 0 in all public headers 2015-07-19 10:32:55 +00:00
qopenglcustomshaderstage.cpp QOpenGLCustomShaderStage - fix a memory leak 2016-05-03 06:58:44 +00:00
qopenglcustomshaderstage_p.h QOpenGLCustomShaderStage - fix a memory leak 2016-05-03 06:58:44 +00:00
qopengldebug.cpp QOpenGLDebugLogger: strengthen the code path in case of GL context destruction 2016-07-27 05:13:02 +00:00
qopengldebug.h QtGui: Use Q_NULLPTR instead of 0 in all public headers 2015-07-19 10:32:55 +00:00
qopenglengineshadermanager.cpp Fix warning about unused local variables 2015-08-12 03:55:21 +00:00
qopenglengineshadermanager_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglengineshadersource_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopengles2ext.h Update qopenglext.h and qopengles2ext.h 2014-08-14 10:23:41 +02:00
qopenglext.h Use stdint.h in qopengl headers on MSVC too 2015-05-02 11:38:32 +00:00
qopenglextensions_p.h Expose GLES 3.0 and 3.1 functions 2015-07-23 07:59:07 +00:00
qopenglextrafunctions.h Make public headers compile with -Wzero-as-null-pointer-constant 2016-02-19 16:37:33 +00:00
qopenglframebufferobject.cpp Unset qgl_current_fbo when the default FBO is bound 2016-10-13 15:38:08 +00:00
qopenglframebufferobject.h Support MRT in QOpenGLFramebufferObject 2015-07-29 07:54:13 +00:00
qopenglframebufferobject_p.h Support MRT in QOpenGLFramebufferObject 2015-07-29 07:54:13 +00:00
qopenglfunctions.cpp Doc: add missing semi-colon 2016-01-15 06:38:50 +00:00
qopenglfunctions.h Support MRT in QOpenGLFramebufferObject 2015-07-29 07:54:13 +00:00
qopenglfunctions_1_0.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_1_0.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_1_1.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_1_1.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_1_2.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_1_2.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_1_3.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_1_3.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_1_4.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_1_4.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_1_5.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_1_5.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_2_0.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_2_0.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_2_1.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_2_1.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_3_0.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_3_0.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_3_1.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_3_1.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_3_2_compatibility.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_3_2_compatibility.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_3_2_core.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_3_2_core.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_3_3_compatibility.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_3_3_compatibility.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_3_3_core.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_3_3_core.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_0_compatibility.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_0_compatibility.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_0_core.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_0_core.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_1_compatibility.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_1_compatibility.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_1_core.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_1_core.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_2_compatibility.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_2_compatibility.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_2_core.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_2_core.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_3_compatibility.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_3_compatibility.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_3_core.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_3_core.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_4_compatibility.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_4_compatibility.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_4_core.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_4_core.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_5_compatibility.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_5_compatibility.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_5_core.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_4_5_core.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_es2.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglfunctions_es2.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglgradientcache.cpp Do not use 16 bits per color on GLES 2015-06-29 15:59:06 +00:00
qopenglgradientcache_p.h QtGui: Pass types with copy-ctor or dtor by const-ref 2015-07-19 10:46:53 +00:00
qopenglpaintdevice.cpp Enable non-integer device pixel ratio 2015-07-30 04:04:01 +00:00
qopenglpaintdevice.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglpaintdevice_p.h De-duplicate vtables, part I: exported private classes 2015-06-03 12:02:55 +00:00
qopenglpaintengine.cpp Remove dead code from QOpenGLPaintEngine 2016-01-21 20:17:30 +00:00
qopenglpaintengine_p.h Remove dead code from QOpenGLPaintEngine 2016-01-21 20:17:30 +00:00
qopenglpixeltransferoptions.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglpixeltransferoptions.h QtGui: make all Q_DECLARE_SHARED types nothrow move-assignable 2015-06-30 16:34:26 +00:00
qopenglqueryhelper_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglshadercache_meego_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglshadercache_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglshaderprogram.cpp Add GLSL version 110 on Intel with compat profiles 2016-09-27 10:54:01 +00:00
qopenglshaderprogram.h QtGui: Use Q_NULLPTR instead of 0 in all public headers 2015-07-19 10:32:55 +00:00
qopengltexture.cpp Merge remote-tracking branch 'origin/5.5' into 5.6 2016-01-19 10:03:01 +01:00
qopengltexture.h Add ETC1 to QOpenGLTexture formats 2015-08-06 07:30:57 +00:00
qopengltexture_p.h QOpenGLTexturePrivate: remove unused member variable 2015-12-16 21:46:02 +00:00
qopengltextureblitter.cpp QtBase: remove explicit function info from qWarning() etc 2015-11-28 16:34:26 +00:00
qopengltextureblitter_p.h Remove unneeded ';' after some macros 2016-08-04 19:52:18 +00:00
qopengltexturecache.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopengltexturecache_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopengltextureglyphcache.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopengltextureglyphcache_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopengltexturehelper.cpp QOpenGLTexture: fix target for compressed textures 2016-01-04 19:49:34 +00:00
qopengltexturehelper_p.h Workaround clang function export bug 2016-07-20 21:17:03 +00:00
qopengltimerquery.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopengltimerquery.h QtGui: Use Q_NULLPTR instead of 0 in all public headers 2015-07-19 10:32:55 +00:00
qopenglversionfunctions.cpp Doc: Change instances of '(Mac) OS X' to 'macOS' 2016-08-12 08:30:29 +00:00
qopenglversionfunctions.h Fix QT_DEPRECATED_SINCE usage 2016-02-02 19:24:12 +00:00
qopenglversionfunctionsfactory.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglversionfunctionsfactory_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglvertexarrayobject.cpp QOpenGLVertexArrayObject: clean up the destructor 2016-07-20 15:58:46 +00:00
qopenglvertexarrayobject.h QtGui: Use Q_NULLPTR instead of 0 in all public headers 2015-07-19 10:32:55 +00:00
qopenglvertexarrayobject_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qrbtree_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qtriangulatingstroker.cpp QtGui/QtOpenGL: Fix compiler warnings by MSVC2015 (64bit). 2015-08-03 20:15:30 +00:00
qtriangulatingstroker_p.h Use C++ <cmath> instead of <math.h> 2015-02-16 16:21:15 +00:00
qtriangulator.cpp Use C++ <cmath> instead of <math.h> 2015-02-16 16:21:15 +00:00
qtriangulator_p.h Update copyright headers 2015-02-11 06:49:51 +00:00