diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-10 16:42:24 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-10 16:42:24 +0100 |
| commit | d6be68c0ad24b9c4bc7ec6cf8deab104f9bc48bc (patch) | |
| tree | dd24d39dd9e6cdab8411064c8d0ad9bb62ee9c1f /src/graphics.h | |
| parent | 88c7b19267e968760fdd350eea77b3199eafe28b (diff) | |
obtaining a egl context
Diffstat (limited to 'src/graphics.h')
| -rw-r--r-- | src/graphics.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/graphics.h b/src/graphics.h index 1ab4651..0419f46 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -3,9 +3,14 @@ #include <EGL/egl.h> #include <wayland-egl.h> +#include "utils.h" + enum graphics_error_e { GRAPHICS_ERROR_NONE = 0, GRAPHICS_ERROR_DISPLAY, + GRAPHICS_ERROR_CONFIG, + GRAPHICS_ERROR_BIND, + GRAPHICS_ERROR_CONTEXT, }; struct graphics_s { @@ -17,3 +22,10 @@ struct graphics_s { enum graphics_error_e wayc_graphics_init(struct graphics_s* graphics, struct wlstate_s* state); void wayc_graphics_deinit(struct graphics_s* graphics); +static inline bool wayc_graphics_use(struct graphics_s* graphics) { + wayc_notnull(graphics); + + eglMakeCurrent(graphics->display, EGL_NO_SURFACE, EGL_NO_SURFACE, + graphics->context); + return true; +} |
