diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-04-22 14:40:47 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-04-24 10:46:52 +0200 |
commit | d737db87349f4d3e9d5ff2cb4758d270cb8f1db7 (patch) | |
tree | 82b0ca95302c441b78a8bfd5749fd51db874324e /src/gui/kernel/qopenglcontext.cpp | |
parent | b32fc183812fc6fe4eb1c566d37ab3ddef3896f1 (diff) |
Clarify ResetNotification in QSurfaceFormat a bit
Add some more details to make it a bit easier for advanced users
to grasp what this is about.
Task-number: QTBUG-80257
Pick-to: 5.15
Change-Id: I9969b5b62384a25d5e90b57ef25c83a8a2a6c9c7
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/kernel/qopenglcontext.cpp')
-rw-r--r-- | src/gui/kernel/qopenglcontext.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 9a03333537..d164f44e73 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -524,6 +524,14 @@ QOpenGLContext::~QOpenGLContext() OpenGL context by calling create(), call makeCurrent() again and then reinitialize all OpenGL resources. + On some platforms context loss situations is not something that can + avoided. On others however, they may need to be opted-in to. This can be + done by enabling \l{QSurfaceFormat::ResetNotification}{ResetNotification} in + the QSurfaceFormat. This will lead to setting + \c{RESET_NOTIFICATION_STRATEGY_EXT} to \c{LOSE_CONTEXT_ON_RESET_EXT} in the + underlying native OpenGL context. QOpenGLContext will then monitor the + status via \c{glGetGraphicsResetStatusEXT()} in every makeCurrent(). + \sa create() */ bool QOpenGLContext::isValid() const |