Changed .obj files to our own format. DummyScene.mesh may be broken.

This commit is contained in:
antc13
2016-01-23 20:35:58 +01:00
parent f1835fd89c
commit 3baa988ad4
26 changed files with 99 additions and 83 deletions
+9 -6
View File
@@ -162,8 +162,9 @@ void RawModelCustom::ReadMaterialSingle(unsigned int &offset, char* fileData, un
if (offset + nameLengths[1] > fileByteSize) {
throw Resource::FailedLoadingException("Reading Material NormalMap path failed");
}
newMaterial.NormalMapPath = (fileData + offset);
newMaterial.NormalMapPath = "Textures/";
newMaterial.NormalMapPath += (fileData + offset);
newMaterial.NormalMapPath += ".png";
offset += nameLengths[1];
}
@@ -171,8 +172,9 @@ void RawModelCustom::ReadMaterialSingle(unsigned int &offset, char* fileData, un
if (offset + nameLengths[2] > fileByteSize) {
throw Resource::FailedLoadingException("Reading Material SpecularMap path failed");
}
newMaterial.SpecularMapPath = (fileData + offset);
newMaterial.SpecularMapPath = "Textures/";
newMaterial.SpecularMapPath += (fileData + offset);
newMaterial.SpecularMapPath += ".png";
offset += nameLengths[2];
}
@@ -180,8 +182,9 @@ void RawModelCustom::ReadMaterialSingle(unsigned int &offset, char* fileData, un
if (offset + nameLengths[3] > fileByteSize) {
throw Resource::FailedLoadingException("Reading Material IncandescenceMap path failed");
}
newMaterial.IncandescenceMapPath = (fileData + offset);
newMaterial.IncandescenceMapPath = "Textures/";
newMaterial.IncandescenceMapPath += (fileData + offset);
newMaterial.IncandescenceMapPath += ".png";
offset += nameLengths[3];
}