瀏覽代碼

Added security check for render batch #1670

pull/1675/head
Ray 3 年之前
父節點
當前提交
60bfee4a7d
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      examples/models/models_rlgl_solar_system.c

+ 4
- 0
examples/models/models_rlgl_solar_system.c 查看文件

@ -135,6 +135,10 @@ void DrawSphereBasic(Color color)
{
int rings = 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);
rlColor4ub(color.r, color.g, color.b, color.a);

Loading…
取消
儲存