introduce struct

This commit is contained in:
Михаил Капелько committed 2026-10-29 17:02:28 +03:00
1 parent 6c142f794c
commit b9b7e91bcd
2 files changed
+38 -40

No files matched your search

+11 -6
View File
@@ -11,18 +11,23 @@
#include <stdio.h>
static RaybriEGLState globalES = {
.caLayer = NULL,
.cfg = NULL,
.ctx = EGL_NO_CONTEXT,
.display = EGL_NO_DISPLAY,
.surface = EGL_NO_SURFACE
};
void raybriInit(void *layer) {
//SetTraceLogLevel(LOG_WARNING);
EGLConfig cfg = NULL;
EGLContext ctx = EGL_NO_CONTEXT;
EGLDisplay display = EGL_NO_DISPLAY;
EGLSurface surface = EGL_NO_SURFACE;
globalES.caLayer = layer;
if (!raybriEGLInit(&cfg, &ctx, &display)) {
if (!raybriEGLInit(&globalES)) {
raybriLog("ERROR Could not initialize EGL");
}
if (!raybriEGLResetSurface(layer, &cfg, &display, &surface)) {
if (!raybriEGLResetSurface(&globalES)) {
raybriLog("ERROR Could not reset EGL surface");
}