OpenGL is on the way out, and for rendering 2D image data it requires too much setup code (need to create the GL context, a swap chain, a texture, and (unless GL 1.x is used) a vertex buffer, shader and setting up tons of render state).
For 3D rendering, WebGPU would be the better option to support in WASI because it has standalone native implementations:
But for blitting CPU-generated 2D image data to the screen WebGPU is also sort of overkill (of course it would be possible to create a much simplified wrapper library in WASM).
For 3D rendering, WebGPU would be the better option to support in WASI because it has standalone native implementations:
https://dawn.googlesource.com/dawn
https://github.com/gfx-rs/wgpu
But for blitting CPU-generated 2D image data to the screen WebGPU is also sort of overkill (of course it would be possible to create a much simplified wrapper library in WASM).