It looks like you're new here. If you want to get involved, click one of these buttons!
One API to rule them all. Wrong fantasy franchise, perhaps, but that’s the idea behind Vulkan, the snazzy open-source successor to OpenGL, alternative to Microsoft’s DirectX and something that might shake up gaming on everything from PCs to phones. But what’s an API? And why should you care? We’ll come to that. For now, if Vulkan is everything it’s cracked up to be, it’ll make games run faster and look better on your existing PC. It might make that SteamOS thing a goer, too. Anyway, version 1.0 is out, so the chattering weberati will be casually trading Vulkan references to prove their PC gaming prowess. Time to bone up. Plus I’ve just sat through a five-hour keynote stream on Vulkan from GDC 2016. So humour me. This stuff is actually quite interesting.
– Vulkan is an open source alternative to Microsoft DirectX on the PC
– It’s the successor to OpenGL
– But it’s derived from AMD’s Mantle API
– It’ll be on everything from phones to PCs
– Like DirectX 12, it claims to make games run faster
– It won’t cost you anything
– It’ll run on AMD graphics cards right back to Radeon HD 7000 series and Nvidia GeForce 600 series boards and newer
– A driver update is all you’ll need
– Oh, and it might make Valve’s SteamOS a viable gaming platform
Let’s begin by elbowing the question of what an API is into touch. It stands for Application Program Interface. And it’s just that. An interface between bits of software.
In practice, an API provides building blocks and tools that make it far simpler for developers to achieve a working application. If we’re talking graphics – and we are indeed talking graphics – then the API is the interface that connects your games with your graphics driver. And thus the 3D visuals are rendered.
The advantages of this approach are pretty profound. With a graphics API, it’s possible to have (mostly) one set of game code that will run on any hardware that’s compliant with the API. So, a game is coded for, say, DirectX 9 and any graphics card that’s DirectX 9-compatible will run it. In theory, anyway. In practice, it’s usually a bit more complicated.
So using an API means that game developers don’t need to be world authorities on both Nvidia and AMD graphics chips, for example. They can use the tools provided by the API and let Nvidia and AMD do the heavy lifting through the driver.
It’s also worth understanding that APIs come in different flavours, otherwise known as high- or low-level abstraction. That sounds fancy, but the implications are pretty straight forward. The higher the level of abstraction, the more distant the application becomes from the specifics of the hardware and the greater the workload handled by the API and graphics driver (in this case).
All aboard the Vulkan train
That’s good in the sense that it makes games development simpler in some ways. The downsides include the need for extensive optimisation jiggery pokery via drivers and in turn fewer opportunities for developers to get things really flying.
As things stand, DirectX has largely been quite a high-level API. It just so happens that DirectX has also been pants when it comes to CPU overheads and multi-threading. And that’s meant DirectX games have been pretty pants by both metrics. And developers often haven’t been able to do much about all that.