diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-28 16:13:16 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-28 16:13:16 +1000 |
commit | e5b3f7a823f5e73cb17456d4b9bdd59760fb18ed (patch) | |
tree | 674ab932766891cfc27c137488e9b496d706299f | |
parent | 7b86e3251a28406862fe16d49f8533beb8ca3150 (diff) |
wrap light types in an enum
-rw-r--r-- | bindgen/rust/src/lib.rs | 7 | ||||
-rw-r--r-- | src/resources/gltf.c | 3 | ||||
-rw-r--r-- | src/resources/loaders.h | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/bindgen/rust/src/lib.rs b/bindgen/rust/src/lib.rs index c86e2d6..4963d8c 100644 --- a/bindgen/rust/src/lib.rs +++ b/bindgen/rust/src/lib.rs @@ -55,3 +55,10 @@ impl SerializableScene { serde_json::from_str(&contents).expect("Should be deserializable") } } + +#[derive(Debug, Clone)] +pub enum Light { + Point(ffi::PointLight), + Directional(ffi::DirectionalLight), + // Spot(ffi::Spotlight) +}
\ No newline at end of file diff --git a/src/resources/gltf.c b/src/resources/gltf.c index 8b949ce..642fc59 100644 --- a/src/resources/gltf.c +++ b/src/resources/gltf.c @@ -38,9 +38,6 @@ KITC_DECL_TYPED_ARRAY(Vec4) KITC_DECL_TYPED_ARRAY(face) // KITC_DECL_TYPED_ARRAY(joint) -bool model_load_gltf_str(const char *file_string, const char *filepath, Str8 relative_path, - Model *out_model, bool invert_textures_y); - size_t GLTF_LoadMaterials(cgltf_data *data, Str8 relative_path, Material_darray *out_materials); ModelHandle ModelLoad_gltf(const char *path, bool invert_texture_y) { diff --git a/src/resources/loaders.h b/src/resources/loaders.h index 677e2a7..220a391 100644 --- a/src/resources/loaders.h +++ b/src/resources/loaders.h @@ -8,6 +8,10 @@ PUB ModelHandle ModelLoad_obj(const char *path, bool invert_texture_y); PUB ModelHandle ModelLoad_gltf(const char *path, bool invert_texture_y); +typedef struct GLTF_LoadStats { + u32 mesh_count, material_count, vertex_count, index_count, animation_count, joint_count; +} GLTF_LoadStats; + // --- Internal bool model_load_gltf_str(const char *file_string, const char *filepath, Str8 relative_path, Model *out_model, bool invert_textures_y); |