From 94ab5e2aabb4a1cc392c711bc9ce0ab3edd03bf7 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Mon, 27 Apr 2020 18:02:54 +0200 Subject: [PATCH] Review issue with vertex batch overflow #1223 --- src/shapes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shapes.c b/src/shapes.c index 02c0eeb7e..8b51af9aa 100644 --- a/src/shapes.c +++ b/src/shapes.c @@ -1298,7 +1298,7 @@ void DrawTriangleStrip(Vector2 *points, int pointsCount, Color color) { if (pointsCount >= 3) { - if (rlCheckBufferLimit(pointsCount)) rlglDraw(); + if (rlCheckBufferLimit(3*(pointsCount - 2))) rlglDraw(); rlBegin(RL_TRIANGLES); rlColor4ub(color.r, color.g, color.b, color.a);