diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-03-11 01:52:27 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-11-18 15:22:10 +0100 |
commit | 1156c0f58b01ff080b9d9ede15b449a845df6654 (patch) | |
tree | 426c14ffd9e6aac2d37af58211e78b1fae8d6fe6 /src/ModelLoader.cpp | |
parent | 12c36c61c3f8d19c44cb2e5ffdf3ed812a0390d2 (diff) |
Diffstat (limited to 'src/ModelLoader.cpp')
-rw-r--r-- | src/ModelLoader.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ModelLoader.cpp b/src/ModelLoader.cpp index 60626f1..099349c 100644 --- a/src/ModelLoader.cpp +++ b/src/ModelLoader.cpp @@ -171,13 +171,18 @@ namespace amalgine { for(unsigned int j = 0; j < num_textures; ++j) { std::string texture_name = model_loader.extract_null_terminated_string(); + if(texture_name.empty()) + continue; + fprintf(stderr, "texture name: %s\n", texture_name.c_str()); std::string texture_path = dir_path + "/" + texture_name; - assert(!*image); // TODO: Support multiple images + //assert(!*image); // TODO: Support multiple images + if(*image) + continue; Result<Image*> image_result = Image::loadFromFile(texture_path.c_str()); if(!image_result) { - fprintf(stderr, "%s\n", image_result.getErrorMsg().c_str()); - return false; + fprintf(stderr, "Warning: %s\n", image_result.getErrorMsg().c_str()); + continue; } *image = image_result.unwrap(); } |