aboutsummaryrefslogtreecommitdiff
path: root/src/saffron_window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/saffron_window.c')
-rw-r--r--src/saffron_window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/saffron_window.c b/src/saffron_window.c
index 34da341..6c89c50 100644
--- a/src/saffron_window.c
+++ b/src/saffron_window.c
@@ -7,6 +7,8 @@
#include <SDL3/SDL.h>
#include <SDL3_ttf/SDL_ttf.h>
#include <saffron.h>
+#include <SDL3/SDL_egl.h>
+#include <SDL3/SDL_opengles2.h>
SaffronWindow* saffron_window_new(const char* title, int w, int h) {
SaffronWindow* window = malloc(sizeof(SaffronWindow));
@@ -17,7 +19,7 @@ SaffronWindow* saffron_window_new(const char* title, int w, int h) {
memset(window->hooks, 0, sizeof(window->hooks));
window->hook_count = 0;
- Uint32 flags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIGH_PIXEL_DENSITY;
+ Uint32 flags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIGH_PIXEL_DENSITY | SDL_WINDOW_OPENGL;
window->sdl_window = SDL_CreateWindow(title, w, h, flags);
window->renderer = SDL_CreateRenderer(window->sdl_window, NULL);
window->root->theme = SF_MACRO_DEFAULT_THEME;