summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/opengl/graphicshelpergl2
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/render/opengl/graphicshelpergl2')
-rw-r--r--tests/auto/render/opengl/graphicshelpergl2/graphicshelpergl2.pro16
-rw-r--r--tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp14
2 files changed, 4 insertions, 26 deletions
diff --git a/tests/auto/render/opengl/graphicshelpergl2/graphicshelpergl2.pro b/tests/auto/render/opengl/graphicshelpergl2/graphicshelpergl2.pro
deleted file mode 100644
index e9ce754e6..000000000
--- a/tests/auto/render/opengl/graphicshelpergl2/graphicshelpergl2.pro
+++ /dev/null
@@ -1,16 +0,0 @@
-TEMPLATE = app
-
-TARGET = tst_graphicshelpergl2
-
-QT += 3dcore 3dcore-private 3drender 3drender-private testlib
-
-CONFIG += testcase
-
-SOURCES += \
- tst_graphicshelpergl2.cpp
-
-include(../../../core/common/common.pri)
-include(../../commons/commons.pri)
-
-# Link Against OpenGL Renderer Plugin
-include(../opengl_render_plugin.pri)
diff --git a/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp b/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp
index 3c60f6e89..655c67a36 100644
--- a/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp
+++ b/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB).
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DRender/qrendertargetoutput.h>
@@ -7,9 +7,7 @@
#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>
@@ -131,11 +129,7 @@ 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;
@@ -526,12 +520,12 @@ private Q_SLOTS:
QCOMPARE(enumValue, GL_COLOR_ATTACHMENT4);
// WHEN
- GLint newBufferEnum = 2;
+ GLenum newBufferEnum = GL_COLOR_ATTACHMENT0 + 2;
m_glHelper.drawBuffers(1, &newBufferEnum);
// THEN
m_func->glGetIntegerv(GL_DRAW_BUFFER0, &enumValue);
- QCOMPARE(enumValue, GL_COLOR_ATTACHMENT0 + newBufferEnum);
+ QCOMPARE(enumValue, GL_COLOR_ATTACHMENT0 + 2);
// WHEN
newBufferEnum = 0;
@@ -539,7 +533,7 @@ private Q_SLOTS:
// THEN
m_func->glGetIntegerv(GL_DRAW_BUFFER0, &enumValue);
- QCOMPARE(enumValue, GL_COLOR_ATTACHMENT0 + newBufferEnum);
+ QCOMPARE(enumValue, GL_NONE);
// Restore
m_extraFunctions->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);