diff options
author | Omniscient <omniscient.oce@gmail.com> | 2024-03-05 21:27:34 +1100 |
---|---|---|
committer | Omniscient <omniscient.oce@gmail.com> | 2024-03-05 21:27:34 +1100 |
commit | 3854bef8b853a369c4fc3a39abff5e2e9cd77625 (patch) | |
tree | e5836d1917a05932797b9652f568ccd1abe7aa14 /src/resources | |
parent | 501c44488fb8918efb5f72b8c42690e8197aad31 (diff) |
why is it crashing on file loading now?
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/loaders.h | 3 | ||||
-rw-r--r-- | src/resources/obj.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/resources/loaders.h b/src/resources/loaders.h index ba38ec4..8904655 100644 --- a/src/resources/loaders.h +++ b/src/resources/loaders.h @@ -3,7 +3,6 @@ #include "defines.h" struct core; -typedef u32 model_handle; model_handle model_load_obj(struct core *core, const char *path, bool invert_texture_y); -model_handle model_load_gltf(struct core *core, const char *path, bool invert_texture_y);
\ No newline at end of file +model_handle model_load_gltf(struct core *core, const char *path, bool invert_texture_y); diff --git a/src/resources/obj.c b/src/resources/obj.c index 9e12f79..05aa96e 100644 --- a/src/resources/obj.c +++ b/src/resources/obj.c @@ -36,7 +36,9 @@ bool load_material_lib(const char *path, material_darray *materials); bool model_load_obj_str(const char *file_string, model *out_model, bool invert_textures_y); model_handle model_load_obj(core *core, const char *path, bool invert_textures_y) { + printf("Path %s\n", path); const char *file_string = string_from_file(path); + printf("Loaded file %s\n", file_string); model model; bool success = model_load_obj_str(file_string, &model, invert_textures_y); @@ -89,7 +91,7 @@ bool model_load_obj_str(const char *file_string, model *out_model, bool invert_t } else { // read the first word of the line int res = sscanf(pch, "%s %n", line_header, &offset); - // printf("header: %s, offset : %d res: %d\n",line_header, offset, res); + /* printf("header: %s, offset : %d res: %d\n",line_header, offset, res); */ if (res != 1) { break; } |