OpenGL vs DirectX: 1 – 0

Since Valve announced their official support for Steam into Linux platform, everyone is acting crazy. Quite recently, Valve’s boss – Mr.Gabe, said that “Windows 8 will be a catastrophe for PC game makers”. The next day, Blizzard’s vice president – Mr.Newell shared his thoughts via twitter saying that “I think Windows 8 is a catastrophe for everyone in the PC space* – not awesome for Blizzard either”. The questions is …

why top game makers are not happy with Windows 8?

DirectX and Windows domination

Since the beginning of Direct3D, Windows operating system has been dominating the gaming industry for years. For a long time now, hardware manufacturers like AMD and nVIDIA were supporting Microsoft by implementing DirectX into their products. Thus, if you wanted to play Assassin’s Creed I  in best quality, you had to buy a new GPU supporting DirectX10, but in six months later, if you wanted to play Assassin’s Creed II also in best quality, you had to buy (again) a new GPU supporting DirectX11, and so on…

Regardless of GPU, when the first AMD 64bit processors came into play you had to keep up with the Joneses. New games using top graphics are now equal to heavy multi threaded applications. Thus, if you wanted to play Dragon’s Age I, you had to buy a dual core processor, but in six months later when Dragon’s Age II was released, a new quad core CPU was required to avoid the bottleneck. So, hardcore gamers have no other choice but overclocking or buying new hardware once in a while.

Alternatives: PlayStation3, Nintendo Wii and XBox360

Playing PC games became an expensive hobby for the majority of people and especially for enthusiasts. As a result, more and more gamers turned into consoles as a fair alternative and affordable choice; one machine dedicated for gamers and games only – pay once and play forever. Nintendo Wii, Microsoft XBox 360, Sony PlayStation3; are all of them great alternatives for descent gaming experience.

This turn out of events had an impact to the gaming industry and soon enough they start paying more attention to console development rather than the Desktop PC. As a result, the majority of game titles are now released in consoles first and then after some months of delay they are ported into Windows and Mac. Things became ever worse, since all the kick-ass titles are not available for PC. Metal Gear Solid 4, Gears of War 3, God of War, Tekken, Dante’s Inferno, and others… are only consoles’ exclusive titles meaning you have to own a console to play them.

Frankly speaking, current PC games are bad-ports of their console version. So, even if you are willing to pay a fortune buying the latest hardware, still you will be unable to live the best gaming experience. Thus, more and more game makers are no longer interested in PC game development, while Blizzard and Valve are already looking for alternatives to Windows 8 and DirectX. But why now?

Tablets, smartphones and embedded graphics

When things come into performance, recent trends like Android tablets prove that OpenGL technology can easily replace desktop PC for daily tasks, such as browsing, music, movies and games.

We have seen many tablets and smartphones using dual core processors while the latest Samsung Galaxy 3 comes with a Quad core CPU. Using webgl and open technologies all these portable devices are able to play games, like Angry Birds. The majority of Android and iPhone games is based in gameplay success; meaning you can use your hands and your body instead of holding a joystick. After all that’s why they are so popular with hand-held devices.

If you wondering how such a little device can play games like Call of Duty Modern Warface 2, ask yourselves how an old and outdated gaming console like PlayStation3 using Linux can still outperform today’s PC. Did you find the answer? Valve did!

Linux and OpenGL strike back

Today, Valve Linux Team posted a great article called “Faster Zombies“. They are trying to develop a Linux version of LFD2 using OpenGL and Linux kernel instead of Direct3D and Windows. So, they modified the game for OpenGL and Linux kernel and optimized the drivers; the result was shocking. The most part of the code was taken from Mac OS and after some modification the result was quite impressive: 315 FPS

The cause . . .

This experience lead to the question: why does an OpenGL version of our game run faster than Direct3D on Windows 7? It appears that it’s not related to multitasking overhead. We have been doing some fairly close analysis and it comes down to a few additional microseconds overhead per batch in Direct3D which does not affect OpenGL on Windows. Now that we know the hardware is capable of more performance, we will go back and figure out how to mitigate this effect under Direct3D.

. . . and effect:

After this work, Left 4 Dead 2 is running at 315 FPS on Linux. That the Linux version runs faster than the Windows version (270.6) seems a little counter-intuitive, given the greater amount of time we have spent on the Windows version. However, it does speak to the underlying efficiency of the kernel and OpenGL.

Laptops/Netbooks and embedded graphics

Right now, any laptop using embedded graphics is unable of playing games in normal/high quality settings. Valve understand that today’s hardware is more than capable of playing their games using OpenGL and Linux instead of running Windows 7 and DirectX. So, using Linux and an Intel Core i3/5/7 processor you will be able to play descent games, only with the help of your integrated GPU. Likewise, all Intel powered netbooks and laptops running Linux will be pretty much able to play Valve games with high framerate.

Answering the very first question

It’s pretty obvious that Windows 8 target into the tablets and smartphones domain, where battery life and quick response are key factors to success. So, it’s not surprising that Windows 8 is more lightweight than Windows 7. Although, games are power-hungry applications that use many resources. In such manner, we expect more powerful tablets to be shipped with Windows 8 launch. However changing the hardware and implementing a more powerful integrated GPU, there will be consequences into wattage power, thus limiting battery’s life. Even though, using OpenGL instead of DirectX, Windows platform will never outperform Android and iPad gaming experience. See what happened with PC Games and consoles.

It’s new and untested market, where top companies like Valve and Blizzard are not sure whether it’s worth to spent time and money implementing games for Windows 8. Instead, open technologies are much more attractive. Linux is open source, runs everywhere and its lightweight.

So, trying to answer the very first question of the article, let me tell you this: Windows 8 will not be a catastrophe for Desktop PC, but they will have dramatic influence for all the other portable devices.

As a Linux user I couldn’t be happier! Valve is going into Linux for good. Linux users are very excited for that turn of events and now Linux will have everything it needed, games and drivers, to be accepted by more users.

14 Comments on this Post

  1. Youre wery wrong in one part. If you want games, and console graphics is good enough for you, then mid-class PC will do the job. You will upgrade once a year or two and bypass 1 generation of consoles and you will give the same amount of mouney for that (i did my own counting).
    Besides, console games are more expensive and have lack of free titles and modes. Only positive think is, that it is more comfortable.

  2. Bruno Martínez

     Consoles and PC gaming are not perfect, some advantages and disadvantages here and there. I wonder if these are Valve’s first steps for the Steambox… mouse, keyboard, gamepad, crazy discounts, free games, best online platform… That could be ground breaking news for console manufactures!

  3. SyedAzli

    no more “F” word for nvidia by Linux after this :p

  4. SyedAzli

     *Linus Torvalds

  5. Agreed. Each have their advantages, anyone from a non-biased viewpoint will see this. However, I think Microsoft may intentionally trying to slowly decrease the Windows gaming platform and focus on PC so people will get a console. That way it is win-win for Microsoft, because there is more of a chance that people will buy an Xbox console and a Windows PC.
    Maybe that’s just me, but it certainly seems like that’s what is happening. Of course PC gaming won’t “totally be phased out”, but I think they are trying to make it so the more hardcore gamers are console gamers since, at the moment, Windows platforms are the only option for that kind of gaming.

  6. Jones56

    Pics or it never happend

  7. Call of duty “warface” <- lol

  8. It will be 1-0 if Linux users will dig into their wallets and show all the morons that we are here and we are going nowhere! I’m not gamer, I’ve never had Steam account in my life but I’m seriously considering buying some shit just out of despite! Valve deserve a big win for that because all Linux users wins with them (just look at the drivers and that’s just tip of the iceberg).

  9. I’ve witnessed GPUs running games faster in OpenGL mode than DirectX and vice versa. (Windows of course) The difference is always the level of graphics, how the game is written (code) and the GPU.
    If you make a game from scratch in OpenGL, it makes sense that it will run efficiently in OpenGL. If you port it to DirectX, it might run the same, or worse. That is unless you actually rewrite the game for DirectX and not just tweak some stuff. DirectX always had, and will have “easier” and “flashier” functions than OpenGL because it’s funded properly. I won’t enumerate  how many graphical differences (and I don’t recall all of them) there are between a game supporting the latest version of OpenGL and a game written for DirectX11.1 . The only thing that’s for sure, is that DX11.1 supports high-end effects that can be easily coded. One might also argue that the implementation of a Graphics Card also makes a big difference. There are GPUs out there that actually perform better or worse in OpenGL than DirectX and the reason is either the drivers, the firmware or both.Now about OpenGL vs DirectX 1-0 ,If you’re talking only about playability then you could argue that OpenGL might be a winner. That is if you stay at a certain level of graphics. And that is because OpenGL has been trying  really hard to optimize basic stuff, and not just use “high-end” effects that can only be run on a high-end pc. That said, playing at a 600fps rate, or at a 60fps means little difference. Why? One (DX) will be rendered as an absolute beauty and the other (OpenGL) will be rendered as a common pc game. But wait- that’s what you wanted right? to play the game. Then OpenGL is certainly a winner. But that doesn’t make it the best.

    “If you wondering how such a little device can play games like Call of Duty Modern Warface 2, ask yourselves how an old and outdated gaming console like PlayStation3 using Linux can still outperform today’s PC. ”

    There are so many wrong things about this statement, I’m not sure where to begin.

    Seriously? You’re comparing computer games with tablets and consoles? Yes, open technologies make a huge difference in these platforms. OpenGL rocks , I support it. But don’t get me wrong. These games were written from scratch UNDER the limitations of the hardware (tablet/phone) and the limitations of the Software (OpenGL) – that’s low count of polyongs, low-res textures, optimized functions that most programmers really hope that are included in the GPU. And that’s what happened with the new chips. Most taxing stuff have been included in the main command set of the GPU. That’s Tegra for you. Tegra has great graphics because most of the effects are hard coded . They are not part of OpenGL or DirectX like in the PC, but part of the hardware. 

    “how an old and outdated gaming console like PlayStation3 using Linux can still outperform today’s PC ”

    Show me how Playstation 3 outperforms a PC.
    Playstation 3 runs most games at 1280×720, with really low quality/resolution textures, and a cool number of polygons. Oh and some times it doesn’t even reach 60fps. Vertical Sync? Hah- Never had, never will. It’s just too slow for that. The difference in quality is what I call “the streaming rate” of data, and the hardcoded effects. People have found ways to optimize their graphics through “tricks” since the hardware allows them to. But they are still limited to some low-res textures due to to PS3’s low graphics RAM. PS3 is nothing more that a flashy graphics beast.

    Oh and who said Playstation 3 is running Linux? Check you sources. It can run Linux, it’s firmware might be unix-based, but it certainly does not run Linux.

    “So, using Linux and an Intel Core i3/5/7 processor you will be able to play descent games, only with the help of your integrated GPU. ”

    Yes. Propably. And most likely with worse graphics. 

    -You could also run these games in OpenGL in Windows. (valve’s estimated 10fps difference than linux)

    -The game itself might not run well in OpenGL either way. An XNA-based game is a good example. It simply won’t get better in OpenGL, its is BORN to be DX. 
    It might run a little better but with worse graphics.

    -It might not be possible due to the cost or time or willingness of the company or the software, to make it work in OpenGL.

    About Windows 8. (I’m a bit tired up to this point, I’ll be short)

    If Microsoft gets hardware companies to include parts of DirectX in their hardware, OpenGL is screwed.

  10. Benjamin Wikstrom

    This will not only be good for Linux, but Mac OS X as well, and if we’re lucky FreeBSD. Nvidia support FreeBSD, so hopefully it wont be hard to get games to FreeBSD, it’s not as big as Linux for end users but for hardcore enthusiasts is a great choice.

  11. Robert Fox

    “If Microsoft gets hardware companies to include parts of DirectX in their hardware, OpenGL is screwed.”
    Considering that the whole point of Direct3D and OpenGL is to access hardware, what exactly do you mean here? Going back to fixed-function implementation or something? What is not implemented?

    I’m also curious about your ease of use argument, which is in fact the opposite of my experience, though I may be biased. Can you give me an example of something you code easily in Direct 3D that is difficult to code in OpenGL.

  12. Fuck D3D; XNA is shit, and so is C#

  13. what about emulators

  1. By OpenGL vs DirectX: 1 – 0 | Unixmen « towerysdev2 on August 6, 2012 at 5:23 pm

    […] Share this:TwitterFacebookLike this:LikeBe the first to like this. […]

Leave a Comment