From 77732540225eabb0ff659710167315265401c772 Mon Sep 17 00:00:00 2001 From: SuperUserNameMan <9801802+SuperUserNameMan@users.noreply.github.com> Date: Sun, 23 Jun 2024 21:14:03 +0200 Subject: [PATCH] LoadIQM() set model.meshMaterial[] (#4092) --- src/rmodels.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rmodels.c b/src/rmodels.c index e48ec9df..a169ec50 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -4326,6 +4326,8 @@ static Model LoadIQM(const char *fileName) model.materials[i] = LoadMaterialDefault(); model.materials[i].maps[MATERIAL_MAP_ALBEDO].texture = LoadTexture(TextFormat("%s/%s", basePath, material)); + model.meshMaterial[i] = i; + TRACELOG(LOG_DEBUG, "MODEL: [%s] mesh name (%s), material (%s)", fileName, name, material); model.meshes[i].vertexCount = imesh[i].num_vertexes;