Graphics: Add default materials

This commit is contained in:
SirLynix
2022-09-08 08:57:11 +02:00
parent 7f7ddb415b
commit 99c9df5731
5 changed files with 49 additions and 3 deletions

View File

@@ -123,7 +123,11 @@ int main()
}
for (std::size_t i = 0; i < bobMesh->GetSubMeshCount(); ++i)
bobModel->SetMaterial(i, materials[bobMesh->GetSubMesh(i)->GetMaterialIndex()]);
{
std::size_t matIndex = bobMesh->GetSubMesh(i)->GetMaterialIndex();
if (materials[matIndex])
bobModel->SetMaterial(i, materials[matIndex]);
}
/*for (std::size_t y = 0; y < 10; ++y)
{