2020-09-10 11:40:07 +02:00
|
|
|
#include "screenplayshader_plugin.h"
|
|
|
|
|
2020-09-13 19:51:20 +02:00
|
|
|
#include <QQmlEngine>
|
2020-09-24 19:08:06 +02:00
|
|
|
#include <QUrl>
|
|
|
|
#include <qqml.h>
|
2020-09-10 11:40:07 +02:00
|
|
|
|
|
|
|
QObject* ScreenPlayShaderLibrarySingleton(QQmlEngine* engine, QJSEngine* scriptEngine)
|
|
|
|
{
|
|
|
|
Q_UNUSED(scriptEngine)
|
|
|
|
return new ShaderLibrary();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScreenPlayShaderPlugin::registerTypes(const char* uri)
|
|
|
|
{
|
|
|
|
|
2020-09-24 19:08:06 +02:00
|
|
|
qmlRegisterType(QUrl("qrc:/ShaderWrapper/ShadertoyShader.qml"), "ScreenPlay.ShadertoyShader", 1,0, "ShadertoyShader");
|
2020-09-10 11:40:07 +02:00
|
|
|
qmlRegisterSingletonType<ShaderLibrary>(uri, 1, 0, "ShaderLibrary", ScreenPlayShaderLibrarySingleton);
|
|
|
|
}
|