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

@@ -1,11 +1,10 @@
//
// Stiches multiple .obj files into one .obj.
//
#define TINYOBJLOADER_IMPLEMENTATION
#include "../../tiny_obj_loader.h"
#include "obj_writer.h"
#include "../../tiny_obj_loader.h"
#include <cassert>
#include <iostream>
#include <cstdlib>
@@ -134,8 +133,9 @@ int main(int argc, char **argv)
for (int i = 0; i < num_objfiles; i++) {
std::cout << "Loading " << argv[i+1] << " ... " << std::flush;
std::string warn;
std::string err;
bool ret = tinyobj::LoadObj(&attributes[i], &shapes[i], &materials[i], &err, argv[i+1]);
bool ret = tinyobj::LoadObj(&attributes[i], &shapes[i], &materials[i], &warn, &err, argv[i+1]);
if (!err.empty()) {
std::cerr << err << std::endl;
}