Some work done on lights and normals and other buggs/fixes

This commit is contained in:
Tleety
2014-05-20 03:33:42 +02:00
parent 82d5953c97
commit e414087816
10 changed files with 46 additions and 27 deletions
+12
View File
@@ -23,11 +23,23 @@ Model::Model(OBJ &obj, ResourceManager* rm)
// TODO: Load normal map
std::shared_ptr<Texture> normalMap = nullptr;
if (!currentMaterial->NormalMap.FileName.empty())
{
normalMap = std::shared_ptr<Texture>(rm->Load<Texture>("Texture", currentMaterial->NormalMap.FileName));
}
else
{
normalMap = std::shared_ptr<Texture>(rm->Load<Texture>("Texture", "Textures/NeutralNormalMap.png"));
}
// Load specular map
std::shared_ptr<Texture> specularMap = nullptr;
if (!currentMaterial->SpecularMap.FileName.empty())
{
specularMap = std::shared_ptr<Texture>(rm->Load<Texture>("Texture", currentMaterial->SpecularMap.FileName));
}
else
{
specularMap = std::shared_ptr<Texture>(rm->Load<Texture>("Texture", "Textures/NeutralSpecularMap.png"));
}
// TODO: Load material parameters
// Create new texture group (start index of new group is upcoming index)