| 1 | // Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB). |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #include <Qt3DQuickExtras/qt3dquickwindow.h> |
| 5 | #include <QGuiApplication> |
| 6 | |
| 7 | int main(int argc, char* argv[]) |
| 8 | { |
| 9 | QGuiApplication app(argc, argv); |
| 10 | Qt3DExtras::Quick::Qt3DQuickWindow view; |
| 11 | |
| 12 | |
| 13 | QSurfaceFormat format; |
| 14 | format.setVersion(4, 3); |
| 15 | format.setProfile(QSurfaceFormat::CoreProfile); |
| 16 | format.setDepthBufferSize(24); |
| 17 | format.setSamples(1); |
| 18 | format.setStencilBufferSize(8); |
| 19 | view.setFormat(format); |
| 20 | |
| 21 | view.setSource(QUrl("qrc:/main.qml")); |
| 22 | view.show(); |
| 23 | |
| 24 | return app.exec(); |
| 25 | } |