diff options
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglconvenience.cpp')
-rw-r--r-- | src/platformsupport/eglconvenience/qeglconvenience.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp index a36d0b83d4..790467150f 100644 --- a/src/platformsupport/eglconvenience/qeglconvenience.cpp +++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include <QByteArray> -#include <QOpenGLFunctions> +#include <QOpenGLContext> #ifdef Q_OS_LINUX #include <sys/ioctl.h> @@ -245,9 +245,11 @@ EGLConfig QEglConfigChooser::chooseConfig() break; #ifdef EGL_VERSION_1_4 case QSurfaceFormat::DefaultRenderableType: - if (!QOpenGLFunctions::isES()) +#ifndef QT_NO_OPENGL + if (QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL) configureAttributes.append(EGL_OPENGL_BIT); else +#endif // QT_NO_OPENGL configureAttributes.append(EGL_OPENGL_ES2_BIT); break; case QSurfaceFormat::OpenGL: @@ -361,7 +363,9 @@ QSurfaceFormat q_glFormatFromConfig(EGLDisplay display, const EGLConfig config, && (renderableType & EGL_OPENGL_BIT)) format.setRenderableType(QSurfaceFormat::OpenGL); else if (referenceFormat.renderableType() == QSurfaceFormat::DefaultRenderableType - && !QOpenGLFunctions::isES() +#ifndef QT_NO_OPENGL + && QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL +#endif && (renderableType & EGL_OPENGL_BIT)) format.setRenderableType(QSurfaceFormat::OpenGL); #endif |