Sign in to follow this  
craksy

openGL or DirectX ?

Recommended Posts

craksy    122
ok, i have programed in C++ for a while, and i decided to start some game development! so what would you recomend openGL or DirectX? and witch learning path should i use to learn them? i hope you can help me! in advance: Thanks

Share this post


Link to post
Share on other sites
DaveMS    187
You should use openGL. Because I like it :)
Seriously though, people are only going to suggest the one that they prefer using, and i'm pretty sure there have been many debates on the forums over which is best.

Just try them both and see which you prefer working with. I've not used DirectX much, but from what i can gather openGL is slightly easier to get to grips with.

Search for some online tutorials, or you can search amazon for some books on the subject.

Good luck!

Share this post


Link to post
Share on other sites
davidsporn    126
One way to choose : Do you want to be locked in the Microsoft Platform, or do you want to be able to port your programs on other platform some day in the future (Mac OS, Linux, etc...) ?

If you want cross-platform, learning SDL (or any other cross-platform game library) and OpenGL is your choice.

If you don't mind being locked in the Microsoft Platform (after all, there is the XBox) then you can choose DirectX.

I hope this will help you.

Share this post


Link to post
Share on other sites
Evil Steve    2017
Just my 2p:

I personally prefer Direct3D (Note that Direct3D is a part of DirectX, DirectX does things other than just rendering). It's object orientated, unlike OpenGL (Although that does make it a nightmare to use with plain C - but then nobody in their right mind uses C for non-trivial apps these days). I hate the OpenGL extension system, it just seems really really hacked together (Admittedly I haven't used OpenGL much), and I actually think that D3D is easier to get started with than OpenGL.

Again, this is just my oppinion, I'd suggest you try them both out if you have time so you can compare them yourself.

EDIT: And being "locked to the Microsoft platform" isn't really that much of a limitation unless you seriously expect to port your app to another OS. And even if you do that, you could always rewrite the renderer (Since you'd have to rewrite most other systems too).

Share this post


Link to post
Share on other sites
MJP    19754
I think some people tend to overstate the importance of the graphics API. It's just a means of accessing the hardware...it's how you apply the core concepts of 3D graphics to accomplish your goal that's actually important (and these concepts apply to pretty much all platforms). Once you know what you're doing with graphics...the API really isn't that important.

That said I agree with Evil Steve: I like that D3D is object-oriented, and I think the D3DX support library helps make it much friendly for beginners. Plus the SDK itself comes with some great samples and tutorials which are really useful if you're just starting out.

Share this post


Link to post
Share on other sites
davidsporn    126
Quote:
Original post by Evil Steve

EDIT: And being "locked to the Microsoft platform" isn't really that much of a limitation unless you seriously expect to port your app to another OS. (...)


I agree, but I think one should be aware of that, even if one doesn't mind about that.

I had to rewrite all my code when I decided to switch from Windows to Linux on my computer.

So now, at least for game developpement, I care a little bit about portability.

Share this post


Link to post
Share on other sites
Oluseyi    2103
Quote:
Original post by davidsporn
I had to rewrite all my code when I decided to switch from Windows to Linux on my computer.

Were you planning to switch from the beginning, or was it a bit of a surprise? If the former, then it demonstrates a shockingly bad lack of planning.

Insulating the bulk of your code from platform specific issues is not terribly difficult. It's also entirely irrelevant to a beginner. Starting out, pick an abstraction layer, not a platform. Once you're comfortable actually making games, then you can delve into the platform beneath.

Share this post


Link to post
Share on other sites
mrbastard    1577
FLAME ON!

OpenGL is object oriented. It just doesn't use the OO features of C++ because it's a C API. Remind me, it's OK to derive from all D3D's wonderful OO C++ classes right? [smile]

The GL extension mechanism is really pretty simple if you can read and use google. If not, then you may struggle. Many (talented, intelligent) D3D people apparently find linking to a whole 1 (one) extra library too difficult. I have never understood why.

Other than the cross-platform issue, the only major difference for a beginner is that D3D comes with D3DX, which does much of the (potentially dull) workhorse stuff for you. This is great if you want to see results ASAP. OpenGL has nothing similar at present, though there are many free and/or open libs that do similar things between them. That requires more reading and googling but will leave you with a greater amount of knowledge.

Simply put D3D is a one-stop-shop, whereas OpenGL provides the minimum required to interact with the driver, and tries not to get in your way.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this