diff --git a/components/egl/egl.h b/components/egl/egl.h index 6b151b6..d9817fe 100644 --- a/components/egl/egl.h +++ b/components/egl/egl.h @@ -15,6 +15,7 @@ typedef struct EGLState { } EGLState; bool eglInit(EGLState *st); +bool eglMakeCurrentContext(EGLState *st); bool eglResetSurface(EGLState *st); // Source @@ -51,6 +52,14 @@ bool eglInit(EGLState *st) { 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) { // Destroy previous surface if (st->surface != EGL_NO_SURFACE) {