Install
Add the package for your language:
The support matrix shows which platforms, architectures, and backends each language supports.
Choose a backend
Section titled “Choose a backend”The library renders with one graphics backend, which you choose when you install it. Where a package has a default, it’s Metal on Apple platforms, OpenGL on Android and OpenHarmony, WebGPU in browsers, and Vulkan elsewhere. Choose OpenGL in emulators and virtual machines, which often lack Vulkan, and choose the backend your application already uses if it draws its own graphics.
The library runs on several threads, which in a browser share memory, and browsers allow shared memory only on a cross-origin isolated page. Serve a page that loads the library with these headers, which make it isolated:
Cross-Origin-Opener-Policy: same-originCross-Origin-Embedder-Policy: require-corpMost static hosts let you set them, such as with a
_headers file
on Cloudflare Pages and
Netlify, or
vercel.json on
Vercel. GitHub Pages can’t set headers, but a service worker such as
coi-serviceworker can add them.
macOS has neither Vulkan nor EGL. To use the Vulkan or OpenGL backend there, load MoltenVK or ANGLE yourself.