Skip to content
modkitv0.2

Example 47 - model loading package (mk_model_*).

← All examples47_model

Loads a glTF/GLB model with the opt-in model package and draws it through the spine. The package is OFF by default; this example is only built when it is enabled (-DMODKIT_ENABLE_MODEL=ON, or `--model` for the build scripts). - mk_model_load : import the file into geometry + materials + node items - mk_model_aabb : frame the camera on the model's bounds - mk_model_draw : submit every primitive into the active 3D pass - mk_set_light : one directional light for the `lit` materials Controls: drag = orbit, scroll = zoom, ESC = quit.

Example 47 - model loading package (mk_model_*).

Runs the WebAssembly build on this page. Click the canvas to give it keyboard focus.

Number
47
Tags
3dmodellightinginputpbribl
Requires
MODKIT_ENABLE_MODEL
Source
examples/47_model/main.c

Build and run

./scripts/build-linux.sh release --target=47_model --run