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>
This commit is contained in:
parent
27479c1323
commit
b1c156d692
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user