The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

DirectX, OpenGL, or Other?

I was wondering which of these is best (opinions are welcome, I would like reasons for your opinions though).  I would like to make some games, scientific applications, screen savers, ect.  I would like to know what the differences and strengths and weaknesses of these are.  Thanks in advance.
Steven Gary Noyce Send private email
Thursday, August 17, 2006
The most obvious reason to select OpenGL is wide cross platform hardware and software support. If you use DirectX, you are limiting yourself to Windows. The only reason I would choose DirectX is if there was a specific library I wanted to use that required DirectX.
Michael Send private email
Friday, August 18, 2006 points to potential problems with OpenGL: "very dependent on video card's drivers".

Is DirectX similarly problematic?
Christopher Wells Send private email
Friday, August 18, 2006
Christopher Wells Send private email
Friday, August 18, 2006
DirectX's version until v7 had been horrible. 7, 8 and 9 are ok, but if you start now, only 9 and (the not yet released) 10 are relevant.

OpenGL is available on just about every platform, and with several implementations (see, e.g., Mesa or Fabrice Bellard's TinyGL which offers a significant subset of OpenGL, which are both open source software implementations).

As for performance and functionality, they are more or less on par with each other.

From a programmer's perspective, OpenGL is kind of stateful, and DirectX is mostly object oriented. Personally, I prefer OpenGL's model as I find I write code that's clearer and more concise with it, but that's largely a personal preference.
Ori Berger
Friday, August 18, 2006
ClanLib for 2D/3D or Ogre3D for bigger projects in 3D:

I think ClanLib is the easyest way to go. You can combine it for 3D applications with OpenGL and it handles all the other things: input, audio, GUI, networking, resource management. It comes with a lot of example applications and it is C++ in a clean OOP style. You can find it at
Another good choice is Ogre3d, the object-oriented graphics rendering engine. It is the best 3D graphics engine in the open source area:
Ogre can render with both APIs: DirectX or OpenGL. It is a huge engine with all the power for virtual worlds, animation and realtime apps.
Tim Ohm Send private email
Friday, August 18, 2006
Developers new to 3D usually find OpenGL much easier to use.  There are lots of beginner's online tutorials (search for nehe) and the Blue and Orange OpenGL books are good reference books.  As previously stated it is cross platform and has been the preferred API for many scientic apps and 3D modelling aps. OpenGL is pretty static in comparison to the DirectX API which changes every 2 months sometimes with breaking changes to existing code.
However, if you want to develop in .net then I would recommend Managed DirectX (MDX 1.1).  There's a good book by Tom Miller, however again the API does experience breaking changes. MDX will be replaced by XNA later this year with the launch of the free Microsoft XNA Studio Express.
Furie Send private email
Friday, August 18, 2006
"Is DirectX similarly problematic?"

Yes, unfortunately. OpenGL and DirectX are dependent on the cards underlying software. There is an annoying tendency for manufacturers to fib about what their card can do in the software interfaces.

Neither DX or OGL really insulates you properly from this -- software failbacks for operations are never a particularly good thing even when they're there; it just means you'll get /some/ result.

Often actually what you'd like is the card to just say "No, look, I don't do stencil buffers in hardware" and rather than find out after shipping that 10% of customers get 2 frames-a-second because the card fibs about whats implemented in software and what in hardware.

This is part of the reason behind the requirements for games listing specific sorts of DirectX N compatible cards. Because when a card says it does DirectX 9, say, all that means is "none of the calls actually hardware reset the machine".

It doesn't mean it'll render anything sensible... games devs end up having to test the software on each card they expect their users to have in case some option somewhere causes unexpected results.
Katie Lucas
Friday, August 18, 2006
Have you considered engines such as Irrlicht that can use either DirectX or OpenGL,
John W Send private email
Friday, August 18, 2006
DirectX supports more than just graphics... eg. sound and multimedia. I believe OpenGl doesn't. I could be wrong.
Greg Send private email
Friday, August 18, 2006
Thanks guys, that helped a lot.
In your opinion, which are there more tutorials and learning resources for?
Also, does OpenGL support sound and input?  If not, then what could I use to get them?
In your opinion, how important is cross-platform portability in the making of software (I realize that this depends on the type of program, but I am looking for a general answer)?
Steven Gary Noyce Send private email
Friday, August 18, 2006
OpenGL only does graphics and there are other projects, OpenAL and OpenNL for sound and network support. has some DirectX articles. is a good site about Managed DirectX and engines based on it.
SteveM Send private email
Friday, August 18, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz