Why you should do OpenGL and not DirectX
blog.wolfire.com
blog.wolfire.com
First and foremost, it's wrong to compare OpenGL and DirectX, rather than OpenGL and Direct3D. OpenGL directly competes with a small portion of Direct3D, and requires several libraries (I'm a big fan of SDL, OpenAL, etc myself) to begin to touch the breadth of DX.
Second, with OpenGL you have many vendors producing extensions and implementing them at different times. With Direct3D, you have a single set of features you write for which are guaranteed to be there (in a given version). This means that when you write code for OpenGL, you have to special-case paths for many different available extensions and duplicate many pieces of functionality.
If you want to use shaders, you have to either make your own effects system on top of GLSL/ARB shaders or use something like Cg. The Direct3D effects pipeline saves a lot of time, but of course reduces flexibility.
In the end, the call on OGL vs DX really comes down to these things: How much do you care about cross-platform compatibility? How much time do you have to put into your engine? Do you want complete flexibility w.r.t. your rendering pipeline?
If you're an engine-tech-heavy firm, OpenGL will almost always be the right choice. If you're just making a game, DirectX will almost definitely save you time. Again, I'm not a DX fan, but it has its place, and this sort of article is woefully misleading.
If you're interested in OGL development, I strongly suggest NeHe's guides ( http://nehe.gamedev.net/ ). Of course, the Red Book is also indispensable.
…for Microsoft's platforms. This article[1] tend to prove that the extra time you spend with OpenGL can be a worthy investment, even if you are "just making a game". (I know you didn't say otherwise, but you sounded like you thought otherwise.)
[1]: http://blog.wolfire.com/2008/12/why-you-should-support-mac-o...
Going with OpenGL, SDL, OpenAL, etc is certainly not the easy route, even with the huge benefits, and for small dev houses it can easily become overwhelming. If your code needs to be cross platform, then OpenGL (or both, but that again is more expensive) is the only way to go. If cross-platform compatibility would simply be icing on the cake, then you need to weigh the development costs of both approaches.
I have wasted a pretty huge amount of my life writing engine code when I don't much care for engine problems and know someone else will be able to write something that performs better and has a good-enough API.
This article is simply a manifesto calling for developers to use OpenGL. The mindset of the author is firmly locked in the late-1990s, which was the height of the OpenGL vs. DirectX flamewars. I'm amazed that he didn't bring up Fahrenheit. (http://en.wikipedia.org/wiki/Fahrenheit_graphics_API)
The accusations about Direct3D gaining dominance because of FUD or some other nefarious actions are pretty ridiculous. Graphics APIs evolved rapidly during the period between 1998-2005, and there were times when Direct3D had a clear technology lead in certain areas. I've never met a single graphics developer who switched away from OpenGL for any reason other than preferring to work with D3D.
However, the balance has stabilized in recent years, and the author of this article doesn't tell us anything useful about current technology.
For example, porting an OpenGL-based game from Windows to the PS3 would not be significantly easier than porting a D3D-based X-Box game.
In summary, OpenGL is an abstraction of 3D concepts with many vendor-specific extensions to enable performance. Direct3D is an abstraction of the most common implementation of real world 3D hardware. Game developers did, and continue to, unambiguously ask Microsoft to produce the latter.
I understand the graphics pipeline pretty deeply if anyone needs some clarification.
At a high level, the concepts that both APIs provide arent that unsimilar and abstraction is possible even if you are using some of the more esoteric features of each.
That said, one way that portable games could contribute to the general advancement of OpenGL is by being the first platform that new programmers learn. A typical console game requires significant coding experience and artistic assets to compete, while the expectations (and costs) for a portable or web game are much lower, making such a game a more appealing target for a beginning programmer. And perhaps those programmers will continue to use OpenGL when they go on to make desktop games.
Either that or offer a slightly degraded gaming experience according to what the OpenGL system exposes.
Nobody cares that much if their phone can't show the same tessellation glory their kid's dual-GPU oil-cooled deskside monster can.
And OpenGL has had a standard shader language since v2.0, about 6-7 years ago? You don't have to "build it yourself" except in the sense of having to port DX shaders to a slightly different source language.
Of course, on the DirectX side you have the DirectDraw vs Direct2D mess, not to mention that the APIs are very poorly designed (in my opinion, at least). Doing 2D stuff in OpenGL isn't terrible, but it's certainly not well suited to it. In most cases, something like SDL ends up being easier and rarely too much slower (well, unless you're scaling/rotating...).
I've found that for my particular uses, the hardware acceleration you get with GL makes it worth it for 2D, even if it's perhaps not otherwise as well-suited for that as SDL.
Qt also has a GL drawing engine, which turned out to be a good move on Trolltech's part.