summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglplatformcontext.cpp')
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index 2bfa7a8a02..ec740b87db 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -49,14 +49,23 @@
static inline void bindApi(const QSurfaceFormat &format)
{
- if (format.renderableType() == QSurfaceFormat::OpenVG)
+ switch (format.renderableType()) {
+ case QSurfaceFormat::OpenVG:
eglBindAPI(EGL_OPENVG_API);
+ break;
#ifdef EGL_VERSION_1_4
- else if (format.renderableType() == QSurfaceFormat::OpenGL)
+# if !defined(QT_OPENGL_ES_2)
+ case QSurfaceFormat::DefaultRenderableType:
+# endif
+ case QSurfaceFormat::OpenGL:
eglBindAPI(EGL_OPENGL_API);
+ break;
#endif
- else
+ case QSurfaceFormat::OpenGLES:
+ default:
eglBindAPI(EGL_OPENGL_ES_API);
+ break;
+ }
}
QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,