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

Method SetupMaterialSlots

Source/Engine/Content/Assets/SkinnedModel.cpp:780–795  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

778}
779
780void SkinnedModel::SetupMaterialSlots(int32 slotsCount)
781{
782 PROFILE_MEM(GraphicsMeshes);
783 ModelBase::SetupMaterialSlots(slotsCount);
784
785 // Adjust meshes indices for slots
786 for (int32 lodIndex = 0; lodIndex < LODs.Count(); lodIndex++)
787 {
788 for (int32 meshIndex = 0; meshIndex < LODs[lodIndex].Meshes.Count(); meshIndex++)
789 {
790 auto& mesh = LODs[lodIndex].Meshes[meshIndex];
791 if (mesh.GetMaterialSlotIndex() >= slotsCount)
792 mesh.SetMaterialSlotIndex(slotsCount - 1);
793 }
794 }
795}
796
797int32 SkinnedModel::GetLODsCount() const
798{

Callers

nothing calls this directly

Calls 3

SetupMaterialSlotsFunction · 0.85
SetMaterialSlotIndexMethod · 0.80
CountMethod · 0.45

Tested by

no test coverage detected