From 9efcd79ba62db3b4e152ce328dd82abddc4b2564 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Tue, 1 Oct 2024 15:23:06 +0300 Subject: [PATCH] twn_gl_15_rendering.c: don't assume seethrough triangle textures, infer actual usage --- src/rendering/twn_gl_15_rendering.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/rendering/twn_gl_15_rendering.c b/src/rendering/twn_gl_15_rendering.c index a6a4bdd..2fed12b 100644 --- a/src/rendering/twn_gl_15_rendering.c +++ b/src/rendering/twn_gl_15_rendering.c @@ -74,13 +74,7 @@ void use_space_pipeline(void) { glDisable(GL_DEPTH_CLAMP); glEnable(GL_CULL_FACE); - glEnable(GL_DEPTH_TEST); - glDepthMask(GL_TRUE); - glDepthFunc(GL_LESS); glDepthRange(0, 1); - glDisable(GL_BLEND); - glEnable(GL_ALPHA_TEST); /* TODO: infer its usage? */ - glAlphaFunc(GL_EQUAL, 1.0f); glEnable(GL_TEXTURE_2D); glActiveTexture(GL_TEXTURE0); @@ -413,6 +407,8 @@ void finally_draw_uncolored_space_traingle_batch(const MeshBatch *batch, textures_bind(&ctx.texture_cache, texture_key); + use_texture_mode(textures_get_mode(&ctx.texture_cache, texture_key)); + glBindBuffer(GL_ARRAY_BUFFER, buffer); /* vertex specification*/