Quick Links

Key Takeaways

Where you are given the option to choose, DirectX, particularly the newest versions, is likely to provide a better overall gaming experience than OpenGL. However, OpenGL might offer slightly better performance on older devices.

The choice between OpenGL and DirectX in games isn't as common as it once was, but you might still see it. And if you do, you might wonder what the difference is and which option gives the optimum gaming experience.

What is OpenGL?

OpenGL (Open Graphics Library) is a cross-platform 2D and 3D graphics API. It is one of the most widely-used graphics standards in the world, used by developers when creating software ranging from video games and virtual reality experiences to computer-aided design (CAD) tools.

An API (Application Programming Interface) makes it easier for software and computer hardware to communicate efficiently and effectively. More importantly, an API standardizes the process. Without access to graphics APIs, software developers would have difficulty ensuring their software could access and use the wide variety of graphics processors available.

OpenGL was created in 1992 by Silicon Graphics Inc but is now managed by the Khronos Group, a tech consortium that is also responsible for Vulkan and several other lesser-known APIs.

How Do OpenGL and DirectX Differ?

Any side-by-side comparison of OpenGL and DirectX would be flawed from the outset. Open GL is just for 2D and 3D graphics, whereas DirectX is a suite of APIs that includes Direct3D and Direct2D for graphics, XAudio2 for sound, DirectWrite for text, and many others. The question should really be: how do OpenGL and Direct3D differ?

The main difference between the two APIs is that Direct3D is only for Microsoft platforms, meaning Windows and Xbox. OpenGL is cross-platform and compatible with Microsoft, Apple, and Linux systems. Notably, Apple has depreciated OpenGL on macOS and iOS in favor of its Metal API, but it is still supported.

When looking at gaming frame rate and use of system resources, OpenGL and DirectX 11 are almost on par. It depends on how well a game developer implements each API, but there is little noticeable difference between the two standards in most cases. The video below demonstrates how similar the performance of OpenGL is to DX11 and even its own successor, Vulkan.

DirectX 12 and 12 Ultimate have helped the Microsoft API pull ahead of OpenGL, particularly regarding the visual quality and effects found in many modern games. Vulkan, which is an attempt to unify the tools of OpenGL and OpenGL ES (Embedded Systems) into a single API, aims to close that gap.

In the past, OpenGL and Direct3D were direct competitors. But as the battle to win a bigger share of the game development market evolved and became less intense, it wasn't uncommon for a game that used OpenGL for graphics to use some components of DirectX for the audio, etc. Assuming the game was developed for Windows, of course.

Related: Vulkan vs. DirectX 12: Which Should You Choose?

What Games Use OpenGL?

Outside of mobile, modern gaming is dominated by Windows, Xbox, and PlayStation. Windows and Xbox games predominantly use DirectX, and the newer Sony consoles use their own graphics APIs. OpenGL is still widely used for mobile games where, due to Android being a Linux-based platform, using DirectX is a less viable option.

There are still lots of games being developed using OpenGL, but they tend to be lower-budget titles from smaller developers. Few, if any, AAA PC or console games of the last 15 years use the once-popular API.

The best-known and most popular OpenGL game is Minecraft. Other notable OpenGL games include Doom (2016), Baldur's Gate: Dark Alliance and its sequel, Desperados 3, and 7 Days to Die.

a castle made in minecraft

DX11 vs. OpenGL: Which is Better for Gaming?

As players, we aren't often given the option to choose between OpenGL and DirectX. At least, not for running a game developed within the last 10-15 years. If a game has been developed using OpenGL, it will generally just run using OpenGL. It is more common to see a choice between DirectX and Vulkan these days.

You are more likely to encounter an OpenGL game on your mobile device. Games such as Fortnite for Android can use either OpenGL or Vulkan, depending on the device. But again, you usually won't get the option to choose between them.

If you are given a choice between OpenGL and DirectX, there's no harm in trying them both out to see which works best for your system. OpenGL might provide slightly better performance on an older computer, but using DirectX will probably result in a more visually-pleasing experience.

Frequently Asked Questions

Did Vulkan replace OpenGL?

The Vulkan API was built using AMD's abandoned Mantel API as a foundation. Both APIs are managed and run by the Khronos Group but are independent of each other. Vulkan is often referred to as the natural successor to OpenGL, but it isn't a direct replacement for it. The older API is still available for developers to use.

Is Minecraft OpenGL?

Minecraft, one of the most played and popular games in the world, uses the OpenGL API. It also uses DirectX 11 or newer when played on Windows (Bedrock Edition) as the Microsoft API suite provides other tools the game needs to run.

Does Steam have OpenGL games?

Steam features hundreds of games that use OpenGL. Simply searching for "OpenGL" in the Steam Store will bring up dozens of results. And that is only the games that are specifically tagged as OpenGL-compatible.

Related: Why Does Every PC Game Install Its Own Copy of DirectX?