| 383 | } |
| 384 | |
| 385 | Result AddToRender(HRenderContext context, RenderObject* ro) |
| 386 | { |
| 387 | if (context == 0x0) return RESULT_INVALID_CONTEXT; |
| 388 | if (context->m_RenderObjects.Full()) |
| 389 | { |
| 390 | if (!context->m_OutOfResources) |
| 391 | { |
| 392 | dmLogWarning("Max number of draw calls reached (%u), some objects will not be rendered. Increase the capacity with graphics.max_draw_calls", context->m_RenderObjects.Capacity()); |
| 393 | context->m_OutOfResources = 1; |
| 394 | } |
| 395 | return RESULT_OUT_OF_RESOURCES; |
| 396 | } |
| 397 | context->m_RenderObjects.Push(ro); |
| 398 | |
| 399 | return RESULT_OK; |
| 400 | } |
| 401 | |
| 402 | Result ClearRenderObjects(HRenderContext context) |
| 403 | { |