Commit 445550c0d9a38b480bd1c6acb8b57f88b7903e96

Thomas de Grivel 2024-01-14T15:55:25

opengl macos

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/libc3/window/sdl2/window_sdl2.c b/libc3/window/sdl2/window_sdl2.c
index cb64808..42c2b15 100644
--- a/libc3/window/sdl2/window_sdl2.c
+++ b/libc3/window/sdl2/window_sdl2.c
@@ -198,7 +198,8 @@ bool window_sdl2_run (s_window_sdl2 *window)
     goto ko;
   }
   glEnable(GL_DEBUG_OUTPUT);
-  glDebugMessageCallback(gl_debug, NULL);
+  if (glDebugMessageCallback)
+    glDebugMessageCallback(gl_debug, NULL);
   if (SDL_GL_MakeCurrent(sdl_window, context) < 0) {
     warnx("window_sdl2_run: failed to make OpenGL context current: %s",
           SDL_GetError());