diff options
| author | raysan5 <[email protected]> | 2021-04-05 13:59:52 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2021-04-05 13:59:52 +0200 |
| commit | a8dd4127f37c52cbd166eecf23a068b3687c1bb1 (patch) | |
| tree | 1a54652c300a483ecc91a247b7c2bdad882d6964 /src | |
| parent | 0e04ae561ebbdd7ceca71d14ae91e08faae7c9da (diff) | |
| download | raylib-a8dd4127f37c52cbd166eecf23a068b3687c1bb1.tar.gz raylib-a8dd4127f37c52cbd166eecf23a068b3687c1bb1.zip | |
Added security check to avoid internal render batch overflow
Diffstat (limited to 'src')
| -rw-r--r-- | src/textures.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/textures.c b/src/textures.c index cea8bef1..c8a19be1 100644 --- a/src/textures.c +++ b/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); |
