Skip to content
modkitv0.2

Dynamic buffer demonstration

← All examples11_dynbuffer

Demonstrates three types of dynamic buffers: 1. Transient Buffers (bottom): - Frame-scoped, auto-reclaimed memory - Used for immediate-mode drawing (sine wave) - Data changes every frame, no persistent allocation 2. Dynamic Buffers (middle): - Persistent buffers with updateable contents - Used for a morphing polygon - Data updated less frequently than every frame 3. Instance Buffers (top): - Per-instance data for instanced rendering - Renders many copies of a shape efficiently - Each instance has unique position/color

Dynamic buffer demonstration

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

Number
11
Tags
shadersuilayout
Source
examples/11_dynbuffer/main.c

Build and run

./scripts/build-linux.sh release --target=11_dynbuffer --run