Test.cc modified with the new flags
This commit is contained in:
1
obj/x32/Debug/link.7608-cvtres.read.1.tlog
Normal file
1
obj/x32/Debug/link.7608-cvtres.read.1.tlog
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
1
obj/x32/Debug/link.7608-cvtres.write.1.tlog
Normal file
1
obj/x32/Debug/link.7608-cvtres.write.1.tlog
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
1
obj/x32/Debug/link.7608.read.1.tlog
Normal file
1
obj/x32/Debug/link.7608.read.1.tlog
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
1
obj/x32/Debug/link.7608.write.1.tlog
Normal file
1
obj/x32/Debug/link.7608.write.1.tlog
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
7
test.cc
7
test.cc
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user