diff options
| author | onelin <oscar@nelin.dk> | 2025-12-03 23:02:54 +0000 |
|---|---|---|
| committer | onelin <oscar@nelin.dk> | 2025-12-18 21:14:21 +0000 |
| commit | 3a24982d1ed318b26e5ea191db63cedeb9e8d43f (patch) | |
| tree | 23dc26c6da3e8c831a9e26be1aec3bfdc6e2049f /src/rendering.c | |
| parent | 7e24f38e9d7c5ea04112c59d3f8dc74bc938da7e (diff) | |
Try linear filtering:)
Diffstat (limited to 'src/rendering.c')
| -rw-r--r-- | src/rendering.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rendering.c b/src/rendering.c index ac7b766..02be7d1 100644 --- a/src/rendering.c +++ b/src/rendering.c @@ -435,7 +435,7 @@ void render_begin(Window* w) { glfwMakeContextCurrent(w->window); ((GladGLContext*)w->context)->BindFramebuffer(GL_FRAMEBUFFER, 0); ((GladGLContext*)w->context)->ClearColor(1.f, 0.f, 1.f, 1.f); - ((GladGLContext*)w->context)->Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + ((GladGLContext*)w->context)->Clear(GL_COLOR_BUFFER_BIT); } void r_clear_buffer(void *restrict context, RenderTargets *restrict t, u32 framebuffer_idx) { @@ -446,7 +446,8 @@ void r_clear_buffer(void *restrict context, RenderTargets *restrict t, u32 frame void render_present(Window* w, RenderObject *restrict default_quad) { const GladGLContext *restrict gl = w->context; - gl->BindFramebuffer(GL_FRAMEBUFFER, 0); + gl->BindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); + gl->Disable(GL_DEPTH_TEST); gl->UseProgram(default_quad->shader.program); gl->BindTextureUnit(0, default_quad->texture); gl->BindVertexArray(default_quad->vao); @@ -549,7 +550,7 @@ void r_draw_model(void *restrict context, RenderTargets *restrict t, u32 framebu Camera c = *t->cam[framebuffer_idx]; gl->BindFramebuffer(GL_FRAMEBUFFER, t->framebuffer[framebuffer_idx]); gl->Enable(GL_DEPTH_TEST); - gl->DepthFunc(GL_LESS); + gl->DepthFunc(GL_LEQUAL); //const f32 s = pos[3]; mat4 view; // view |
