| 1 | // Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). |
| 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 <Qt3DRender/private/qgeometryloaderfactory_p.h> |
| 5 | |
| 6 | #include "fbxgeometryloader.h" |
| 7 | |
| 8 | QT_BEGIN_NAMESPACE |
| 9 | |
| 10 | class FBXGeometryLoaderPlugin : public Qt3DRender::QGeometryLoaderFactory |
| 11 | { |
| 12 | Q_OBJECT |
| 13 | Q_PLUGIN_METADATA(IID QGeometryLoaderFactory_iid FILE "fbx.json") |
| 14 | public: |
| 15 | |
| 16 | QStringList keys() const override |
| 17 | { |
| 18 | return QStringList() << FBXGEOMETRYLOADER_EXT; |
| 19 | } |
| 20 | |
| 21 | Qt3DRender::QGeometryLoaderInterface* create(const QString& ext) override |
| 22 | { |
| 23 | if ((ext.compare(FBXGEOMETRYLOADER_EXT, Qt::CaseInsensitive) == 0)) |
| 24 | return new Qt3DRender::FbxGeometryLoader; |
| 25 | return nullptr; |
| 26 | } |
| 27 | }; |
| 28 | |
| 29 | QT_END_NAMESPACE |
| 30 | |
| 31 | #include "main.moc" |