summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp')
-rw-r--r--tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp b/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp
index ead476c3a..a7690924a 100644
--- a/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp
+++ b/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp
@@ -32,7 +32,9 @@
#include <graphicshelpergl2_p.h>
#include <Qt3DRender/private/attachmentpack_p.h>
#include <QOpenGLContext>
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <QOpenGLVersionFunctionsFactory>
+#endif
#include <QOpenGLBuffer>
#include <QOpenGLFunctions_2_0>
#include <QOpenGLExtraFunctions>
@@ -154,7 +156,11 @@ private Q_SLOTS:
return;
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if ((m_func = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_2_0>()) != nullptr) {
+#else
+ if ((m_func = m_glContext.versionFunctions<QOpenGLFunctions_2_0>())) {
+#endif
m_extraFunctions = m_glContext.extraFunctions();
m_glHelper.initializeHelper(&m_glContext, m_func);
m_initializationSuccessful = true;