why

Started by
7 comments, last by nefthy 17 years, 12 months ago
I've never used openGL willingly, but I have had to use it for some classes. The only reasons I see to use openGL are: 1) easy learning curve, easier to use than DirectX 2) hating Microsoft Can someone give me some reasons why they use openGL over DirectX?
-------Harmotion - Free 1v1 top-down shooter!Double Jump StudiosBlog
Advertisement
Linux/Mac
It all comes down to personal preference, but I think the main differences are the interface (OOP versus state machine) and portability issues.
OpenGL is much more portable. Also, it has extensions. Not sure if DirectX has an equivalent to that, though.
When it gets right down to it anymore most game developers shouldn't care anymore, as the two API's have become more-or-less functionally equivalant. I happen to use OpenGL for my primary development solely because it is cross platform, and I am designing a cross platform engine. The engine is designed in such a way, however, that a DX backend could easily be swapped in without anyone being the wiser, so it's really not a big deal.
// The user formerly known as Tojiro67445, formerly known as Toji [smile]
The main reason is portability. It's a graphics library that works on other operating systems besides Windows.
The main reason to learn OpenGL is for consoles. Unfortunately this is usually wrapped inside middleware, so even this can be pointless. Just remember which way your middleware uses matrix and vector multiplication notation and you'll be fine. You'll be dealing with a scenegraph for the rest of the middleware.

The only other reason is if you're a *nix user. If you're programming for Windows, don't bother with cross platform coding since I doubt *nix people would buy games for *nix anyway. People who use *nix either use it because they want a throw-together simple server, or because they hate Microsoft, or because they don't want to pay for anything they don't have to. Those platforms aren't really game developers' target audience for these reasons.


Bottom line it'll come down to whether you're making a Windows/console game, a hobby/marketed game. If it's a hobby project, learn both. If it's a marketed game, use DirectX for Windows and OpenGL for everything else.
@Nypyren - I know several Linux users who are avid gamers and would love to see more games for Linux. I think that you're making an extreme over statement. And besides, there's Macs, too. They are based on Unix and can use OpenGL.
@nyphen: I also think your view is very narrow. There are quite a few reasons, besides low cost, for using linux or BSD. They are not a cheap windows replacement, they follow a totaly different design. You will work very differently on a Unix-like system than you will on Windows. I prefere to work on Linux :)

Free, as in beer, software is a nice thing but it is not the most significant IMHO. There are even people paying for software they could get for free...

Crossplatform game development isn't that hard anyway. With libs like SDL you get the crossalplatform part almost without additional work. So why not have a few happy custoumers more?

This topic is closed to new replies.

Advertisement