Multi-threaded Rendering
← All examples27_multithreaded
Demonstrates practical multi-threaded rendering patterns: - API thread allocates/configures the pass views - Worker owns a force-new bgfx encoder through mk_render_ctx_t - Worker submits 3D batches only after the view is fully prepared - Main joins the job and ends the worker context before pass/frame end Pattern: Worker Thread: Computes particle positions each frame Main Thread: Renders particles + 3D scene Sync: Semaphores coordinate data handoff This is a common pattern for games where physics, AI, or procedural generation runs on background threads while rendering happens on main.

- Number
- 27
- Tags
- Source
examples/27_multithreaded/main.c
Build and run
./scripts/build-linux.sh release --target=27_multithreaded --run