infer texture mode for triangles

This commit is contained in:
veclavtalica 2025-01-05 23:43:30 +03:00
parent a9d9936cb7
commit e914cad0dd

View File

@ -100,6 +100,12 @@ void finally_draw_uncolored_space_traingle_batch(const MeshBatch *batch,
command.primitive_count = (GLsizei)(3 * primitives_len); command.primitive_count = (GLsizei)(3 * primitives_len);
/* TODO: support alpha blended case, with distance sort */
TextureMode mode = textures_get_mode(&ctx.texture_cache, texture_key);
if (mode == TEXTURE_MODE_GHOSTLY)
mode = TEXTURE_MODE_SEETHROUGH;
use_texture_mode(mode);
DeferredCommand final_command = { DeferredCommand final_command = {
.type = DEFERRED_COMMAND_TYPE_DRAW, .type = DEFERRED_COMMAND_TYPE_DRAW,
.draw = command .draw = command