winrt: Warn if OpenGL ES version is set to a value > 3.0

Our bundled ANGLE library only partially supports OpenGL ES > 3.0 so warn
users that there might be dragons.

Change-Id: I16711fe9f449e85dd8b2369e1fcec6c9f81d5ae0
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
bb10
Oliver Wolff 2019-02-04 12:15:54 +01:00
parent 932b13d3ec
commit 5f384bd39c
1 changed files with 4 additions and 0 deletions

View File

@ -134,6 +134,10 @@ void QWinRTEGLContext::initialize()
const EGLint flags = d->format.testOption(QSurfaceFormat::DebugContext)
? EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR : 0;
const int major = d->format.majorVersion();
const int minor = d->format.minorVersion();
if (major > 3 || (major == 3 && minor > 0))
qWarning("QWinRTEGLContext: ANGLE only partially supports OpenGL ES > 3.0");
const EGLint attributes[] = {
EGL_CONTEXT_CLIENT_VERSION, d->format.majorVersion(),
EGL_CONTEXT_MINOR_VERSION_KHR, d->format.minorVersion(),