add bridge call native
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "context_manager.h"
|
||||
#include "native_bridge.h"
|
||||
#include "plugin/shader_plugin.h"
|
||||
|
||||
Q_INVOKABLE void NativeBridge::function(int contextId, QString module, QString methodName, QString callbackId, QJSValue jsValue) {
|
||||
qDebug() << "contextId: " + QString::number(contextId) + ", " +
|
||||
@@ -8,5 +9,11 @@ Q_INVOKABLE void NativeBridge::function(int contextId, QString module, QString m
|
||||
"callbackId: " + callbackId + ", " +
|
||||
"arguments: " + jsValue.toString();
|
||||
Context *context = ContextManager::getInstance()->getContext(contextId);
|
||||
context->driver->getRegistry();
|
||||
QString value = context->driver->getRegistry()->acquirePluginInfo(module);
|
||||
|
||||
qDebug() << value;
|
||||
if (value.contains("ShaderPlugin")) {
|
||||
ShaderPlugin shaderPlugin(context);
|
||||
QMetaObject::invokeMethod(&shaderPlugin, methodName.toStdString().c_str());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user