This commit is contained in:
Михаил Капелько committed 2026-10-29 23:05:04 +03:00
1 parent 360be210c2
commit 26528819a7
1 file changed
+9
+9
View File
@@ -15,6 +15,7 @@ typedef struct EGLState {
} EGLState; } EGLState;
bool eglInit(EGLState *st); bool eglInit(EGLState *st);
bool eglMakeCurrentContext(EGLState *st);
bool eglResetSurface(EGLState *st); bool eglResetSurface(EGLState *st);
// Source // Source
@@ -51,6 +52,14 @@ bool eglInit(EGLState *st) {
return true; return true;
} }
bool eglMakeCurrentContext(EGLState *st) {
if (eglMakeCurrent(st->display, st->surface, st->surface, st->ctx) == EGL_FALSE) {
return false;
}
return true;
}
bool eglResetSurface(EGLState *st) { bool eglResetSurface(EGLState *st) {
// Destroy previous surface // Destroy previous surface
if (st->surface != EGL_NO_SURFACE) { if (st->surface != EGL_NO_SURFACE) {