summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/eglconvenience/qeglconvenience.cpp10
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp6
2 files changed, 11 insertions, 5 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
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index 3a34748fc7..630c77fba0 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -42,7 +42,7 @@
#include "qeglplatformcontext_p.h"
#include "qeglconvenience_p.h"
#include <qpa/qplatformwindow.h>
-#include <QtGui/QOpenGLFunctions>
+#include <QOpenGLContext>
QT_BEGIN_NAMESPACE
@@ -71,9 +71,11 @@ static inline void bindApi(const QSurfaceFormat &format)
break;
#ifdef EGL_VERSION_1_4
case QSurfaceFormat::DefaultRenderableType:
- if (!QOpenGLFunctions::isES())
+#ifndef QT_NO_OPENGL
+ if (QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL)
eglBindAPI(EGL_OPENGL_API);
else
+#endif // QT_NO_OPENGL
eglBindAPI(EGL_OPENGL_ES_API);
break;
case QSurfaceFormat::OpenGL: