add shader plugin register
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <QtPlugin>
|
||||
|
||||
#include "registry.h"
|
||||
|
||||
class Driver {
|
||||
|
||||
public:
|
||||
@@ -12,6 +14,8 @@ public:
|
||||
virtual void invokeContextEntityMethod(int contextId, QString *method, ...) = 0;
|
||||
virtual void invokeDoricMethod(QString *method, ...) = 0;
|
||||
|
||||
virtual Registry *getRegistry() = 0;
|
||||
|
||||
virtual ~Driver() = default;
|
||||
};
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
#include <QDebug>
|
||||
|
||||
#include "stdarg.h"
|
||||
|
||||
#include "native_driver.h"
|
||||
@@ -50,3 +52,7 @@ void NativeDriver::invokeContextEntityMethod(int contextId, QString *method, ...
|
||||
void NativeDriver::invokeDoricMethod(QString *method, ...) {
|
||||
|
||||
}
|
||||
|
||||
Registry* NativeDriver::getRegistry() {
|
||||
return jsEngine->registry;
|
||||
}
|
||||
|
@@ -1,8 +1,6 @@
|
||||
#ifndef NATIVE_DRIVER_H
|
||||
#define NATIVE_DRIVER_H
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include "driver.h"
|
||||
#include "engine/js_engine.h"
|
||||
|
||||
@@ -28,6 +26,8 @@ public:
|
||||
|
||||
void invokeContextEntityMethod(int contextId, QString *method, ...) override;
|
||||
void invokeDoricMethod(QString *method, ...) override;
|
||||
|
||||
Registry * getRegistry() override;
|
||||
};
|
||||
|
||||
#endif // NATIVE_DRIVER_H
|
||||
|
Reference in New Issue
Block a user