From eb772bc1e0f1042338037eb8a906ea4464001ab0 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 3 Oct 2019 17:07:32 +0200 Subject: [PATCH] Check whether GLTF was loaded correctly (#981) --- src/models.c | 3 +++ 1 file changed, 3 insertions(+) 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;