MCPcopy Create free account
hub / github.com/defold/defold / AddToRender

Function AddToRender

engine/render/src/render/render.cpp:385–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 15

TEST_FFunction · 0.85
TestDrawStateDispatchFunction · 0.85
DebugRenderListDispatchFunction · 0.85
CreateFontRenderBatchFunction · 0.85
RenderBatchWorldVSFunction · 0.85
RenderBatchLocalVSFunction · 0.85
RenderListDispatchFunction · 0.85
RenderBatchFunction · 0.85

Calls 3

FullMethod · 0.45
CapacityMethod · 0.45
PushMethod · 0.45

Tested by 4

TEST_FFunction · 0.68
TestDrawStateDispatchFunction · 0.68