Portability benchmark of Dota2 on MacOS
gfx-rs.github.io
gfx-rs.github.io
It brings back the option of writing one graphics backend, having it work everywhere, and as a bonus not having to deal with terrible API that is OpenGL.
Eh, Direct3D9 was awful and not at all rooted in mathematical convention. I think (0,0) was the upper left of a texture instead of the center of the upper-left texel, too.
Granted, it's been awhile. Maybe the situation has improved.
The biggest win is how explicit it is so you won't stutter for things like shader recompiles like you do in OpenGL (I'll give you a hint, most of the time the shader isn't fully compiled by the time glLink returns). Also, Vulkan's emphasis on immutable objects really tickles my fancy in terms of programming hygiene.
Vulkan, to me, is the assembly language of graphics APIs. Few should need to drop down that far, but those who do really need to.
*The exception being platform-specific window management which has always been terrible, but mostly solved by compatibility libraries.
The boilerplate in Vulkan is a lot of work to get to a triangle on the screen, but once you're there it really isn't much more work to do whatever. The boilerplate isn't linear with lines of code, and honestly anything nontrivial with modern OpenGL is probably going to have more boilerplate.
It's sort of an unfortunate consequence of how code architecturally should change with log10(cloc). Examples in Vulkan look verbose, but as soon as you get out of examples, it's a lot nicer. So, with a simple game, I'd probably end up using something like Vulkan too.
OpenGL is so raw than everyone ends up creating their own scene graph API from scratch.
> The initial results were… slightly discouraging. For a while we weren’t able to get the game to start, due to our Metal backend was missing some required features, like compressed texture support
As mentioned in the blog post, the team is also actively working on improving Vulkan conformance test suite coverage, so the goal is to continue maturing these backends relatively quickly.
In the future there could be a backend to target WebGPU (https://www.w3.org/community/gpu/) as well.
It wasn't about dpi or speed. I would constantly find myself trying to rapidly aim-click on something and have my cursor stop just short of the target. The cursor felt _heavy_ and stuck like it didn't move as easily.
The SmoothMouse utility fixed the latency issues and made the mouse cursor move like it did on Windows. I was very disappointed when Apple deprecated the APIs that made it work.