The website doesn’t provide much context for what problem Vulkan is trying to address. Is it a replacement for OpenGL?
OpenGL was written to mirror the functionality of GPUs of the 1990s. The hardware has evolved quite significantly, but OpenGL’s API has not, so modern graphics drivers spend a lot of effort shoehorning everything into place. The lack of visibility into what is really going on, and the fact that not all driver code paths are optimised equally, can also make it difficult to reason about OpenGL performance.
Vulkan is a new graphics API built to fit modern hardware. It’s (much) more low level than OpenGL (e.g. 650 lines of code to draw a triangle), but you can get better performance out of it.
That triangle.cpp example is quite something. I assume the intended usage is that most people would be writing through some kind of higher-level library, and only the designers of really performance-critical parts of libraries/engines would write this sort of code directly?
Correct. I’ve not implemented it myself, but I expect a typical design would look like this: