|
|
|
|
|
|
#include "Unity/IUnityUIWidgets.h" |
|
|
|
#include "flutter/fml/macros.h" |
|
|
|
#include "runtime/mono_api.h" |
|
|
|
#include <GLES2/gl2.h> |
|
|
|
#include <EGL/egl.h> |
|
|
|
|
|
|
|
namespace uiwidgets { |
|
|
|
|
|
|
|
|
|
|
UIWIDGETS_CALLBACK(void) _WakeUp() { GetInstancePtr()->WakeUp(); } |
|
|
|
|
|
|
|
UIWIDGETS_CALLBACK(void) _GfxWorkerCallback(int eventId, void* data) { |
|
|
|
auto context = eglGetCurrentContext(); |
|
|
|
auto display = eglGetCurrentDisplay(); |
|
|
|
auto draw = eglGetCurrentSurface(EGL_DRAW); |
|
|
|
auto read = eglGetCurrentSurface(EGL_READ); |
|
|
|
eglMakeCurrent(display, draw, read, context); |
|
|
|
} |
|
|
|
|
|
|
|
void Update(); |
|
|
|