From c65efecf0a24d046d0ed176ca7375afaaba3f18a Mon Sep 17 00:00:00 2001 From: Jeffery Myers Date: Sat, 19 Mar 2022 14:26:27 -0700 Subject: [PATCH] Verify there is enough space in the batch for the npatch geometry. (#2401) --- src/rtextures.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rtextures.c b/src/rtextures.c index d1e14db75..77f40ac5e 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -3471,6 +3471,8 @@ void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, coordD.x = (nPatchInfo.source.x + nPatchInfo.source.width)/width; coordD.y = (nPatchInfo.source.y + nPatchInfo.source.height)/height; + rlCheckRenderBatchLimit(9 * 3 * 2); // Maxium number of verts that could happen + rlSetTexture(texture.id); rlPushMatrix();