Sign in to follow this  
longjohnsliver

To learn DirectX 9 or OpenGL 2.1?

Recommended Posts

Hi, I was trying to decide which one of these libraries I should learn to use (first). I'm quite fluent in C++, and I've had some contact with DirectX 9 previously, but I'd like to start working hard on one these two from scratch, since it's been a few months and I've forgotten almost anything. Which one would you recommend, since I don't know much about each other's pros/cons, and about their ease of use for a beginner like me? Thank you for your help. [Edited by - longjohnsliver on June 6, 2007 5:43:20 PM]

Share this post


Link to post
Share on other sites
I'd say DX9, simply because all the fancy features and benefits of next-gen will be of little immediate benefit to you, whereas DX9 is solidly supported in both software and hardware.

Of course, it depends on your intention. If it's for hobby only, then it doesn't matter. If it's for personal project, then your availability of hardware/software will determine.

If for a job, then you likely don't have a choice in the first place. Learn either all of them, or whatever you hope to find a job in.

Share this post


Link to post
Share on other sites
Thank you for your quick replies.
Let me explain my intentions a little further. I do this only as hobby, so I haven't set any commercial goals.
As for hardware, in the short run (that is, while I learn), I only care about mine, and I have 7900GS.
I run Windows Vista so I could use DirectX 10 I guess. I'd like to learn DirectX 10 over DirectX 9 because if I learn DirectX 10 I can easily downgrade to the previous version, can't I?
Being cross-platform doesn't matter too much because I just want to have fun, and if later others want to play, well, most people still run Windows.
Basically, I consider using OpenGL because COM puzzled me the first time (maybe wrong approach or something) and I hadn't even thought about OpenGL at that time, so I want to think about it this time.

Share this post


Link to post
Share on other sites
Quote:
Original post by longjohnsliver
I run Windows Vista so I could use DirectX 10 I guess. I'd like to learn DirectX 10 over DirectX 9 because if I learn DirectX 10 I can easily downgrade to the previous version, can't I?


Not really. There's lots of API changes (some of them being deprecated), and quite some features which, likely, will never be supported in DX9, or which require different aproach.

Another reason is also support. DX9 tutorials, documents, bugs, troubleshooting, documentation should be trivial to find everywhere. DX10 will take a while to build up - and that can quickly result in getting stuck on nonsensical bugs or unusual issues.

If you're doing this for fun, then the better supported and more accessible option is always less frustrating.

In the end it just comes down to how much time you want to spend, and what you'd like to achieve.

Share this post


Link to post
Share on other sites
In order to run DX10 in hardware you need an 8000 series Nvidia GPU or one of those new ATI cards (2900 or something). As you only have a 7900GS card you'll be limited to developing using the reference rasterizer if you decide to go with DX10. For what you want to do I would recommend sticking with DX9. Either that or go with OpenGL. I personally prefer using DX though.

Share this post


Link to post
Share on other sites
Thank you for your answers again.
OK, I just modified topic to DirectX 9 or OpenGL 2.1 :)
So what about these 2, should I take the former or the latter?
(Sorry, I know this is the kind of question answered by "take whichever you like best", but I can't tell at all)

Share this post


Link to post
Share on other sites
DirectX will handle input and sound as well as doing 3D. OpenGL on the other hand is only a graphics library so you would have to learn other libraries to do input and sound for you.

Now if the question is Direct3D or OpenGL everyone has their own opinion. Each library is structured differently and has its own pros and cons. DirectX is object oriented and only available on Windows. OpenGL is a C library and is multiplatform. However, the 3d concepts that exist way below the API, that is to say the concept of primitives, textures, projections, etc., is the same for both. Once you learn one of them learning the other is just a matter learning a new API.

If I were to recommend one or the other I would have to say learn OpenGL with SDL or something to handle the windowing and other stuff not directly related to 3D. OpenGL has a cleaner syntax to me and the fact that you can take any OpenGL you've learned on Windows and apply it on Linux or Mac is also a big plus.

Share this post


Link to post
Share on other sites
Use DirectX if:

1) you are planning to port to XBOX
2) you want an all in one graphics, sound, input etc solution AND you don't care about linux/osx/etc.

otherwise, use OpenGL

that's my 2c

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this