John Carmack thinks DirectX is better than OpenGL

For what seems like forever, id Software programming guru John Carmack has built his legendary game engines around the cross-platform OpenGL API. That trend may well continue, but not because Carmack thinks OpenGL is superior to Microsoft’s competing DirectX API. In an interview with Bit-Tech, the programmer reveals that he thinks DirectX is a better API today: “Microsoft had the courage to continue making significant incompatible changes to improve the API, while OpenGL has been held back by compatibility concerns. Direct3D handles multi-threading better, and newer versions manage state better.”

Carmack also says that OpenGL “still works fine,” so a switch isn’t necessarily in the cards. Despite the Microsoft API’s apparent benefits, OpenGL is rooted deeply in id’s game and tool code. Transitioning to DirectX would involve a lot of work, and it might complicate supporting platforms like the PlayStation 3 and Mac. Going the DirectX route would probably ease development for Windows and the Xbox 360, though.

The Carmack quotes are meant to tease an upcoming article on the state of OpenGL gaming on the PC, and Bit-Tech follows them up with a nice snippet from AMD developer relations manager Richard Huddy talking up Microsoft’s invention of the geometry shader in DirectX 10. We’re on to DirectX 11 now, an API with much improved tessellation support plus multi-threaded rendering and compute shaders. Microsoft does seem to be doing a better job than OpenGL’s governing body when it comes to pushing new features for PC graphics. Thanks to Slashdot for the tip.

Comments closed
    • blastdoor
    • 9 years ago

    Apple seems to finally be taking gaming seriously — that has to be good news for OpenGL.

    • odizzido
    • 9 years ago

    I wasn’t really old enough to understand everything when OGL was big, but didn’t an OGL game run on linux just as well as windows?

      • derFunkenstein
      • 9 years ago

      No, not at all, but I think that had more to do with drivers and priority. Linux was a distant third behind Windows and the Classic Mac OS.

      Even then, the only reason the Mac had something approaching game performance parity in the 1990s was because of RAVE and GLide (between ATI and 3Dfx). For example, Diablo II GLide on the Mac with a Voodoo 2 was fluid and perfect. Running the same game in Rave was mostly-fluid with a Rage128. OpenGL was horribly choppy. It was even worse in Linux, at least in part because of driver support.

        • Chrispy_
        • 9 years ago

        You think correctly. Windows drivers were tweaked and optimised, even to the point of cheating (quake3/quack3) by both nVidia and ATi. They had (and still do have) big teams of people working on their windows drivers around the clock, targetting the limited range of game engines that exist.

        By contrast, official Linux drivers were mostly just made “to work”. They had to be far more generic, for compatibility reasons and they likely received almost negligible attention from the driver devs back in those days.

        I remember being pleased when I finally got Quake 3 running natively at a decent framerate, but it still wasn’t as fast as on Windows 2000.

        • UberGerbil
        • 9 years ago

        And there’s more to a game — much more — than just the 3D api. Even if you wrote it to be fairly OS-agnostic as far as basic system services are concerned (memory management, file IO, etc) there are still all the other aspects peculiar to games: sound and music effects, net play, controller input, etc. DirectX was more than Direct3D: it also had DirectPlay, DirectSound, DirectInput, etc for all of those things. On Linux you had to either find (and integrate) libraries from multiple sources or write all of that also.

    • ltcommander.data
    • 9 years ago

    Is a multithreaded OpenGL renderer available in Windows? Apple made their OpenGL implementation multithreaded in OS X 10.4.8. I’d be curious to know whether that is comparable to DX11’s multithreading?

      • BlackStar
      • 9 years ago

      OpenGL (and Direct3d) drivers have been multithreaded since 2004 or so on Windows and Linux (search for “nvidia threading optimization”). This is completely different to DX11-level multithreading.

      The former is a necessary driver optimization that allows applications and driver code to run in parallel. The latter allows applications to run several rendering threads in parallel (i.e. so they can update textures, build vertex buffers and compile shaders in parallel). Both are necessary for optimal performance, nowadays.

      Note that OpenGL has always supported multiple rendering threads. DX11 only caught up to that last year, but with an easier and safer API. (This is where OpenGL is paying the price for backwards compatibility).

        • Hattig
        • 9 years ago

        So that’s why Sandy Bridge basically dies with heavy multithreaded GPU use in that AMD Llano demo – it requires DX11 to work nicely, and SB doesn’t offer DX11…

        • bcronce
        • 9 years ago

        Seems we got trolls that go around down ranking people.

      • bcronce
      • 9 years ago

      From what I have read about Mutil-threaded OpenGL, is that the OpenGL framework is threaded as to alleviate load from the primary thread. OpenGL can only have *one* thread that calls it, but the calls get queued and off-loaded to worker threads which allows your application’s main loop to continue to do non-OpenGL work.

      This is all good, but it is not *as* good as what DX11 is allowing. DX11 allows multiple thread to access DX11 at the same time. So you can have multiple parts of your screening being processed at the same time.

      eg. While one-or-more thread can be setting up the scene, another thread can be running DirectCompute. In OpenGL, the similar thing would be running OpenCL, but since only one thread may work on OpenGL/CL at a time, so you can’t be doing all of this at the same time like you can with DX11.

      OpenGL does not allow for this yet.

      DX11 will scale quite a bit better with more cores until OpenGL adds this in. But The biggest issue with OpenGL is it wants to be backwards compatible, which is holding it back.

      MS had to do a complete re-write to make DX11 the way it is, which is a large reason why DX11 is taking so long to become standard. It is a new way of rendering. To take full advantage of DX11, programs have to be re-designed from ground up. OpenGL isn’t willing to make this step yet as OpenGL isn’t targeted towards games, but professional rendering where API stability is a must.

      This will be more of an issue in upcoming years, but it’s not a “must have” quite yet.

        • BlackStar
        • 9 years ago

        This is, in fact, incorrect. OpenGL has allowed multiple rendering threads since v1.1 (around 15 years ago). This is 100% documented and possible (and with well-documented caveats).

          • djgandy
          • 9 years ago

          Correct. OGL has always allowed many threads, however a single GL context can only be bound to a single thread at any one time.

          [url<]http://msdn.microsoft.com/en-us/library/dd374387(VS.85).aspx[/url<] As you know though and has already been said, this is completely different from the DX-11 multithreading.

      • ltcommander.data
      • 9 years ago

      Just wanted to thank BlackStar and bcronce for your quick and clear replies.

    • bcronce
    • 9 years ago

    D3D11 is currently being ported to Linux+Wine. The developers are saying it’s not only the easiest D3D to port, but it’s easier to program than OpenGL.

    If D3D was cross-platform, I’m sure it would become standard quite fast.

      • djgandy
      • 9 years ago

      I had a quick look over the D3D11 spec the other day and it does look good. Also from a driver implementation point of view it looks good, especially for state.

    • Veerappan
    • 9 years ago

    OpenGL 4.x introduced tesselation support, and the core profile support in GL 3.2 allows programs to drop a lot of the legacy cruft (fixed function pipeline mostly), so hopefully the backwards compatibility issue can be mitigated. I’m not sure about how the new versions have handled multi-threading and state tracking

    OpenGL also supports interoperability with OpenCL, similar to Direct3D and DirectCompute sharing data.

    The OpenGL ES specifications are also very useful and hopefully will help lead to a revival of OpenGL. Most smartphones don’t support DirectX, but do support a version of OpenGL. Mac/Linux/BSD/etc also only support OpenGL.

    • Aquilino
    • 9 years ago

    Sure, John says that DirectX is better than OpenGL, that’s why he ends the interview saying: “all of our tool code has to share resources with the game renderer, and I wouldn’t care to go over all of that [b<]for a dubious win[/b<]."

      • Firestarter
      • 9 years ago

      That the API is better doesn’t imply that a switch to DirectX would make their games better/faster. That’s why he says ‘dubious’.

      • srilumpa
      • 9 years ago

      That would be because whatever advantage DirectX has over OpenGL is not significant enough to overcome the disadvantage of porting all their tools over to it. Same reason that plenty of older programming languages still exist even if better alternatives are here; it would be too expensive to port tall the old code at once to a new system.

    • kyboshed
    • 9 years ago

    Surely OpenGL will only become more important as technologies such as WebGL and gaming on iOS/Android takes off?

      • sweatshopking
      • 9 years ago

      do you mean again? OpenGL was important. it is no longer. Apple might assist with a resurgence. Who knows.

      • PixelArmy
      • 9 years ago

      He’s talking about the newer iterations of the APIs… the ones that tax GTX 5xx and HD 6xxx cards. Mobile/browser versions are at the level of old school games… not exactly cutting edge.

    • Corrado
    • 9 years ago

    Seeing as 2.1 is the latest release OGL version, and that was introduced in 2006, its no surprise really. You can’t let it languish that long.

      • codedivine
      • 9 years ago

      Umm apparently you missed the whole OpenGL 3.x and 4.x series that are already out and supported?

        • Corrado
        • 9 years ago

        Looks like I did! I need to learn to read better.

    • Helmore
    • 9 years ago

    John Carmack isn’t exactly the first person that comes to mind as someone who would claim that DirectX is better than OpenGL. 5 years ago people may have thought that hell froze over if they heard him say that.

      • Hattig
      • 9 years ago

      Yeah, to be fair OpenGL got stuck with version 1.4 and then version 2, until Khronos came along to manage it amongst other things. OpenGL has a lot of legacy professional software tying it down too. Still, it’s OpenGL 4.1 currently, and thus it has done a lot of catching up.

      • Meadows
      • 9 years ago

      That’s exactly why this is news.

Pin It on Pinterest

Share This