summaryrefslogtreecommitdiffstats
path: root/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp')
-rw-r--r--src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp b/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp
index 6bcb3deb1..b62cad811 100644
--- a/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp
+++ b/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp
@@ -28,9 +28,7 @@
#include <glshader_p.h>
#if !QT_CONFIG(opengles2)
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <QtOpenGL/QOpenGLVersionFunctionsFactory>
-#endif
#include <QOpenGLFunctions_2_0>
#include <QOpenGLFunctions_3_2_Core>
#include <QOpenGLFunctions_3_3_Core>
@@ -48,13 +46,9 @@
#include <QSurface>
#include <QWindow>
#include <QOpenGLTexture>
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#ifdef QT_OPENGL_LIB
#include <QtOpenGL/QOpenGLDebugLogger>
#endif
-#else
-#include <QOpenGLDebugLogger>
-#endif
QT_BEGIN_NAMESPACE
@@ -358,32 +352,16 @@ GraphicsHelperInterface *GraphicsContext::resolveHighestOpenGLFunctions()
#if !QT_CONFIG(opengles2)
else {
QAbstractOpenGLFunctions *glFunctions = nullptr;
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if ((glFunctions = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_3_Core>()) != nullptr) {
-#else
- if ((glFunctions = m_gl->versionFunctions<QOpenGLFunctions_4_3_Core>()) != nullptr) {
-#endif
qCDebug(Backend) << Q_FUNC_INFO << " Building OpenGL 4.3";
glHelper = new GraphicsHelperGL4();
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
} else if ((glFunctions = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_3_Core>()) != nullptr) {
-#else
- } else if ((glFunctions = m_gl->versionFunctions<QOpenGLFunctions_3_3_Core>()) != nullptr) {
-#endif
qCDebug(Backend) << Q_FUNC_INFO << " Building OpenGL 3.3";
glHelper = new GraphicsHelperGL3_3();
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
} else if ((glFunctions = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_2_Core>()) != nullptr) {
-#else
- } else if ((glFunctions = m_gl->versionFunctions<QOpenGLFunctions_3_2_Core>()) != nullptr) {
-#endif
qCDebug(Backend) << Q_FUNC_INFO << " Building OpenGL 3.2";
glHelper = new GraphicsHelperGL3_2();
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
} else if ((glFunctions = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_2_0>()) != nullptr) {
-#else
- } else if ((glFunctions = m_gl->versionFunctions<QOpenGLFunctions_2_0>()) != nullptr) {
-#endif
qCDebug(Backend) << Q_FUNC_INFO << " Building OpenGL 2 Helper";
glHelper = new GraphicsHelperGL2();
}
@@ -402,7 +380,7 @@ GraphicsHelperInterface *GraphicsContext::resolveHighestOpenGLFunctions()
qCDebug(Backend) << "Qt3D: Enabling OpenGL debug logging";
m_debugLogger.reset(new QOpenGLDebugLogger);
if (m_debugLogger->initialize()) {
- QObject::connect(m_debugLogger.data(), &QOpenGLDebugLogger::messageLogged, &logOpenGLDebugMessage);
+ QObject::connect(m_debugLogger.data(), &QOpenGLDebugLogger::messageLogged, m_debugLogger.data(), &logOpenGLDebugMessage);
const QString mode = QString::fromLocal8Bit(debugLoggingMode);
m_debugLogger->startLogging(mode.startsWith(QLatin1String("sync"), Qt::CaseInsensitive)
? QOpenGLDebugLogger::SynchronousLogging