diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-05-18 14:50:27 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-05-20 10:03:56 +0000 |
commit | ad8bdecc68482eda079e8b49c3c5e8059ec45d69 (patch) | |
tree | 6826bec0fa873ef885d167049efc232cf9cfddc6 | |
parent | ba39a03645ef6f789c8de7da71f1b08d812b2059 (diff) |
Examples: Remove shared resource library.
Split example-assets.qrc into smaller resource files per
directory and add those to the examples as required.
Task-number: QTBUG-45990
Change-Id: I0a5a6cee64dc23560e9e093f272ff0d90a6e2e97
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
39 files changed, 110 insertions, 286 deletions
diff --git a/examples/qt3d/anaglyph-rendering/anaglyph-rendering.pro b/examples/qt3d/anaglyph-rendering/anaglyph-rendering.pro index e57436172..dfe5e1cf6 100644 --- a/examples/qt3d/anaglyph-rendering/anaglyph-rendering.pro +++ b/examples/qt3d/anaglyph-rendering/anaglyph-rendering.pro @@ -9,10 +9,10 @@ OTHER_FILES += *.qml SOURCES += \ main.cpp -include("../exampleresources/exampleresources.pri") - RESOURCES += \ - resources.qrc + resources.qrc \ + ../exampleresources/cubemaps.qrc \ + ../exampleresources/obj.qrc DISTFILES += \ StereoFrameGraph.qml diff --git a/examples/qt3d/anaglyph-rendering/main.cpp b/examples/qt3d/anaglyph-rendering/main.cpp index 621217c61..4521970f0 100644 --- a/examples/qt3d/anaglyph-rendering/main.cpp +++ b/examples/qt3d/anaglyph-rendering/main.cpp @@ -34,8 +34,6 @@ ** ****************************************************************************/ -#include <exampleresources.h> - #include <Qt3DCore/window.h> #include <Qt3DRenderer/qrenderaspect.h> #include <Qt3DInput/QInputAspect> @@ -48,8 +46,6 @@ int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - initializeAssetResources("../exampleresources/example-assets.qrb"); - Qt3D::Window view; Qt3D::Quick::QQmlAspectEngine engine; diff --git a/examples/qt3d/assimp/assimp.pro b/examples/qt3d/assimp/assimp.pro index 1db64789d..85d78fe89 100644 --- a/examples/qt3d/assimp/assimp.pro +++ b/examples/qt3d/assimp/assimp.pro @@ -9,7 +9,6 @@ OTHER_FILES += main.qml SOURCES += \ main.cpp -include("../exampleresources/exampleresources.pri") - RESOURCES += \ - assimp.qrc + assimp.qrc \ + ../exampleresources/test_scene.qrc diff --git a/examples/qt3d/assimp/main.cpp b/examples/qt3d/assimp/main.cpp index 7c0858193..d9c0ede88 100644 --- a/examples/qt3d/assimp/main.cpp +++ b/examples/qt3d/assimp/main.cpp @@ -34,8 +34,6 @@ ** ****************************************************************************/ -#include <exampleresources.h> - #include <Qt3DCore/window.h> #include <Qt3DRenderer/qrenderaspect.h> #include <Qt3DInput/QInputAspect> @@ -48,8 +46,6 @@ int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - initializeAssetResources("../exampleresources/example-assets.qrb"); - Qt3D::Window view; Qt3D::Quick::QQmlAspectEngine engine; diff --git a/examples/qt3d/cpp_example/cpp_example.pro b/examples/qt3d/cpp_example/cpp_example.pro index 943f81533..64e9d142e 100644 --- a/examples/qt3d/cpp_example/cpp_example.pro +++ b/examples/qt3d/cpp_example/cpp_example.pro @@ -2,8 +2,9 @@ TEMPLATE = app QT += 3dcore 3drenderer 3dinput -include("../exampleresources/exampleresources.pri") - SOURCES += main.cpp +RESOURCES += \ + ../exampleresources/test_scene.qrc \ + ../exampleresources/gltf.qrc diff --git a/examples/qt3d/cpp_example/main.cpp b/examples/qt3d/cpp_example/main.cpp index df20ba030..014e8d958 100644 --- a/examples/qt3d/cpp_example/main.cpp +++ b/examples/qt3d/cpp_example/main.cpp @@ -36,8 +36,6 @@ #include <QGuiApplication> -#include <exampleresources.h> - #include <Qt3DCore/window.h> #include <Qt3DCore/qcamera.h> #include <Qt3DCore/qentity.h> @@ -73,8 +71,6 @@ int main(int ac, char **av) { QGuiApplication app(ac, av); - initializeAssetResources("../exampleresources/example-assets.qrb"); - Qt3D::Window view; Qt3D::QAspectEngine engine; engine.registerAspect(new Qt3D::QRenderAspect()); diff --git a/examples/qt3d/deferred-renderer-cpp/deferred-renderer-cpp.pro b/examples/qt3d/deferred-renderer-cpp/deferred-renderer-cpp.pro index eaebea4ed..ac50c9b0a 100644 --- a/examples/qt3d/deferred-renderer-cpp/deferred-renderer-cpp.pro +++ b/examples/qt3d/deferred-renderer-cpp/deferred-renderer-cpp.pro @@ -2,8 +2,6 @@ TEMPLATE = app QT += 3dcore 3drenderer 3dinput -include("../exampleresources/exampleresources.pri") - HEADERS += \ gbuffer.h \ deferredrenderer.h \ diff --git a/examples/qt3d/exampleresources/chest.qrc b/examples/qt3d/exampleresources/chest.qrc new file mode 100644 index 000000000..86fac221b --- /dev/null +++ b/examples/qt3d/exampleresources/chest.qrc @@ -0,0 +1,6 @@ +<RCC> + <qresource prefix="/"> + <file>assets/chest/Chest.obj</file> + <file>assets/chest/diffuse.webp</file> + </qresource> +</RCC> diff --git a/examples/qt3d/exampleresources/cubemaps.qrc b/examples/qt3d/exampleresources/cubemaps.qrc new file mode 100644 index 000000000..2c36602ae --- /dev/null +++ b/examples/qt3d/exampleresources/cubemaps.qrc @@ -0,0 +1,16 @@ +<RCC> + <qresource prefix="/"> + <file>assets/cubemaps/miramar/miramar_negx.webp</file> + <file>assets/cubemaps/miramar/miramar_negy.webp</file> + <file>assets/cubemaps/miramar/miramar_negz.webp</file> + <file>assets/cubemaps/miramar/miramar_posx.webp</file> + <file>assets/cubemaps/miramar/miramar_posy.webp</file> + <file>assets/cubemaps/miramar/miramar_posz.webp</file> + <file>assets/cubemaps/night/night_negx.webp</file> + <file>assets/cubemaps/night/night_negy.webp</file> + <file>assets/cubemaps/night/night_negz.webp</file> + <file>assets/cubemaps/night/night_posx.webp</file> + <file>assets/cubemaps/night/night_posy.webp</file> + <file>assets/cubemaps/night/night_posz.webp</file> + </qresource> +</RCC> diff --git a/examples/qt3d/exampleresources/exampleresources.cpp b/examples/qt3d/exampleresources/exampleresources.cpp deleted file mode 100644 index 6249f5bdd..000000000 --- a/examples/qt3d/exampleresources/exampleresources.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** 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 http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "exampleresources.h" - -#include <QDebug> - -bool initializeAssetResources( const QString& fileName ) -{ - QString assetPath = QStringLiteral( QT3D_XSTRINGIFY( ASSETS ) ) + fileName; - qDebug() << "assetPath =" << assetPath; - bool b = QResource::registerResource( assetPath ); - if ( !b ) - qDebug() << "Failed to load assets"; - return b; -} diff --git a/examples/qt3d/exampleresources/exampleresources.h b/examples/qt3d/exampleresources/exampleresources.h deleted file mode 100644 index c2d75873d..000000000 --- a/examples/qt3d/exampleresources/exampleresources.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** 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 http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QT3D_EXAMPLERESOURCES_H -#define QT3D_EXAMPLERESOURCES_H - -#include <QResource> - -#define QT3D_XSTRINGIFY(s) QT3D_STRINGIFY(s) -#define QT3D_STRINGIFY(s) #s - -bool initializeAssetResources( const QString& fileName ); - -#endif // QT3D_EXAMPLERESOURCES_H - diff --git a/examples/qt3d/exampleresources/exampleresources.pri b/examples/qt3d/exampleresources/exampleresources.pri deleted file mode 100644 index 0bd8a17f5..000000000 --- a/examples/qt3d/exampleresources/exampleresources.pri +++ /dev/null @@ -1,17 +0,0 @@ -INCLUDEPATH += $$PWD - -EXAMPLERESOURCESLIB=exampleresources - -win32 { - build_pass { - CONFIG(debug, debug|release) { - LIBS += $$shadowed($$PWD)/debug/$${QMAKE_PREFIX_STATICLIB}$${EXAMPLERESOURCESLIB}.$${QMAKE_EXTENSION_STATICLIB} - } else { - LIBS += $$shadowed($$PWD)/release/$${QMAKE_PREFIX_STATICLIB}$${EXAMPLERESOURCESLIB}.$${QMAKE_EXTENSION_STATICLIB} - } - } -} else { - LIBS += $$shadowed($$PWD)/$${QMAKE_PREFIX_STATICLIB}$${EXAMPLERESOURCESLIB}.$${QMAKE_EXTENSION_STATICLIB} -} - -unset(EXAMPLERESOURCESLIB) diff --git a/examples/qt3d/exampleresources/exampleresources.pro b/examples/qt3d/exampleresources/exampleresources.pro deleted file mode 100644 index 90c733046..000000000 --- a/examples/qt3d/exampleresources/exampleresources.pro +++ /dev/null @@ -1,36 +0,0 @@ -TEMPLATE = lib -CONFIG += static - -SOURCES += exampleresources.cpp - -HEADERS += exampleresources.h - -DEFINES += ASSETS=$$shadowed($$PWD)/ - -# -# Generate the RCC (binary resource) file for all of our assets. -# We can't use RESOURCES here, as the resources are not in a subdir, -# of each example -# -load(resources) -RCC_BINARY_SOURCES += example-assets.qrc -asset_builder.commands = $$QMAKE_RCC -binary ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} -asset_builder.depend_command = $$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} -asset_builder.input = RCC_BINARY_SOURCES -asset_builder.output = ${QMAKE_FILE_IN_BASE}.qrb -asset_builder.CONFIG += no_link target_predeps -QMAKE_EXTRA_COMPILERS += asset_builder - -OTHER_FILES += \ - example-assets.qrc \ - assets/gltf/duck/* \ - assets/gltf/rambler/* \ - assets/gltf/SuperMurdoch/* \ - assets/gltf/wine/* \ - assets/obj/* \ - assets/textures/pattern_09/* \ - assets/chest/* \ - assets/houseplants/* \ - assets/metalbarrel/* \ - assets/cubemaps/miramar/* \ - assets/cubemaps/night/* diff --git a/examples/qt3d/exampleresources/gltf.qrc b/examples/qt3d/exampleresources/gltf.qrc new file mode 100644 index 000000000..ecc727504 --- /dev/null +++ b/examples/qt3d/exampleresources/gltf.qrc @@ -0,0 +1,16 @@ +<RCC> + <qresource prefix="/"> + <file>assets/gltf/wine/_2004_old_vine_zinfandel_btl_xlg.jpg</file> + <file>assets/gltf/wine/artezin_bottle.jpg</file> + <file>assets/gltf/wine/wine.bin</file> + <file>assets/gltf/wine/wine.dae</file> + <file>assets/gltf/wine/wine.json</file> + <file>assets/gltf/wine/wine0FS.glsl</file> + <file>assets/gltf/wine/wine0VS.glsl</file> + <file>assets/gltf/wine/wine2FS.glsl</file> + <file>assets/gltf/wine/wine2VS.glsl</file> + <file>assets/gltf/wine/wine4FS.glsl</file> + <file>assets/gltf/wine/wine4VS.glsl</file> + <file>assets/gltf/wine/Wood_Cherry_Original_.jpg</file> + </qresource> +</RCC> diff --git a/examples/qt3d/exampleresources/example-assets.qrc b/examples/qt3d/exampleresources/houseplants.qrc index ccfac6563..faa47dc90 100644 --- a/examples/qt3d/exampleresources/example-assets.qrc +++ b/examples/qt3d/exampleresources/houseplants.qrc @@ -1,23 +1,5 @@ <RCC> <qresource prefix="/"> - <file>assets/gltf/wine/_2004_old_vine_zinfandel_btl_xlg.jpg</file> - <file>assets/gltf/wine/artezin_bottle.jpg</file> - <file>assets/gltf/wine/wine.bin</file> - <file>assets/gltf/wine/wine.dae</file> - <file>assets/gltf/wine/wine.json</file> - <file>assets/gltf/wine/wine0FS.glsl</file> - <file>assets/gltf/wine/wine0VS.glsl</file> - <file>assets/gltf/wine/wine2FS.glsl</file> - <file>assets/gltf/wine/wine2VS.glsl</file> - <file>assets/gltf/wine/wine4FS.glsl</file> - <file>assets/gltf/wine/wine4VS.glsl</file> - <file>assets/gltf/wine/Wood_Cherry_Original_.jpg</file> - <file>assets/test_scene.dae</file> - <file>assets/obj/ball.obj</file> - <file>assets/obj/trefoil.obj</file> - <file>assets/obj/toyplane.obj</file> - <file>assets/chest/Chest.obj</file> - <file>assets/chest/diffuse.webp</file> <file>assets/houseplants/bamboo_normal.webp</file> <file>assets/houseplants/bamboo.webp</file> <file>assets/houseplants/cover_normal.webp</file> @@ -67,35 +49,5 @@ <file>assets/houseplants/triangle-pot.obj</file> <file>assets/houseplants/triangle-shrub.obj</file> <file>assets/houseplants/triangle-spikes.obj</file> - <file>assets/metalbarrel/diffus_black.webp</file> - <file>assets/metalbarrel/diffus_blue.webp</file> - <file>assets/metalbarrel/diffus_green.webp</file> - <file>assets/metalbarrel/diffus_red.webp</file> - <file>assets/metalbarrel/diffus_rust.webp</file> - <file>assets/metalbarrel/diffus_stainless_steel.webp</file> - <file>assets/metalbarrel/diffus_yellow.webp</file> - <file>assets/metalbarrel/metal_barrel.obj</file> - <file>assets/metalbarrel/normal_hard_bumps.webp</file> - <file>assets/metalbarrel/normal_middle_bumps.webp</file> - <file>assets/metalbarrel/normal_no_bumps.webp</file> - <file>assets/metalbarrel/normal_soft_bumps.webp</file> - <file>assets/metalbarrel/specular_rust.webp</file> - <file>assets/metalbarrel/specular_stainless_steel.webp</file> - <file>assets/metalbarrel/specular.webp</file> - <file>assets/textures/pattern_09/specular.webp</file> - <file>assets/textures/pattern_09/normal.webp</file> - <file>assets/textures/pattern_09/diffuse.webp</file> - <file>assets/cubemaps/miramar/miramar_negx.webp</file> - <file>assets/cubemaps/miramar/miramar_negy.webp</file> - <file>assets/cubemaps/miramar/miramar_negz.webp</file> - <file>assets/cubemaps/miramar/miramar_posx.webp</file> - <file>assets/cubemaps/miramar/miramar_posy.webp</file> - <file>assets/cubemaps/miramar/miramar_posz.webp</file> - <file>assets/cubemaps/night/night_negx.webp</file> - <file>assets/cubemaps/night/night_negy.webp</file> - <file>assets/cubemaps/night/night_negz.webp</file> - <file>assets/cubemaps/night/night_posx.webp</file> - <file>assets/cubemaps/night/night_posy.webp</file> - <file>assets/cubemaps/night/night_posz.webp</file> </qresource> </RCC> diff --git a/examples/qt3d/exampleresources/metalbarrel.qrc b/examples/qt3d/exampleresources/metalbarrel.qrc new file mode 100644 index 000000000..43381ba51 --- /dev/null +++ b/examples/qt3d/exampleresources/metalbarrel.qrc @@ -0,0 +1,19 @@ +<RCC> + <qresource prefix="/"> + <file>assets/metalbarrel/diffus_black.webp</file> + <file>assets/metalbarrel/diffus_blue.webp</file> + <file>assets/metalbarrel/diffus_green.webp</file> + <file>assets/metalbarrel/diffus_red.webp</file> + <file>assets/metalbarrel/diffus_rust.webp</file> + <file>assets/metalbarrel/diffus_stainless_steel.webp</file> + <file>assets/metalbarrel/diffus_yellow.webp</file> + <file>assets/metalbarrel/metal_barrel.obj</file> + <file>assets/metalbarrel/normal_hard_bumps.webp</file> + <file>assets/metalbarrel/normal_middle_bumps.webp</file> + <file>assets/metalbarrel/normal_no_bumps.webp</file> + <file>assets/metalbarrel/normal_soft_bumps.webp</file> + <file>assets/metalbarrel/specular_rust.webp</file> + <file>assets/metalbarrel/specular_stainless_steel.webp</file> + <file>assets/metalbarrel/specular.webp</file> + </qresource> +</RCC> diff --git a/examples/qt3d/exampleresources/obj.qrc b/examples/qt3d/exampleresources/obj.qrc new file mode 100644 index 000000000..952fd59d0 --- /dev/null +++ b/examples/qt3d/exampleresources/obj.qrc @@ -0,0 +1,7 @@ +<RCC> + <qresource prefix="/"> + <file>assets/obj/ball.obj</file> + <file>assets/obj/trefoil.obj</file> + <file>assets/obj/toyplane.obj</file> + </qresource> +</RCC> diff --git a/examples/qt3d/exampleresources/test_scene.qrc b/examples/qt3d/exampleresources/test_scene.qrc new file mode 100644 index 000000000..3ac240b7c --- /dev/null +++ b/examples/qt3d/exampleresources/test_scene.qrc @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/"> + <file>assets/test_scene.dae</file> + </qresource> +</RCC> diff --git a/examples/qt3d/exampleresources/textures.qrc b/examples/qt3d/exampleresources/textures.qrc new file mode 100644 index 000000000..ef70706a5 --- /dev/null +++ b/examples/qt3d/exampleresources/textures.qrc @@ -0,0 +1,7 @@ +<RCC> + <qresource prefix="/"> + <file>assets/textures/pattern_09/specular.webp</file> + <file>assets/textures/pattern_09/normal.webp</file> + <file>assets/textures/pattern_09/diffuse.webp</file> + </qresource> +</RCC> diff --git a/examples/qt3d/gltf/gltf.pro b/examples/qt3d/gltf/gltf.pro index d2ac810a9..24208fbdd 100644 --- a/examples/qt3d/gltf/gltf.pro +++ b/examples/qt3d/gltf/gltf.pro @@ -2,8 +2,6 @@ TEMPLATE = app QT += 3dcore 3drenderer 3dinput 3dquick qml quick -include("../exampleresources/exampleresources.pri") - HEADERS += \ SOURCES += \ @@ -13,4 +11,6 @@ OTHER_FILES += \ main.qml RESOURCES += \ - gltf.qrc + gltf_example.qrc \ + ../exampleresources/gltf.qrc \ + ../exampleresources/obj.qrc diff --git a/examples/qt3d/gltf/gltf.qrc b/examples/qt3d/gltf/gltf_example.qrc index c24519313..c24519313 100644 --- a/examples/qt3d/gltf/gltf.qrc +++ b/examples/qt3d/gltf/gltf_example.qrc diff --git a/examples/qt3d/gltf/main.cpp b/examples/qt3d/gltf/main.cpp index a65d56218..523ee4396 100644 --- a/examples/qt3d/gltf/main.cpp +++ b/examples/qt3d/gltf/main.cpp @@ -34,7 +34,6 @@ ** ****************************************************************************/ -#include <exampleresources.h> #include <Qt3DCore/window.h> #include <Qt3DRenderer/qrenderaspect.h> #include <Qt3DInput/QInputAspect> @@ -47,8 +46,6 @@ int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - initializeAssetResources("../exampleresources/example-assets.qrb"); - Qt3D::Window view; Qt3D::Quick::QQmlAspectEngine engine; diff --git a/examples/qt3d/materials-cpp/main.cpp b/examples/qt3d/materials-cpp/main.cpp index 3704ffcdf..2e5a4834b 100644 --- a/examples/qt3d/materials-cpp/main.cpp +++ b/examples/qt3d/materials-cpp/main.cpp @@ -53,13 +53,11 @@ #include "planeentity.h" #include "rotatingtrefoilknot.h" #include "barrel.h" -#include "exampleresources.h" #include "houseplant.h" int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - initializeAssetResources("../exampleresources/example-assets.qrb"); Qt3D::Window view; Qt3D::QAspectEngine engine; diff --git a/examples/qt3d/materials-cpp/materials-cpp.pro b/examples/qt3d/materials-cpp/materials-cpp.pro index 351ed82f8..0f09346c0 100644 --- a/examples/qt3d/materials-cpp/materials-cpp.pro +++ b/examples/qt3d/materials-cpp/materials-cpp.pro @@ -2,8 +2,6 @@ TEMPLATE = app QT += 3dcore 3drenderer 3dinput -include("../exampleresources/exampleresources.pri") - HEADERS += \ planeentity.h \ renderableentity.h \ @@ -20,3 +18,10 @@ SOURCES += \ barrel.cpp \ rotatingtrefoilknot.cpp \ houseplant.cpp + +RESOURCES += \ + ../exampleresources/chest.qrc \ + ../exampleresources/houseplants.qrc \ + ../exampleresources/metalbarrel.qrc \ + ../exampleresources/obj.qrc \ + ../exampleresources/textures.qrc diff --git a/examples/qt3d/materials/main.cpp b/examples/qt3d/materials/main.cpp index 20b518734..e27bbdaff 100644 --- a/examples/qt3d/materials/main.cpp +++ b/examples/qt3d/materials/main.cpp @@ -39,8 +39,6 @@ #include <Qt3DInput/QInputAspect> #include <Qt3DQuick/QQmlAspectEngine> -#include <exampleresources.h> - #include <QGuiApplication> #include <QtQml> @@ -48,8 +46,6 @@ int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - initializeAssetResources("../exampleresources/example-assets.qrb"); - Qt3D::Window view; Qt3D::Quick::QQmlAspectEngine engine; diff --git a/examples/qt3d/materials/materials.pro b/examples/qt3d/materials/materials.pro index 23d4d38a8..58631f90e 100644 --- a/examples/qt3d/materials/materials.pro +++ b/examples/qt3d/materials/materials.pro @@ -2,8 +2,6 @@ TEMPLATE = app QT += 3dcore 3drenderer 3dinput 3dquick qml quick -include("../exampleresources/exampleresources.pri") - HEADERS += \ SOURCES += \ @@ -15,4 +13,9 @@ OTHER_FILES += \ HousePlant.qml RESOURCES += \ - materials.qrc + materials.qrc \ + ../exampleresources/chest.qrc \ + ../exampleresources/houseplants.qrc \ + ../exampleresources/metalbarrel.qrc \ + ../exampleresources/obj.qrc \ + ../exampleresources/textures.qrc diff --git a/examples/qt3d/multiviewport/main.cpp b/examples/qt3d/multiviewport/main.cpp index ca9ea8abe..666aa1434 100644 --- a/examples/qt3d/multiviewport/main.cpp +++ b/examples/qt3d/multiviewport/main.cpp @@ -39,8 +39,6 @@ #include <Qt3DInput/QInputAspect> #include <Qt3DQuick/QQmlAspectEngine> -#include <exampleresources.h> - #include <QGuiApplication> int main(int ac, char **av) @@ -49,7 +47,6 @@ int main(int ac, char **av) Qt3D::Window view; Qt3D::Quick::QQmlAspectEngine engine; - initializeAssetResources("../exampleresources/example-assets.qrb"); engine.aspectEngine()->registerAspect(new Qt3D::QRenderAspect); engine.aspectEngine()->registerAspect(new Qt3D::QInputAspect()); QVariantMap data; diff --git a/examples/qt3d/multiviewport/multiviewport.pro b/examples/qt3d/multiviewport/multiviewport.pro index d7ed38b6d..f6c033a05 100644 --- a/examples/qt3d/multiviewport/multiviewport.pro +++ b/examples/qt3d/multiviewport/multiviewport.pro @@ -2,8 +2,6 @@ TEMPLATE = app QT += 3dcore 3drenderer 3dinput 3dquick qml quick -include("../exampleresources/exampleresources.pri") - HEADERS += \ SOURCES += \ @@ -13,4 +11,5 @@ OTHER_FILES += \ main.qml RESOURCES += \ - multiviewport.qrc + multiviewport.qrc \ + ../exampleresources/test_scene.qrc diff --git a/examples/qt3d/playground-qml/main.cpp b/examples/qt3d/playground-qml/main.cpp index 890776d22..6ec4c6097 100644 --- a/examples/qt3d/playground-qml/main.cpp +++ b/examples/qt3d/playground-qml/main.cpp @@ -39,8 +39,6 @@ #include <Qt3DInput/qinputaspect.h> #include <Qt3DQuick/QQmlAspectEngine> -#include <exampleresources.h> - #include <QGuiApplication> #include <QtQml> @@ -48,8 +46,6 @@ int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - initializeAssetResources("../exampleresources/example-assets.qrb"); - Qt3D::Window view; Qt3D::Quick::QQmlAspectEngine engine; diff --git a/examples/qt3d/playground-qml/playground-qml.pro b/examples/qt3d/playground-qml/playground-qml.pro index ed48e137f..c7dcdd3c3 100644 --- a/examples/qt3d/playground-qml/playground-qml.pro +++ b/examples/qt3d/playground-qml/playground-qml.pro @@ -2,8 +2,6 @@ TEMPLATE = app QT += 3dcore 3drenderer 3dquick qml quick 3dinput -include("../exampleresources/exampleresources.pri") - HEADERS += \ SOURCES += \ @@ -25,4 +23,5 @@ OTHER_FILES += \ AnimatedDiffuseMaterial.qml RESOURCES += \ - playground-qml.qrc + playground-qml.qrc \ + ../exampleresources/gltf.qrc \ diff --git a/examples/qt3d/qt3d.pro b/examples/qt3d/qt3d.pro index 61b736691..5882ad38b 100644 --- a/examples/qt3d/qt3d.pro +++ b/examples/qt3d/qt3d.pro @@ -1,7 +1,6 @@ TEMPLATE = subdirs SUBDIRS += \ - exampleresources \ playground-qml \ simple-qml \ simple-cpp \ @@ -36,11 +35,3 @@ SUBDIRS += \ # TODO Port the old examples to new APIs #SUBDIRS += qt3d qtHaveModule(widgets): SUBDIRS += assimp-cpp - -# Make all other subdirs depend on exampleresources -for(subdir, SUBDIRS) { - !equals(subdir, exampleresources) { - $${subdir}.depends += exampleresources - } -} - diff --git a/examples/qt3d/shadow-map-qml/main.cpp b/examples/qt3d/shadow-map-qml/main.cpp index 31836bf9d..2357106c7 100644 --- a/examples/qt3d/shadow-map-qml/main.cpp +++ b/examples/qt3d/shadow-map-qml/main.cpp @@ -43,14 +43,10 @@ #include <QQmlContext> #include <QQmlEngine> -#include <exampleresources.h> - int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - initializeAssetResources("../exampleresources/example-assets.qrb"); - Qt3D::Window view; Qt3D::Quick::QQmlAspectEngine engine; diff --git a/examples/qt3d/shadow-map-qml/shadow-map-qml.pro b/examples/qt3d/shadow-map-qml/shadow-map-qml.pro index 7d7670022..76ded6a5c 100644 --- a/examples/qt3d/shadow-map-qml/shadow-map-qml.pro +++ b/examples/qt3d/shadow-map-qml/shadow-map-qml.pro @@ -2,8 +2,6 @@ TEMPLATE = app QT += 3dcore 3drenderer 3dinput 3dquick qml quick -include("../exampleresources/exampleresources.pri") - SOURCES += \ main.cpp @@ -18,4 +16,5 @@ OTHER_FILES += \ GroundPlane.qml RESOURCES += \ - shadow-map-qml.qrc + shadow-map-qml.qrc \ + ../exampleresources/obj.qrc diff --git a/examples/qt3d/skybox/main.cpp b/examples/qt3d/skybox/main.cpp index 698403872..318b5181f 100644 --- a/examples/qt3d/skybox/main.cpp +++ b/examples/qt3d/skybox/main.cpp @@ -39,8 +39,6 @@ #include <Qt3DInput/QInputAspect> #include <Qt3DQuick/QQmlAspectEngine> -#include <exampleresources.h> - #include <QGuiApplication> #include <QtQml> @@ -48,8 +46,6 @@ int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - initializeAssetResources("../exampleresources/example-assets.qrb"); - Qt3D::Window view; Qt3D::Quick::QQmlAspectEngine engine; diff --git a/examples/qt3d/skybox/skybox.pro b/examples/qt3d/skybox/skybox.pro index c58d7f90e..955d1281b 100644 --- a/examples/qt3d/skybox/skybox.pro +++ b/examples/qt3d/skybox/skybox.pro @@ -2,10 +2,9 @@ TEMPLATE = app QT += 3dcore 3drenderer 3dinput 3dquick qml quick -include("../exampleresources/exampleresources.pri") - RESOURCES += \ - skybox.qrc + skybox.qrc \ + ../exampleresources/cubemaps.qrc SOURCES += \ main.cpp diff --git a/examples/qt3d/wave/main.cpp b/examples/qt3d/wave/main.cpp index 6130cc708..b30248031 100644 --- a/examples/qt3d/wave/main.cpp +++ b/examples/qt3d/wave/main.cpp @@ -39,8 +39,6 @@ #include <Qt3DInput/qinputaspect.h> #include <Qt3DQuick/QQmlAspectEngine> -#include <exampleresources.h> - #include <QGuiApplication> #include <QtQml> @@ -48,8 +46,6 @@ int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - initializeAssetResources("../exampleresources/example-assets.qrb"); - Qt3D::Window view; Qt3D::Quick::QQmlAspectEngine engine; diff --git a/examples/qt3d/wave/wave.pro b/examples/qt3d/wave/wave.pro index 05c937cb6..c45df2bf0 100644 --- a/examples/qt3d/wave/wave.pro +++ b/examples/qt3d/wave/wave.pro @@ -2,8 +2,6 @@ TEMPLATE = app QT += 3dcore 3drenderer 3dquick 3dinput qml quick -include("../exampleresources/exampleresources.pri") - HEADERS += \ SOURCES += \ diff --git a/examples/qt3d/wireframe/main.cpp b/examples/qt3d/wireframe/main.cpp index ecad579c9..e869a2fb4 100644 --- a/examples/qt3d/wireframe/main.cpp +++ b/examples/qt3d/wireframe/main.cpp @@ -39,8 +39,6 @@ #include <Qt3DInput/QInputAspect> #include <Qt3DQuick/QQmlAspectEngine> -#include <exampleresources.h> - #include <QGuiApplication> #include <QtQml> @@ -48,8 +46,6 @@ int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - initializeAssetResources("../exampleresources/example-assets.qrb"); - Qt3D::Window view; Qt3D::Quick::QQmlAspectEngine engine; diff --git a/examples/qt3d/wireframe/wireframe.pro b/examples/qt3d/wireframe/wireframe.pro index 2b2fd991a..225de3ddb 100644 --- a/examples/qt3d/wireframe/wireframe.pro +++ b/examples/qt3d/wireframe/wireframe.pro @@ -2,8 +2,6 @@ TEMPLATE = app QT += 3dcore 3drenderer 3dinput 3dquick qml quick -include("../exampleresources/exampleresources.pri") - HEADERS += \ SOURCES += \ @@ -17,4 +15,5 @@ OTHER_FILES += \ TrefoilKnot.qml RESOURCES += \ - wireframe.qrc + wireframe.qrc \ + ../exampleresources/obj.qrc |