You can't play games without it
DirectX is an API or Application Programming Interface. It acts as the middleman between the software code of video games and the hardware used to play them. Without DirectX, playing video games would not be as painless as it is today, but what is DirectX and why is it so critical?
DirectX Is an API, but What Is That?
We’ve said that an API is software that lets games communicate with hardware, but that’s a big oversimplification. After all, hardware drivers that speak to the operating system can also be described in the same way.
What an API does is standardize the catalogue of commands and features that game developers can ask computer hardware to provide. It’s a layer of software between the game and hardware that translates the two “languages” that the game and hardware device speak.
To be more accurate, the API speaks to the hardware drivers on behalf of the game and since both the game and hardware drivers have been written to be compliant with DirectX, rather than each other directly, it means that conversation is seamless.
If you want to dig deeper into APIs, HDG Explains: What Is An API? is a great place to start.
The Bad Old Days Before DirectX
So we’ve established that DirectX is an API that stands between a game and the hardware that it needs to run, but why can’t the video game just talk directly to the graphics card, sound card and so on?
That’s exactly what used to happen. In the days of MS-DOS and the early days of Windows, video games communicated directly with hardware drivers.
The problem with this approach is that the game developer had to write code for every individual product or product family. If you play a classic MS-DOS game today, you’ll see sound card entries for brands such as Creative SoundBlaster or AdLib.
These were the most popular sound card brands, so game developers could cover most customers by supporting them, but not all. Eventually, lesser-known hardware makers would create products that were compatible with the same drivers as the big names. Which is why we got so many “Sound Blaster Compatible” cards back in the day.
The result was that, even if you got the most widely supported hardware, there was no guarantee that a given game would work with your computer. DirectX solved this problem.
DirectX Makes Things Easier for Developers and Hardware Makers
Each version of DirectX (and we’re up to DirectX 12) lays down the set of hardware and software features that compatible hardware must have. In other words, if you want your graphics card to be certified for the latest version of DirectX, it has to have a minimum set of capabilities built into it.
Developers then write their games not to be compatible with a specific graphics card, but to be compatible with DirectX itself. In other words, both hardware makers and game developers standardize their products to DirectX and, as such, any game and hardware component designed to work with a specific version of DirectX are guaranteed to play nicely with each other.
DirectX Is The “X” in Xbox
Everyone knows that the two biggest names in the video game console space are PlayStation and Xbox, but what you might not know is that the original name of the latter was at first “DirectX Box”.
It’s probably for the best that Microsoft decided to shorten the name, but it’s also a very accurate description of the console. The first Xbox was cobbled together with PC hardware, running a cut-down version of Windows and DirectX. That’s still true today with the latest Xbox Series X and S consoles.
One big benefit of this is that porting games between Xbox and Windows PC is very simple. Since they are in effect the same platform. PlayStation and Nintendo Switch use their own APIs however, which brings us to the next important fact about DirectX.
DirectX is Not the Only Game in Town
While DirectX has become one of the most important and widespread APIs, it’s far from the only one. Many different organizations recognized that there was a need for standardization. While DirectX is an API that encompasses everything from graphics to game controllers, there are also APIs that only focus on one aspect, such as graphics.
When the first 3D graphics card started to become popular in the mid 90s, the need for graphics APIs became acute. The 3dFX Voodoo cards used the proprietary Glide API. OpenGL (Open Graphics Library) is an open standard that remains popular today and exists in its modern form as Vulkan. Also, Apple has its Metal API for its own devices and there are many more in other device categories such as mobile phones and tablets.
While DirectX doesn’t have complete market dominance, other APIs are influenced by what Microsoft decided to mandate in each version of DirectX. That being said, they don’t dictate to everyone else. Each version of DirectX is created in consultation with all the stakeholders, so the relationship does seem to be more mutual than one might assume.
DirectX isn’t Something You Need to Worry About
The big question is to what extent you, the user, need to worry about DirectX. In the past, with earlier versions of DirectX on older Windows systems, you would have to install DirectX manually. Most of the time, a given game would bundle the minimum version of DirectX it needed. If that installer detected a newer version of that DirectX generation on the system it would simply install nothing.
Each DirectX version (e.g. 9c,11 &12) is its own thing, but Windows 10 comes with copies of them preinstalled. Your older games will run just fine on your shiny new Windows 10 computer.
What’s far more important is your selection of hardware. You can always update the software or download the right software to make retro games work, but the hardware you have can’t be changed without an upgrade or a new computer.
Hardware Compliance With DirectX
Every piece of hardware that’s relevant to videogames or any other application that uses similar technology, is generally compliant with the latest version of DirectX at the time of its release.
However, should a new version of DirectX be released, there’s a chance your existing hardware might not be compliant if it’s missing a hardware feature that a new version of DirectX needs to work. This isn’t a reason to immediately switch your hardware though!
There’s always a transitional period where games support multiple versions of DirectX. For example, it’s currently typical for games to support both DirectX 11 and DirectX 12. However, if you’re in the market for a new piece of hardware (especially GPUs) then it’s a good idea to buy something that’s compatible with the newest major version of DirectX. Since you’d like your new purchase to remain relevant for at least a few years.
While you’re at it, you may as well check if your new hardware is compliant with the latest versions of other major competing APIs, such as Vulcan, as well.