summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qopenglcontext.cpp8
-rw-r--r--src/gui/kernel/qsurfaceformat.cpp5
2 files changed, 12 insertions, 1 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
diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp
index 571b820409..6c04abc293 100644
--- a/src/gui/kernel/qsurfaceformat.cpp
+++ b/src/gui/kernel/qsurfaceformat.cpp
@@ -148,7 +148,10 @@ public:
\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.
+ may choose to report context loss regardless of this flag. Platforms that support dynamically enabling
+ the monitoring of the loss of context, such as, Windows with WGL, or Linux/X11 (xcb) with GLX, will
+ monitor the status in every call to \l{QOpenGLContext::makeCurrent()}{makeCurrent()}. See
+ \l{QOpenGLContext::isValid()}{isValid()} for more information on this.
*/
/*!