pick the right gl version
authorGunnar Sletta <gunnar.sletta@nokia.com>
Wed, 18 Jan 2012 17:16:28 +0000 (18:16 +0100)
committerJørgen Lind <jorgen.lind@nokia.com>
Wed, 18 Jan 2012 17:21:46 +0000 (18:21 +0100)
Change-Id: I1bee7028f9cf53383bb76678f1446b86cc2d007f
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
src/plugins/platforms/wayland/gl_integration/wayland_egl/qwaylandglcontext.cpp

index a09bdc9..b2b7e32 100644 (file)
@@ -63,7 +63,7 @@ QWaylandGLContext::QWaylandGLContext(EGLDisplay eglDisplay, const QSurfaceFormat
 
     QVector<EGLint> eglContextAttrs;
     eglContextAttrs.append(EGL_CONTEXT_CLIENT_VERSION);
-    eglContextAttrs.append(2);
+    eglContextAttrs.append(format.majorVersion() == 1 ? 1 : 2);
     eglContextAttrs.append(EGL_NONE);
 
     m_context = eglCreateContext(m_eglDisplay, m_config, shareEGLContext, eglContextAttrs.constData());