Verify there is enough space in the batch for the npatch geometry. (#2401)

This commit is contained in:
Jeffery Myers
2022-03-19 14:26:27 -07:00
committed by GitHub
parent 9ecbc465a9
commit c65efecf0a

View File

@@ -3471,6 +3471,8 @@ void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest,
coordD.x = (nPatchInfo.source.x + nPatchInfo.source.width)/width; coordD.x = (nPatchInfo.source.x + nPatchInfo.source.width)/width;
coordD.y = (nPatchInfo.source.y + nPatchInfo.source.height)/height; coordD.y = (nPatchInfo.source.y + nPatchInfo.source.height)/height;
rlCheckRenderBatchLimit(9 * 3 * 2); // Maxium number of verts that could happen
rlSetTexture(texture.id); rlSetTexture(texture.id);
rlPushMatrix(); rlPushMatrix();