summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeffery Myers <[email protected]>2022-03-19 14:26:27 -0700
committerGitHub <[email protected]>2022-03-19 22:26:27 +0100
commitc65efecf0a24d046d0ed176ca7375afaaba3f18a (patch)
treede63a1454604d7959273eebf89e506784db9f90d
parent9ecbc465a934fdde9e3d69a709370a370bf193a0 (diff)
downloadraylib-c65efecf0a24d046d0ed176ca7375afaaba3f18a.tar.gz
raylib-c65efecf0a24d046d0ed176ca7375afaaba3f18a.zip
Verify there is enough space in the batch for the npatch geometry. (#2401)
-rw-r--r--src/rtextures.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rtextures.c b/src/rtextures.c
index d1e14db7..77f40ac5 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();