diff --git a/WFObj.cc b/WFObj.cc index 9b88317..0dfe42b 100644 --- a/WFObj.cc +++ b/WFObj.cc @@ -202,9 +202,25 @@ void WFObj::processInputLine(const std::string & input) } else if (type == "usemtl") { + if (tokens.size() >= 2) + m_current_material_name = tokens[1]; } else if (type == "mtllib") { + if (tokens.size() >= 2) + loadMaterial(tokens[1]); + } + else if (type == "s") + { + /* ignore smoothing */ + } + else if (type == "g") + { + /* ignore group name */ + } + else + { + cerr << "WFObj: warning: unhandled command '" << type << "'" << endl; } }