Skip to content
modkitv0.2

Example 34 - async asset loading (mk_assets_load_texture_async).

← All examples34_async_assets

Kicks off several async texture loads at startup. The image DECODE runs on a background worker thread; the GPU upload + completion callback happen on the main thread inside mk_assets_poll() (auto-driven by the frame loop). A spinner keeps animating the whole time to show the main loop is never blocked.

Example 34 - async asset loading (mk_assets_load_texture_async).

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

Number
34
Tags
2dvectortextureinput
Source
examples/34_async_assets/main.c

Build and run

./scripts/build-linux.sh release --target=34_async_assets --run