| ↓ on → | CPU | OpenGL | OpenGLES | D3D9 | D3D11 | D3D12 | Vulkan | Metal |
|---|---|---|---|---|---|---|---|---|
| OpenGL | [llvmpipe][] | - | [gl4es][] | [TitaniumGL][] | [d3d12][] | [zink][] | ||
| OpenGLES | [llvmpipe][] [SwiftShader][slegacy] | [ANGLE][] | - | [ANGLE][] | [ANGLE][] | [d3d12][] [ANGLE][] | [zink][] [ANGLE][] | [ANGLE][] [MoltenGL][] |
| D3D9 | [SwiftShader][slegacy] | [wined3d][] | - | [D3D9on12][] | [DXVK][] | |||
| D3D11 | [WARP][] | [wined3d][] |
Minimal WASAPI reference implementation. Runnable console application contained in a single function and laid out in a linear, step-by-step fashion. No modern C++ / OOP / obscuring cruft. Produces a steady sine wave sound.
(This is a re-post of the same gist I posted a few years earlier, simply due to me wanting the Minimal D3D11 series to be listed contiguously and it's not possible to hide or rearrange gists).
A traditional table-based DFA implementation looks like this:
uint8_t table[NUM_STATES][256]
uint8_t run(const uint8_t *start, const uint8_t *end, uint8_t state) {
for (const uint8_t *s = start; s != end; s++)
state = table[state][*s];
return state;
}