From b1c156d692b21a04e31d5658ee6a73867e86e48f Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Sun, 20 Dec 2015 00:09:01 +0100 Subject: Default to OpenGLES when building with -opengl es2 Fixes the xcb_glx plugin to follow the -opengl configure option for default surface types. This makes it match closer to xcb_egl behavior and makes the default match QOpenGLContext::openGLModuleType. Change-Id: Iea3f8069fffefa46a32945eeeea1312566df129f Task-number: QTBUG-50015 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp index 37f01d4eed..4cb220a02f 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp @@ -175,7 +175,11 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share) { if (m_format.renderableType() == QSurfaceFormat::DefaultRenderableType) +#if defined(QT_OPENGL_ES_2) + m_format.setRenderableType(QSurfaceFormat::OpenGLES); +#else m_format.setRenderableType(QSurfaceFormat::OpenGL); +#endif if (m_format.renderableType() != QSurfaceFormat::OpenGL && m_format.renderableType() != QSurfaceFormat::OpenGLES) return; -- cgit v1.2.3