#pragma once #include "gl_common.h" #ifdef STELA_USE_GLAD #include #else #include #include #endif struct stl_egl_global { EGLDisplay display; }; struct stl_egl { EGLDisplay display; EGLSurface surface; EGLContext context; EGLContext current; }; bool stl_maybe_load_egl(void); bool stl_load_egl(struct stl_egl_global *global); void stl_terminate_egl(struct stl_egl_global *global); bool stl_init_egl_context(struct stl_egl *egl, struct stl_egl_global *global, EGLint visual_id, EGLConfig *config); bool stl_egl_make_current(struct stl_egl *egl); void stl_egl_release_current(struct stl_egl *egl); void stl_egl_swap_interval(struct stl_egl *egl, EGLint interval); void stl_egl_swap_buffers(struct stl_egl *egl); bool stl_egl_is_ready(struct stl_egl *egl); void stl_egl_destroy_surface(struct stl_egl *egl); void stl_egl_destroy_context(struct stl_egl *egl); void stl_egl_check_error();