MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / DrawActors

Method DrawActors

Source/Engine/Renderer/Renderer.cpp:340–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340void Renderer::DrawActors(RenderContext& renderContext, const Array<Actor*>& customActors)
341{
342 if (customActors.HasItems())
343 {
344 // Draw custom actors
345 for (Actor* actor : customActors)
346 {
347 if (actor && actor->GetIsActive())
348 actor->Draw(renderContext);
349 }
350 }
351 else
352 {
353 // Draw scene actors
354 RenderContextBatch renderContextBatch(renderContext);
355 JobSystem::SetJobStartingOnDispatch(false);
356 Level::DrawActors(renderContextBatch, SceneRendering::DrawCategory::SceneDraw);
357 Level::DrawActors(renderContextBatch, SceneRendering::DrawCategory::SceneDrawAsync);
358 JobSystem::SetJobStartingOnDispatch(true);
359 for (const int64 label : renderContextBatch.WaitLabels)
360 JobSystem::Wait(label);
361 renderContextBatch.WaitLabels.Clear();
362 }
363}
364
365void RenderInner(SceneRenderTask* task, RenderContext& renderContext, RenderContextBatch& renderContextBatch)
366{

Callers

nothing calls this directly

Calls 4

WaitFunction · 0.50
HasItemsMethod · 0.45
DrawMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected