1// Copyright (C) 2018 Klaralvdalens Datakonsult AB (KDAB).
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 "qrendererpluginfactory_p.h"
5
6#include <QtCore/private/qfactoryloader_p.h>
7#include <QtCore/QCoreApplication>
8#include <QtCore/QDir>
9
10#include <Qt3DRender/private/qrendererplugin_p.h>
11
12QT_BEGIN_NAMESPACE
13
14namespace Qt3DRender {
15
16namespace Render {
17
18Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QRendererPluginFactoryInterface_iid, QLatin1String("/renderers"), Qt::CaseInsensitive))
19
20QStringList QRendererPluginFactory::keys()
21{
22 return loader->keyMap().values();
23}
24
25AbstractRenderer *QRendererPluginFactory::create(const QString &name)
26{
27 return qLoadPlugin<AbstractRenderer, QRendererPlugin>(loader: loader(), key: name);
28}
29
30} // Render
31
32} // Qt3DRender
33
34QT_END_NAMESPACE
35

source code of qt3d/src/render/qrendererpluginfactory.cpp