summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/gltf/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qt3d/gltf/main.cpp')
-rw-r--r--examples/qt3d/gltf/main.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/examples/qt3d/gltf/main.cpp b/examples/qt3d/gltf/main.cpp
index 51bde76a6..cf50473ae 100644
--- a/examples/qt3d/gltf/main.cpp
+++ b/examples/qt3d/gltf/main.cpp
@@ -34,31 +34,16 @@
**
****************************************************************************/
-#include <window.h>
-#include <Qt3DRender/qrenderaspect.h>
-#include <Qt3DInput/QInputAspect>
-#include <Qt3DQuick/QQmlAspectEngine>
-
+#include "qt3dquickwindow.h"
#include <QGuiApplication>
#include <QOpenGLContext>
-#include <QtQml>
int main(int argc, char* argv[])
{
+ Qt3DQuickWindow view;
QGuiApplication app(argc, argv);
- Window view;
- Qt3DCore::Quick::QQmlAspectEngine engine;
-
- 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.setSource(QUrl("qrc:/main.qml"));
+ view.setSource(QUrl("qrc:/main.qml"));
view.show();
const bool isES = QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES