One explicit rendering API. Every backend, every platform.
Write your renderer once — VRI runs it on Vulkan, Direct3D 12, Metal, WebGPU, and OpenGL, on desktop, mobile/embedded, and the web. A C ABI core with a header-only C++23 wrapper, honest capability queries, one diagnostics sink, and shaders authored in Slang.
An explicit, modern surface (command buffers, descriptor sets, explicit synchronization) — à la Vulkan/D3D12 — that maps onto each platform's native graphics API.
// C ABI core, or a std::expected-based RAII layer in C++23: auto device = vri::Device::Create({ .graphicsAPI = VriGraphicsAPI_Auto }); auto swapchain = device->CreateSwapchain({ .window = window }); auto pipeline = device->CreateGraphicsPipeline({ .shaders = { vs, fs }, ... }); cmd.BeginRendering({ .colors = { backbuffer } }); cmd.SetPipeline(*pipeline); cmd.Draw({ .vertexNum = 3 }); // same image on every backend cmd.EndRendering();
The desktop application requests Auto and VRI picks the best backend. On the web VRI runs through WebGPU and WebGL 2, both via Emscripten. A software (CPU) fallback renders with no GPU at all.
| Backend | Platforms |
|---|---|
| Vulkan | Windows, Linux (and macOS via MoltenVK) |
| Direct3D 12 | Windows |
| Metal | macOS (Apple Silicon) |
| WebGPU | Windows, Linux, macOS, Web |
| OpenGL | Windows, Linux (and macOS, capped at 4.1) |
| WebGL 2 | Web |
| OpenGL ES | Linux / embedded (e.g. Raspberry Pi) |
| Software (CPU) | Windows, Linux, macOS — anywhere with a software Vulkan ICD |
Every optional feature is queryable. If a backend can't do something, it tells you — it never silently no-ops.
| Feature | Vulkan | D3D12 | Metal | WebGPU | OpenGL | WebGL 2 | GL ES |
|---|---|---|---|---|---|---|---|
| Core rendering & swapchain | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Depth / stencil, blending, MRT | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| MSAA + resolve | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Mipmaps, instancing, cubemaps | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Compute shaders | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Push constants | ✅ | ✅ | ✅ | 🟡 | 🟡 | 🟡 | 🟡 |
| Bindless / descriptor indexing | ✅ | ✅ | 🟡 | 🟡 | 🟡 | 🟡 | 🟡 |
| Geometry shaders | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
| Tessellation | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
| Mesh shaders | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Ray tracing | ✅ | ✅ | ✅ | 🟡 | 🟡 | ❌ | ❌ |
| Opacity micromaps | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Variable rate shading | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Conservative rasterization | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Fragment-shader barycentrics | ✅ | ✅ | ⬜ | ❌ | ❌ | ❌ | ❌ |
| Custom sampler border color | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Subgroup / wave operations | ✅ | ✅ | ⬜ | ❌ | ❌ | ❌ | ❌ |
| Multiview (single-pass stereo) | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ |
| External memory / interop (CUDA) | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| GPU timestamp queries | ✅ | ✅ | ✅ | 🟡 | 🟡 | ❌ | ❌ |
| Occlusion queries | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ |
| Pipeline-statistics queries | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
| Calibrated GPU+CPU timestamps | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Pipeline cache | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ |
| Indirect draw count (GPU-driven) | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
| Video memory budget | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Clear storage buffer / texture | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
| Built-in Dear ImGui renderer | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Per-backend implementation notes — fallbacks, caveats, and the native extension each feature uses — are in DETAIL.md.