add more handshake output
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
#include <tiny_obj_loader.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
|
||||
namespace object_loader = ::basalt::shared::object_loader;
|
||||
using object_loader::IObjectLoader;
|
||||
@@ -30,9 +32,15 @@ public:
|
||||
std::string err;
|
||||
|
||||
// Load the OBJ file
|
||||
if (!tinyobj::LoadObj(&attrib, &shapes, &materials, &err, this->config.filename.c_str())) {
|
||||
std::ifstream fs;
|
||||
fs.open(std::filesystem::path(this->config.filename));
|
||||
if (!fs.is_open()) {
|
||||
throw std::runtime_error("fail to open obj file");
|
||||
}
|
||||
if (!tinyobj::LoadObj(&attrib, &shapes, &materials, &err, &fs)) {
|
||||
throw std::runtime_error("fail to load obj file");
|
||||
}
|
||||
fs.close();
|
||||
|
||||
// Create one object from all shapes in the OBJ file
|
||||
std::vector<Vector3> vertices;
|
||||
|
||||
Reference in New Issue
Block a user