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.'"
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!
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.
5) OpenGL is easy(er?) to pick up
It used to be, with the fixed-function pipeline. Unfortunately all of the easy bits were deprecated with 3.0 and removed with 3.1 (fortunately people like nVidia then re-introduced them all as extensions). OpenGL 3.1 is incredibly powerful, but I wouldn't describe it as easy.
I am TheRaven on Soylent News
Please RTFA. Also, Chris Hecker's article, linked from TFA. Then give us specific, technical reasons that DX/D3D is somehow better for games than OpenGL. Your post is filled with assertions, but with nothing to back them up. It's pretty sad that got moderated "informative".
Again, RTFA. Give specific, technical reasons that OpenGL is "harder" than D3D. If you'd bothered to read Carmack's position, his favoring of GL was because GL is easier. Your inability to deal with OpenGL putting your claims in doubt aside, you could at least be specific about the reasons. As per Chris Hecker's article, the only one making these claims are Microsoft evangelists. You wouldn't happen to work for Microsoft would you?
This is a bit disingenuous. All of the articles involved are addressing the 3D aspect of DX. The rest of the stuff is either trivial (use SDL or similar which is about the simplest API you could imagine, has a billion support libs, and runs on everything), or you'd be doing it by hand anyway (implement your own networking stack for performance, a la EVE). Your point is therefore irrelevant.
You seem to be a lazy-enough or low-end-enough developer that this article does not apply to you. However, it does matter to developers who make engines (either primarily or otherwise). Perhaps you should move along; these are not the articles you are looking for.
Don't think of it as a flame---it's more like an argument that does 3d6 fire damage
Not bogus at. I am working on a project at this very moment that started in DirectX. Sat on the shelf for a number of years, and when I decided to start it up again, made the switch to openGL. I wished I had not.
1) openGL documentation sucks at best. Examples are all of the same beginner draw a triangle type.
2) Not only does directX provide more than just graphics, even within the graphics space it provides a lot more grunt code I have to do myself in openGL.
3) I use managed languages. I am not developing a game, I am developing business software (CAD/CAM related). Both openGL and DirectX currently suck in this respect. At least directX has XNA for games. OpenGL has no native (managed) Windows forms or WPF implementations. If I was developing a game, XNA is the easy choice. But since I am developing a business app, I live with stale dead third party libraries (TAO in this case).
4) Very relevant - for whatever reason, mind share is currently on DirectX - and from a community support perspective that is huge.
5) I was able to be productive in directX 8 (where I started) enormously faster than openGL. Even now, I end up converting directX code to openGL most of the time, as opposed to finding openGL code that shows what I am trying to accomplish.
Like I said, I wished I would have stayed with DirectX. If and when this project gets completed I will never use openGL again unless they provide better managed language support , better documentation and better built in functionality. I get tired of passing in integer values to set parameters. When I want to set a light color I want to call SetLightColor(Color), not setSomeParamater(12, 15); It makes for unreadable and unmaintainable code. I know, there are those who still think C is great, and they write some of the ugliest code on the planet, let them collect in the a little tiny small group for all I care.
slashdot troll = you make a compelling argument I do not like the implications of.
SDL has a number of problems and we've dropped it from our projects. It is definitely not performance oriented; for example, calls to WaitForSingleObject in the Windows port even when it can be determined that no blocking is necessary, and thus wasting 4000 cycles on a kernel call instead of 200 on an interlocked instruction. That's just one random example that came up when we were troubleshooting performance. Note that I'm not at all ranting against using other libraries, and I'm generally sour to DirectX. It's just that SDL is a mediocre example for anything other than input handling. For threading, pthreads works great for both Linux and Windows (the Windows port is much better optimized than SDL threads), or even better yet from a software engineering perspective, boost threads can be used. In a high performance optimized to a given engine architecture, a custom thread library with custom task scheduling etc. is the real choice, and would written at a lower level than these libraries, with OS primitives and interlocked instructions. With networking, there is a huge amount of libraries out there that are optimized for various tasks better than SDL Net, and for sound OpenAL is the obvious choice (using libavcodec/ffmpeg for decoding).
"Politicians and diapers must be changed often, and for the same reason."