Explorar o código

Added security check to avoid internal render batch overflow

raysan5 %!s(int64=4) %!d(string=hai) anos
pai
achega
a8dd4127f3
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/textures.c

+ 2 - 0
src/textures.c

@@ -3236,6 +3236,8 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2
             bottomRight.x = x + (dx + dest.width)*cosRotation - (dy + dest.height)*sinRotation;
             bottomRight.y = y + (dx + dest.width)*sinRotation + (dy + dest.height)*cosRotation;
         }
+        
+        rlCheckRenderBatchLimit(4);     // Make sure there is enough free space on the batch buffer
 
         rlSetTexture(texture.id);
         rlBegin(RL_QUADS);