diff options
author | Syoyo Fujita <syoyo@lighttransport.com> | 2015-11-07 23:08:39 +0900 |
---|---|---|
committer | Syoyo Fujita <syoyo@lighttransport.com> | 2015-11-07 23:08:39 +0900 |
commit | e7e7eed616cee946a10b5239545a75c2c968919e (patch) | |
tree | 550cd082a47d64db1a3d6ef8d0c2cdc12f57348c /examples | |
parent | 475bc83ef3193198f145896abc864429ef07fdbf (diff) | |
download | tinyobjloader-e7e7eed616cee946a10b5239545a75c2c968919e.tar.gz |
Change API and handle no-mtl-file case correctly. Fixes #58.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/obj_sticher/obj_sticher.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/obj_sticher/obj_sticher.cc b/examples/obj_sticher/obj_sticher.cc index 8ec7a28..f59fee4 100644 --- a/examples/obj_sticher/obj_sticher.cc +++ b/examples/obj_sticher/obj_sticher.cc @@ -86,9 +86,12 @@ main( for (int i = 0; i < num_objfiles; i++) { std::cout << "Loading " << argv[i+1] << " ... " << std::flush; - std::string err = tinyobj::LoadObj(shapes[i], materials[i], argv[i+1]); + std::string err; + bool ret = tinyobj::LoadObj(shapes[i], materials[i], err, argv[i+1]); if (!err.empty()) { std::cerr << err << std::endl; + } + if (!ret) { exit(1); } |