fix load obj texture filename when has any option
This commit is contained in:
parent
a282947a72
commit
735f93c256
|
@ -1049,10 +1049,10 @@ public:
|
||||||
std::string textureName;
|
std::string textureName;
|
||||||
if (tokens.size() < 2)
|
if (tokens.size() < 2)
|
||||||
return false;
|
return false;
|
||||||
else if (tokens.size() == 2)
|
else {
|
||||||
textureName = tokens[1]; //play it safe
|
//the tex name is the last one (after any option)
|
||||||
else
|
textureName = tokens[tokens.size()-1];
|
||||||
textureName = line.substr(7); //get everything after "map_Kd "
|
}
|
||||||
|
|
||||||
currentMaterial.map_Kd=textureName;
|
currentMaterial.map_Kd=textureName;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue