Saturday, January 09, 2010

OpenGL vs DirectX

A very apt article/blog and must read for all those working on graphics (Simulators? Domain awareness? Game Development?)

http://blog.wolfire.com/2010/01/Why-you-should-use-OpenGL-and-not-DirectX

OpenGL Graphics Libraries are Open Standards, first developed by 'Silicon Graphics' and currently supported on all platforms has for long has been living in the shadows of Microsoft's DirectX. Time to get to know the truth other than DirectX marketing over dose!!

One of the comments in the article drives home the point, which I am reproducing just to hightlight lest you may miss it.

To an observation that DirectX is easier for development view ease of use with Microsoft's Development tools and integration, Frozencow replies:
Yes, I first also thought that was really cool.I started with C#+ ManagedDirectX (MDX). MDX is a sort of wrapper for DirectX that exposes the functionality to .NET. But after using it some time, it felt like it was always coming second. A small subset of features were available in MDX and newer features took Microsoft WAY too long to be implemented into MDX.
NA does more 'abstraction' over the graphics API. It makes it much easier to start with your game and it a very clean and polished library (compared to MDX). But, like MDX, it made a small subset of the features of DirectX available to the programmer. Next to that, it requires people to install another framework next to your game. My little application/game was smaller in size than the framework itself! Especially that last part is in my opinion not cool.
I can see why. DirectX is quite complex. This makes it hard for people (Microsoft) to create a wrapper for it. That's where OpenGL has an advantage. It's much more simple than DirectX. Wrappers like Tao Framework and OpenTK expose most functions of OpenGL to .NET. Also, IF functions are missing, you can easily extend the wrapper with the needed functions, since the wrappers are opensource and OpenGL has a simple structure.

Next to that, your .NET game/application will work on more platforms, since you can run it on Linux through Mono. This is why I'm nowadays using OpenGL instead of DirectX. It's just a bit more freedom (nice catchphrase eh?) for me.

No comments:

Post a Comment