Explorar o código

Check whether parsing mtl file was succesful (#982)

Michael Vetter %!s(int64=6) %!d(string=hai) anos
pai
achega
596338b26a
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/models.c

+ 3 - 0
src/models.c

@@ -809,6 +809,9 @@ Material *LoadMaterials(const char *fileName, int *materialCount)
         tinyobj_material_t *mats;
 
         int result = tinyobj_parse_mtl_file(&mats, &count, fileName);
+        if (result != TINYOBJ_SUCCESS) {
+            TraceLog(LOG_WARNING, "[%s] Could not parse Materials file", fileName);
+        }
 
         // TODO: Process materials to return