1 | // Copyright (C) 2017 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #include "qtquickscene2dplugin.h" |
5 | |
6 | #include <Qt3DQuickScene2D/qscene2d.h> |
7 | #include <private/qrenderaspect_p.h> |
8 | #include <Qt3DQuickScene2D/private/qt3dquick3dscene2d_p.h> |
9 | #include <QtCore/qcoreapplication.h> |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | static void initScene2dPlugin() |
14 | { |
15 | Qt3DRender::QRenderAspectPrivate::configurePlugin(plugin: "scene2d"); |
16 | } |
17 | |
18 | Q_COREAPP_STARTUP_FUNCTION(initScene2dPlugin) |
19 | |
20 | void QtQuickScene2DPlugin::registerTypes(const char *uri) |
21 | { |
22 | qmlRegisterExtendedType<Qt3DRender::Quick::QScene2D, Qt3DRender::Render::Quick::QQuick3DScene2D>(uri, versionMajor: 2, versionMinor: 9, qmlName: "Scene2D"); |
23 | |
24 | // The minor version used to be the current Qt 5 minor. For compatibility it is the last |
25 | // Qt 5 release. |
26 | qmlRegisterModule(uri, versionMajor: 2, versionMinor: 15); |
27 | } |
28 | |
29 | QT_END_NAMESPACE |
30 | |
31 | #include "moc_qtquickscene2dplugin.cpp" |
32 |