summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsglcontext.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-01-13 14:17:41 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-02-03 16:16:56 +0000
commite445fa45b14ac2b7ab112a4b39748f01e505ac23 (patch)
treeaf99b1ba526c8f7860964d97cd51623d210f806e /src/plugins/platforms/windows/qwindowsglcontext.h
parent699efbe862efca5a0d18599dbc8a09d6e4cd0e9f (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/plugins/platforms/windows/qwindowsglcontext.h')
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.h b/src/plugins/platforms/windows/qwindowsglcontext.h
index 5f845f245e..27b0b2e191 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.h
+++ b/src/plugins/platforms/windows/qwindowsglcontext.h
@@ -232,7 +232,7 @@ public:
explicit QWindowsGLContext(QOpenGLStaticContext *staticContext, QOpenGLContext *context);
~QWindowsGLContext();
bool isSharing() const Q_DECL_OVERRIDE { return m_context->shareHandle(); }
- bool isValid() const Q_DECL_OVERRIDE { return m_renderingContext; }
+ bool isValid() const Q_DECL_OVERRIDE { return m_renderingContext && !m_lost; }
QSurfaceFormat format() const Q_DECL_OVERRIDE { return m_obtainedFormat; }
void swapBuffers(QPlatformSurface *surface) Q_DECL_OVERRIDE;
@@ -262,6 +262,8 @@ private:
bool m_extensionsUsed;
int m_swapInterval;
bool m_ownsContext;
+ GLenum (APIENTRY * m_getGraphicsResetStatus)();
+ bool m_lost;
};
QT_END_NAMESPACE