From ba92fe922244a66b4851a049af61cf9be7b1bc9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 24 Oct 2011 14:35:50 +0200 Subject: Re-added hellogl_es and ES 1 support for QOpenGLContext. Change-Id: I576cf3595cdeeefb4ed840bb3b2b7097b3609cc7 Reviewed-by: Gunnar Sletta --- src/platformsupport/eglconvenience/qeglconvenience.cpp | 2 +- src/platformsupport/eglconvenience/qeglplatformcontext.cpp | 4 ++-- src/platformsupport/eglconvenience/qeglplatformcontext_p.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/platformsupport') 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 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 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); -- cgit v1.2.3