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

Method DrawFoliageJob

Source/Engine/Foliage/Foliage.cpp:433–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433void Foliage::DrawFoliageJob(int32 i)
434{
435 PROFILE_CPU();
436 PROFILE_MEM(Graphics);
437 const FoliageType& type = FoliageTypes[i];
438 if (type._canDraw)
439 {
440 DrawCallsList drawCallsLists[MODEL_MAX_LODS];
441 for (RenderContext& renderContext : _renderContextBatch->Contexts)
442 {
443#if !FOLIAGE_USE_SINGLE_QUAD_TREE && FOLIAGE_USE_DRAW_CALLS_BATCHING
444 DrawType(renderContext, type, drawCallsLists);
445#else
446 Mesh::DrawInfo draw;
447 draw.Flags = GetStaticFlags();
448 draw.DrawModes = (DrawPass)(DrawPass::Default & renderContext.View.Pass);
449 draw.LODBias = 0;
450 draw.ForcedLOD = -1;
451 draw.VertexColors = nullptr;
452 draw.Deformation = nullptr;
453 DrawType(renderContext, type, draw);
454#endif
455 }
456 }
457}
458
459#endif
460

Callers

nothing calls this directly

Calls 1

GetStaticFlagsFunction · 0.85

Tested by

no test coverage detected