Skip to content

Commit 738cb03

Browse files
committed
start on removing lines mode
1 parent d91675a commit 738cb03

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Source/Renderer/raylib/rshapes.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,9 @@ void DrawRectangleGradientEx(Rectangle rec, RLColor topLeft, RLColor bottomLeft,
751751
// it implies flushing the current batch and changing draw mode to RL_LINES
752752
// but it solves another issue: https://github.com/raysan5/raylib/issues/3884
753753
void DrawRectangleLines(int posX, int posY, int width, int height, RLColor color) {
754+
DrawRectangleLinesEx((Rectangle){(float)posX, (float)posY, (float)width, (float)height}, 1.0f, color);
755+
/*
756+
// DO NOT USE LINES MODE.
754757
RLMatrix mat = rlGetMatrixModelview();
755758
float zoomFactor = 0.5f / mat.m0;
756759
rlBegin(RL_LINES);
@@ -767,7 +770,6 @@ void DrawRectangleLines(int posX, int posY, int width, int height, RLColor color
767770
rlVertex2f((float)posX, (float)posY + (float)height + zoomFactor);
768771
rlVertex2f((float)posX, (float)posY - zoomFactor);
769772
rlEnd();
770-
/*
771773
// Previous implementation, it has issues... but it does not require view matrix...
772774
#if defined(SUPPORT_QUADS_DRAW_MODE)
773775
DrawRectangle(posX, posY, width, 1, color);

0 commit comments

Comments
 (0)