mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-17 20:05:35 +00:00
Added security check for render batch #1670
This commit is contained in:
@@ -135,6 +135,10 @@ void DrawSphereBasic(Color color)
|
|||||||
{
|
{
|
||||||
int rings = 16;
|
int rings = 16;
|
||||||
int slices = 16;
|
int slices = 16;
|
||||||
|
|
||||||
|
// Make sure there is enough space in the internal render batch
|
||||||
|
// buffer to store all required vertex, batch is reseted if required
|
||||||
|
rlCheckRenderBatchLimit((rings + 2)*slices*6);
|
||||||
|
|
||||||
rlBegin(RL_TRIANGLES);
|
rlBegin(RL_TRIANGLES);
|
||||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||||
|
|||||||
Reference in New Issue
Block a user