Hacker News new | ask | show | jobs
by 1propionyl 2268 days ago
The bit about a Vulkan and OpenGL isn't really accurate.

Practically no one, apart from some hobbyists working on side projects, are actually using Vulkan or Metal or D3D12 directly to make games or applications. These APIs weren't written for end-developers to use directly, they were written for engine developers.

I mean, it's fun to try. But you'll have to write something like ~1200 lines of C/C++ just to render a single triangle. It's a far cry from playing around with OpenGL immediate mode.

And to be frank, Vulkan/Metal/D3D12 are about as similar to one another as major graphics APIs have ever been. Sure, there's quite a lot of differences, but the broad strokes are more or less similar.

1 comments

I agree that usually one uses a higher level API, but I've worked on commercial apps that use Metal both for graphics and compute. The code is not so unweildy as is suggested here. An old triangle test app I have here shows only about 100 lines of graphics code.
In Metal, yes. In Vulkan it's a lot more.

Of course, a lot of this code is code you only write once and then abstract on top of. Metal just has a lot of that abstraction "done for you" because it's only designed to work on a closed set of hardware profiles.

Vulkan requires a lot more signatures in triplicate and setup rituals. Not a bad thing, just a different target.