Commit 856d87545b24c02c5c6eb8c568b34fb4c49b9e94

Thomas de Grivel 2024-01-07T21:26:09

window_sdl2 resize

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/libc3/window/sdl2/demo/window_sdl2_demo.c b/libc3/window/sdl2/demo/window_sdl2_demo.c
index e5668e4..91ce296 100644
--- a/libc3/window/sdl2/demo/window_sdl2_demo.c
+++ b/libc3/window/sdl2/demo/window_sdl2_demo.c
@@ -327,6 +327,7 @@ bool window_sdl2_demo_resize (s_window_sdl2 *window,
   (void) window;
   assert(glGetError() == GL_NO_ERROR);
   gl_ortho_resize(&g_ortho, 0, w, 0, h, -1, 1);
+  glViewport(0, 0, w, h);
   assert(glGetError() == GL_NO_ERROR);
   return true;
 }