3 ms·
There are higher levels. In the Rust world, there's "Wgpu", which provides a unified Vulkan-like interface over Linux (Vulkan), Windows (Vulkan or DX12), Apple'
by Animats 3y ago
There are higher levels. In the Rust world, there's "Wgpu", which provides a unified Vulkan-like interface over Linux (Vulkan), Windows (Vulkan or DX12), Apple's Metal, Android, and Web (WGPU). The desktop systems all work pretty much the same, but the Android and Web models run into the limited threading model of those platforms and need some special cases. This level is well supported.
At the WGPU level, you're still managing buffers in the application. The next level up is Rend3. This hides the underlying layers. The application creates meshes and 2D textures, and feeds them to Rend3, which puts them in the GPU and takes care of GPU memory allocation and safety. The application also creates materials, which collect up all the parameters and textures needed for an object, and Objects, which take a material, a mesh, and a transform and put the object on screen. At this level you're in safe Rust and can ignore what platform you are on. It's like old-school OpenGL, but all retained mode. This level needs more people working on it.
If that's not enough abstraction, there are game engines.