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

Method InitType

Source/Engine/Foliage/Foliage.cpp:592–610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590}
591
592void Foliage::InitType(const RenderView& view, FoliageType& type)
593{
594 const DrawPass drawModes = type._drawModes & view.Pass & view.GetShadowsDrawPassMask(type.ShadowsMode);
595 type._canDraw = type.IsReady() && drawModes != DrawPass::None && type.Model && type.Model->CanBeRendered();
596 bool drawModesDirty = false;
597 for (int32 j = 0; j < type.Entries.Count(); j++)
598 {
599 auto& e = type.Entries[j];
600 e.ReceiveDecals = type.ReceiveDecals != 0;
601 e.ShadowsMode = type.ShadowsMode;
602 if (type._drawModesDirty)
603 {
604 type._drawModesDirty = 0;
605 drawModesDirty = true;
606 }
607 }
608 if (drawModesDirty)
609 GetSceneRendering()->UpdateActor(this, _sceneRenderingKey, ISceneRenderingListener::DrawModes);
610}
611
612int32 Foliage::GetInstancesCount() const
613{

Callers

nothing calls this directly

Calls 3

UpdateActorMethod · 0.80
IsReadyMethod · 0.45
CountMethod · 0.45

Tested by

no test coverage detected