From 2ebb2ba53b3d6e119da6917e78d747ef1ecaf2a8 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Tue, 1 Oct 2024 15:17:51 +0300 Subject: [PATCH] twn_gl_15_rendering.c: disable depth writes for skybox --- src/rendering/twn_gl_15_rendering.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rendering/twn_gl_15_rendering.c b/src/rendering/twn_gl_15_rendering.c index e810591..241f753 100644 --- a/src/rendering/twn_gl_15_rendering.c +++ b/src/rendering/twn_gl_15_rendering.c @@ -589,7 +589,7 @@ void finally_render_skybox(char *paths) { glNewList(list, GL_COMPILE); { /* note: assumes that space pipeline is applied already */ glDisable(GL_ALPHA_TEST); - glDepthMask(GL_TRUE); + glDepthMask(GL_FALSE); glBegin(GL_QUADS); { /* up */ @@ -653,6 +653,7 @@ void finally_render_skybox(char *paths) { glVertex3f(-50.f, 50.f, -50.f); } glEnd(); + glDepthMask(GL_TRUE); glDisable(GL_TEXTURE_CUBE_MAP); } glEndList();