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.'"
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.
Experiments and other stuff
Corrections/clarifications
1) So does OpenGL
2) True -- Let's talk Direct3D vs OpenGL
3) False -- Name me one language that doesn't have OpenGL bindings
4) The 360 has a DirectX-like API. OpenGL-like interfaces is used on Wii and PS3
5) OpenGL is easy(er?) to pick up
Goodbye Slashdot. You've changed.
All of Rages/IDs software runs on OpenGL... that not quick enough for you?
Experiments and other stuff
DirectX is made for games. You can use it for other kinds of applications, but if you want to do something that you do in a game, there is likely a function or construct specifically for what you need. It's docs assume you are making a game and when there are multiple ways to do something they often point out the faster way. heck it only works with triangulated mesh data.
Open GL is made for EVERYTHING. Sure, you can use it for games. There's nothing wrong with that, but i'm not John Carmack. That shit is hard for me. If i want to make a game, i'll take the platform that holds my hand.
Plus, like others said, direct x is a whole game api. it's not just graphics. it's input, it's networking, it's sound. the whole platform is very cohesive. I'd rather just keep up with one api, one download, etc than have to follow open gl, open al, etc.
anyway modern game development means licensing an engine. engine developers worry about supporting open gl or direct x.
I would also point out that there are open standards for networking, input and sound. They just are not all bundled up under a single name.
OpenGL is a graphics-specific API (like Direct3D). If you want sound, network, etc. support, try SDL or Qt.
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.
First of all, if a language can call C APIs (and, in particular, can deal with C function pointers returned by those APIs), it can call COM APIs as well. DX isn't even "COM", it just uses COM conventions (vtable layout, refcounting etc) - but it's not a set of proper registered COM objects. In particular, this means that you absolutely can write DX applications using gcc (e.g. Mingw, on Windows), and even g++, since its vtable layout is (by design) COM-compatible.
Furthermore, there are plenty of high-level DX wrappers for various other languages: Delphi and Python from your list have them for sure, and there are many more (just google for "directx language").
You are not up to date then. OpenGL 3.2 has it in the standard.
DirectSound doesn't even work on Windows7
Where did you hear that? Because, that's nonsense (or, as you say, complete bogus).
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.
I've dabbled in 3D programming, I haven't done anything amazing, let alone made my own game, but I will say that D3D is much easier to write working code than OpenGL. With OpenGL I got about as far as a spinning triangle on the screen. With D3D I was able to get to the point where I was rendering a model on the screen and manipulating it with pixel and vertex shaders.
Somebody earlier hit the the nail on the head when they said that because it's easier it's what people will start and subsequently stick with. Not only that, but as a business if it takes your programmers 10 months to write a graphics engine in D3D and 12 months to write one in OpenGL, which one are you going to go for? There aren't many instances where I will go to bat for MS, but DirectX has a better graphics API compared to OpenGL.
Oh, a lesson in history from Mr. I'm my own grandpa.
If you really wanna do that, knock yourself out: http://code.google.com/p/bfopengl/ :-)
I'm not sure about 7, but the Vista driver model disabled the hardware acceleration path in DirectSound. If you want hardware accelerated sound then you need to use OpenAL on Vista, not DirectSound. This irritated Creative Labs a lot, but considering the fact that they insist on putting buggy crap in ring 0 on any platform that they provide drivers for, they probably deserved it.
I am TheRaven on Soylent News
From the article, Carmack said:
And:
Sounds to me like he's still favoring OpenGL.
Hasn't Carmack all but reversed his position on DirectX, saying that OpenGL is failing to keep up?
http://linux.slashdot.org/story/09/08/24/0059218/Linux-Port-For-ids-Tech-5-Graphics-Engine-Unlikely?from=rss
Oh yeah.
You're completely delusional right? http://www.opengl.org/sdk/docs/man/
Experiments and other stuff
It doesn't sound like you've developed much in the way of commercial quality graphics-centric software for "middle tier" end-users.
Long story short is that if you ship a 3D software title that's designed and marketed to be run on as many machines as possible, modern OpenGL drivers tend to greatly lag or be unavailable on many Windows machines. Vista and especially Vista 64 really made this worse since maintaining and upgrading GL drivers for middle tier GPU hardware is generally at the bottom of the priority list for 3D driver development. Meanwhile, D3D support tends to be solid, speedy, and well maintained considering especially when you consider what hardware they have to work with.
I'm a senior engineer at a software company that manages a cross-platform codebase that puts OGL and D3D under the same roof (we ship products for OS X and Windows). One of our older products requires OpenGL on Windows due to not wanting to rewrite all its shaders for D3D, and the number of support tickets that we get from that TOWERS our the number of support tickets from our other D3D titles combined. It's downright pathetic how poor OpenGL hardware and driver support is on these middle tier Windows machines.
The last thing the guys and Intel and Nvidia that maintain the drivers for built-in chips that go on the typical Dell machine give a crap about are the state of their OpenGL support. I'm typically surprised to see them have support past 1.3.
G-Force music visualization
Irrefutable, feel welcome to try.
- OpenGL works on Mac, Linux, WindowsXP and Direct3D does not (or only partially as in no DX11 for XP)
- OpenGL compatible APIs are present on the PS3, Wii, iPhone and many other devices, wheras Direct3D works on none of those.
- Cutting edge features can be accessed in OpenGL as they come out, whereas in Direct3D you'll have to wait until M$uck decides to iterate++ DX.
- A wealth of good online and dead tree documentation can be had for OpenGL
- A host of "killer apps" has been done and is continuing to be done with OpenGL (such as Maya, 3ds max, softimage, all iPhone games, Mac Games etc.)
Experiments and other stuff
The standard has evolved significantly since Carmack posted this, and the state of OpenGL is much further along than it was then, as the committee has adopted an accelerated roadmap (to a large extent due to the championing of NVIDIA).
"Politicians and diapers must be changed often, and for the same reason."
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: -
(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?)
What I see in this video is "just" a state of the art game engine renderer. The current generation of games only expoits a subset of the features of current generation hardware. Were it not for the strict realtime requirements that are present in games, which push the available CPU time for rendering in the range of 3 to 6ms for 60FPS (the rest of the time is taken up by other parts of the game), the visuals could be immensely more impressive. And none of that is something that can be done in DirectX exclusively.
Hardware tesselation is demoed in the video you mentioned, but this is only available on highest end ATI hardware at the moment and AMD published extension specifications for that as early as March 2009 (see for example http://www.opengl.org/registry/specs/AMD/vertex_shader_tessellator.txt)! When did Windows 7 hit the market? October?
http://www.moonlight3d.eu/
Timothee Besset of Id says:
"As far as idTech 5 (the Rage engine), it runs on PS3 and Mac already. Setting up idTech 5 to run on those platforms early on in our development cycle was a direct result of carrying Linux/Mac support in idTech 4 beforehand. It is likely i will be involved with idTech 5 in the near future, I'll be damned if we don't find the time to get Linux builds done."
http://ttimo.vox.com/