Skip to content
modkitv0.2

GPU-compressed texture loading (DDS/KTX1 via dds-ktx)

← All examples44_compressed_textures

To stay self-contained (no binary asset checked in), this generates a CPU image, BC1-compresses it with stb_dxt, writes a minimal .dds container into the per-user storage dir, then loads it back through mk_texture_load -- which routes DDS/KTX1 to the new dds-ktx path and uploads the block-compressed data to the GPU in its native format. The texture you see was decoded from BC1.

GPU-compressed texture loading (DDS/KTX1 via dds-ktx)

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

Number
44
Tags
imagestorage2dvectortexture
Source
examples/44_compressed_textures/main.c

Build and run

./scripts/build-linux.sh release --target=44_compressed_textures --run