1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-05 10:32:28 +01:00
ScreenPlay/ScreenPlayShader/screenplayshader_plugin.cpp
2020-10-29 19:17:37 +01:00

19 lines
542 B
C++

#include "screenplayshader_plugin.h"
#include <QQmlEngine>
#include <QUrl>
#include <qqml.h>
QObject* ScreenPlayShaderLibrarySingleton(QQmlEngine* engine, QJSEngine* scriptEngine)
{
Q_UNUSED(scriptEngine)
return new ShaderLibrary();
}
void ScreenPlayShaderPlugin::registerTypes(const char* uri)
{
qmlRegisterType(QUrl("qrc:/ShaderWrapper/ShadertoyShader.qml"), "ScreenPlay.ShadertoyShader", 1, 0, "ShadertoyShader");
qmlRegisterSingletonType<ShaderLibrary>(uri, 1, 0, "ShaderLibrary", ScreenPlayShaderLibrarySingleton);
}