Test.cc modified with the new flags

This commit is contained in:
Vazquinhos
2016-05-13 12:28:10 +02:00
parent e528741a8b
commit 33d5e9aa07
5 changed files with 8 additions and 3 deletions

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@

View File

@@ -124,7 +124,7 @@ static bool
TestLoadObj( TestLoadObj(
const char* filename, const char* filename,
const char* basepath = NULL, const char* basepath = NULL,
bool triangulate = true) unsigned int flags = 1 )
{ {
std::cout << "Loading " << filename << std::endl; std::cout << "Loading " << filename << std::endl;
@@ -132,7 +132,7 @@ TestLoadObj(
std::vector<tinyobj::material_t> materials; std::vector<tinyobj::material_t> materials;
std::string err; std::string err;
bool ret = tinyobj::LoadObj(shapes, materials, err, filename, basepath, triangulate); bool ret = tinyobj::LoadObj(shapes, materials, err, filename, basepath, flags);
if (!err.empty()) { if (!err.empty()) {
std::cerr << err << std::endl; std::cerr << err << std::endl;
@@ -143,7 +143,8 @@ TestLoadObj(
return false; return false;
} }
PrintInfo(shapes, materials, triangulate); bool triangulate( ( flags & tinyobj::triangulation ) == tinyobj::triangulation );
PrintInfo(shapes, materials, triangulate );
return true; return true;
} }