diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-01-14 08:43:34 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2016-01-16 01:59:44 +0000 |
commit | 8dcd8e42458748ca3ae3293b3d2b7e5b56b87252 (patch) | |
tree | b4a63f6bd0665e9cdeb64ebdb9caaded12be16ff /examples/qt3d/shadow-map-qml | |
parent | 78ad6123fb4f8597eb936e2c4b1636d307df4ecc (diff) |
Link examples against static lib
Contains:
Qt3DWindow
Qt3DQuickWindow
QFirstPersonCameraController
FirstPersonCameraController.qml
This will allow to get rid of the Camera configuration hack
Change-Id: I55c5634aa4c162f9dd2852d3258073a6352b426c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples/qt3d/shadow-map-qml')
-rw-r--r-- | examples/qt3d/shadow-map-qml/main.cpp | 20 | ||||
-rw-r--r-- | examples/qt3d/shadow-map-qml/main.qml | 4 |
2 files changed, 5 insertions, 19 deletions
diff --git a/examples/qt3d/shadow-map-qml/main.cpp b/examples/qt3d/shadow-map-qml/main.cpp index f455f8d66..3f7573e4f 100644 --- a/examples/qt3d/shadow-map-qml/main.cpp +++ b/examples/qt3d/shadow-map-qml/main.cpp @@ -34,11 +34,8 @@ ** ****************************************************************************/ -#include <window.h> -#include <Qt3DRender/qrenderaspect.h> -#include <Qt3DInput/QInputAspect> +#include <qt3dquickwindow.h> #include <Qt3DQuick/QQmlAspectEngine> - #include <QGuiApplication> #include <QQmlContext> #include <QQmlEngine> @@ -47,19 +44,10 @@ int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); - Window view; - Qt3DCore::Quick::QQmlAspectEngine engine; - + Qt3DQuickWindow view; view.resize(1600, 800); - engine.aspectEngine()->registerAspect(new Qt3DRender::QRenderAspect()); - engine.aspectEngine()->registerAspect(new Qt3DInput::QInputAspect()); - QVariantMap data; - data.insert(QStringLiteral("surface"), QVariant::fromValue(static_cast<QSurface *>(&view))); - data.insert(QStringLiteral("eventSource"), QVariant::fromValue(&view)); - engine.aspectEngine()->setData(data); - engine.qmlEngine()->rootContext()->setContextProperty("_window", &view); - engine.setSource(QUrl("qrc:/main.qml")); - + view.engine()->qmlEngine()->rootContext()->setContextProperty("_window", &view); + view.setSource(QUrl("qrc:/main.qml")); view.show(); return app.exec(); diff --git a/examples/qt3d/shadow-map-qml/main.qml b/examples/qt3d/shadow-map-qml/main.qml index 37340053a..d42401f60 100644 --- a/examples/qt3d/shadow-map-qml/main.qml +++ b/examples/qt3d/shadow-map-qml/main.qml @@ -53,9 +53,7 @@ Entity { upVector: Qt.vector3d(0.0, 1.0, 0.0) } - Configuration { - controlledCamera: camera - } + FirstPersonCameraController { camera: camera } ShadowMapLight { id: light |