aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2018-11-07 22:31:35 +0100
committerRay <raysan5@gmail.com>2018-11-07 22:31:35 +0100
commite17bd422fa2198db7cd9e570f97b9eaa40795bd2 (patch)
tree950af5c44f195458b45f80cf8c4bccd3668931f4
parentb356ef5564e7fa2f4e26232cac451f9d63984ba5 (diff)
downloadraylib-e17bd422fa2198db7cd9e570f97b9eaa40795bd2.tar.gz
raylib-e17bd422fa2198db7cd9e570f97b9eaa40795bd2.zip
Corrected issue with line drawing
-rw-r--r--src/shapes.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shapes.c b/src/shapes.c
index 77c141d1..838bce0e 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();