Added security check to avoid internal render batch overflow

This commit is contained in:
raysan5 2021-04-05 13:59:52 +02:00
parent 0e04ae561e
commit a8dd4127f3

View file

@ -3237,6 +3237,8 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2
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);