aboutsummaryrefslogtreecommitdiff
path: root/src/models.c
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2019-05-15 15:12:56 +0200
committerRay <raysan5@gmail.com>2019-05-15 15:12:56 +0200
commit5a1a0a34923fa8ecfcd5d45717b7db63f630b2a7 (patch)
tree38e1a5087af6a09b92ff785271d334eb01beb58f /src/models.c
parent0b18133e46e72d7f51df7ddbbb81e9547bf5f4ba (diff)
downloadraylib-5a1a0a34923fa8ecfcd5d45717b7db63f630b2a7.tar.gz
raylib-5a1a0a34923fa8ecfcd5d45717b7db63f630b2a7.zip
Corrected issue with multi-mesh obj models
Note that all meshes are loaded as a single one at this moment, loading should be improved!
Diffstat (limited to 'src/models.c')
-rw-r--r--src/models.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/models.c b/src/models.c
index 6af33116..bd83e925 100644
--- a/src/models.c
+++ b/src/models.c
@@ -2769,7 +2769,9 @@ static Model LoadOBJ(const char *fileName)
else TraceLog(LOG_INFO, "[%s] Model data loaded successfully: %i meshes / %i materials", fileName, meshCount, materialCount);
// Init model meshes array
- model.meshCount = meshCount;
+ // TODO: Support multiple meshes... in the meantime, only one mesh is returned
+ //model.meshCount = meshCount;
+ model.meshCount = 1;
model.meshes = (Mesh *)RL_MALLOC(model.meshCount*sizeof(Mesh));
// Init model materials array