From 1f8a225f89f8cb4617ed581b4c909015f1cb06d4 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Tue, 8 Oct 2024 00:51:46 +0300 Subject: [PATCH] twn_gl_15_rendering.c: only disable color array for sprite batch if it was used --- src/rendering/twn_gl_15_rendering.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rendering/twn_gl_15_rendering.c b/src/rendering/twn_gl_15_rendering.c index 8c05724..02e9d75 100644 --- a/src/rendering/twn_gl_15_rendering.c +++ b/src/rendering/twn_gl_15_rendering.c @@ -339,7 +339,9 @@ void finally_render_sprites(const Primitive2D primitives[], glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); + + if (!batch.constant_colored) + glDisableClientState(GL_COLOR_ARRAY); glBindTexture(GL_TEXTURE_2D, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);