diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2015-12-20 00:09:01 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-12-25 14:02:08 +0000 |
commit | b1c156d692b21a04e31d5658ee6a73867e86e48f (patch) | |
tree | af1d15bbd7dabfc20f21a5f9934e4e72861a5ea6 | |
parent | 27479c13237692d91ba385e8eef82221d7de2d19 (diff) |
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 <laszlo.agocs@theqtcompany.com>
-rw-r--r-- | src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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; |