diff options
author | Omniscient <omniscient.oce@gmail.com> | 2024-04-23 20:58:18 +1000 |
---|---|---|
committer | Omniscient <omniscient.oce@gmail.com> | 2024-04-23 20:58:18 +1000 |
commit | 823f25f993d52a377e95bbfd98506b6b73fdf01e (patch) | |
tree | cd42bbef148b3f5abcdd4384cbe5b9da36b08db7 | |
parent | d8b564ffd1257152094966784a8db3d1396a8879 (diff) |
update variable naming in gltf example
-rw-r--r-- | examples/gltf_loading/ex_gltf_loading.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/examples/gltf_loading/ex_gltf_loading.c b/examples/gltf_loading/ex_gltf_loading.c index 98654d6..0c47fec 100644 --- a/examples/gltf_loading/ex_gltf_loading.c +++ b/examples/gltf_loading/ex_gltf_loading.c @@ -23,12 +23,10 @@ int main() { core* core = core_bringup(); - model_handle cube_handle = + model_handle helmet_handle = model_load_gltf(core, "assets/models/gltf/DamagedHelmet/glTF/DamagedHelmet.gltf", false); - // model_handle cube_handle = model_load_gltf(core, "assets/models/gltf/scifi_girl/scene.gltf", - // false); - model* cube = &core->models->data[cube_handle.raw]; - model_upload_meshes(&core->renderer, cube); + model* helmet = &core->models->data[helmet_handle.raw]; + model_upload_meshes(&core->renderer, helmet); vec3 camera_pos = vec3(5., 0., 0.); vec3 camera_front = vec3_normalise(vec3_negate(camera_pos)); @@ -59,7 +57,6 @@ int main() { deltaTime = currentFrame - lastFrame; lastFrame = currentFrame; input_update(&core->input); - // threadpool_process_results(&core->threadpool, 1); render_frame_begin(&core->renderer); @@ -68,10 +65,9 @@ int main() { static f32 rot_speed = 0.5; quat rot = quat_from_axis_angle(VEC3_Z, fmod(angle, TAU), true); angle += (rot_speed * deltaTime); - transform model_tf = transform_create(vec3(0.0, 0.1, -0.1), rot, - 1.8); // make the backpack a bit bigger + transform model_tf = transform_create(vec3(0.0, 0.1, -0.1), rot, 1.8); mat4 model = transform_to_mat(&model_tf); - draw_model(&core->renderer, &cam, cube, &model, &our_scene); + draw_model(&core->renderer, &cam, helmet, &model, &our_scene); render_frame_end(&core->renderer); } |