summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/eglconvenience/qeglconvenience.cpp2
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp4
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext_p.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp
index b864378470..ea4b5566c5 100644
--- a/src/platformsupport/eglconvenience/qeglconvenience.cpp
+++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp
@@ -212,7 +212,7 @@ EGLConfig q_configFromGLFormat(EGLDisplay display, const QSurfaceFormat &format,
configureAttributes.append(surfaceType);
configureAttributes.append(EGL_RENDERABLE_TYPE);
- configureAttributes.append(EGL_OPENGL_ES2_BIT);
+ configureAttributes.append(format.majorVersion() == 1 ? EGL_OPENGL_ES_BIT : EGL_OPENGL_ES2_BIT);
configureAttributes.append(EGL_NONE);
do {
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index 58debb8ba8..dfa0bacd35 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -48,7 +48,7 @@
#include <EGL/egl.h>
QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
- EGLint eglClientVersion, EGLenum eglApi)
+ EGLenum eglApi)
: m_eglDisplay(display)
, m_eglApi(eglApi)
, m_format(format)
@@ -60,7 +60,7 @@ QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatform
QVector<EGLint> contextAttrs;
contextAttrs.append(EGL_CONTEXT_CLIENT_VERSION);
- contextAttrs.append(eglClientVersion);
+ contextAttrs.append(format.majorVersion());
contextAttrs.append(EGL_NONE);
eglBindAPI(m_eglApi);
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
index 2fe0e04388..c38af1dfda 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
@@ -50,7 +50,7 @@ class QEGLPlatformContext : public QPlatformOpenGLContext
{
public:
QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
- EGLint eglClientVersion = 2, EGLenum eglApi = EGL_OPENGL_ES_API);
+ EGLenum eglApi = EGL_OPENGL_ES_API);
~QEGLPlatformContext();
bool makeCurrent(QPlatformSurface *surface);