aboutsummaryrefslogtreecommitdiff
path: root/src/model_loader
diff options
context:
space:
mode:
Diffstat (limited to 'src/model_loader')
-rw-r--r--src/model_loader/ObjModelLoader.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/model_loader/ObjModelLoader.cpp b/src/model_loader/ObjModelLoader.cpp
index 7976bc9..7c4ee5c 100644
--- a/src/model_loader/ObjModelLoader.cpp
+++ b/src/model_loader/ObjModelLoader.cpp
@@ -101,7 +101,7 @@ namespace amalgine {
static Result<Material> load_material_from_file(const char *filepath);
- void ObjModelLoader::load_from_file(const char *filepath, std::vector<Triangle3D> &triangles, std::vector<vec2f> &texture_coords, Image **image) {
+ bool ObjModelLoader::load_from_file(const char *filepath, std::vector<Triangle3D> &triangles, std::vector<vec2f> &texture_coords, Image **image) {
triangles.clear();
texture_coords.clear();
*image = nullptr;
@@ -109,7 +109,7 @@ namespace amalgine {
size_t file_size;
char *file_data = file_get_content(filepath, &file_size);
if(!file_data)
- return;
+ return false;
std::string dir_path = filepath;
dirname(&dir_path[0]);
@@ -238,6 +238,7 @@ namespace amalgine {
cleanup:
free(file_data);
+ return true;
}
Result<Material> load_material_from_file(const char *filepath) {