D3D or OpenGL...How about BOTH?

Ok, i’m not trying to start another all out war here. But i was reading a thread in the advanced forum and everyone was just blasting away at how one API was better than the other.

First of all, in my opinion i don’t think that either is really BETTER than the other. I mean someone may like one over the other because of many reasons (coding style, like or dislike Microsoft)

So many of the reasons there are just bogus in a way. I mean cross platform. Ok…fine…OpenGl is cross platform, but most graphics applications run only on windows anyway! D3D sucks because it isn’t elegant like OpenGL right? Well no…i mean some people define elegant as a bunch of procedural calls and others as functionality being wrapped into classes.

Basically i’m saying why bicker about which is better? They both have their advantages and disadvantages so why not learn both and use the right one when the situation arises. For example if you need to render to a texture, use d3d…it’s a lot simpler using renderTarget(…) in D3D than it is drawing to a texture in OGL.

By learning both you also jump over the ‘language’ barrier and learn the real concepts behind graphics.

What do you guys think? Is it so unreasonable to learn both (maybe one better than the other)?

  • Halcyon

A good advise is at least to try both out and see how they are, the exception is of course if you want to be platform indepedent, in that case OpenGL is the only choice.

DirectX also has DirectInput, DirectSound and so on, this is useful for games… (as long as you stick to Win32).

DirectX has the disadvantage that Microsoft controls it, this means then you have to expect the API to suddenly change a little bit here and there, it’s not the most stable API in the world…


Thanks for the support mikael. I agree with you when you say that the disadvantage of DirectX is that only one company controls it and they have power to change whatever they want.

I prefer OpenGL just because of the aforementioned cross platform ability. I haven’t even considered D3D because of this limitation. I am interested in programming games for PCs, UN*Xes, Macs, etc. If a person were to write a game using DirectAnything, they are limiting their sales to Microsoft systems, which (sorry to say) shift their APIs from one system to another, so if you write your game for Win98, XP ppl will have problems with it.

My other concern with D3D is that it is largely software based. If you write an app for D3D, you are running your calls thru software, which routes the calls to the appropriate hardware. If you write using OpenGL, it goes directly to the hardware (as far as I know) unless the hardware doesn’t exist, in which it goes to a software driver.

So, because of the software dependance of D3D, I would say OpenGL wins it’s second point, the first being the platform independance.

Im gonna shoot down D3D’s point here… If you are so inclined to do so, you may use GLUT (eww!) or any one of the other system front end APIs for OpenGL to get joystick, keyboard and mouse input. You can also use some other freely available libs to handle sound, I know EAXlib is cross platform, as well as SDL.

Hi !

Yes, that’s true, there are plentry of alternativies to Directxyz, even though for exampåle DirectSound if highly omptimized for the Win32 platform, this is not possible (or at least not that easy) with platform independent software, but you are of course right so it’s not that big advantage after all.