summaryrefslogtreecommitdiffstats
path: root/examples/materials
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-03-04 16:05:02 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-03-04 15:21:01 +0000
commitc82207d54c76d8b66be010bfa63e45f9507891fa (patch)
tree8d112e96bc1fa42dbc49907f53d71fa5b893869a /examples/materials
parent8bff6813ee2e7a59d27bd8639dc9a6e23287a0c8 (diff)
Move the examples under a qt3d subdir
Modules cannot have their examples in the top-level examples directory because in the pre-built packages all modules' examples are merged together. Change-Id: I80fdbb8f1ec6f3d8fd793e4d856e705000237127 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'examples/materials')
-rw-r--r--examples/materials/Barrel.qml72
-rw-r--r--examples/materials/BasicCamera.qml52
-rw-r--r--examples/materials/Chest.qml60
-rw-r--r--examples/materials/HousePlant.qml82
-rw-r--r--examples/materials/PlaneEntity.qml66
-rw-r--r--examples/materials/RenderableEntity.qml64
-rw-r--r--examples/materials/SortedForwardRenderer.qml72
-rw-r--r--examples/materials/TrefoilKnot.qml65
-rw-r--r--examples/materials/main.cpp70
-rw-r--r--examples/materials/main.qml187
-rw-r--r--examples/materials/materials.pro18
-rw-r--r--examples/materials/materials.qrc13
12 files changed, 0 insertions, 821 deletions
diff --git a/examples/materials/Barrel.qml b/examples/materials/Barrel.qml
deleted file mode 100644
index 1dcec0ca1..000000000
--- a/examples/materials/Barrel.qml
+++ /dev/null
@@ -1,72 +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$
-**
-****************************************************************************/
-
-import Qt3D 2.0
-import Qt3D.Render 2.0
-
-Entity {
- id: root
-
- property string diffuseColor: "red"
- property string bump: "no_bumps"
- property string specular: ""
-
- property alias x: barrel.x
- property alias y: barrel.y
- property alias z: barrel.z
- property alias shininess: material.shininess
- property real scale: 1.0
-
- RenderableEntity {
- id: barrel
- source: "assets/metalbarrel/metal_barrel.obj"
- scale: 0.03 * root.scale
-
- material: NormalDiffuseSpecularMapMaterial {
- id: material
- diffuse: "assets/metalbarrel/diffus_" + root.diffuseColor + ".webp"
- normal: "assets/metalbarrel/normal_" + root.bump + ".webp"
- specular: {
- if (root.specular !== "" )
- return "assets/metalbarrel/specular_" + root.specular + ".webp"
- else
- return "assets/metalbarrel/specular.webp"
- }
-
- shininess: 10.0
- }
- }
-}
diff --git a/examples/materials/BasicCamera.qml b/examples/materials/BasicCamera.qml
deleted file mode 100644
index f96132416..000000000
--- a/examples/materials/BasicCamera.qml
+++ /dev/null
@@ -1,52 +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$
-**
-****************************************************************************/
-
-import Qt3D 2.0
-import Qt3D.Render 2.0
-
-Camera {
- id: mainCamera
- objectName: "mainCamera"
-
- projectionType: CameraLens.PerspectiveProjection
- fieldOfView: 22.5
- aspectRatio: _window.width / _window.height
- onAspectRatioChanged: console.log( "aspectRatio = " + aspectRatio )
- nearPlane: 0.01
- farPlane: 1000.0
- viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 )
- upVector: Qt.vector3d( 0.0, 1.0, 0.0 )
-}
diff --git a/examples/materials/Chest.qml b/examples/materials/Chest.qml
deleted file mode 100644
index 1acd126ff..000000000
--- a/examples/materials/Chest.qml
+++ /dev/null
@@ -1,60 +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$
-**
-****************************************************************************/
-
-import Qt3D 2.0
-import Qt3D.Render 2.0
-
-Entity {
- id: root
-
- property alias x: chest.x
- property alias y: chest.y
- property alias z: chest.z
- property real scale: 1.0
-
- RenderableEntity {
- id: chest
- source: "assets/chest/Chest.obj"
- scale: 0.03 * root.scale
-
- material: DiffuseMapMaterial {
- id: material
- diffuse: "assets/chest/diffuse.webp"
- specular: Qt.rgba( 0.2, 0.2, 0.2, 1.0 )
- shininess: 2.0
- }
- }
-}
diff --git a/examples/materials/HousePlant.qml b/examples/materials/HousePlant.qml
deleted file mode 100644
index 353a252d2..000000000
--- a/examples/materials/HousePlant.qml
+++ /dev/null
@@ -1,82 +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$
-**
-****************************************************************************/
-
-import Qt3D 2.0
-import Qt3D.Render 2.0
-
-Entity {
- id: root
-
- property string potShape: "cross"
- property string plantType: "bamboo"
-
- property alias x: pot.x
- property alias y: pot.y
- property alias z: pot.z
- property real scale: 1.0
-
- RenderableEntity {
- id: pot
- source: "assets/houseplants/" + root.potShape + "-pot.obj"
- scale: 0.03 * root.scale
-
- material: NormalDiffuseMapMaterial {
- diffuse: "assets/houseplants/pot.webp"
- normal: "assets/houseplants/pot_normal.webp"
- specular: Qt.rgba( 0.75, 0.75, 0.75, 1.0 )
- shininess: 10.0
- }
-
- RenderableEntity {
- source: "assets/houseplants/" + root.potShape + "-" + root.plantType + ".obj"
- material: NormalDiffuseMapAlphaMaterial {
- diffuse: "assets/houseplants/" + root.plantType + ".webp"
- normal: "assets/houseplants/" + root.plantType + "_normal.webp"
- shininess: 10.0
- }
- }
-
- RenderableEntity {
- source: "assets/houseplants/" + root.potShape + "-pot-cover.obj"
- material: NormalDiffuseMapMaterial {
- diffuse: "assets/houseplants/cover.webp"
- normal: "assets/houseplants/cover_normal.webp"
- specular: Qt.rgba( 0.05, 0.05, 0.05, 1.0 )
- shininess: 5.0
- }
- }
- }
-}
diff --git a/examples/materials/PlaneEntity.qml b/examples/materials/PlaneEntity.qml
deleted file mode 100644
index 222b5a33b..000000000
--- a/examples/materials/PlaneEntity.qml
+++ /dev/null
@@ -1,66 +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$
-**
-****************************************************************************/
-
-import Qt3D 2.0
-import Qt3D.Render 2.0
-
-Entity {
- id: root
-
- property alias x: translateTransform.dx
- property alias y: translateTransform.dy
- property alias z: translateTransform.dz
- property alias scale: scaleTransform.scale
- property alias width: mesh.width
- property alias height: mesh.height
- property alias resolution: mesh.meshResolution
- property Material material
-
- components: [ transform, mesh, root.material ]
-
- Transform {
- id: transform
- Translate { id: translateTransform }
- Scale { id: scaleTransform }
- }
-
- PlaneMesh {
- id: mesh
- width: 1.0
- height: 1.0
- meshResolution: Qt.size(2, 2)
- }
-}
diff --git a/examples/materials/RenderableEntity.qml b/examples/materials/RenderableEntity.qml
deleted file mode 100644
index 03119b713..000000000
--- a/examples/materials/RenderableEntity.qml
+++ /dev/null
@@ -1,64 +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$
-**
-****************************************************************************/
-
-import Qt3D 2.0
-import Qt3D.Render 2.0
-
-Entity {
- id: root
-
- property alias x: translateTransform.dx
- property alias y: translateTransform.dy
- property alias z: translateTransform.dz
- property alias scale: scaleTransform.scale
- property alias rotationAngle: rotateTransform.angle
- property alias rotationAxis: rotateTransform.axis
- property alias source: mesh.source
- property Material material
-
- components: [ transform, mesh, root.material ]
-
- Transform {
- id: transform
- Rotate { id: rotateTransform }
- Scale { id: scaleTransform }
- Translate { id: translateTransform }
- }
-
- Mesh {
- id: mesh
- }
-}
diff --git a/examples/materials/SortedForwardRenderer.qml b/examples/materials/SortedForwardRenderer.qml
deleted file mode 100644
index 0687785fb..000000000
--- a/examples/materials/SortedForwardRenderer.qml
+++ /dev/null
@@ -1,72 +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$
-**
-****************************************************************************/
-
-import Qt3D 2.0
-import Qt3D.Render 2.0
-
-TechniqueFilter {
- id: root
- objectName : "techniqueFilter"
-
- // Expose camera to allow user to choose which camera to use for rendering
- property alias camera: cameraSelector.camera
-
- // Select the forward rendering Technique of any used Effect
- requires: [ Annotation { name: "renderingStyle"; value: "forward" } ]
-
- // Use the whole viewport
- Viewport {
- id: viewport
- objectName : "viewport"
- rect: Qt.rect(0.0, 0.0, 1.0, 1.0)
- clearColor: "white"
-
- // Use the specified camera
- CameraSelector {
- id : cameraSelector
- objectName : "cameraSelector"
- ClearBuffer {
- buffers : ClearBuffer.ColorDepthBuffer
- SortMethod {
- criteria: [
- SortCriterion { sort: SortCriterion.StateChangeCost },
- SortCriterion { sort: SortCriterion.Material }
- ]
- }
- }
- }
- }
-}
diff --git a/examples/materials/TrefoilKnot.qml b/examples/materials/TrefoilKnot.qml
deleted file mode 100644
index 48b334ce0..000000000
--- a/examples/materials/TrefoilKnot.qml
+++ /dev/null
@@ -1,65 +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$
-**
-****************************************************************************/
-
-import Qt3D 2.0
-import Qt3D.Render 2.0
-
-Entity {
- id: root
-
- property real x: 0.0
- property real y: 0.0
- property real z: 0.0
- property real scale: 1.0
- property real theta: 0.0
- property real phi: 0.0
- property Material material
-
- components: [ transform, mesh, root.material ]
-
- Transform {
- id: transform
- Scale { scale: root.scale }
- Rotate{ angle: root.theta; axis: Qt.vector3d(1.0, 0.0, 0.0) }
- Rotate{ angle: root.phi; axis: Qt.vector3d(0.0, 1.0, 0.0) }
- Translate { dx: root.x; dy: root.y; dz: root.z }
- }
-
- Mesh {
- id: mesh
- source: "assets/obj/trefoil.obj"
- }
-}
diff --git a/examples/materials/main.cpp b/examples/materials/main.cpp
deleted file mode 100644
index 20b518734..000000000
--- a/examples/materials/main.cpp
+++ /dev/null
@@ -1,70 +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 <Qt3DCore/window.h>
-#include <Qt3DRenderer/qrenderaspect.h>
-#include <Qt3DInput/QInputAspect>
-#include <Qt3DQuick/QQmlAspectEngine>
-
-#include <exampleresources.h>
-
-#include <QGuiApplication>
-#include <QtQml>
-
-int main(int argc, char* argv[])
-{
- QGuiApplication app(argc, argv);
-
- initializeAssetResources("../exampleresources/example-assets.qrb");
-
- Qt3D::Window view;
- Qt3D::Quick::QQmlAspectEngine engine;
-
- engine.aspectEngine()->registerAspect(new Qt3D::QRenderAspect());
- engine.aspectEngine()->registerAspect(new Qt3D::QInputAspect());
- engine.aspectEngine()->initialize();
- QVariantMap data;
- data.insert(QStringLiteral("surface"), QVariant::fromValue(static_cast<QSurface *>(&view)));
- data.insert(QStringLiteral("eventSource"), QVariant::fromValue(&view));
-
- engine.aspectEngine()->setData(data);
- // Expose the window as a context property so we can set the aspect ratio
- engine.qmlEngine()->rootContext()->setContextProperty("_window", &view);
- engine.setSource(QUrl("qrc:/main.qml"));
- view.show();
-
- return app.exec();
-}
diff --git a/examples/materials/main.qml b/examples/materials/main.qml
deleted file mode 100644
index cceac110b..000000000
--- a/examples/materials/main.qml
+++ /dev/null
@@ -1,187 +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$
-**
-****************************************************************************/
-
-import Qt3D 2.0
-import Qt3D.Render 2.0
-import QtQuick 2.1 as QQ2
-
-Entity {
- id: root
- objectName: "root"
-
- // Use the renderer configuration specified in ForwardRenderer.qml
- // and render from the mainCamera
- components: [
- FrameGraph {
- activeFrameGraph: SortedForwardRenderer {
- id: renderer
- camera: mainCamera
- }
- }
- ]
-
- BasicCamera {
- id: mainCamera
- position: Qt.vector3d( 0.0, 3.5, 25.0 )
- viewCenter: Qt.vector3d( 0.0, 3.5, 0.0 )
- }
-
- Configuration {
- controlledCamera: mainCamera
- }
-
- PhongMaterial {
- id: redAdsMaterial
- ambient: Qt.rgba( 0.2, 0.0, 0.0, 1.0 )
- diffuse: Qt.rgba( 0.8, 0.0, 0.0, 1.0 )
- }
-
- PlaneEntity {
- id: floor
-
- width: 100
- height: 100
- resolution: Qt.size(20, 20)
-
- material: NormalDiffuseSpecularMapMaterial {
- ambient: Qt.rgba( 0.2, 0.2, 0.2, 1.0 )
- diffuse: "assets/textures/pattern_09/diffuse.webp"
- specular: "assets/textures/pattern_09/specular.webp"
- normal: "assets/textures/pattern_09/normal.webp"
- textureScale: 10.0
- shininess: 80.0
- }
- }
-
- TrefoilKnot {
- id: trefoilKnot
- material: redAdsMaterial
- y: 3.5
- scale: 0.5
-
- QQ2.ParallelAnimation {
- loops: QQ2.Animation.Infinite
- running: true
-
- QQ2.NumberAnimation {
- target: trefoilKnot
- property: "theta"
- from: 0; to: 360
- duration: 2000
- }
-
- QQ2.NumberAnimation {
- target: trefoilKnot
- property: "phi"
- from: 0; to: 360
- duration: 2000
- }
- }
- }
-
- Chest {
- x: -8
- }
-
- HousePlant {
- x: 4
- potShape: "square"
- plantType: "bamboo"
- }
-
- HousePlant {
- z: 4
- potShape: "triangle"
- plantType: "palm"
- }
-
- HousePlant {
- x: -4
- potShape: "sphere"
- plantType: "pine"
- }
-
- HousePlant {
- z: -4
- potShape: "cross"
- plantType: "spikes"
- }
-
- HousePlant {
- z: -8
- potShape: "cross"
- plantType: "palm"
- scale: 1.15
- }
-
- HousePlant {
- z: 8
- potShape: "cross"
- plantType: "shrub"
- scale: 1.15
- }
-
- Barrel {
- x: 8
- }
-
- Barrel {
- x: 10
- diffuseColor: "rust"
- bump: "hard_bumps"
- specular: "rust"
- }
-
- Barrel {
- x: 12
- diffuseColor: "blue"
- bump: "middle_bumps"
- }
-
- Barrel {
- x: 14
- diffuseColor: "green"
- bump: "soft_bumps"
- }
-
- Barrel {
- x: 16
- diffuseColor: "stainless_steel"
- bump: "no_bumps"
- specular: "stainless_steel"
- shininess: 150
- }
-}
diff --git a/examples/materials/materials.pro b/examples/materials/materials.pro
deleted file mode 100644
index 23d4d38a8..000000000
--- a/examples/materials/materials.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-TEMPLATE = app
-
-QT += 3dcore 3drenderer 3dinput 3dquick qml quick
-
-include("../exampleresources/exampleresources.pri")
-
-HEADERS += \
-
-SOURCES += \
- main.cpp
-
-OTHER_FILES += \
- main.qml \
- *.qml \
- HousePlant.qml
-
-RESOURCES += \
- materials.qrc
diff --git a/examples/materials/materials.qrc b/examples/materials/materials.qrc
deleted file mode 100644
index 417653df9..000000000
--- a/examples/materials/materials.qrc
+++ /dev/null
@@ -1,13 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>BasicCamera.qml</file>
- <file>TrefoilKnot.qml</file>
- <file>PlaneEntity.qml</file>
- <file>RenderableEntity.qml</file>
- <file>HousePlant.qml</file>
- <file>Barrel.qml</file>
- <file>Chest.qml</file>
- <file>SortedForwardRenderer.qml</file>
- </qresource>
-</RCC>