Fixed possible bug with map_emmissive keyword and removed second check for ambient texture keyword

pull/311/head
Robin 2014-07-11 08:11:54 +02:00
parent afa2d3da94
commit ce37d3bcad
1 changed files with 2 additions and 5 deletions

View File

@ -54,6 +54,7 @@ static const std::string DiffuseTexture = "map_kd";
static const std::string AmbientTexture = "map_ka"; static const std::string AmbientTexture = "map_ka";
static const std::string SpecularTexture = "map_ks"; static const std::string SpecularTexture = "map_ks";
static const std::string OpacityTexture = "map_d"; static const std::string OpacityTexture = "map_d";
static const std::string EmmissiveTexture = "map_emissive";
static const std::string BumpTexture1 = "map_bump"; static const std::string BumpTexture1 = "map_bump";
static const std::string BumpTexture2 = "map_Bump"; static const std::string BumpTexture2 = "map_Bump";
static const std::string BumpTexture3 = "bump"; static const std::string BumpTexture3 = "bump";
@ -303,11 +304,7 @@ void ObjFileMtlImporter::getTexture() {
// Opacity texture // Opacity texture
out = & m_pModel->m_pCurrentMaterial->textureOpacity; out = & m_pModel->m_pCurrentMaterial->textureOpacity;
clampIndex = ObjFile::Material::TextureOpacityType; clampIndex = ObjFile::Material::TextureOpacityType;
} else if (!ASSIMP_strincmp( pPtr,"map_ka",6)) { } else if (!ASSIMP_strincmp( pPtr, EmmissiveTexture.c_str(), EmmissiveTexture.size())) {
// Ambient texture
out = & m_pModel->m_pCurrentMaterial->textureAmbient;
clampIndex = ObjFile::Material::TextureAmbientType;
} else if (!ASSIMP_strincmp(&(*m_DataIt),"map_emissive",6)) {
// Emissive texture // Emissive texture
out = & m_pModel->m_pCurrentMaterial->textureEmissive; out = & m_pModel->m_pCurrentMaterial->textureEmissive;
clampIndex = ObjFile::Material::TextureEmissiveType; clampIndex = ObjFile::Material::TextureEmissiveType;