diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2019-02-04 11:23:16 +0100 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2019-02-08 08:59:54 +0000 |
commit | 932b13d3ec76eedfc0e76e81c05b2d54552c0715 (patch) | |
tree | e6f6cbd492e6fecc6f07011ab87d98baa83711c0 | |
parent | 1036c450860fcc6eb1b5fd702f8ca83972170bb7 (diff) | |
download | qtbase-932b13d3ec76eedfc0e76e81c05b2d54552c0715.tar.gz |
windows: Support OpenGL ES versions > 3.0 with ANGLE
Even though our ANGLE versions only partially supports OpenGL ES > 3.0,
there are users who want to use functionality that is available. By
setting major and minor version we can support this use case.
Fixes: QTBUG-72762
Change-Id: I9a1d3009355693baa971deb3c4bbf14c595edf0b
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
-rw-r--r-- | src/plugins/platforms/windows/qwindowseglcontext.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp index 70ba2784e9..063e81150e 100644 --- a/src/plugins/platforms/windows/qwindowseglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp @@ -393,8 +393,14 @@ QWindowsEGLContext::QWindowsEGLContext(QWindowsEGLStaticContext *staticContext, m_shareContext = share ? static_cast<QWindowsEGLContext *>(share)->m_eglContext : nullptr; QVector<EGLint> contextAttrs; - contextAttrs.append(EGL_CONTEXT_CLIENT_VERSION); - contextAttrs.append(m_format.majorVersion()); + const int major = m_format.majorVersion(); + const int minor = m_format.minorVersion(); + if (major > 3 || (major == 3 && minor > 0)) + qWarning("QWindowsEGLContext: ANGLE only partially supports OpenGL ES > 3.0"); + contextAttrs.append(EGL_CONTEXT_MAJOR_VERSION); + contextAttrs.append(major); + contextAttrs.append(EGL_CONTEXT_MINOR_VERSION); + contextAttrs.append(minor); contextAttrs.append(EGL_NONE); QWindowsEGLStaticContext::libEGL.eglBindAPI(m_api); |