diff options
Diffstat (limited to 'tests/auto/render/opengl')
51 files changed, 236 insertions, 828 deletions
diff --git a/tests/auto/render/opengl/CMakeLists.txt b/tests/auto/render/opengl/CMakeLists.txt index 21133f63f..778319a1d 100644 --- a/tests/auto/render/opengl/CMakeLists.txt +++ b/tests/auto/render/opengl/CMakeLists.txt @@ -1,10 +1,15 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from opengl.pro. if (NOT QT_BUILD_STANDALONE_TESTS) add_subdirectory(filtercompatibletechniquejob) +if (NOT ANDROID) add_subdirectory(graphicshelpergl3_3) add_subdirectory(graphicshelpergl3_2) add_subdirectory(graphicshelpergl2) +endif() add_subdirectory(glshadermanager) add_subdirectory(textures) add_subdirectory(renderer) @@ -18,7 +23,7 @@ if (NOT QT_BUILD_STANDALONE_TESTS) if(TARGET Qt::Quick) add_subdirectory(materialparametergathererjob) endif() - if(NOT MACOS) + if(NOT MACOS AND NOT ANDROID) add_subdirectory(graphicshelpergl4) endif() endif() diff --git a/tests/auto/render/opengl/computecommand/CMakeLists.txt b/tests/auto/render/opengl/computecommand/CMakeLists.txt index 0bb3494d8..f98c44bd8 100644 --- a/tests/auto/render/opengl/computecommand/CMakeLists.txt +++ b/tests/auto/render/opengl/computecommand/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from computecommand.pro. ##################################################################### diff --git a/tests/auto/render/opengl/computecommand/computecommand.pro b/tests/auto/render/opengl/computecommand/computecommand.pro deleted file mode 100644 index 38515059a..000000000 --- a/tests/auto/render/opengl/computecommand/computecommand.pro +++ /dev/null @@ -1,15 +0,0 @@ -TEMPLATE = app - -TARGET = tst_computecommand - -QT += 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += tst_computecommand.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/computecommand/tst_computecommand.cpp b/tests/auto/render/opengl/computecommand/tst_computecommand.cpp index 0b1ff3881..b9ccece1a 100644 --- a/tests/auto/render/opengl/computecommand/tst_computecommand.cpp +++ b/tests/auto/render/opengl/computecommand/tst_computecommand.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> diff --git a/tests/auto/render/opengl/filtercompatibletechniquejob/CMakeLists.txt b/tests/auto/render/opengl/filtercompatibletechniquejob/CMakeLists.txt index 80db6f729..b8e666df4 100644 --- a/tests/auto/render/opengl/filtercompatibletechniquejob/CMakeLists.txt +++ b/tests/auto/render/opengl/filtercompatibletechniquejob/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from filtercompatibletechniquejob.pro. ##################################################################### diff --git a/tests/auto/render/opengl/filtercompatibletechniquejob/filtercompatibletechniquejob.pro b/tests/auto/render/opengl/filtercompatibletechniquejob/filtercompatibletechniquejob.pro deleted file mode 100644 index 5d533839c..000000000 --- a/tests/auto/render/opengl/filtercompatibletechniquejob/filtercompatibletechniquejob.pro +++ /dev/null @@ -1,15 +0,0 @@ -TEMPLATE = app - -TARGET = tst_filtercompatibletechniquejob - -QT += 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += tst_filtercompatibletechniquejob.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/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp b/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp index 3a4d5f021..bac5512c3 100644 --- a/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp +++ b/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> @@ -248,7 +223,7 @@ private Q_SLOTS: // THEN -> empty if job ran properly const std::vector<Qt3DCore::QNodeId> dirtyTechniquesId = testAspect.nodeManagers()->techniqueManager()->takeDirtyTechniques(); - QCOMPARE(dirtyTechniquesId.size(), 0); + QCOMPARE(dirtyTechniquesId.size(), 0U); // Check at least one technique is valid bool foundValid = false; diff --git a/tests/auto/render/opengl/glshadermanager/CMakeLists.txt b/tests/auto/render/opengl/glshadermanager/CMakeLists.txt index f3c4b4d6c..631c1931d 100644 --- a/tests/auto/render/opengl/glshadermanager/CMakeLists.txt +++ b/tests/auto/render/opengl/glshadermanager/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from glshadermanager.pro. ##################################################################### diff --git a/tests/auto/render/opengl/glshadermanager/glshadermanager.pro b/tests/auto/render/opengl/glshadermanager/glshadermanager.pro deleted file mode 100644 index dc96ab3bb..000000000 --- a/tests/auto/render/opengl/glshadermanager/glshadermanager.pro +++ /dev/null @@ -1,15 +0,0 @@ -TEMPLATE = app - -TARGET = tst_glshadermanager - -QT += core-private 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += tst_glshadermanager.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/glshadermanager/tst_glshadermanager.cpp b/tests/auto/render/opengl/glshadermanager/tst_glshadermanager.cpp index 6b37db64c..44a273f1b 100644 --- a/tests/auto/render/opengl/glshadermanager/tst_glshadermanager.cpp +++ b/tests/auto/render/opengl/glshadermanager/tst_glshadermanager.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <glresourcemanagers_p.h> @@ -69,7 +44,7 @@ void tst_GLShaderManager::adopt() // THEN QVERIFY(glShader1 != nullptr); std::vector<Qt3DCore::QNodeId> shaderNodeIds = cache.shaderIdsForProgram(glShader1); - QCOMPARE(shaderNodeIds.size(), 1); + QCOMPARE(shaderNodeIds.size(), 1U); QCOMPARE(shaderNodeIds.front(), backendShaderNode1.peerId()); // WHEN @@ -79,7 +54,7 @@ void tst_GLShaderManager::adopt() QCOMPARE(glShader1, glShader2); shaderNodeIds = cache.shaderIdsForProgram(glShader2); - QCOMPARE(shaderNodeIds.size(), 2); + QCOMPARE(shaderNodeIds.size(), 2U); QCOMPARE(shaderNodeIds.front(), backendShaderNode1.peerId()); QCOMPARE(shaderNodeIds.back(), backendShaderNode2.peerId()); } @@ -109,7 +84,7 @@ void tst_GLShaderManager::lookupResource() QVERIFY(glShader1 != nullptr); QCOMPARE(glShader1, glShader2); const std::vector<Qt3DCore::QNodeId> shaderNodeIds = cache.shaderIdsForProgram(glShader1); - QCOMPARE(shaderNodeIds.size(), 2); + QCOMPARE(shaderNodeIds.size(), 2U); QVERIFY(std::find(shaderNodeIds.begin(), shaderNodeIds.end(), frontendShader1.id()) != shaderNodeIds.end()); @@ -142,7 +117,7 @@ void tst_GLShaderManager::abandon() // THEN std::vector<Qt3DCore::QNodeId> shaderNodeIds = cache.shaderIdsForProgram(glShader); QVERIFY(cache.takeAbandonned().empty()); - QCOMPARE(shaderNodeIds.size(), 1); + QCOMPARE(shaderNodeIds.size(), 1U); QCOMPARE(shaderNodeIds.front(), backendShaderNode2.peerId()); // WHEN @@ -150,9 +125,9 @@ void tst_GLShaderManager::abandon() // THEN shaderNodeIds = cache.shaderIdsForProgram(glShader); - QCOMPARE(shaderNodeIds.size(), 0); + QCOMPARE(shaderNodeIds.size(), 0U); const std::vector<Qt3DRender::Render::OpenGL::GLShader *> releasedShaders = cache.takeAbandonned(); - QCOMPARE(releasedShaders.size(), 1); + QCOMPARE(releasedShaders.size(), 1U); QCOMPARE(releasedShaders.front(), glShader); } diff --git a/tests/auto/render/opengl/gltexturemanager/CMakeLists.txt b/tests/auto/render/opengl/gltexturemanager/CMakeLists.txt index 2a0d251a9..98274ee62 100644 --- a/tests/auto/render/opengl/gltexturemanager/CMakeLists.txt +++ b/tests/auto/render/opengl/gltexturemanager/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from gltexturemanager.pro. ##################################################################### diff --git a/tests/auto/render/opengl/gltexturemanager/gltexturemanager.pro b/tests/auto/render/opengl/gltexturemanager/gltexturemanager.pro deleted file mode 100644 index 7784d8da7..000000000 --- a/tests/auto/render/opengl/gltexturemanager/gltexturemanager.pro +++ /dev/null @@ -1,15 +0,0 @@ -TEMPLATE = app - -TARGET = tst_gltexturemanager - -QT += core-private 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += tst_gltexturemanager.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/gltexturemanager/tst_gltexturemanager.cpp b/tests/auto/render/opengl/gltexturemanager/tst_gltexturemanager.cpp index 676720369..27be8be3c 100644 --- a/tests/auto/render/opengl/gltexturemanager/tst_gltexturemanager.cpp +++ b/tests/auto/render/opengl/gltexturemanager/tst_gltexturemanager.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <Qt3DRender/QTextureImageDataGenerator> @@ -96,7 +71,7 @@ private Q_SLOTS: t->setImages({img}); // THEN - QCOMPARE(t->images().size(), 1); + QCOMPARE(t->images().size(), 1U); QCOMPARE(t->dirtyFlags(), Qt3DRender::Render::OpenGL::GLTexture::TextureImageData); // WHEN diff --git a/tests/auto/render/opengl/graphicshelpergl2/CMakeLists.txt b/tests/auto/render/opengl/graphicshelpergl2/CMakeLists.txt index d7b0fdd49..e0678a353 100644 --- a/tests/auto/render/opengl/graphicshelpergl2/CMakeLists.txt +++ b/tests/auto/render/opengl/graphicshelpergl2/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from graphicshelpergl2.pro. ##################################################################### 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 a7690924a..5299e3a46 100644 --- a/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp +++ b/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <Qt3DRender/qrendertargetoutput.h> @@ -32,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> @@ -156,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; @@ -730,7 +699,7 @@ private Q_SLOTS: std::vector<ShaderAttribute> activeAttributes = m_glHelper.programAttributesAndLocations(shaderProgram.programId()); // THEN - QCOMPARE(activeAttributes.size(), 2); + QCOMPARE(activeAttributes.size(), 2U); std::sort(activeAttributes.begin(), activeAttributes.end(), [] (const ShaderAttribute &a, const ShaderAttribute &b) { return a.m_name < b.m_name; }); const ShaderAttribute attribute1 = activeAttributes.at(0); @@ -761,7 +730,7 @@ private Q_SLOTS: std::vector<ShaderUniform> activeUniforms = m_glHelper.programUniformsAndLocations(shaderProgram.programId()); // THEN - QCOMPARE(activeUniforms.size(), 4); + QCOMPARE(activeUniforms.size(), 4U); std::sort(activeUniforms.begin(), activeUniforms.end(), [] (const ShaderUniform &a, const ShaderUniform &b) { return a.m_name < b.m_name; }); const ShaderUniform uniform1 = activeUniforms.at(0); diff --git a/tests/auto/render/opengl/graphicshelpergl3_2/CMakeLists.txt b/tests/auto/render/opengl/graphicshelpergl3_2/CMakeLists.txt index 6898d85d0..a8a6e326b 100644 --- a/tests/auto/render/opengl/graphicshelpergl3_2/CMakeLists.txt +++ b/tests/auto/render/opengl/graphicshelpergl3_2/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from graphicshelpergl3_2.pro. ##################################################################### diff --git a/tests/auto/render/opengl/graphicshelpergl3_2/graphicshelpergl3_2.pro b/tests/auto/render/opengl/graphicshelpergl3_2/graphicshelpergl3_2.pro deleted file mode 100644 index a613f1279..000000000 --- a/tests/auto/render/opengl/graphicshelpergl3_2/graphicshelpergl3_2.pro +++ /dev/null @@ -1,16 +0,0 @@ -TEMPLATE = app - -TARGET = tst_graphicshelpergl3_2 - -QT += 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += \ - tst_graphicshelpergl3_2.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/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp b/tests/auto/render/opengl/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp index 54662e4e0..2b6d531b6 100644 --- a/tests/auto/render/opengl/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp +++ b/tests/auto/render/opengl/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <Qt3DRender/qrendertargetoutput.h> @@ -32,9 +7,7 @@ #include <graphicshelpergl3_2_p.h> #include <Qt3DRender/private/attachmentpack_p.h> #include <QOpenGLBuffer> -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include <QOpenGLVersionFunctionsFactory> -#endif #include <QOpenGLFunctions_3_2_Core> #include <QOpenGLShaderProgram> #include <QOpenGLVertexArrayObject> @@ -210,11 +183,7 @@ private Q_SLOTS: return; } -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) if ((m_func = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_2_Core>()) != nullptr) { -#else - if ((m_func = m_glContext.versionFunctions<QOpenGLFunctions_3_2_Core>())) { -#endif m_glHelper.initializeHelper(&m_glContext, m_func); m_initializationSuccessful = true; } @@ -978,7 +947,7 @@ private Q_SLOTS: const std::vector<ShaderUniformBlock> activeUniformBlocks = m_glHelper.programUniformBlocks(shaderProgram.programId()); // THEN - QCOMPARE(activeUniformBlocks.size(), 1); + QCOMPARE(activeUniformBlocks.size(), 1U); const ShaderUniformBlock uniformBlock = activeUniformBlocks.front(); QCOMPARE(uniformBlock.m_activeUniformsCount, 1); @@ -1006,7 +975,7 @@ private Q_SLOTS: std::vector<ShaderAttribute> activeAttributes = m_glHelper.programAttributesAndLocations(shaderProgram.programId()); // THEN - QCOMPARE(activeAttributes.size(), 2); + QCOMPARE(activeAttributes.size(), 2U); std::sort(activeAttributes.begin(), activeAttributes.end(), [] (const ShaderAttribute &a, const ShaderAttribute &b) { return a.m_name < b.m_name; }); const ShaderAttribute attribute1 = activeAttributes.at(0); @@ -1037,7 +1006,7 @@ private Q_SLOTS: std::vector<ShaderUniform> activeUniforms = m_glHelper.programUniformsAndLocations(shaderProgram.programId()); // THEN - QCOMPARE(activeUniforms.size(), 4); + QCOMPARE(activeUniforms.size(), 4U); std::sort(activeUniforms.begin(), activeUniforms.end(), [] (const ShaderUniform &a, const ShaderUniform &b) { return a.m_name < b.m_name; }); const ShaderUniform uniform1 = activeUniforms.at(0); diff --git a/tests/auto/render/opengl/graphicshelpergl3_3/CMakeLists.txt b/tests/auto/render/opengl/graphicshelpergl3_3/CMakeLists.txt index 3a750b092..143580d81 100644 --- a/tests/auto/render/opengl/graphicshelpergl3_3/CMakeLists.txt +++ b/tests/auto/render/opengl/graphicshelpergl3_3/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from graphicshelpergl3_3.pro. ##################################################################### diff --git a/tests/auto/render/opengl/graphicshelpergl3_3/graphicshelpergl3_3.pro b/tests/auto/render/opengl/graphicshelpergl3_3/graphicshelpergl3_3.pro deleted file mode 100644 index ae8e06eba..000000000 --- a/tests/auto/render/opengl/graphicshelpergl3_3/graphicshelpergl3_3.pro +++ /dev/null @@ -1,16 +0,0 @@ -TEMPLATE = app - -TARGET = tst_graphicshelpergl3_3 - -QT += 3dcore 3dcore-private 3drender 3drender-private testlib opengl - -CONFIG += testcase - -SOURCES += \ - tst_graphicshelpergl3_3.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/graphicshelpergl3_3/tst_graphicshelpergl3_3.cpp b/tests/auto/render/opengl/graphicshelpergl3_3/tst_graphicshelpergl3_3.cpp index 6cd62a170..859c18158 100644 --- a/tests/auto/render/opengl/graphicshelpergl3_3/tst_graphicshelpergl3_3.cpp +++ b/tests/auto/render/opengl/graphicshelpergl3_3/tst_graphicshelpergl3_3.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <Qt3DRender/qrendertargetoutput.h> @@ -32,9 +7,7 @@ #include <Qt3DRender/private/attachmentpack_p.h> #include <graphicshelpergl3_3_p.h> #include <QOpenGLBuffer> -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include <QOpenGLVersionFunctionsFactory> -#endif #include <QOpenGLFunctions_3_3_Core> #include <QOpenGLShaderProgram> #include <QOpenGLVertexArrayObject> @@ -210,11 +183,7 @@ private Q_SLOTS: return; } -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) if ((m_func = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_3_Core>()) != nullptr) { -#else - if ((m_func = m_glContext.versionFunctions<QOpenGLFunctions_3_3_Core>())) { -#endif m_glHelper.initializeHelper(&m_glContext, m_func); m_initializationSuccessful = true; } @@ -1076,7 +1045,7 @@ private Q_SLOTS: const std::vector<ShaderUniformBlock> activeUniformBlocks = m_glHelper.programUniformBlocks(shaderProgram.programId()); // THEN - QCOMPARE(activeUniformBlocks.size(), 1); + QCOMPARE(activeUniformBlocks.size(), 1U); const ShaderUniformBlock uniformBlock = activeUniformBlocks.front(); QCOMPARE(uniformBlock.m_activeUniformsCount, 1); @@ -1104,7 +1073,7 @@ private Q_SLOTS: std::vector<ShaderAttribute> activeAttributes = m_glHelper.programAttributesAndLocations(shaderProgram.programId()); // THEN - QCOMPARE(activeAttributes.size(), 2); + QCOMPARE(activeAttributes.size(), 2U); std::sort(activeAttributes.begin(), activeAttributes.end(), [] (const ShaderAttribute &a, const ShaderAttribute &b) { return a.m_name < b.m_name; }); const ShaderAttribute attribute1 = activeAttributes.at(0); @@ -1135,7 +1104,7 @@ private Q_SLOTS: std::vector<ShaderUniform> activeUniforms = m_glHelper.programUniformsAndLocations(shaderProgram.programId()); // THEN - QCOMPARE(activeUniforms.size(), 4); + QCOMPARE(activeUniforms.size(), 4U); std::sort(activeUniforms.begin(), activeUniforms.end(), [] (const ShaderUniform &a, const ShaderUniform &b) { return a.m_name < b.m_name; }); const ShaderUniform uniform1 = activeUniforms.at(0); diff --git a/tests/auto/render/opengl/graphicshelpergl4/CMakeLists.txt b/tests/auto/render/opengl/graphicshelpergl4/CMakeLists.txt index 494b686e8..9f05f5604 100644 --- a/tests/auto/render/opengl/graphicshelpergl4/CMakeLists.txt +++ b/tests/auto/render/opengl/graphicshelpergl4/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from graphicshelpergl4.pro. ##################################################################### diff --git a/tests/auto/render/opengl/graphicshelpergl4/graphicshelpergl4.pro b/tests/auto/render/opengl/graphicshelpergl4/graphicshelpergl4.pro deleted file mode 100644 index 5ea881208..000000000 --- a/tests/auto/render/opengl/graphicshelpergl4/graphicshelpergl4.pro +++ /dev/null @@ -1,16 +0,0 @@ -TEMPLATE = app - -TARGET = tst_graphicshelpergl4 - -QT += 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += \ - tst_graphicshelpergl4.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/graphicshelpergl4/tst_graphicshelpergl4.cpp b/tests/auto/render/opengl/graphicshelpergl4/tst_graphicshelpergl4.cpp index 2b1aa2b8f..d706f7e8a 100644 --- a/tests/auto/render/opengl/graphicshelpergl4/tst_graphicshelpergl4.cpp +++ b/tests/auto/render/opengl/graphicshelpergl4/tst_graphicshelpergl4.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <Qt3DRender/qrendertargetoutput.h> @@ -36,10 +11,7 @@ #include <QOpenGLShaderProgram> #include <QOpenGLVertexArrayObject> #include <QSurfaceFormat> - -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include <QtOpenGL/QOpenGLVersionFunctionsFactory> -#endif #if !QT_CONFIG(opengles2) && defined(QT_OPENGL_4_3) @@ -259,11 +231,7 @@ private Q_SLOTS: return; } -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) if ((m_func = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_3_Core>()) != nullptr) { -#else - if ((m_func = m_glContext.versionFunctions<QOpenGLFunctions_4_3_Core>()) != nullptr) { -#endif m_glHelper.initializeHelper(&m_glContext, m_func); m_initializationSuccessful = true; } @@ -931,11 +899,7 @@ private Q_SLOTS: QVERIFY(error == 0); // THEN -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) QList<QVector4D> colors(512 * 512); -#else - QVector<QVector4D> colors(512 * 512); -#endif textures[3]->bind(); m_func->glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_FLOAT, colors.data()); textures[3]->release(); @@ -1360,7 +1324,7 @@ private Q_SLOTS: const std::vector<ShaderUniformBlock> activeUniformBlocks = m_glHelper.programUniformBlocks(shaderProgram.programId()); // THEN - QCOMPARE(activeUniformBlocks.size(), 1); + QCOMPARE(activeUniformBlocks.size(), 1U); const ShaderUniformBlock uniformBlock = activeUniformBlocks.front(); QCOMPARE(uniformBlock.m_activeUniformsCount, 1); @@ -1383,7 +1347,7 @@ private Q_SLOTS: std::vector<ShaderAttribute> activeAttributes = m_glHelper.programAttributesAndLocations(shaderProgram.programId()); // THEN - QCOMPARE(activeAttributes.size(), 2); + QCOMPARE(activeAttributes.size(), 2U); std::sort(activeAttributes.begin(), activeAttributes.end(), [] (const ShaderAttribute &a, const ShaderAttribute &b) { return a.m_location < b.m_location; }); const ShaderAttribute attribute1 = activeAttributes.at(0); @@ -1414,7 +1378,7 @@ private Q_SLOTS: std::vector<ShaderUniform> activeUniforms = m_glHelper.programUniformsAndLocations(shaderProgram.programId()); // THEN - QCOMPARE(activeUniforms.size(), 4); + QCOMPARE(activeUniforms.size(), 4U); std::sort(activeUniforms.begin(), activeUniforms.end(), [] (const ShaderUniform &a, const ShaderUniform &b) { return a.m_location < b.m_location; }); const ShaderUniform uniform1 = activeUniforms.at(0); diff --git a/tests/auto/render/opengl/materialparametergathererjob/CMakeLists.txt b/tests/auto/render/opengl/materialparametergathererjob/CMakeLists.txt index ff49b6d42..96566709c 100644 --- a/tests/auto/render/opengl/materialparametergathererjob/CMakeLists.txt +++ b/tests/auto/render/opengl/materialparametergathererjob/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from materialparametergathererjob.pro. ##################################################################### diff --git a/tests/auto/render/opengl/materialparametergathererjob/materialparametergathererjob.pro b/tests/auto/render/opengl/materialparametergathererjob/materialparametergathererjob.pro deleted file mode 100644 index 106e7a263..000000000 --- a/tests/auto/render/opengl/materialparametergathererjob/materialparametergathererjob.pro +++ /dev/null @@ -1,14 +0,0 @@ -TEMPLATE = app - -TARGET = tst_materialparametergathererjob - -QT += core-private 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += tst_materialparametergathererjob.cpp - -include(../../commons/commons.pri) - -# Link Against OpenGL Renderer Plugin -include(../opengl_render_plugin.pri) diff --git a/tests/auto/render/opengl/materialparametergathererjob/tst_materialparametergathererjob.cpp b/tests/auto/render/opengl/materialparametergathererjob/tst_materialparametergathererjob.cpp index 73017bead..f8d2ecdb6 100644 --- a/tests/auto/render/opengl/materialparametergathererjob/tst_materialparametergathererjob.cpp +++ b/tests/auto/render/opengl/materialparametergathererjob/tst_materialparametergathererjob.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <Qt3DCore/qentity.h> @@ -237,7 +212,7 @@ private Q_SLOTS: testAspect.initializeRenderer(); // THEN - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 0); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 0U); // WHEN gatherer->run(); @@ -257,7 +232,7 @@ private Q_SLOTS: testAspect.initializeRenderer(); // THEN - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1U); // WHEN gatherer->setHandles(testAspect.nodeManagers()->materialManager()->activeHandles()); @@ -279,7 +254,7 @@ private Q_SLOTS: testAspect.initializeRenderer(); // THEN - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1U); // WHEN gatherer->setHandles(testAspect.nodeManagers()->materialManager()->activeHandles()); @@ -311,7 +286,7 @@ private Q_SLOTS: testAspect.initializeRenderer(); // THEN - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1U); Qt3DRender::Render::TechniqueFilter *backendTechniqueFilter = static_cast<Qt3DRender::Render::TechniqueFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(frameGraphFilter->id())); QVERIFY(backendTechniqueFilter != nullptr); @@ -351,7 +326,7 @@ private Q_SLOTS: testAspect.initializeRenderer(); // THEN - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1U); Qt3DRender::Render::TechniqueFilter *backendTechniqueFilter = static_cast<Qt3DRender::Render::TechniqueFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(frameGraphFilter->id())); QVERIFY(backendTechniqueFilter != nullptr); @@ -387,7 +362,7 @@ private Q_SLOTS: testAspect.initializeRenderer(); // THEN - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1U); Qt3DRender::Render::TechniqueFilter *backendTechniqueFilter = static_cast<Qt3DRender::Render::TechniqueFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(frameGraphFilter->id())); QVERIFY(backendTechniqueFilter != nullptr); @@ -421,7 +396,7 @@ private Q_SLOTS: testAspect.initializeRenderer(); // THEN - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1U); Qt3DRender::Render::RenderPassFilter *backendPassFilter = static_cast<Qt3DRender::Render::RenderPassFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(frameGraphFilter->id())); QVERIFY(backendPassFilter != nullptr); @@ -461,7 +436,7 @@ private Q_SLOTS: testAspect.initializeRenderer(); // THEN - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1U); Qt3DRender::Render::RenderPassFilter *backendPassFilter = static_cast<Qt3DRender::Render::RenderPassFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(frameGraphFilter->id())); QVERIFY(backendPassFilter != nullptr); @@ -512,7 +487,7 @@ private Q_SLOTS: Qt3DRender::Render::MaterialParameterGathererJobPtr gatherer = testAspect.materialGathererJob(); testAspect.initializeRenderer(); - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1U); Qt3DRender::Render::TechniqueFilter *backendTechniqueFilter = static_cast<Qt3DRender::Render::TechniqueFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(techniqueFilterFG->id())); Qt3DRender::Render::RenderPassFilter *backendRenderPassFilter = static_cast<Qt3DRender::Render::RenderPassFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(renderPassFG->id())); QVERIFY(backendTechniqueFilter != nullptr); @@ -527,7 +502,7 @@ private Q_SLOTS: QCOMPARE(gatherer->materialToPassAndParameter().size(), 1); const std::vector<Qt3DRender::Render::RenderPassParameterData> passParameterData = gatherer->materialToPassAndParameter().begin().value(); - QCOMPARE(passParameterData.size(), 1); + QCOMPARE(passParameterData.size(), 1U); const Qt3DRender::Render::RenderPassParameterData data = passParameterData.front(); @@ -568,7 +543,7 @@ private Q_SLOTS: Qt3DRender::Render::MaterialParameterGathererJobPtr gatherer = testAspect.materialGathererJob(); testAspect.initializeRenderer(); - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1U); Qt3DRender::Render::TechniqueFilter *backendTechniqueFilter = static_cast<Qt3DRender::Render::TechniqueFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(techniqueFilterFG->id())); Qt3DRender::Render::RenderPassFilter *backendRenderPassFilter = static_cast<Qt3DRender::Render::RenderPassFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(renderPassFG->id())); QVERIFY(backendTechniqueFilter != nullptr); @@ -583,7 +558,7 @@ private Q_SLOTS: QCOMPARE(gatherer->materialToPassAndParameter().size(), 1); const std::vector<Qt3DRender::Render::RenderPassParameterData> passParameterData = gatherer->materialToPassAndParameter().begin().value(); - QCOMPARE(passParameterData.size(), 1); + QCOMPARE(passParameterData.size(), 1U); const Qt3DRender::Render::RenderPassParameterData data = passParameterData.front(); @@ -623,7 +598,7 @@ private Q_SLOTS: Qt3DRender::Render::MaterialParameterGathererJobPtr gatherer = testAspect.materialGathererJob(); testAspect.initializeRenderer(); - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1U); Qt3DRender::Render::TechniqueFilter *backendTechniqueFilter = static_cast<Qt3DRender::Render::TechniqueFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(techniqueFilterFG->id())); Qt3DRender::Render::RenderPassFilter *backendRenderPassFilter = static_cast<Qt3DRender::Render::RenderPassFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(renderPassFG->id())); QVERIFY(backendTechniqueFilter != nullptr); @@ -638,7 +613,7 @@ private Q_SLOTS: QCOMPARE(gatherer->materialToPassAndParameter().size(), 1); const std::vector<Qt3DRender::Render::RenderPassParameterData> passParameterData = gatherer->materialToPassAndParameter().begin().value(); - QCOMPARE(passParameterData.size(), 1); + QCOMPARE(passParameterData.size(), 1U); const Qt3DRender::Render::RenderPassParameterData data = passParameterData.front(); @@ -677,7 +652,7 @@ private Q_SLOTS: Qt3DRender::Render::MaterialParameterGathererJobPtr gatherer = testAspect.materialGathererJob(); testAspect.initializeRenderer(); - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1U); Qt3DRender::Render::TechniqueFilter *backendTechniqueFilter = static_cast<Qt3DRender::Render::TechniqueFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(techniqueFilterFG->id())); Qt3DRender::Render::RenderPassFilter *backendRenderPassFilter = static_cast<Qt3DRender::Render::RenderPassFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(renderPassFG->id())); QVERIFY(backendTechniqueFilter != nullptr); @@ -692,7 +667,7 @@ private Q_SLOTS: QCOMPARE(gatherer->materialToPassAndParameter().size(), 1); const std::vector<Qt3DRender::Render::RenderPassParameterData> passParameterData = gatherer->materialToPassAndParameter().begin().value(); - QCOMPARE(passParameterData.size(), 1); + QCOMPARE(passParameterData.size(), 1U); const Qt3DRender::Render::RenderPassParameterData data = passParameterData.front(); @@ -727,7 +702,7 @@ private Q_SLOTS: Qt3DRender::Render::MaterialParameterGathererJobPtr gatherer = testAspect.materialGathererJob(); testAspect.initializeRenderer(); - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1U); Qt3DRender::Render::TechniqueFilter *backendTechniqueFilter = static_cast<Qt3DRender::Render::TechniqueFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(techniqueFilterFG->id())); Qt3DRender::Render::RenderPassFilter *backendRenderPassFilter = static_cast<Qt3DRender::Render::RenderPassFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(renderPassFG->id())); QVERIFY(backendTechniqueFilter != nullptr); @@ -742,7 +717,7 @@ private Q_SLOTS: QCOMPARE(gatherer->materialToPassAndParameter().size(), 1); const std::vector<Qt3DRender::Render::RenderPassParameterData> passParameterData = gatherer->materialToPassAndParameter().begin().value(); - QCOMPARE(passParameterData.size(), 1); + QCOMPARE(passParameterData.size(), 1U); const Qt3DRender::Render::RenderPassParameterData data = passParameterData.front(); @@ -771,7 +746,7 @@ private Q_SLOTS: Qt3DRender::Render::MaterialParameterGathererJobPtr gatherer = testAspect.materialGathererJob(); testAspect.initializeRenderer(); - QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1); + QCOMPARE(testAspect.nodeManagers()->materialManager()->activeHandles().size(), 1U); Qt3DRender::Render::TechniqueFilter *backendTechniqueFilter = static_cast<Qt3DRender::Render::TechniqueFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(techniqueFilterFG->id())); Qt3DRender::Render::RenderPassFilter *backendRenderPassFilter = static_cast<Qt3DRender::Render::RenderPassFilter *>(testAspect.nodeManagers()->frameGraphManager()->lookupNode(renderPassFG->id())); QVERIFY(backendTechniqueFilter != nullptr); @@ -786,7 +761,7 @@ private Q_SLOTS: QCOMPARE(gatherer->materialToPassAndParameter().size(), 1); const std::vector<Qt3DRender::Render::RenderPassParameterData> passParameterData = gatherer->materialToPassAndParameter().begin().value(); - QCOMPARE(passParameterData.size(), 1); + QCOMPARE(passParameterData.size(), 1U); const Qt3DRender::Render::RenderPassParameterData data = passParameterData.front(); diff --git a/tests/auto/render/opengl/opengl.pro b/tests/auto/render/opengl/opengl.pro deleted file mode 100644 index 2e99a970d..000000000 --- a/tests/auto/render/opengl/opengl.pro +++ /dev/null @@ -1,23 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS += \ - filtercompatibletechniquejob \ - graphicshelpergl3_3 \ - graphicshelpergl3_2 \ - graphicshelpergl2 \ - glshadermanager \ - textures \ - renderer \ - renderviewutils \ - renderviews \ - renderqueue \ - renderviewbuilder \ - qgraphicsutils \ - computecommand \ - gltexturemanager - -qtHaveModule(quick) { - SUBDIRS += \ - materialparametergathererjob -} -!macos: SUBDIRS += graphicshelpergl4 diff --git a/tests/auto/render/opengl/opengl_render_plugin.pri b/tests/auto/render/opengl/opengl_render_plugin.pri deleted file mode 100644 index 50fade878..000000000 --- a/tests/auto/render/opengl/opengl_render_plugin.pri +++ /dev/null @@ -1,18 +0,0 @@ -# Found no way of having the test runner include the correct -# library path as runtime - -#PLUGIN_SRC_PATH = $$PWD/../../../../src/plugins/renderers/opengl - -#INCLUDEPATH += \ -# $$PLUGIN_SRC_PATH/graphicshelpers \ -# $$PLUGIN_SRC_PATH/io \ -# $$PLUGIN_SRC_PATH/jobs \ -# $$PLUGIN_SRC_PATH/managers \ -# $$PLUGIN_SRC_PATH/renderer \ -# $$PLUGIN_SRC_PATH/renderstates \ -# $$PLUGIN_SRC_PATH/textures - -#LIBS += -L$$[QT_INSTALL_PLUGINS]/renderers/ -lopenglrenderer - -# Instead we link against the sources directly -include(../../../../src/plugins/renderers/opengl/opengl.pri) diff --git a/tests/auto/render/opengl/qgraphicsutils/CMakeLists.txt b/tests/auto/render/opengl/qgraphicsutils/CMakeLists.txt index c0874f12e..496be0d86 100644 --- a/tests/auto/render/opengl/qgraphicsutils/CMakeLists.txt +++ b/tests/auto/render/opengl/qgraphicsutils/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from qgraphicsutils.pro. ##################################################################### diff --git a/tests/auto/render/opengl/qgraphicsutils/qgraphicsutils.pro b/tests/auto/render/opengl/qgraphicsutils/qgraphicsutils.pro deleted file mode 100644 index 8c936c527..000000000 --- a/tests/auto/render/opengl/qgraphicsutils/qgraphicsutils.pro +++ /dev/null @@ -1,12 +0,0 @@ -TEMPLATE = app - -TARGET = tst_qgraphicsutils - -QT += 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += tst_qgraphicsutils.cpp - -# Link Against OpenGL Renderer Plugin -include(../opengl_render_plugin.pri) diff --git a/tests/auto/render/opengl/qgraphicsutils/tst_qgraphicsutils.cpp b/tests/auto/render/opengl/qgraphicsutils/tst_qgraphicsutils.cpp index aefbeffbe..b7af84ba6 100644 --- a/tests/auto/render/opengl/qgraphicsutils/tst_qgraphicsutils.cpp +++ b/tests/auto/render/opengl/qgraphicsutils/tst_qgraphicsutils.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <qgraphicsutils_p.h> diff --git a/tests/auto/render/opengl/renderer/CMakeLists.txt b/tests/auto/render/opengl/renderer/CMakeLists.txt index 209b10fa2..9bb043c51 100644 --- a/tests/auto/render/opengl/renderer/CMakeLists.txt +++ b/tests/auto/render/opengl/renderer/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from renderer.pro. ##################################################################### diff --git a/tests/auto/render/opengl/renderer/renderer.pro b/tests/auto/render/opengl/renderer/renderer.pro deleted file mode 100644 index a4a459655..000000000 --- a/tests/auto/render/opengl/renderer/renderer.pro +++ /dev/null @@ -1,15 +0,0 @@ -TEMPLATE = app - -TARGET = tst_renderer - -QT += 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += tst_renderer.cpp - -# Link Against OpenGL Renderer Plugin -include(../opengl_render_plugin.pri) - -CONFIG += useCommonTestAspect -include(../../commons/commons.pri) diff --git a/tests/auto/render/opengl/renderer/tst_renderer.cpp b/tests/auto/render/opengl/renderer/tst_renderer.cpp index 69855f346..46c909a1e 100644 --- a/tests/auto/render/opengl/renderer/tst_renderer.cpp +++ b/tests/auto/render/opengl/renderer/tst_renderer.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <QMutex> @@ -81,14 +56,14 @@ private Q_SLOTS: std::vector<Qt3DCore::QAspectJobPtr> jobs = renderer.preRenderingJobs(); // THEN - QCOMPARE(jobs.size(), 0); + QCOMPARE(jobs.size(), 0U); // WHEN renderer.m_sendBufferCaptureJob->addRequest({Qt3DCore::QNodeId(), {}}); jobs = renderer.preRenderingJobs(); // THEN - QCOMPARE(jobs.size(), 1); // SendBufferCaptureJob + QCOMPARE(jobs.size(), 1U); // SendBufferCaptureJob // Note: pending render buffer captures are only cleared when the job is run // WHEN @@ -97,7 +72,7 @@ private Q_SLOTS: // THEN QCOMPARE(jobs.size(), - 1); // SendBufferCaptureJob´ + 1U); // SendBufferCaptureJob´ // Note: pending set fence handles are only cleared when the job is run // Properly shutdown command thread @@ -138,16 +113,16 @@ private Q_SLOTS: // NOTE: FilterCompatibleTechniqueJob and ShaderGathererJob cannot run because the context // is not initialized in this test - const int renderViewBuilderMaterialCacheJobCount = 1 + 1; + const uint renderViewBuilderMaterialCacheJobCount = 1 + 1; // syncMaterialGathererJob // n * materialGathererJob (where n depends on the numbers of available threads and the number of materials) - const int layerCacheJobCount = 2; + const uint layerCacheJobCount = 2; // filterEntityByLayerJob, // syncFilterEntityByLayerJob - const int singleRenderViewCommandRebuildJobCount = 1 + Qt3DCore::QAspectJobManager::idealThreadCount(); + const uint singleRenderViewCommandRebuildJobCount = 1 + Qt3DCore::QAspectJobManager::idealThreadCount(); - const int singleRenderViewJobCount = 8 + 1 * Qt3DCore::QAspectJobManager::idealThreadCount(); + const uint singleRenderViewJobCount = 8 + 1 * Qt3DCore::QAspectJobManager::idealThreadCount(); // RenderViewBuilder renderViewJob, // syncRenderViewInitializationJob, // syncFrustumCullingJob, diff --git a/tests/auto/render/opengl/renderqueue/CMakeLists.txt b/tests/auto/render/opengl/renderqueue/CMakeLists.txt index a2c5cb688..ed215fcd0 100644 --- a/tests/auto/render/opengl/renderqueue/CMakeLists.txt +++ b/tests/auto/render/opengl/renderqueue/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from renderqueue.pro. ##################################################################### diff --git a/tests/auto/render/opengl/renderqueue/renderqueue.pro b/tests/auto/render/opengl/renderqueue/renderqueue.pro deleted file mode 100644 index 19106ba92..000000000 --- a/tests/auto/render/opengl/renderqueue/renderqueue.pro +++ /dev/null @@ -1,14 +0,0 @@ -TEMPLATE = app - -TARGET = tst_renderqueue - -QT += 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += tst_renderqueue.cpp - -include(../../../core/common/common.pri) - -# Link Against OpenGL Renderer Plugin -include(../opengl_render_plugin.pri) diff --git a/tests/auto/render/opengl/renderqueue/tst_renderqueue.cpp b/tests/auto/render/opengl/renderqueue/tst_renderqueue.cpp index ca176f7c2..f6abfdf36 100644 --- a/tests/auto/render/opengl/renderqueue/tst_renderqueue.cpp +++ b/tests/auto/render/opengl/renderqueue/tst_renderqueue.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <QMutex> @@ -199,7 +174,8 @@ void tst_RenderQueue::concurrentQueueAccess() // WHEN unlocked // THEN QVERIFY (renderQueue->isFrameQueueComplete()); - QCOMPARE(renderQueue->nextFrameQueue().size(), renderQueue->targetRenderViewCount()); + QCOMPARE(renderQueue->nextFrameQueue().size(), + size_t(renderQueue->targetRenderViewCount())); // reset queue for next frame renderQueue->reset(); diff --git a/tests/auto/render/opengl/renderviewbuilder/CMakeLists.txt b/tests/auto/render/opengl/renderviewbuilder/CMakeLists.txt index 1cfec3785..5a439d5a0 100644 --- a/tests/auto/render/opengl/renderviewbuilder/CMakeLists.txt +++ b/tests/auto/render/opengl/renderviewbuilder/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from renderviewbuilder.pro. ##################################################################### diff --git a/tests/auto/render/opengl/renderviewbuilder/renderviewbuilder.pro b/tests/auto/render/opengl/renderviewbuilder/renderviewbuilder.pro deleted file mode 100644 index b7b8f5b81..000000000 --- a/tests/auto/render/opengl/renderviewbuilder/renderviewbuilder.pro +++ /dev/null @@ -1,15 +0,0 @@ -TEMPLATE = app - -TARGET = tst_renderviewbuilder - -QT += 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += tst_renderviewbuilder.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/renderviewbuilder/tst_renderviewbuilder.cpp b/tests/auto/render/opengl/renderviewbuilder/tst_renderviewbuilder.cpp index 62b0bed05..53848c340 100644 --- a/tests/auto/render/opengl/renderviewbuilder/tst_renderviewbuilder.cpp +++ b/tests/auto/render/opengl/renderviewbuilder/tst_renderviewbuilder.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <Qt3DCore/private/qaspectjobmanager_p.h> @@ -251,8 +226,8 @@ private Q_SLOTS: QVERIFY(renderViewBuilder.syncRenderViewPostCommandUpdateJob().isNull()); QVERIFY(renderViewBuilder.syncRenderViewPostInitializationJob().isNull()); - QCOMPARE(renderViewBuilder.renderViewCommandUpdaterJobs().size(), 0); - QCOMPARE(renderViewBuilder.materialGathererJobs().size(), 0); + QCOMPARE(renderViewBuilder.renderViewCommandUpdaterJobs().size(), 0U); + QCOMPARE(renderViewBuilder.materialGathererJobs().size(), 0U); // WHEN renderViewBuilder.prepareJobs(); @@ -264,9 +239,9 @@ private Q_SLOTS: QVERIFY(renderViewBuilder.filterEntityByLayerJob().isNull()); QVERIFY(renderViewBuilder.syncFilterEntityByLayerJob().isNull()); - QCOMPARE(renderViewBuilder.renderViewCommandUpdaterJobs().size(), Qt3DCore::QAspectJobManager::idealThreadCount()); - QCOMPARE(renderViewBuilder.materialGathererJobs().size(), 0); - QCOMPARE(renderViewBuilder.buildJobHierachy().size(), 8 + 1 * Qt3DCore::QAspectJobManager::idealThreadCount()); + QCOMPARE(renderViewBuilder.renderViewCommandUpdaterJobs().size(), size_t(Qt3DCore::QAspectJobManager::idealThreadCount())); + QCOMPARE(renderViewBuilder.materialGathererJobs().size(), 0U); + QCOMPARE(renderViewBuilder.buildJobHierachy().size(), 8U + 1 * Qt3DCore::QAspectJobManager::idealThreadCount()); } { @@ -282,7 +257,7 @@ private Q_SLOTS: QVERIFY(!renderViewBuilder.syncFilterEntityByLayerJob().isNull()); // mark jobs dirty and recheck - QCOMPARE(renderViewBuilder.buildJobHierachy().size(), 10 + renderViewBuilder.optimalJobCount()); + QCOMPARE(renderViewBuilder.buildJobHierachy().size(), 10U + renderViewBuilder.optimalJobCount()); } { @@ -296,11 +271,11 @@ private Q_SLOTS: QCOMPARE(renderViewBuilder.materialGathererCacheNeedsToBeRebuilt(), true); // We have elementsPerJob = qMax(materialHandles.size() / m_optimalParallelJobCount, 1) // Given we have 2 materials -> 1 element per job -> so we need 2 jobs - QCOMPARE(renderViewBuilder.materialGathererJobs().size(), 2); + QCOMPARE(renderViewBuilder.materialGathererJobs().size(), 2U); QVERIFY(!renderViewBuilder.syncMaterialGathererJob().isNull()); // mark jobs dirty and recheck - QCOMPARE(renderViewBuilder.buildJobHierachy().size(), 13); + QCOMPARE(renderViewBuilder.buildJobHierachy().size(), 13U); } } @@ -328,10 +303,10 @@ private Q_SLOTS: // THEN // Step 1 - QCOMPARE(renderViewBuilder.renderViewJob()->dependencies().size(), 1); // Depends upon skinning palette update + QCOMPARE(renderViewBuilder.renderViewJob()->dependencies().size(), 1U); // Depends upon skinning palette update // Step 2 - QCOMPARE(renderViewBuilder.syncRenderViewPostInitializationJob()->dependencies().size(), 1); + QCOMPARE(renderViewBuilder.syncRenderViewPostInitializationJob()->dependencies().size(), 1U); QCOMPARE(renderViewBuilder.syncRenderViewPostInitializationJob()->dependencies().front().toStrongRef().data(), renderViewBuilder.renderViewJob().data()); @@ -339,21 +314,21 @@ private Q_SLOTS: QVERIFY(renderViewBuilder.filterEntityByLayerJob().isNull()); QVERIFY(renderViewBuilder.syncFilterEntityByLayerJob().isNull()); - QCOMPARE(renderViewBuilder.filterProximityJob()->dependencies().size(), 2); + QCOMPARE(renderViewBuilder.filterProximityJob()->dependencies().size(), 2U); QVERIFY(containsDependency(renderViewBuilder.filterProximityJob()->dependencies(), renderViewBuilder.syncRenderViewPostInitializationJob())); QVERIFY(containsDependency(renderViewBuilder.filterProximityJob()->dependencies(), expandBVJob)); - QCOMPARE(renderViewBuilder.setClearDrawBufferIndexJob()->dependencies().size(), 1); + QCOMPARE(renderViewBuilder.setClearDrawBufferIndexJob()->dependencies().size(), 1U); QCOMPARE(renderViewBuilder.setClearDrawBufferIndexJob()->dependencies().front().toStrongRef().data(), renderViewBuilder.syncRenderViewPostInitializationJob().data()); - QCOMPARE(renderViewBuilder.syncPreFrustumCullingJob()->dependencies().size(), 3); + QCOMPARE(renderViewBuilder.syncPreFrustumCullingJob()->dependencies().size(), 3U); QVERIFY(containsDependency(renderViewBuilder.syncPreFrustumCullingJob()->dependencies(), renderViewBuilder.syncRenderViewPostInitializationJob())); QVERIFY(containsDependency(renderViewBuilder.syncPreFrustumCullingJob()->dependencies(), wordTransformJob)); QVERIFY(containsDependency(renderViewBuilder.syncPreFrustumCullingJob()->dependencies(), testAspect.renderer()->updateShaderDataTransformJob())); // Step 4 - QCOMPARE(renderViewBuilder.frustumCullingJob()->dependencies().size(), 2); + QCOMPARE(renderViewBuilder.frustumCullingJob()->dependencies().size(), 2U); QVERIFY(containsDependency(renderViewBuilder.frustumCullingJob()->dependencies(), renderViewBuilder.syncPreFrustumCullingJob())); QVERIFY(containsDependency(renderViewBuilder.frustumCullingJob()->dependencies(), expandBVJob)); @@ -368,7 +343,7 @@ private Q_SLOTS: // Step 5 for (const auto &renderViewBuilderJob : renderViewBuilder.renderViewCommandUpdaterJobs()) { - QCOMPARE(renderViewBuilderJob->dependencies().size(), 1); + QCOMPARE(renderViewBuilderJob->dependencies().size(), 1U); QCOMPARE(renderViewBuilderJob->dependencies().front().toStrongRef().data(), renderViewBuilder.syncRenderViewPreCommandUpdateJob().data()); } @@ -389,44 +364,44 @@ private Q_SLOTS: // THEN // Step 1 - QCOMPARE(renderViewBuilder.renderViewJob()->dependencies().size(), 1); // Depends upon skinning palette update + QCOMPARE(renderViewBuilder.renderViewJob()->dependencies().size(), 1U); // Depends upon skinning palette update // Step 2 - QCOMPARE(renderViewBuilder.syncRenderViewPostInitializationJob()->dependencies().size(), 1); + QCOMPARE(renderViewBuilder.syncRenderViewPostInitializationJob()->dependencies().size(), 1U); QCOMPARE(renderViewBuilder.syncRenderViewPostInitializationJob()->dependencies().front().toStrongRef().data(), renderViewBuilder.renderViewJob().data()); // Step 3 - QCOMPARE(renderViewBuilder.filterEntityByLayerJob()->dependencies().size(), 3); + QCOMPARE(renderViewBuilder.filterEntityByLayerJob()->dependencies().size(), 3U); QVERIFY(containsDependency(renderViewBuilder.filterEntityByLayerJob()->dependencies(), updateEntityLayerJob)); QVERIFY(containsDependency(renderViewBuilder.filterEntityByLayerJob()->dependencies(), renderViewBuilder.syncRenderViewPostInitializationJob())); QVERIFY(containsDependency(renderViewBuilder.filterEntityByLayerJob()->dependencies(), updateTreeEnabledJob)); - QCOMPARE(renderViewBuilder.syncFilterEntityByLayerJob()->dependencies().size(), 1); + QCOMPARE(renderViewBuilder.syncFilterEntityByLayerJob()->dependencies().size(), 1U); QVERIFY(containsDependency(renderViewBuilder.syncFilterEntityByLayerJob()->dependencies(), renderViewBuilder.filterEntityByLayerJob())); - QCOMPARE(renderViewBuilder.filterProximityJob()->dependencies().size(), 2); + QCOMPARE(renderViewBuilder.filterProximityJob()->dependencies().size(), 2U); QVERIFY(containsDependency(renderViewBuilder.filterProximityJob()->dependencies(), renderViewBuilder.syncRenderViewPostInitializationJob())); QVERIFY(containsDependency(renderViewBuilder.filterProximityJob()->dependencies(), expandBVJob)); - QCOMPARE(renderViewBuilder.setClearDrawBufferIndexJob()->dependencies().size(), 1); + QCOMPARE(renderViewBuilder.setClearDrawBufferIndexJob()->dependencies().size(), 1U); QCOMPARE(renderViewBuilder.setClearDrawBufferIndexJob()->dependencies().front().toStrongRef().data(), renderViewBuilder.syncRenderViewPostInitializationJob().data()); - QCOMPARE(renderViewBuilder.syncPreFrustumCullingJob()->dependencies().size(), 3); + QCOMPARE(renderViewBuilder.syncPreFrustumCullingJob()->dependencies().size(), 3U); QVERIFY(containsDependency(renderViewBuilder.syncPreFrustumCullingJob()->dependencies(), renderViewBuilder.syncRenderViewPostInitializationJob())); QVERIFY(containsDependency(renderViewBuilder.syncPreFrustumCullingJob()->dependencies(), wordTransformJob)); QVERIFY(containsDependency(renderViewBuilder.syncPreFrustumCullingJob()->dependencies(), testAspect.renderer()->updateShaderDataTransformJob())); for (const auto &materialGatherer : renderViewBuilder.materialGathererJobs()) { - QCOMPARE(materialGatherer->dependencies().size(), 3); + QCOMPARE(materialGatherer->dependencies().size(), 3U); QVERIFY(containsDependency(materialGatherer->dependencies(), renderViewBuilder.syncRenderViewPostInitializationJob())); QVERIFY(containsDependency(materialGatherer->dependencies(), testAspect.renderer()->introspectShadersJob())); QVERIFY(containsDependency(materialGatherer->dependencies(), testAspect.renderer()->filterCompatibleTechniqueJob())); } // Step 4 - QCOMPARE(renderViewBuilder.frustumCullingJob()->dependencies().size(), 2); + QCOMPARE(renderViewBuilder.frustumCullingJob()->dependencies().size(), 2U); QVERIFY(containsDependency(renderViewBuilder.frustumCullingJob()->dependencies(), renderViewBuilder.syncPreFrustumCullingJob())); QVERIFY(containsDependency(renderViewBuilder.frustumCullingJob()->dependencies(), expandBVJob)); @@ -440,7 +415,7 @@ private Q_SLOTS: // Step 5 for (const auto &renderViewBuilderJob : renderViewBuilder.renderViewCommandUpdaterJobs()) { - QCOMPARE(renderViewBuilderJob->dependencies().size(), 1); + QCOMPARE(renderViewBuilderJob->dependencies().size(), 1U); QCOMPARE(renderViewBuilderJob->dependencies().front().toStrongRef().data(), renderViewBuilder.syncRenderViewPreCommandUpdateJob().data()); } @@ -491,7 +466,7 @@ private Q_SLOTS: // THEN Qt3DRender::Render::RendererCache<Qt3DRender::Render::OpenGL::RenderCommand> *cache = renderer->cache(); - QCOMPARE(cache->gatheredLights.size(), 2); + QCOMPARE(cache->gatheredLights.size(), 2U); QVERIFY(cache->environmentLight != nullptr); } @@ -512,7 +487,7 @@ private Q_SLOTS: // THEN Qt3DRender::Render::RendererCache<Qt3DRender::Render::OpenGL::RenderCommand> *cache = renderer->cache(); - QCOMPARE(cache->renderableEntities.size(), 1); + QCOMPARE(cache->renderableEntities.size(), 1U); } void checkComputableEntitiesFilteringExecution() @@ -532,7 +507,7 @@ private Q_SLOTS: // THEN Qt3DRender::Render::RendererCache<Qt3DRender::Render::OpenGL::RenderCommand> *cache = renderer->cache(); - QCOMPARE(cache->computeEntities.size(), 1); + QCOMPARE(cache->computeEntities.size(), 1U); } void checkSyncRenderViewInitializationExecution() @@ -675,8 +650,8 @@ private Q_SLOTS: std::vector<Qt3DRender::Render::Entity *> filteredEntity = renderViewBuilder.filterEntityByLayerJob()->filteredEntities(); // THEN - QCOMPARE(renderableEntity.size(), 200); - QCOMPARE(filteredEntity.size(), 100); + QCOMPARE(renderableEntity.size(), 200U); + QCOMPARE(filteredEntity.size(), 100U); std::sort(renderableEntity.begin(), renderableEntity.end()); @@ -684,7 +659,7 @@ private Q_SLOTS: renderableEntity = Qt3DRender::Render::entitiesInSubset(renderableEntity, filteredEntity); // THEN - QCOMPARE(renderableEntity.size(), 100); + QCOMPARE(renderableEntity.size(), 100U); for (const auto entity : renderableEntity) { QVERIFY(std::find(filteredEntity.begin(), filteredEntity.end(), diff --git a/tests/auto/render/opengl/renderviews/CMakeLists.txt b/tests/auto/render/opengl/renderviews/CMakeLists.txt index e3c0b0f58..bcc8b88d1 100644 --- a/tests/auto/render/opengl/renderviews/CMakeLists.txt +++ b/tests/auto/render/opengl/renderviews/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from renderviews.pro. ##################################################################### diff --git a/tests/auto/render/opengl/renderviews/renderviews.pro b/tests/auto/render/opengl/renderviews/renderviews.pro deleted file mode 100644 index 7efbaec14..000000000 --- a/tests/auto/render/opengl/renderviews/renderviews.pro +++ /dev/null @@ -1,15 +0,0 @@ -TEMPLATE = app - -TARGET = tst_renderviews - -QT += 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += tst_renderviews.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/renderviews/tst_renderviews.cpp b/tests/auto/render/opengl/renderviews/tst_renderviews.cpp index 9d4765f8a..f73a9e7db 100644 --- a/tests/auto/render/opengl/renderviews/tst_renderviews.cpp +++ b/tests/auto/render/opengl/renderviews/tst_renderviews.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <qbackendnodetester.h> @@ -294,6 +269,68 @@ private Q_SLOTS: << QList<ShaderParameterPack> { pack1, minifiedPack1, minifiedPack1, pack1, minifiedPack1, minifiedPack1 }; } + void checkShaderParameterPackStoresSingleUBOPerBlockIndex() + { + // GIVEN + ShaderParameterPack pack; + auto nodeId1 = Qt3DCore::QNodeId::createId(); + auto nodeId2 = Qt3DCore::QNodeId::createId(); + + BlockToUBO ubo1 { 1, nodeId1, false, {}}; + BlockToUBO ubo2 { 1, nodeId2, false, {}}; + + // WHEN + pack.setUniformBuffer(ubo1); + pack.setUniformBuffer(ubo2); + + // THEN + QCOMPARE(pack.uniformBuffers().size(), 1U); + QCOMPARE(pack.uniformBuffers().front().m_blockIndex, 1); + QCOMPARE(pack.uniformBuffers().front().m_bufferID, nodeId2); + + // WHEN + BlockToUBO ubo3 { 2, nodeId2, false, {}}; + pack.setUniformBuffer(ubo3); + + // THEN + QCOMPARE(pack.uniformBuffers().size(), 2U); + QCOMPARE(pack.uniformBuffers().front().m_blockIndex, 1); + QCOMPARE(pack.uniformBuffers().front().m_bufferID, nodeId2); + QCOMPARE(pack.uniformBuffers().back().m_blockIndex, 2); + QCOMPARE(pack.uniformBuffers().back().m_bufferID, nodeId2); + } + + void checkShaderParameterPackStoresSingleSSBOPerBlockIndex() + { + // GIVEN + ShaderParameterPack pack; + auto nodeId1 = Qt3DCore::QNodeId::createId(); + auto nodeId2 = Qt3DCore::QNodeId::createId(); + + BlockToSSBO ssbo1 { 1, 0, nodeId1}; + BlockToSSBO ssbo2 { 1, 0, nodeId2}; + + // WHEN + pack.setShaderStorageBuffer(ssbo1); + pack.setShaderStorageBuffer(ssbo2); + + // THEN + QCOMPARE(pack.shaderStorageBuffers().size(), 1U); + QCOMPARE(pack.shaderStorageBuffers().front().m_blockIndex, 1); + QCOMPARE(pack.shaderStorageBuffers().front().m_bufferID, nodeId2); + + // WHEN + BlockToSSBO ssbo3 { 2, 1, nodeId2}; + pack.setShaderStorageBuffer(ssbo3); + + // THEN + QCOMPARE(pack.shaderStorageBuffers().size(), 2U); + QCOMPARE(pack.shaderStorageBuffers().front().m_blockIndex, 1); + QCOMPARE(pack.shaderStorageBuffers().front().m_bufferID, nodeId2); + QCOMPARE(pack.shaderStorageBuffers().back().m_blockIndex, 2); + QCOMPARE(pack.shaderStorageBuffers().back().m_bufferID, nodeId2); + } + void checkRenderViewUniformMinification() { QFETCH(QList<QShaderProgram*>, shaders); diff --git a/tests/auto/render/opengl/renderviewutils/CMakeLists.txt b/tests/auto/render/opengl/renderviewutils/CMakeLists.txt index 771e49e10..d4e5a3b13 100644 --- a/tests/auto/render/opengl/renderviewutils/CMakeLists.txt +++ b/tests/auto/render/opengl/renderviewutils/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from renderviewutils.pro. ##################################################################### diff --git a/tests/auto/render/opengl/renderviewutils/renderviewutils.pro b/tests/auto/render/opengl/renderviewutils/renderviewutils.pro deleted file mode 100644 index e9c9f8d51..000000000 --- a/tests/auto/render/opengl/renderviewutils/renderviewutils.pro +++ /dev/null @@ -1,15 +0,0 @@ -TEMPLATE = app - -TARGET = tst_renderviewutils - -QT += core-private 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += tst_renderviewutils.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/renderviewutils/tst_renderviewutils.cpp b/tests/auto/render/opengl/renderviewutils/tst_renderviewutils.cpp index 629952422..d6f3ce220 100644 --- a/tests/auto/render/opengl/renderviewutils/tst_renderviewutils.cpp +++ b/tests/auto/render/opengl/renderviewutils/tst_renderviewutils.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <qbackendnodetester.h> @@ -462,7 +437,7 @@ void tst_RenderViewUtils::topLevelScalarValue() blockBuilder.buildActiveUniformNameValueMapStructHelper(backendShaderData, QStringLiteral("MyBlock")); // THEN - QCOMPARE(blockBuilder.activeUniformNamesToValue.count(), 1); + QCOMPARE(blockBuilder.activeUniformNamesToValue.size(), 1); // WHEN Qt3DRender::Render::UniformBlockValueBuilderHash::const_iterator it = blockBuilder.activeUniformNamesToValue.begin(); @@ -536,7 +511,7 @@ void tst_RenderViewUtils::topLevelTextureValue() blockBuilder.buildActiveUniformNameValueMapStructHelper(backendShaderData, QStringLiteral("MyBlock")); // THEN - QCOMPARE(blockBuilder.activeUniformNamesToValue.count(), 1); + QCOMPARE(blockBuilder.activeUniformNamesToValue.size(), 1); // WHEN Qt3DRender::Render::UniformBlockValueBuilderHash::const_iterator it = blockBuilder.activeUniformNamesToValue.begin(); @@ -577,7 +552,7 @@ void tst_RenderViewUtils::topLevelArrayValue() blockBuilder.buildActiveUniformNameValueMapStructHelper(backendShaderData, QStringLiteral("MyBlock")); // THEN - QCOMPARE(blockBuilder.activeUniformNamesToValue.count(), 1); + QCOMPARE(blockBuilder.activeUniformNamesToValue.size(), 1); // WHEN Qt3DRender::Render::UniformBlockValueBuilderHash::const_iterator it = blockBuilder.activeUniformNamesToValue.begin(); @@ -647,7 +622,7 @@ void tst_RenderViewUtils::nestedShaderDataValue() blockBuilder.buildActiveUniformNameValueMapStructHelper(backendArrayShaderData, QStringLiteral("MyBlock")); // THEN - QCOMPARE(blockBuilder.activeUniformNamesToValue.count(), 3); + QCOMPARE(blockBuilder.activeUniformNamesToValue.size(), 3); // WHEN auto it = blockBuilder.activeUniformNamesToValue.cbegin(); @@ -721,7 +696,8 @@ void tst_RenderViewUtils::topLevelStructValue() blockBuilder.buildActiveUniformNameValueMapStructHelper(backendShaderData, blockName); // THEN - QCOMPARE(blockBuilder.activeUniformNamesToValue.count(), shaderData->buildUniformMapNameIds(blockName).size()); + QCOMPARE(size_t(blockBuilder.activeUniformNamesToValue.size()), + shaderData->buildUniformMapNameIds(blockName).size()); // WHEN Qt3DRender::Render::UniformBlockValueBuilderHash::const_iterator it = blockBuilder.activeUniformNamesToValue.begin(); @@ -770,7 +746,7 @@ void tst_RenderViewUtils::topLevelDynamicProperties() // build name-value map blockBuilder.buildActiveUniformNameValueMapStructHelper(backendShaderData, QStringLiteral("MyBlock")); // THEN - QCOMPARE(blockBuilder.activeUniformNamesToValue.count(), 3); + QCOMPARE(blockBuilder.activeUniformNamesToValue.size(), 3); QCOMPARE(blockBuilder.activeUniformNamesToValue.value(Qt3DRender::Render::StringToInt::lookupId("MyBlock.scalar")), shaderData->property("scalar")); @@ -835,8 +811,8 @@ void tst_RenderViewUtils::transformedProperties() // THEN QCOMPARE(position0Value, positionQt); - QCOMPARE(position1Value, viewMatrix * worldMatrix * position); - QCOMPARE(position2Value, worldMatrix * position); + QCOMPARE(position1Value, (viewMatrix * worldMatrix).map(position)); + QCOMPARE(position2Value, worldMatrix.map(position)); QCOMPARE(position3Value, Vector3D((worldMatrix * Vector4D(position, 0.0f)))); } diff --git a/tests/auto/render/opengl/textures/CMakeLists.txt b/tests/auto/render/opengl/textures/CMakeLists.txt index ce74fcfac..fac0800f0 100644 --- a/tests/auto/render/opengl/textures/CMakeLists.txt +++ b/tests/auto/render/opengl/textures/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from textures.pro. ##################################################################### diff --git a/tests/auto/render/opengl/textures/textures.pro b/tests/auto/render/opengl/textures/textures.pro deleted file mode 100644 index a116756af..000000000 --- a/tests/auto/render/opengl/textures/textures.pro +++ /dev/null @@ -1,15 +0,0 @@ -TEMPLATE = app - -TARGET = tst_textures - -QT += core-private 3dcore 3dcore-private 3drender 3drender-private testlib - -CONFIG += testcase - -SOURCES += tst_textures.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/textures/tst_textures.cpp b/tests/auto/render/opengl/textures/tst_textures.cpp index 8eb338f90..72c09a342 100644 --- a/tests/auto/render/opengl/textures/tst_textures.cpp +++ b/tests/auto/render/opengl/textures/tst_textures.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only // TODO Remove in Qt6 #include <QtCore/qcompilerdetection.h> |