3 ms·
Quick shout-out to a graphics abstraction library that works quite well: sokol. https://github.com/floooh/sokol https://github.com/floooh/sokol It has DX11, M
by cyber_kinetist 4y ago
Quick shout-out to a graphics abstraction library that works quite well: sokol.
https://github.com/floooh/sokol https://github.com/floooh/sokol
It has DX11, Metal, and OpenGL backends (with optional shader compilation tool from GLSL to each target), which is probably all you need to get cross-platform support for all desktop and mobile targets. Rewrote my OpenGL code to this, was a pretty nice experience. The subset of graphical features it exposes seems more than good enough for simple 2D games (probably enough for simple 3D ones also). Can't say more than that though, since I haven't seen a shipped 3D game on Steam using it yet.
Though what we ultimately need for the future is a Metal-like API that runs on all platforms (since from what I've heard from other graphics developers Metal's API design is quite nice and finds the right balance between low-level control and high-level usability). The experimental SDL_gpu development (https://gist.github.com/icculus/f731224bef3906e4c5e8cbed6f98bb08 https://gist.github.com/icculus/f731224bef3906e4c5e8cbed6f98...) strives to achieve this, although it's still in the early stages...
- zamalek 4y agoWebGPU (wgpu in Rust land) is pretty fantastic as well.
- cyber_kinetist 4y agoWell… WebGPU is still in the early stages and seems a bit unstable as a target, so I wouldn’t start making an actual game with it right now.