Commit 26dac0a7eda96102f66c53880a7d6bec63e69eac

Thomas de Grivel 2024-01-14T22:18:02

fix invalid texture id

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/libc3/window/sdl2/gl_ortho.c b/libc3/window/sdl2/gl_ortho.c
index e183ba4..5efc204 100644
--- a/libc3/window/sdl2/gl_ortho.c
+++ b/libc3/window/sdl2/gl_ortho.c
@@ -171,7 +171,7 @@ void gl_ortho_render (s_gl_ortho *ortho)
   assert(glGetError() == GL_NO_ERROR);
   glUniform1i(ortho->gl_enable_texture_loc, 0);
   assert(glGetError() == GL_NO_ERROR);
-  glUniform1i(ortho->gl_texture_loc, -1);
+  glUniform1i(ortho->gl_texture_loc, 0);
   assert(glGetError() == GL_NO_ERROR);
   glDepthRange(ortho->clip_z_near, ortho->clip_z_far);
   assert(glGetError() == GL_NO_ERROR);