diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-08-13 20:29:27 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-08-13 20:29:27 +1000 |
commit | 567d384b698151e287e31140709c93f1b92e6db4 (patch) | |
tree | e00975124d3f002a8aaa22e85475d913c6950346 /examples | |
parent | 13949ca02bcf9fcdfcc48ea7949f617553a260b6 (diff) |
loading joints and animations
Diffstat (limited to 'examples')
-rw-r--r-- | examples/skinned_animation/ex_skinned_animation.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/skinned_animation/ex_skinned_animation.c b/examples/skinned_animation/ex_skinned_animation.c index 672e0d2..7a44160 100644 --- a/examples/skinned_animation/ex_skinned_animation.c +++ b/examples/skinned_animation/ex_skinned_animation.c @@ -7,6 +7,8 @@ #include "log.h" #include "maths.h" #include "maths_types.h" +#include "pbr.h" +#include "render.h" #include "render_types.h" int main() { @@ -19,6 +21,8 @@ int main() { ModelHandle handle = ModelLoad_gltf("assets/models/gltf/SimpleSkin/glTF/SimpleSkin.gltf", false); Model* simple_skin = MODEL_GET(handle); + RenderEnt_darray* rend_ents = RenderEnt_darray_new(1); + // Okay, right here we've loaded the model. let's assert some facts // assert(simple_skin->animations->len == 1); // assert(simple_skin->animations->data[0].rotation != NULL); @@ -67,8 +71,12 @@ int main() { // Transform tf = transform_create(VEC3_ZERO, quat_ident(), 1.0); // TODO: Drawing should still just use the PBR pipeline + ModelExtractRenderEnts(rend_ents, handle, mat4_translation(vec3(0, -1, 0)), 0); // draw_skinned_model(&core->renderer, &game.camera, simple_skin, tf, &our_scene); + Render_RenderEntities(rend_ents->data, rend_ents->len); + + RenderEnt_darray_clear(rend_ents); Frame_End(); } |