Browse Source

Corrected issue with line drawing

pull/685/head
Ray 6 years ago
parent
commit
e17bd422fa
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/shapes.c

+ 7
- 0
src/shapes.c View File

@ -134,9 +134,16 @@ void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color)
rlColor4ub(color.r, color.g, color.b, color.a); rlColor4ub(color.r, color.g, color.b, color.a);
rlNormal3f(0.0f, 0.0f, 1.0f); rlNormal3f(0.0f, 0.0f, 1.0f);
rlTexCoord2f(recTexShapes.x/texShapes.width, recTexShapes.y/texShapes.height);
rlVertex2f(0.0f, 0.0f); rlVertex2f(0.0f, 0.0f);
rlTexCoord2f(recTexShapes.x/texShapes.width, (recTexShapes.y + recTexShapes.height)/texShapes.height);
rlVertex2f(0.0f, thick); rlVertex2f(0.0f, thick);
rlTexCoord2f((recTexShapes.x + recTexShapes.width)/texShapes.width, (recTexShapes.y + recTexShapes.height)/texShapes.height);
rlVertex2f(d, thick); rlVertex2f(d, thick);
rlTexCoord2f((recTexShapes.x + recTexShapes.width)/texShapes.width, recTexShapes.y/texShapes.height);
rlVertex2f(d, 0.0f); rlVertex2f(d, 0.0f);
rlEnd(); rlEnd();
rlPopMatrix(); rlPopMatrix();

Loading…
Cancel
Save