Use QOpenGLContext::openGLModuleType() instead of QT_CONFIG(opengles2)
In the QOpenGLContext::openGLModuleType(), it will correctly judge QT_CONFIG(opengles2), there is no need to use QT_CONFIG(opengles2) alone in QGLXContext. Change-Id: I012703b6a81b88fa4b8aa53cc1077c8b42d34ed5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
9c28080f49
commit
3e65d0408b
@ -226,11 +226,8 @@ QGLXContext::QGLXContext(Display *display, QXcbScreen *screen, const QSurfaceFor
|
||||
, m_ownsContext(true)
|
||||
{
|
||||
if (m_format.renderableType() == QSurfaceFormat::DefaultRenderableType)
|
||||
#if QT_CONFIG(opengles2)
|
||||
m_format.setRenderableType(QSurfaceFormat::OpenGLES);
|
||||
#else
|
||||
m_format.setRenderableType(QSurfaceFormat::OpenGL);
|
||||
#endif
|
||||
m_format.setRenderableType(QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL
|
||||
? QSurfaceFormat::OpenGL : QSurfaceFormat::OpenGLES);
|
||||
if (m_format.renderableType() != QSurfaceFormat::OpenGL && m_format.renderableType() != QSurfaceFormat::OpenGLES)
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user