| 590 | } |
| 591 | |
| 592 | void 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 | |
| 612 | int32 Foliage::GetInstancesCount() const |
| 613 | { |
nothing calls this directly
no test coverage detected