From aa0fe8457cfff9c47c0c9fa4a1c86a79c7cbf9c5 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sat, 27 Jul 2024 14:01:16 +1000 Subject: add a pool insert function. move RenderEnt to use handles --- src/resources/gltf.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/resources/gltf.c') diff --git a/src/resources/gltf.c b/src/resources/gltf.c index c575fb9..ef7569f 100644 --- a/src/resources/gltf.c +++ b/src/resources/gltf.c @@ -320,15 +320,16 @@ bool model_load_gltf_str(const char *file_string, const char *filepath, Str8 rel i32 mat_idx = -1; if (primitive.material != NULL) { DEBUG("Primitive Material %s", primitive.material->name); - for (u32 i = 0; i < Material_darray_len(out_model->materials); i++) { - printf("%s vs %s \n", primitive.material->name, out_model->materials->data[i].name); - if (strcmp(primitive.material->name, out_model->materials->data[i].name) == 0) { - INFO("Found material"); - mat_idx = i; - // mesh.material_index = i; - break; - } - } + // FIXME! + // for (u32 i = 0; i < Material_darray_len(out_model->materials); i++) { + // printf("%s vs %s \n", primitive.material->name, out_model->materials->data[i].name); + // if (strcmp(primitive.material->name, out_model->materials->data[i].name) == 0) { + // INFO("Found material"); + // mat_idx = i; + // // mesh.material_index = i; + // break; + // } + // } } TRACE("Vertex data has been loaded"); @@ -417,7 +418,7 @@ bool model_load_gltf_str(const char *file_string, const char *filepath, Str8 rel // m.material_index = (u32_opt){ .has_value = mat_idx == 9999, .value = mat_idx }; Mesh m = Mesh_Create(geometry, false); - m.material_index = mat_idx; + // m.material_index = mat_idx; FIXME Mesh_darray_push(out_model->meshes, m); } -- cgit v1.2.3-70-g09d2