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

  • ruthan - Monday, March 24, 2014 - link

    On all those other devices running OpenGL, because you need API, which are accelered by HW and without Windows you havent DirectXP, some you havent choice and you have to use OpenGL.
  • lmcd - Monday, March 24, 2014 - link

    DirectX tends to get a lot of features beforehand, and there's no outrageous extension system to work with/deal with.
  • errorr - Monday, March 24, 2014 - link

    While desktop games will continue to be a popular driver of some technology the vast majority of people will have a tablet or phone as their only computer. Quality 3D in games requires experience in and knowledge of OpenGL ES. I don't see where MS will have the clout necessary to drive mobile hardware. DirectX will only be as relevant as the console is and mobile hardware will drive future development. No way can they replace OpenGL as long as Android and Apple make the decisions on the api level.

    Also the paradigm of good coding practices is wildly different for TLDR mobile GPUs and there is no evidence the MS knows how to create an api that deals with the quirks of those Arch's.
  • inighthawki - Monday, March 24, 2014 - link

    They've announced DX12 support for mobile, and have backing from Qualcomm, who themselves have (what I assume you meant :)) a TBDR architecture. I sincerely doubt Microsoft is oblivious to how they work.
  • didibus - Tuesday, August 5, 2014 - link

    I saw that, even Tegra K1 supports DirectX 12, I was wondering though, if it'll be Windows Phone exclusive?
  • TheJian - Monday, March 24, 2014 - link

    What I don't understand is why an NV blog page post has the entire surrounding info from AMD advertised crap. No bias here I guess ;) Why is EVERY single piece of info on this page about AMD when the article is covering NV's slides and Vids? Why is this in AMD center and not NV? Red text for links too? Why not GREEN in an NV article? You should get the point here. Two NV guys, ONE AMD guy, ONE Intel guy, but this is AMD news?

    NV not paying enough for an NV CENTER portal to be prominent on this site or is this just Ryan's/anandtech's AMD love shining through? Some things never change? I digress...
  • DanNeely - Monday, March 24, 2014 - link

    Anything with an AMD tag gets the AMD branding automatically no matter how peripheral AMD is to it. In at least one past case objections resulted in the AMD tag being dropped.
  • lmcd - Monday, March 24, 2014 - link

    This is as relevant to AMD as anyone.
  • Will Robinson - Friday, March 28, 2014 - link

    Would you like some cheese with that whine?
  • Homeles - Monday, March 24, 2014 - link

    DirectX still has some life in it, but I'd argue its days are numbered. OGL is simply a more universal API. DX will still live on for the Windows GUI, I'm sure.

    With Android and iOS's growing sales, there's no doubt that OGL will overtake DX on the desktop as time goes on. In the meantime, DX12 sounds really great.

Log in

Don't have an account? Sign up now