summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-08-14 16:43:39 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-08-17 14:30:42 +0000
commit632d60d520ef2e5dcd8d64633b740759a83de876 (patch)
treea96eeed2de08628f17df682cd138220e798f7e1b /examples
parent164293bad95d8dc805feb6f055bb9dded19ee40b (diff)
Add Object3D infra
Use Group (and Node) to crystalize the concepts. Fix also some issues in Studio3DEngine. Also changes the pureqml example to a manual test since Studio3DEngine and friends are marked as internal for now, so shipping examples for them along with the regular examples is not desirable yet. Change-Id: I8ab0ad50d1b846cadb6927fcb38afe9dff576c2e Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/3dstudioruntime2/3dstudioruntime2.pro3
-rw-r--r--examples/3dstudioruntime2/pureqml3d/main.cpp74
-rw-r--r--examples/3dstudioruntime2/pureqml3d/main.qml88
-rw-r--r--examples/3dstudioruntime2/pureqml3d/pureqml3d.pro14
-rw-r--r--examples/3dstudioruntime2/pureqml3d/pureqml3d.qrc5
5 files changed, 1 insertions, 183 deletions
diff --git a/examples/3dstudioruntime2/3dstudioruntime2.pro b/examples/3dstudioruntime2/3dstudioruntime2.pro
index 71cf65c..37e384d 100644
--- a/examples/3dstudioruntime2/3dstudioruntime2.pro
+++ b/examples/3dstudioruntime2/3dstudioruntime2.pro
@@ -7,8 +7,7 @@ SUBDIRS += \
qtHaveModule(quick) {
SUBDIRS += simpleqml \
qmldatainput \
- layersinquick \
- pureqml3d
+ layersinquick
}
qtHaveModule(widgets) {
diff --git a/examples/3dstudioruntime2/pureqml3d/main.cpp b/examples/3dstudioruntime2/pureqml3d/main.cpp
deleted file mode 100644
index 38f98e0..0000000
--- a/examples/3dstudioruntime2/pureqml3d/main.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt 3D Studio.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QGuiApplication>
-#include <QQuickView>
-#include <q3dsruntimeglobal.h>
-
-int main(int argc, char *argv[])
-{
- qputenv("QSG_INFO", "1");
- QGuiApplication app(argc, argv);
-
- // Use the ideal format (i.e. OpenGL version and profile) recommended by
- // the Qt 3D Studio runtime. Without this the format set on the QQuickView
- // would be used instead.
- QSurfaceFormat::setDefaultFormat(Q3DS::surfaceFormat());
-
- QQuickView viewer;
- viewer.setSource(QUrl("qrc:/main.qml"));
-
- viewer.setTitle(QStringLiteral("Qt 3D Studio Pure QML Example"));
- viewer.setResizeMode(QQuickView::SizeRootObjectToView);
- viewer.resize(1280, 720);
- viewer.show();
-
- return app.exec();
-}
diff --git a/examples/3dstudioruntime2/pureqml3d/main.qml b/examples/3dstudioruntime2/pureqml3d/main.qml
deleted file mode 100644
index c747d9f..0000000
--- a/examples/3dstudioruntime2/pureqml3d/main.qml
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt 3D Studio.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtStudio3D 2.1
-import QtQuick.Controls 2.2
-import QtQuick.Layouts 1.0
-
-Rectangle {
- id: root
- color: "lightGray"
-
- Studio3DEngine {
- id: s3d
- }
-
- RowLayout {
- width: parent.width
- Repeater {
- model: 4
- Rectangle {
- border.color: "black"
- border.width: 4
- color: "transparent"
- width: 320
- height: 200
-
- Layer3D {
- engine: s3d
- anchors.fill: parent
- }
- }
- }
- }
-
-
- Studio3DProfiler {
- anchors.fill: parent
- focus: true
- }
-}
diff --git a/examples/3dstudioruntime2/pureqml3d/pureqml3d.pro b/examples/3dstudioruntime2/pureqml3d/pureqml3d.pro
deleted file mode 100644
index fcc798b..0000000
--- a/examples/3dstudioruntime2/pureqml3d/pureqml3d.pro
+++ /dev/null
@@ -1,14 +0,0 @@
-TEMPLATE = app
-
-QT += quick 3dstudioruntime2
-
-SOURCES += \
- main.cpp
-
-RESOURCES += pureqml3d.qrc
-
-OTHER_FILES += \
- main.qml
-
-target.path = $$[QT_INSTALL_EXAMPLES]/3dstudioruntime2/$$TARGET
-INSTALLS += target
diff --git a/examples/3dstudioruntime2/pureqml3d/pureqml3d.qrc b/examples/3dstudioruntime2/pureqml3d/pureqml3d.qrc
deleted file mode 100644
index 5f6483a..0000000
--- a/examples/3dstudioruntime2/pureqml3d/pureqml3d.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- </qresource>
-</RCC>