Loading age @ 42e3360a Compare 7557ae3e to 42e3360a Original line number Diff line number Diff line Subproject commit 7557ae3e6b178fd4071a50eb5f490d41ea7393ba Subproject commit 42e3360a4a7c06df00432003e4d8d6ed2c098602 src/game/src/presenter.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -296,12 +296,13 @@ void Presenter::initialize() // // Bear with me, as this requires a bit more elaborate setup. We will be using // // a procedurally generated box again, but this time with bone IDs and weights // // assigned to its vertices. You may look into the implementation of the // // insert_procedural_box_solid() method to see how the bone IDs and weights // // insert_procedural_box_skinned() method to see how the bone IDs and weights // // are set up in a skinned buffer. // // The box has two bones, influencing the bottom and top sides. // // First, we need to create a material supporting skinning and insert a box using it. // gfx::Material* skinned_material = gfx::material_system()->insert_default_lit_skinning_material("skinned_material", { "game" }, vec3{ 0.0f, 0.75f, 1.f }); // com::Folder* const skinned_box = gfx::object_system()->insert_object({ "game", "skinned_box" }, skinned_material, box_primitive); // gfx::Buffer* skinned_primitive = gfx::buffer_generators()->insert_procedural_box_skinned({ 0.5f, 0.5f, 0.5f }, "skinned_box", { "game" }); // com::Folder* const skinned_box = gfx::object_system()->insert_object({ "game", "skinned_box" }, skinned_material, skinned_primitive); // // Next, we need to create a frame for the skinned box, position it // // in the scene the usual way and link it to the object. Loading Loading
age @ 42e3360a Compare 7557ae3e to 42e3360a Original line number Diff line number Diff line Subproject commit 7557ae3e6b178fd4071a50eb5f490d41ea7393ba Subproject commit 42e3360a4a7c06df00432003e4d8d6ed2c098602
src/game/src/presenter.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -296,12 +296,13 @@ void Presenter::initialize() // // Bear with me, as this requires a bit more elaborate setup. We will be using // // a procedurally generated box again, but this time with bone IDs and weights // // assigned to its vertices. You may look into the implementation of the // // insert_procedural_box_solid() method to see how the bone IDs and weights // // insert_procedural_box_skinned() method to see how the bone IDs and weights // // are set up in a skinned buffer. // // The box has two bones, influencing the bottom and top sides. // // First, we need to create a material supporting skinning and insert a box using it. // gfx::Material* skinned_material = gfx::material_system()->insert_default_lit_skinning_material("skinned_material", { "game" }, vec3{ 0.0f, 0.75f, 1.f }); // com::Folder* const skinned_box = gfx::object_system()->insert_object({ "game", "skinned_box" }, skinned_material, box_primitive); // gfx::Buffer* skinned_primitive = gfx::buffer_generators()->insert_procedural_box_skinned({ 0.5f, 0.5f, 0.5f }, "skinned_box", { "game" }); // com::Folder* const skinned_box = gfx::object_system()->insert_object({ "game", "skinned_box" }, skinned_material, skinned_primitive); // // Next, we need to create a frame for the skinned box, position it // // in the scene the usual way and link it to the object. Loading