Explorar o código

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

Jeffery Myers %!s(int64=3) %!d(string=hai) anos
pai
achega
c65efecf0a
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/rtextures.c

+ 2 - 0
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();