diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/rendering.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rendering.c b/src/rendering.c index 12b0370..9dfc89c 100644 --- a/src/rendering.c +++ b/src/rendering.c @@ -2,6 +2,7 @@ #include <glad/gl.h> #include <GLFW/glfw3.h> +#define CGLM_FORCE_DEPTH_ZERO_TO_ONE #include <cglm/cam.h> #include <cglm/vec2.h> #include <cglm/ivec3.h> @@ -583,7 +584,7 @@ void r_perspective_ortho(Camera *c, f32 sz, ivec2 windowsize) { void r_set_camera(RenderTargets *restrict t, i32 framebuffer_idx, Camera *restrict c) { ASSERT(t != NULL); - ASSERT(framebuffer_idx == -1 || framebuffer_idx < (i32)t->framebuffer_len); + ASSERT(framebuffer_idx >= 0 || framebuffer_idx < (i32)t->framebuffer_len); t->cam[framebuffer_idx] = c; } @@ -981,7 +982,7 @@ void r_attach_buffers(void *restrict ctx, u32 fbo, u32* buffers, u32* buffer_par } } -void framebuffer_size_callback_default(ivec3* dst,ivec2 src) { +void framebuffer_size_callback_default(ivec3* dst, ivec2 src) { glm_ivec2_copy(src, *dst); } |
