Slashdot Mirror


Why You Should Use OpenGL and Not DirectX

stickyboot writes "The independent games developer Wolfire describes why they decided to use OpenGL instead of DirectX. The article mainly discusses the marketing strategies behind DirectX and how the API became so popular. It also goes over why a developer would choose OpenGL over DirectX and what this decision means for the gamer. 'Back in 1997, the situation was similar to how it is now. Microsoft was running a massive marketing campaign for Direct3D, and soon everyone "just knew" that it was faster and better than OpenGL. This started to change when Chris Hecker published his open letter denouncing DirectX. Soon after that, John Carmack posted his famous OpenGL rant, and put his money where his mouth was by implementing all of Id Software's games in OpenGL, proving once and for all that DirectX was unnecessary for high-end 3D gaming. This lesson appears to have been forgotten over the last few years. Most game developers have fallen under the spell of DirectX marketing, or into the whirlpool of vicious cycles and network advantages.'"

22 of 515 comments (clear)

  1. OpenGL and the rant about marketing by sopssa · · Score: 5, Insightful

    I am still kind of surprised that even after so many years, the open source communitys answer to marketing is only ranting about it.

    Providing libraries, API's or platforms is NOT only about technical platform. *Nothing* in the world works like that. You must "market" it to companies, create a community around it with the right people and actually provide support and good tools to the developers. You can rant all you want about the technical sides of things, but if you do not understand this and completely ignore it you're only hurting yourself.

    I have worked with both DirectX and OpenGL. In my opinion, OpenGL is loosing because:
    1) DirectX has a comprehensive, well-documented references and documentation
    2) DirectX provides a lot more than just 3D drawing - sounds, networking, fonts, input processing, and it used to have an API for 2D graphics before (relevant because the story is about why DirectX gained marketshare)
    3) The DirectX libraries had more support in whatever coding language you wanted to use. You can argue this with the point that of course they had because Microsoft is a company so they can do it, but that doesn't change it. In fact, it would show that propretiery formats and libraries are better than open
    4) Later it was possible to easily develop XBOX 360 games with DirectX and the tools were made good and easy to pick up. You may say it's irrelevant, that MS is using another market to improve their position, but it is not irrelevant. And unless OpenGL supporters start to work at it too, they're going to lose. Give more support and more value for the work!
    5) DirectX was easy to pick up, and everyone supported it. If it's easy to pick up for beginners, they'll learn it and continue using it later as a professional (the same thing as why Adobe doesn't really care about home users Photoshop piracy)

    It is NOT only about providing the technical platform. It is also about providing all the things that company it - some may call that "marketing", but it's mostly about giving support to those who use the platform, and giving more value for their time, work and money.

    1. Re:OpenGL and the rant about marketing by Blakey+Rat · · Score: 5, Insightful

      Without DirectX propping up the monopoly we'd have other technologies and far more companies that would provide innovative competition, thus providing more, and often better, products.

      Then instead of ranting about DirectX, why don't you put your money where your mouth is and make a competitor for DirectX?

      I'm sick of open source buck-passing. Sure, it's terrible that Microsoft has such a commanding monopoly in so many areas, but on the other hand, why are you complaining about it instead of actually working to make it go away?

      For every one of those bulletpoints the parent mentioned, there's nothing, nothing stopping you from providing a similar level of support for OpenGL.

      DirectX has networking/input/graphics drivers? Then write those and attach them to OpenGL. DirectX has better documentation/examples? Then create them for your OpenGL solution! DirectX can be ported to Xbox? Fine; then get off your bony butt and go talk to Sony and Nintendo about enabling trivial porting of OpenGL apps.

      Sorry, I just get sick of the whining by anti-Microsoft goons who don't have the cojones to actually compete with Microsoft-- stop passing the buck and do it already.

    2. Re:OpenGL and the rant about marketing by pyalot · · Score: 5, Informative

      1) completely bogus: OpenGL has an both a good documentation and extremely good literature
      2) completely bogus: These days M$ is advocating *not* using anything Like DirectInput, etc. In fact, DirectSound doesn't even work on Windows7
      3) completely bogus: If you're not doing C#/C++ on Visual Studio using Com+, you're not getting DirectX. OpenGL can be coded in anything, Delphi, Python, C (gcc), C++, perl, Ruby, etc.
      4) The only thing you got right, remotely
      5) completely bogus: Before version 9 or 10, DirectX was the most hard and retarded thing to pick up, then it slowly, very slowly, got better.

    3. Re:OpenGL and the rant about marketing by pyalot · · Score: 5, Informative

      All of Rages/IDs software runs on OpenGL... that not quick enough for you?

    4. Re:OpenGL and the rant about marketing by SanityInAnarchy · · Score: 5, Insightful

      make a competitor for DirectX?

      DirectX is a combination of several not-entirely-related technologies. The graphics component is Direct3D, and the stupidly obvious competitor is OpenGL.

      why are you complaining about it instead of actually working to make it go away?

      Because OpenGL is already better, as TFA explains. The problem is purely a marketing one, and requires a marketing response. The marketing response sounds like "complaining", but is actually encouraging people to think and explore their options.

      DirectX has networking/input/graphics drivers? Then write those and attach them to OpenGL.

      The result is called SDL. Again, these have already been done, they just aren't part of one giant marketing package, largely because they don't necessarily have anything to do with each other. For example, OpenGL powers my compositing window manager at the moment, but it really doesn't need to make any sound.

      DirectX has better documentation/examples? Then create them for your OpenGL solution!

      Fair enough.

      DirectX can be ported to Xbox? Fine; then get off your bony butt and go talk to Sony and Nintendo about enabling trivial porting of OpenGL apps.

      What makes you think the author of TFA hasn't done so? Indeed, what makes you think they would listen to the GP at all?

      But FYI, PS3 and Wii both include a form of OpenGL, though there are differences.

      Sorry, I just get sick of the whining by anti-Microsoft goons who don't have the cojones to actually compete with Microsoft-- stop passing the buck and do it already.

      I understand what you're saying, but if it was that easy, we'd have done it already.

      Whining is not mutually exclusive with doing something about it.

      --
      Don't thank God, thank a doctor!
    5. Re:OpenGL and the rant about marketing by timmarhy · · Score: 5, Insightful
      instead of whining about MS's success, why don't you all go out and beat directX at it's own game - an easy to use 3d gaming API. openGL is NOT as easy and thus more expensive to write games in.

      if all these people wrote code instead of rants you'd be a little closer by now.

      --
      If you mod me down, I will become more powerful than you can imagine....
    6. Re:OpenGL and the rant about marketing by Synchis · · Score: 5, Insightful

      The interesting part of your whole argument is that you completely ignore the fact that both Wolfire and ID Software do more than just rant about it.

      They develop games that support OpenGL. What they want, is *other* big developers to stop supporting the inferior libraries and open their eyes.

      Plan and simple: There is nothing bad about Open standards.

      - If they are broken, you can fix them.
      - if they lack features, you can add them.
      - If the performance is poor, you can improve it.

      Can you say this about Direct3D? The only entity that can fix, add to, or improve Direct3D is Microsoft. Period.

      - If its broken, you have to wait for a patch.
      - If it lacks features, you have to wait for the next version, and pray that it supports your operating system.
      - If the performance sucks, you have to deal with it.

      Whats good about that? And thats talking a strictly Windows audience.

      From a cross platform point of view, there really is just one choice. And its not Direct3D.

      --
      Thomas A. Knight
      Author of The Time Weaver
    7. Re:OpenGL and the rant about marketing by moderatorrater · · Score: 5, Insightful

      1) completely bogus: OpenGL has an both a good documentation and extremely good literature

      It's nice that you think so, but I've seen the documentation for both, and I much prefer the directx documentation. You are, in fact, helping to prove the GP's point: when Microsoft hears from a developer that their documentation sucks, they'll work on it and improve it. When open source people hear that something sucks, they insult the user and stick their heads back in their asses.

    8. Re:OpenGL and the rant about marketing by mcvos · · Score: 5, Insightful

      I am surprised that someone would want to use something as old as opengl. I bet those people still read their mail with elm, pine and mail.

      You have no idea. My computer still uses TCP/IP!

    9. Re:OpenGL and the rant about marketing by n8_f · · Score: 5, Insightful

      Sure, you could have an "open standard," but someone is controlling that, too.

      No, that is why it is an open standard. Once it is out there, anyone can implement it and conform to the standard. Maybe someone maintains it and maybe someone is working on the next version, but no one controls it. To illustrate the difference, what platforms does DirectX run on? Microsoft Windows, Microsoft Xbox, and Microsoft Windows Mobile. Notice the pattern? And what platforms does OpenGL run on? All of those plus dozens or even hundreds more. If you want to port your app to the iPhone or the Palm Pre or an Android phone, who is going to have to do more work, the person with the app programmed in DirectX or the person with the app programmed in OpenGL? That is the advantage of an open standard.

  2. Former OpenGL developer by WilyCoder · · Score: 5, Insightful

    As a former OpenGL developer, I am not too fond of GL anymore.

    Khronos really disappointed a lot of people when they announced the GL3 specs. They had promised SO much and delivered SO little. Khronos claimed that it didn't want to piss of the CAD community, which is heavily GL based. They basically chose to please the CAD community instead of the gaming community.

    That move totally killed GL for me.

    1. Re:Former OpenGL developer by WilyCoder · · Score: 5, Interesting

      I know its taboo to respond to oneself, but I forgot to mention the recent release of the GL books (red and orange) adequately display the state that GL is in. They STILL do not have geometry shaders in the standard, and its freaking 2010! Yes, you can use those shaders via extensions, but anyone who recommends that path has not been personally burned by vendors supporting extensions to different levels. Writing code that uses extensions that only work on Nvidia and not ATi (or vice versa) is NOT what GL is about!
       

    2. Re:Former OpenGL developer by Anonymous Coward · · Score: 5, Informative

      You are not up to date then. OpenGL 3.2 has it in the standard.

  3. John Carmack ditched OpenGL by Anonymous Coward · · Score: 5, Insightful

    In an article a couple years back during the Doom 3 release he(John Carmack) said in later articles that they would be moving away from the OpenGL platform and considering he was one of the biggest backers of it. He even said in the article that they liked DirectX and the new features they have added, also that it was a lot better to work with these days and supported more. I can only imagine after the last fiasco update that OpenGL put out and all the missing features they promised, it looks pretty dismal for that development team as they cannot deliver what they promise.

    Really the last place OpenGL stands strong is in AutoCAD and even they have indicated that the platform will not last longer, so we may see AutoCAD be using DirectX in the next few 5-10 years.

    1. Re:John Carmack ditched OpenGL by shutdown+-p+now · · Score: 5, Insightful

      I have posted this citation by Carmack in a comment on recent article on DX11, but it seems to be very much relevant here as well, so I'll re-post it - especially as TFS mentions Carmack's opinion circa 1997 (which favorably matches with the point of the article), but conveniently omits the more recent comment. Here it is:

      "DX9 is really quite a good API level. Even with the D3D side of things, where I know I have a long history of people thinking I'm antagonistic against it. Microsoft has done a very, very good job of sensibly evolving it at each step—they're not worried about breaking backwards compatibility—and it's a pretty clean API. I especially like the work I'm doing on the 360, and it's probably the best graphics API as far as a sensibly designed thing that I've worked with."

    2. Re:John Carmack ditched OpenGL by Xest · · Score: 5, Interesting

      This is really it, the summary almost sounds like a complete troll.

      OpenGL didn't lose out because of Microsoft's marketing, it lost out because whilst OpenGL stagnated, DirectX grew and grew to become a completely unified games development framework. Carmack may have had a point 12 years ago, but whilst OpenGL development completely ignored criticisms, Microsoft took criticism from the likes of Carmack on board and improved performance of their API whilst adding new features, providing great documentation and tidying up the interface.

      Citing an argument from over a decade ago is desperate to say the least.

      OpenGL needed to become something more, it needed to become part of a unified game development library in itself- we had part of that with OpenAL but it needed everything, we simply need an Open Multimedia/Gaming framework that can do everything that DirectX can do.

      The fact is, game development requires more code and more content than ever before, developers can simply no longer justify spending time on filling in the gaps when other libraries like DirectX already have those gaps filled.

      I would love nothing more than a resurgence of a set of open libraries covering the various facets of game development like DirectX does because it'd mean near zero effort porting to Mac and Linux, but right now the extra effort required to use OpenGL and OpenAL and then fill in the other gaps yourself coupled with the additional support requirements just doesn't justify the relatively minimal extra userbase for many developers.

    3. Re:John Carmack ditched OpenGL by GooberToo · · Score: 5, Informative

      Really the last place OpenGL stands strong is in AutoCAD and even they have indicated that the platform will not last longer, so we may see AutoCAD be using DirectX in the next few 5-10 years.

      I find that hard to believe. Right now there is a new renaissance in game development and game platforms. Mobile platforms are just now grabbing noteworthy market share and it looks like its only continuing to grow as more mobile devices increase in capability - especially 3d capabilities. Thus far that segment has clearly spoken. Thus far this segment is OpenGL and/or OpenGL ES. And that's entirely his point. You want to chase an emerging market plus cover all other platforms, you have exactly one option - OpenGL.

      If you develop via OpenGL you can address XP+Vista, Mac, Linux, iPhone, and Android, plus all the major consoles. Its one stop shopping. With DX and comparable graphics with OpenGL, you can only target Vista. If you want Vista + XP + Consoles, you're looking at DX9 which is a subpar graphics experience compared to that which is provided by OpenGL. Simply put, OpenGL provides you more platforms more easily.

      We most certainly have not reached any critical point which can not be reversed. As the author clearly points out, OpenGL vs MS is much the same today as it was in the past. At this point, its strictly about mind share and that needs to change.

      Much is said that OpenGL is less than DX, and that's true. But people seem in a hurry to ignore the fact that there is a standardize solution which is OpenGL/OpenAL/OpenSL/SDL. When game developers talk about OpenGL as a solution, they really mean all four. OpenGL has a complete solution which addresses both CAD and gamers alike. The only questions is, are companies smart enough to realize this - far too often, its seems not because of the MS marketing. And as I've said many times before here, MS is not so much a technology company as they are a marketing company. Generally speaking their technology is second rate, but their marketing and business prowess is world renowned. All too often people confuse the facts.

      Ultimately, the problem is that the PHB making the technology decision is simply unaware of the poor MS-centric decision they are making, which is then costing them additional dollars to later turn around and target the platforms they specifically excluded themselves from by picking DX in the first place. OpenGL needs to be championed by someone that understands how to speak PHB so that OpenGL can be fairly evaluated. Right now the only contender who is whispering into the PHB's ear is MS, and as a result, everyone is losing.

  4. Re:I'm sorry but I don't really care by Hatta · · Score: 5, Insightful

    I exclusively use Windows for PC gaming. I could give two flying F's whether my game is developed in OGL or DX.

    If more games were developed in OGL, they would be easier to port to other operating systems (or run under Wine)so you wouldn't need to use Windows anymore. That would save you a hundred bucks or so on a Windows license, or at the very least the need to reboot to play a game. That's got to be worth at least one flying F.

    --
    Give me Classic Slashdot or give me death!
  5. Reality Check From A Real Game/Graphics Developer by Anonymous Coward · · Score: 5, Insightful

    I don't know whether to laugh or cry at people like you.

    Let's just sum up the platforms our company supports:

    PS3
    Wii
    Linux
    Mac
    Windows
    Android
    iPhone
    Various embedded custom ARM based hardware

    Guess which API is the one we use for all of those platforms - except the two consoles?

    OpenGL

    Guess which API will be used for the next media hardware platform no one has heard about yet?

    OpenGL

    So, yeah, go right ahead and keep babbling about how somehow OpenGL needs to 'prove' itself. DirectX is a dead end API to anyone except the fading Windows gaming market and teenage Windows only coders.

  6. Re:One language by drei0003019 · · Score: 5, Informative

    If you really wanna do that, knock yourself out: http://code.google.com/p/bfopengl/ :-)

  7. Re:Direct X and the Xbox by metamatic · · Score: 5, Funny

    I'm not sure if you've noticed, but both windows and the Xbox/360 use DirectX, which represents something like 50-90% of the "gaming market".

    Could you make those error bars a bit bigger? You almost said something.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
  8. Moving and all by Estragib · · Score: 5, Informative

    Now if someone came and blew Powerpoint away, sold the software for less-- you bet your ass Microsoft would start moving again.

    The question is what move that would be. To judge by the past, they would, in order of feasibility: -

    1. rely on ubiquity of the .ppt format,
    2. spread FUD about security issues and TCO,
    3. pay bloggers, consultants and analysts to badmouth it,
    4. announce the next version of PPT, complete with mock-up screenshots, scaring off investors, then never release it,
    5. suffocate it with patent litigation,
    6. buy them out and
      1. kill it off,
      2. assimilate it (but not invest into further development, because, hey, no competition again),
    7. change office to be incompatible,
    8. change IE to be incompatible,
    9. change windows to be incompatible.

    (Not comprehensive.)

    All of this has happened before, and all of it will happen again.
    (aka: Are you absolutely positive you are not new here?)