Separate error message into warning and error. Breaks API, so bump to version 1.3.0

This commit is contained in:
Syoyo Fujita
2018-10-10 01:56:07 +09:00
parent 1cdfd786d8
commit e07a835f02
7 changed files with 568 additions and 378 deletions

View File

@@ -308,9 +308,13 @@ static bool LoadObjAndConvert(float bmin[3], float bmax[3],
base_dir += "/";
#endif
std::string warn;
std::string err;
bool ret = tinyobj::LoadObj(&attrib, &shapes, &materials, &err, filename,
bool ret = tinyobj::LoadObj(&attrib, &shapes, &materials, &warn, &err, filename,
base_dir.c_str());
if (!warn.empty()) {
std::cout << "WARN: " << warn << std::endl;
}
if (!err.empty()) {
std::cerr << err << std::endl;
}