From 732c1fcb26030d15dfaba838043d24358b10f352 Mon Sep 17 00:00:00 2001 From: Artem Borovik Date: Fri, 30 Aug 2024 18:08:39 +0300 Subject: [PATCH] texture fix --- src/rtextures.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rtextures.c b/src/rtextures.c index 882050b21..d9c00ff65 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -4598,9 +4598,9 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 bottomRight.y = y + (dx + dest.width)*sinRotation + (dy + dest.height)*cosRotation; } - rlSetTexture(texture.id); #if defined(SUPPORT_QUADS_DRAW_MODE) rlBegin(RL_QUADS); + rlSetTexture(texture.id); rlColor4ub(tint.r, tint.g, tint.b, tint.a); rlNormal3f(0.0f, 0.0f, 1.0f); // Normal vector pointing towards viewer @@ -4667,6 +4667,7 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 #else rlBegin(RL_TRIANGLES); + rlSetTexture(texture.id); rlColor4ub(tint.r, tint.g, tint.b, tint.a); rlNormal3f(0.0f, 0.0f, 1.0f); // Normal vector pointing towards viewer