summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/exampleresources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-05-18 14:50:27 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-05-20 10:03:56 +0000
commitad8bdecc68482eda079e8b49c3c5e8059ec45d69 (patch)
tree6826bec0fa873ef885d167049efc232cf9cfddc6 /examples/qt3d/exampleresources
parentba39a03645ef6f789c8de7da71f1b08d812b2059 (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>
Diffstat (limited to 'examples/qt3d/exampleresources')
-rw-r--r--examples/qt3d/exampleresources/chest.qrc6
-rw-r--r--examples/qt3d/exampleresources/cubemaps.qrc16
-rw-r--r--examples/qt3d/exampleresources/exampleresources.cpp49
-rw-r--r--examples/qt3d/exampleresources/exampleresources.h48
-rw-r--r--examples/qt3d/exampleresources/exampleresources.pri17
-rw-r--r--examples/qt3d/exampleresources/exampleresources.pro36
-rw-r--r--examples/qt3d/exampleresources/gltf.qrc16
-rw-r--r--examples/qt3d/exampleresources/houseplants.qrc (renamed from examples/qt3d/exampleresources/example-assets.qrc)48
-rw-r--r--examples/qt3d/exampleresources/metalbarrel.qrc19
-rw-r--r--examples/qt3d/exampleresources/obj.qrc7
-rw-r--r--examples/qt3d/exampleresources/test_scene.qrc5
-rw-r--r--examples/qt3d/exampleresources/textures.qrc7
12 files changed, 76 insertions, 198 deletions
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>