From b1f6b4711cb5473adaa8123c8a3dd1cc954a8c31 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Sat, 2 May 2026 22:11:23 +1200 Subject: GL context things --- include/saffron_api.h | 5 +++++ include/saffron_window.h | 3 +++ 2 files changed, 8 insertions(+) (limited to 'include') diff --git a/include/saffron_api.h b/include/saffron_api.h index 964eaa9..99b4988 100644 --- a/include/saffron_api.h +++ b/include/saffron_api.h @@ -7,8 +7,11 @@ #include "saffron_text.h" #include "saffron_button.h" #include +#include #include #include +#include +#include bool saffron_init(void); void saffron_quit(void); @@ -42,4 +45,6 @@ void saffron_widget_set_theme(SaffronWidget* widget, SaffronTheme* theme); */ void saffron_hook_sdl_all_events(SaffronWindow* window, bool (*callback)(SDL_Event* event), int priority); +SDL_GLContext saffron_window_get_gl_context(SaffronWindow* window); + #endif diff --git a/include/saffron_window.h b/include/saffron_window.h index 89bf684..1552814 100644 --- a/include/saffron_window.h +++ b/include/saffron_window.h @@ -2,6 +2,8 @@ #define SAFFRON_WINDOW_H #include +#include +#include #include "saffron_event_hooks.h" #include "saffron_widget.h" @@ -13,6 +15,7 @@ typedef struct { const char* title; SfInternalEventHook hooks[32]; int hook_count; + SDL_GLContext gl_context; } SaffronWindow; #endif -- cgit v1.2.3