summaryrefslogtreecommitdiff
path: root/src/resources/gltf.c
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-27 14:01:16 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-27 14:01:16 +1000
commitaa0fe8457cfff9c47c0c9fa4a1c86a79c7cbf9c5 (patch)
treea7fa374cb59c6c59e386086dcdae8a7efc372b5f /src/resources/gltf.c
parent2e2c57a8c04575eec164279a49947cfdba250853 (diff)
add a pool insert function. move RenderEnt to use handles
Diffstat (limited to 'src/resources/gltf.c')
-rw-r--r--src/resources/gltf.c21
1 files changed, 11 insertions, 10 deletions
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);
}