Graphics API (DirectX, Vulkan, Metal)
Also known as: rendering API, graphics programming interface
A graphics API (application programming interface) is the set of commands software uses to talk to a graphics card.
DirectX dominates Windows and Xbox, Metal runs on Apple devices, Vulkan works across many platforms including Android and Linux, and OpenGL is the older cross-platform standard. While players rarely choose one directly, the API a game uses affects its performance, which devices it runs on, and how hard it is to port.
Graphics API (DirectX, Vulkan, Metal), explained at three levels
At home
Think of a graphics API as the menu at a restaurant. The game, like a customer, can't walk into the kitchen and cook; it orders from a fixed list of dishes the kitchen understands. The graphics card is the kitchen, and the driver is the waiter translating orders. Each platform has its own menu: Windows uses DirectX, Apple uses Metal, and many others use Vulkan.
At work
A graphics API is the set of commands software uses to tell a graphics card what to draw: load these textures, run this shader, draw these triangles. DirectX covers Windows and Xbox, Metal covers Apple devices, and Vulkan covers Android, Linux, and Windows. The API a product targets decides which platforms it can reach and how much porting work each new platform costs.
At home
When a game draws a frame, it doesn't talk to your graphics card directly. It sends commands through the API, such as DirectX 12, to the graphics driver from Nvidia, AMD, or Intel, which translates them into instructions the chip understands. That's why updating drivers can fix crashes or speed up games. It's also why some PC games offer a choice of API: each one hands work to the driver differently, and one may suit your hardware better.
At work
Graphics APIs come in two broad styles. Older, higher-level APIs such as OpenGL and DirectX 11 let the driver manage memory and synchronization, which is easier but adds CPU overhead and hidden stalls. Low-level APIs such as DirectX 12, Vulkan, and Metal hand that control to the developer, so engines can record commands on many CPU threads at once. WebGPU brings a similar modern model to browsers, sitting on top of whichever native API the device uses.
At home
Because APIs are just sets of commands, one can be translated into another. DXVK and VKD3D-Proton catch DirectX calls from a Windows game and convert them into Vulkan in real time, which is how Valve's Proton runs Windows games on Linux and the Steam Deck. Apple's Game Porting Toolkit does something similar for Metal. While translation adds some overhead, in my opinion it's one of the most impressive compatibility achievements in recent software.
At work
Low-level APIs move correctness from the driver to the engine. Developers must insert resource barriers so the GPU doesn't read memory still being written, manage descriptor heaps that point shaders at resources, and prebuild pipeline state objects. Mistakes show up as crashes or corruption that differ between drivers. Teams rely on validation layers, tools like RenderDoc and PIX, and an engine abstraction layer, often called a render hardware interface, so one renderer can target several APIs.
Real-world examples
At home
Lena's game stuttered on her PC. Switching the graphics setting from DirectX 12 to Vulkan in the options menu made it run noticeably smoother on her hardware.
At work
Marcus leads a small Halifax studio porting its game to Mac. Because they used a game engine with Metal support, the port took weeks instead of rewriting the renderer from scratch.
How it compares
| feature | DirectX | Vulkan | Metal |
|---|---|---|---|
| Main platforms | Windows, Xbox | Windows, Linux, Android | Apple devices |
| Owner | Microsoft | Khronos Group (open standard) | Apple |
| Level of control | High in DirectX 12 | High | High |
| Released (modern version) | 2015 (DirectX 12) | 2016 | 2014 |
Each platform has its preferred API, and engines bridge them.
For analysts
Platform reach is a business decision tied to graphics APIs. I'd choose an engine with strong multi-API support early, since retrofitting a renderer for a new platform is expensive.
History & origin
Silicon Graphics released OpenGL in 1992 as an open standard, and Microsoft launched DirectX in 1995 to make Windows a gaming platform. The two competed through the 2000s, with DirectX winning most PC games. AMD's Mantle API in 2013 showed that lower-level control could boost performance, inspiring Apple's Metal (2014), DirectX 12 (2015), and Vulkan (2016) from the Khronos Group. Apple deprecated OpenGL in 2018. Valve's Proton, built on translation layers that convert DirectX to Vulkan, made thousands of Windows games playable on Linux and the Steam Deck. WebGPU began shipping in browsers in 2023. In my view, translation layers have quietly made the API wars matter less to players than ever.