Skip to content
modkitv0.2

Uniform example - shader uniforms with direct submission

← All examples03_uniform

Demonstrates uniforms through the submission spine: - mk_layout/mk_vbuf/mk_ibuf for geometry - mk_shader_load_desc(): uniforms declared WITH the shader (no ordering trap) - mk_shader_uniform() to look the handle up, fed via mk_draw_desc bindings - mk_camera_ortho() + mk_set_camera() for camera setup - mk_pipeline_create() bakes shader + layout + state once - mk_pass_draw() submits geometry + the animated uniform each frame

Uniform example - shader uniforms with direct submission

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

Number
3
Tags
shadersuilayout3d
Source
examples/03_uniform/main.c

Build and run

./scripts/build-linux.sh release --target=03_uniform --run