| 427 | #endif |
| 428 | |
| 429 | void Model::SetupMaterialSlots(int32 slotsCount) |
| 430 | { |
| 431 | PROFILE_MEM(GraphicsMeshes); |
| 432 | ModelBase::SetupMaterialSlots(slotsCount); |
| 433 | |
| 434 | // Adjust meshes indices for slots |
| 435 | for (int32 lodIndex = 0; lodIndex < LODs.Count(); lodIndex++) |
| 436 | { |
| 437 | for (int32 meshIndex = 0; meshIndex < LODs[lodIndex].Meshes.Count(); meshIndex++) |
| 438 | { |
| 439 | auto& mesh = LODs[lodIndex].Meshes[meshIndex]; |
| 440 | if (mesh.GetMaterialSlotIndex() >= slotsCount) |
| 441 | mesh.SetMaterialSlotIndex(slotsCount - 1); |
| 442 | } |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | int32 Model::GetLODsCount() const |
| 447 | { |
no test coverage detected