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

  • sprockkets - Monday, March 24, 2014 - link

    Well in the old days Microsoft's dominance on the desktop made Directx win. Today, that's no longer the case. Apple's ios and Android both dominate, and unless MS allows Directx to run on non windows devices, won't have the clout to force Directx 12 on us.

    I'm glad this is the case since this will help prevent a repeat of the late 90s to mid last decade where if you didn't have windows you were screwed.
  • lmcd - Monday, March 24, 2014 - link

    Microsoft's dominance on the desktop still makes DirectX win there. On mobile, small games go straight for OpenGL ES but larger games use third-party engines that handle the divide.

    Also, the way tablets are going, we're going to be back to the 90s soon enough. Intel-based Windows 8 tablets likely take over much of Android's strength in productivity tablets, and Apple will always have the iPad for content consumption and overall luxury.

    Android has had a good run, but counting on Dalvik as the center of your OS (which is bound to the weaknesses of Java) puts a damper on Android power efficiency, performance, and scalability which can't be recovered. Android probably dead-ends somewhere between 5.x and 7.x, where Chrome OS takes over on Google's side and subsequently loses a huge install base.

    Basically, unless Google has an upgrade plan from Dalvik code to Dart code, I would put Microsoft as 1st or 2nd in tablet before 2018. If WP comes together with Windows (and finishes integration) then Windows Phone could start making a similar push.
  • valvalis - Monday, March 24, 2014 - link

    Google already has a replacement for Dalvik in 4.4 - ART.
  • lmcd - Monday, March 24, 2014 - link

    As if slowing down the already-torturous Android boot time is a good solution. Even if ART is "ready" by the next point release, I don't see how ART improves the situation dramatically.
  • nico_mach - Saturday, March 29, 2014 - link

    I can't see how it's a problem. Windows' lagginess never hurt its platform after it had platform dominance. Windows tablets have the same problem as Apple laptops - they don't have the compatible software and probably never will, they're the domain of artists (with the stylus) and wintel grognards. For all your bluster, PCs with touch aren't selling and tablets are still primarily ios and Android.

    I'll grant that nothing lasts forever, but your 2018 forecast isn't based on evidence yet, just speculation - speculation that also had Windows Phones dominating mobile and Surface selling like ipads. There's nothing seriously wrong with Windows' platform, just like there was nothing seriously wrong with Apple in the 90s, but it's still a declining platform, caught on the wrong side of change with an outdated business model.
  • kpb321 - Monday, March 24, 2014 - link

    I have no idea how Google would have plan to upgrade from Davlik to Dart considering Dart is a replacement for Java Script and not Java which are two different things.

    http://en.wikipedia.org/wiki/Dart_%28programming_l...

    Not to mention that Dalvik isn't even Java in the first place. The borrowed some ideas and basic structure for the api's but invented their own new environment to run it. The also do support native applications if performance is really that critical. They don't seem to be that popular so I can only assume that their Davlik performance is doing okay.
  • coder543 - Monday, March 24, 2014 - link

    The idea would be to make Dart a viable option for app development on Android. It doesn't have to rewrite developers' code for them. I would love for Dart to be an option, at least... but all this whining about Dalvik performance isn't worthwhile. People don't write things in Java on Android when they need performance -- they use C++ and native binaries, with maybe some Java for a GUI. Dalvik isn't much of a concern for the viability of Android, and ART will be along shortly enough to replace it.
  • Flunk - Tuesday, March 25, 2014 - link

    I think you're a bit confused. Dart is a programming language, Davlik is a compiler (and framework). There is no reason that Davlik applications couldn't be written in Dart. Why they would care enough to write a compiler just to support an extra language that isn't all that different from Java I don't know.
  • didibus - Tuesday, August 5, 2014 - link

    I think he understood that. I think he just would like to be able to Code in Dart instead of Java. Personally, I think Google needs to rebrand their Java to something else. Call it Droid or something. And they need to stop following the Java evolution, add their own construct and basically branch out their own language out of Java. I like Java, but I find it evolves rather slowly, I'd prefer something that moved faster, which is why I think it'd be nice if Google took control of that.
  • syxbit - Monday, March 24, 2014 - link

    ART not Dart :)

Log in

Don't have an account? Sign up now