Fixed texture bug due simultaneously using 'usemtl' and 'usemap' attributes
Signed-off-by: Vitaly Kovalev <vkovalev@gkmsoft.ru>pull/1323/head
parent
9ffc1a97c1
commit
6891db99af
|
@ -178,9 +178,20 @@ void ObjFileParser::parseFile( IOStreamBuffer<char> &streamBuffer ) {
|
|||
break;
|
||||
|
||||
case 'u': // Parse a material desc. setter
|
||||
{
|
||||
std::string name;
|
||||
|
||||
getNameNoSpace(m_DataIt, m_DataItEnd, name);
|
||||
|
||||
size_t nextSpace = name.find(" ");
|
||||
if (nextSpace != std::string::npos)
|
||||
name = name.substr(0, nextSpace);
|
||||
|
||||
if(name == "usemtl")
|
||||
{
|
||||
getMaterialDesc();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'm': // Parse a material library or merging group ('mg')
|
||||
|
|
Loading…
Reference in New Issue