attempt-1

This commit is contained in:
Михаил Капелько committed 2026-10-29 23:12:16 +03:00
1 parent 26528819a7
commit 7bd72fc60a
3 files changed
+19 -17

No files matched your search

+11
View File
@@ -12,6 +12,17 @@ func renderInit(_ vm: RenderVM) {
// UIKit has no NSOpenGLContext: EGL/ANGLE renders into the view's layer,
// so the layer is what the bridge needs to create its surface from.
let layer = Unmanaged.passUnretained(vm.glView.layer).toOpaque()
vm.glView.st.caLayer = layer;
if (!eglInit(&vm.glView.st)) {
raybriLog("ERROR Could not initialize EGL");
}
if (!eglResetSurface(&vm.glView.st)) {
raybriLog("ERROR Could not reset EGL surface");
}
eglMakeCurrentContext(&vm.glView.st)
raybriInit(layer)
}