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

POST A COMMENT

104 Comments

View All Comments

  • jimjamjamie - Tuesday, March 25, 2014 - link

    The problem with this argument is that Android user experience on bottom-end hardware is mostly unbearable garbage even compared to a feature phone. The Lumia 520 is Windows Phone's best seller because it offers a better experience than its equivalent Androids, unless you pony up more cash for a Moto G. Reply
  • Honest Accounting - Tuesday, March 25, 2014 - link

    Not accurate. The 520 is a $180 device. That's precisely the same price as a Moto G (or Xperia E1 for that matter). There's no point comparing it to a device less that half the price. But again, if it's this good performer that you claim, the thing to do would be to reduce the price (to gain more market share) rather than up the specs - which was a necessity since the performance was in fact inadequate Reply
  • Alexvrb - Wednesday, March 26, 2014 - link

    Who's not being accurate? You're thinking of the 620. The 520 is clearly available unlocked for 120-130, and I've seen it on sale for less. Performance is quite good for such a lowend smartphone. Reply
  • Mondozai - Tuesday, March 25, 2014 - link

    "Why? Because of office which is available on Android as well? Because of the crappy legacy desktop?"

    I agree that Windows tablets aren't going to conquer Android tablets. But you're delusional if you think that Windows legacy desktop is somehow bad. Nobody even comes close to the amount of programs available. Everything works. MacOS is better on some things, but it's a common myth that the only thing that holds Mac back is basically gaming and a few other apps. It's a lot more than that.
    Reply
  • Anders CT - Tuesday, March 25, 2014 - link

    That is just flat out nonsense:

    1) OpenGL is also available on Windows. In fact if DirectX 12 wont be available on windows 7, modern OpenGL will have a much wider installbase than DirectX on the desktop alone.

    2) Dalvik is not the center of Android. It is a higly efficient execution model that complements native binaries. Most OpenGL applications, and indeed all of the libraries, will always be natively compiled.

    3) Dalvik is in no way bound to Java, is not based on Java, and does not use any Java classes. It is a virual register machine. Java is a tool that developers can use to target dalvik.

    4) ART only slows down Androids (quite speedy) boot time one single time, when you first turn on ART and reboots your device. Then it will compile all your dex-files and be done with it. ART improves execution efficiency slightly at the exchange for a slightly larger memory footprint. Also, ART helps out with x86 and MIPS compatibility without the performance overhead of jit binary translation.

    5) Dart is not a virtual machine, and cannot replace Dalvik. Dart is a programming language and application framework for client-side webprogramming. In theory you should be able to make a dart compiler that targets dalvik. Go right ahead.

    6) If Microsoft intends to integrate Windows Phone with Windows, they are moving pretty slowly. In fact, running Android apps on Windows is a lot easier than running Windows Phone apps on Windows.
    Reply
  • jimjamjamie - Tuesday, March 25, 2014 - link

    "Microsoft.. are moving pretty slowly."

    Considering how late they have been to the smartphone game I think that is a given, I wouldn't discount the prospect of OS family homogenisation simply because Microsoft is being slow about it; they are just slow in general.
    Reply
  • Mondozai - Tuesday, March 25, 2014 - link

    I think it's less a matter of moving slowly than just trying to manage their main business. Google had no legacy business so they could focus it all on mobile. Microsoft's business in the software space is far more fragmented/divided.

    Another issue is that while casual consumption is done as good if not better on tablets etc, people are starting to find that working is horrible and gaming is atrocious unless for very simple games. You won't have deep immersive experiences on mobile gaming by and large. It's horrible to type long documents. Etc. So they are held back by this, because the cassandras were right about the death of the desktop. And Apple can afford to discount MacOS because they know it'll always be a marginal player.
    Reply
  • Mondozai - Tuesday, March 25, 2014 - link

    "because the cassandras were right about the death of the desktop." should say "cassandras were wrong". Declining, but now stabilizing. And once places like India gets built out properly, a lot of people will tire of just watching 5-10 inches all the time. Especially for tasks that require sustained concentration over hours of time aside from movies. Reply
  • didibus - Tuesday, August 05, 2014 - link

    I don't think people think Gaming is atrocious. In fact, I'd claim there's more people who game and enjoy gaming on mobile than on consoles and PCs. Out of those who prefer console and PC like me, I do think it's atrocious, but it gets a lot better fast. Take things like the Nvidia Shield Portable and Tablet. Moga controller. Android TV, Fire TV, etc. These bring proper controls to Android games, and the Shield proves that mobile already has Xbox 360 like power.

    Same thing will happen for working. Right now, it's not as good. Mostly because of the form factor. But already if you plug a tablet to a monitor, a keyboard and a mouse, you realize that's it way closer to being productive than you thought.

    Also, the Enterprise is all about mobile right now, I work in enterprise software development, and if you want to sell, you've gotta say 2 magic word: Works on your tablet and cloud based.
    Reply
  • toyotabedzrock - Tuesday, March 25, 2014 - link

    Android allows native code apps. The 12.x versions of Opera where native c or c++ and opengles. And ART only increases the boot time once to pres compile your apps into a new format. Reply

Log in

Don't have an account? Sign up now