From e17bd422fa2198db7cd9e570f97b9eaa40795bd2 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 7 Nov 2018 22:31:35 +0100 Subject: [PATCH] Corrected issue with line drawing --- src/shapes.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/shapes.c b/src/shapes.c index 77c141d18..838bce0e0 100644 --- a/src/shapes.c +++ b/src/shapes.c @@ -134,9 +134,16 @@ void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color) rlColor4ub(color.r, color.g, color.b, color.a); rlNormal3f(0.0f, 0.0f, 1.0f); + rlTexCoord2f(recTexShapes.x/texShapes.width, recTexShapes.y/texShapes.height); rlVertex2f(0.0f, 0.0f); + + rlTexCoord2f(recTexShapes.x/texShapes.width, (recTexShapes.y + recTexShapes.height)/texShapes.height); rlVertex2f(0.0f, thick); + + rlTexCoord2f((recTexShapes.x + recTexShapes.width)/texShapes.width, (recTexShapes.y + recTexShapes.height)/texShapes.height); rlVertex2f(d, thick); + + rlTexCoord2f((recTexShapes.x + recTexShapes.width)/texShapes.width, recTexShapes.y/texShapes.height); rlVertex2f(d, 0.0f); rlEnd(); rlPopMatrix();