With the announcement of DirectX 12 features like low-level programming, it appears we're having a revival of the DirectX vs. OpenGL debates—and we can toss AMD's Mantle into the mix in place of Glide (RIP 3dfx). I was around back in the days of the flame wars between OGL and DX1/2/3 devotees, with id Software's John Carmack and others weighing in on behalf of OGL at the time. As Microsoft continued to add features to DX, and with a healthy dose of marketing muscle, the subject mostly faded away after a few years. Today, the vast majority of Windows games run on DirectX, but with mobile platforms predominantly using variants of OpenGL (i.e. smartphones and tablets use a subset called OpenGL ES—the ES being for "Embedded Systems") we're seeing a bit of a resurgence in OGL use. There's also the increasing support of Linux and OS X, making a cross-platform grapics API even more desirable.

At the Game Developers Conference 2014, in a panel including NVIDIA's Cass Everitt and John McDonald, AMD's Graham Sellers, and Intel's Tim Foley, explanations and demonstrations were given suggesting OpenGL could unlock as much as a 7X to 15X improvement in performance. Even without fine tuning, they note that in general OpenGL code is around 1.3X faster than DirectX. It almost makes you wonder why we ever settled for DirectX in the first place—particularly considering many developers felt DirectX code was always a bit more complex than OpenGL code. (Short summary: DX was able to push new features into the API and get them working faster than OpenGL in the DX8/9/10/11 days.) Anyway, if you have an interest in graphics programming (or happen to be a game developer), you can find a full set of 130 slides from the presentation on NVIDIA's blog. Not surprisingly, Valve is also promoting OpenGL in various ways; the same link also has a video from a couple weeks back at Steam Dev Days covering the same topic.

The key to unlocking improved performance appears to be pretty straightforward: reducing driver overhead and increasing the number of draw calls. These are both items targeted by AMD's Mantle API, and presumably the low level DX12 API as well. I suspect the "7-15X improved performance" is going to be far more than we'll see in most real-world situations (i.e. games), but even a 50-100% performance improvement would be huge. Many of the mainstream laptops I test can hit 30-40 FPS at high quality 1080p settings, but there are periodic dips into the low 20s or maybe even the teens. Double the frame rates and everything becomes substantially smoother.

I won't pretend to have a definitive answer on which API is "best", but just like being locked into a single hardware platform or OS can lead to stagnation, I think it's always good to have alternatives. Obviously there's a lot going on with developing game engines, and sometimes slower code that's easier to use/understand is preferable to fast/difficult code. There's also far more to making a "good" game than graphics, which is a topic unto itself. Regardless, code for some of the testing scenarios provided by John McDonald is available on Github if you're interested in checking it out. It should work on Windows and Linux but may require some additional work to get it running on OS X for now.

Source: NVIDIA Blog - GDC 2014

Comments Locked

105 Comments

View All Comments

  • LennyZ - Tuesday, March 25, 2014 - link

    Long live the Banshee!
  • ericore - Sunday, March 30, 2014 - link

    "Many of the mainstream laptops I test can hit 30-40 FPS at high quality 1080p settings, but there are periodic dips into the low 20s or maybe even the teens. Double the frame rates and everything becomes substantially smooter."

    You are thinking of DirectX, OpenGL has much more consistent frame rate.
    Also, there is more than the programmers involved in game engines.

    You shouldn't have to restrain artists. Imagine an artist producing the sickess looking character. He brings it to the developer team, and the developer team says, "We got two options, either we incorporate the character as is and it uses 50% of the graphic card or we take away its charm so as to be able to create a playable game." "This was a hero right, not an enemy?" Enemy. "Well I guess we could use it as a boss, but there's no way we are using this as a mainstream high quantity enemy model." Keep drawing, thank you. "That bast****."

    That's an important reason behind a faster less approachable engine and low level access to GPU for faster draw calls which can accommodate for greater polygon count.
  • bluevaping - Monday, March 31, 2014 - link

    People who play games don't care which API format games are created on. They care if its available to them to play on what they got. There nothing that interesting on current Windows that makes me want to build a system for gaming. I don't like the modern UI, 16:9 screens, touch screens, gamepad support left out for some games, no smaller higher quality monitors. Then downsides of upgrading just for minor features or to bring features back.
  • Jammrock - Tuesday, April 1, 2014 - link

    DX12 is designed to work across the entire Windows platform, from desktops to Xbox One to Windows Phone. One API to cover the entire spectrum. Should make designing games and game engines for the entire Windows platform easier.

    Most Android and iPhone games use pre-built engines like Unity. Heck, most indie desktop titles use Unity these days. As long as the key cross-platform engines get translated to DX12's low-level APIs the debate will only be relevant to tier 1 game devs who still build their own engines. And all of them have the resources to build for any platform they deem profitable.
  • rogerdpack - Friday, August 28, 2015 - link

    How does this relate to vulkan?

Log in

Don't have an account? Sign up now