aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-10-03 17:07:32 +0200
committerRay <raysan5@gmail.com>2019-10-03 17:07:32 +0200
commiteb772bc1e0f1042338037eb8a906ea4464001ab0 (patch)
tree65d454595c67bbb61c8d05d179dc05dc1c7d0d1e
parent047f093503de31217738c15c0bec2ae2a25c5f18 (diff)
downloadraylib-eb772bc1e0f1042338037eb8a906ea4464001ab0.tar.gz
raylib-eb772bc1e0f1042338037eb8a906ea4464001ab0.zip
Check whether GLTF was loaded correctly (#981)
-rw-r--r--src/models.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/models.c b/src/models.c
index 90f3290a..8a4fe1d2 100644
--- a/src/models.c
+++ b/src/models.c
@@ -3406,6 +3406,9 @@ static Model LoadGLTF(const char *fileName)
// Read data buffers
result = cgltf_load_buffers(&options, data, fileName);
+ if (result != cgltf_result_success) {
+ TraceLog(LOG_INFO, "[%s][%s] Error loading mesh/material buffers", fileName, (data->file_type == 2)? "glb" : "gltf");
+ }
int primitivesCount = 0;