diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-01-13 14:17:41 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-02-03 16:16:56 +0000 |
commit | e445fa45b14ac2b7ab112a4b39748f01e505ac23 (patch) | |
tree | af99b1ba526c8f7860964d97cd51623d210f806e /src/gui/kernel | |
parent | 699efbe862efca5a0d18599dbc8a09d6e4cd0e9f (diff) |
WGL: support reset notifications via GL_ARB_robustness
Handling context losses is unavoidable with ANGLE. Introduce
some level of support for desktop GL too by making it possible
to opt in via a new flag.
Support is added for Windows (WGL, opengl32) only for now.
In case of Windows with ANGLE setting the flag is not necessary,
context losses will be reported regardless.
Change-Id: Ic354c1382e876566538c52a4381f7ff328b7477e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qsurfaceformat.cpp | 4 | ||||
-rw-r--r-- | src/gui/kernel/qsurfaceformat.h | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp index b7f8e375a4..a0dc0acbc3 100644 --- a/src/gui/kernel/qsurfaceformat.cpp +++ b/src/gui/kernel/qsurfaceformat.cpp @@ -128,6 +128,10 @@ public: \value DeprecatedFunctions Used to request that deprecated functions be included in the OpenGL context profile. If not specified, you should get a forward compatible context without support functionality marked as deprecated. This requires OpenGL version 3.0 or higher. + \value ResetNotification Enables notifications about resets of the OpenGL context. The status is then + queryable via the context's \l{QOpenGLContext::isValid()}{isValid()} function. Note that not setting + this flag does not guarantee that context state loss never occurs. Additionally, some implementations + may choose to report context loss regardless of this flag. */ /*! diff --git a/src/gui/kernel/qsurfaceformat.h b/src/gui/kernel/qsurfaceformat.h index b33f4d1f6b..58013cade6 100644 --- a/src/gui/kernel/qsurfaceformat.h +++ b/src/gui/kernel/qsurfaceformat.h @@ -48,7 +48,8 @@ public: enum FormatOption { StereoBuffers = 0x0001, DebugContext = 0x0002, - DeprecatedFunctions = 0x0004 + DeprecatedFunctions = 0x0004, + ResetNotification = 0x0008 }; Q_DECLARE_FLAGS(FormatOptions, FormatOption) |