Extended OBJ loader to parse specular and normal maps

This commit is contained in:
2014-04-23 16:55:51 +02:00
parent 84d6911744
commit 530b16e31b
3 changed files with 242 additions and 29 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ Model::Model(OBJ &obj, ResourceManager* rm)
{
currentMaterial = face.Material;
// Load texture
auto texture = std::shared_ptr<Texture>(rm->Load<Texture>("Texture", currentMaterial->TextureFile));
auto texture = std::shared_ptr<Texture>(rm->Load<Texture>("Texture", currentMaterial->DiffuseTexture.FileName));
// TODO: Load material parameters
// Create new texture group (start index of new group is upcoming index)
TextureGroup texGroup = { texture, index, index };