Sign in to follow this  
MrPickle

Confused, DirectX 9 or 10?

Recommended Posts

MrPickle    118
I wanted to start learning DirectX but I am confused, I'm not sure where I should be learning v9 or v10. At first I thought I should learn v10 but then I read that it only works with vista. I'm on vista so that wouldn't be a problem, but I'd still want whatever I make to be able to run on XP or earlier. But still, wouldn't video cards get new drivers to support v10 so it works on XP and earlier? So what should I be learning, DirectX 9 or 10?

Share this post


Link to post
Share on other sites
zach297    154
Quote:
But still, wouldn't video cards get new drivers to support v10 so it works on XP and earlier?

No. It has to do with the drivers that run on Vista being different from the drivers that run on XP.
Quote:
So what should I be learning, DirectX 9 or 10?

I would start with DirectX 9. DirectX 10 has some very worthwhile improvements over DirectX 9 but they are new and therefore less likely to have good tutorials. DirectX 9 has been around for a while and has had a chance to get good tutorials. When you feel you have a good grasp on DirectX 9 go ahead to DirectX 10. That way you will only have to focus on learning the new advanced features and slightly changed API. Although, that situation is rapidly changing with new tutorials being released often and the excellent ones provided by Microsoft.
The argument could also be made that you shouldn't start with DirectX at all, but I know nothing about what game programming experience you have to give you help on that.
The important thing to remember though is that many of the things you learn in DirectX 9 can readily be applied to DirectX 10, OpenGL, or whatever 3D graphics API you use. They all work very similarly. DirectX is just an API. The things you should be learning are the "why" behind the things you do. APIs change and new ones are always coming out but the "why" is forever.
Hope that helps,
zach297

Share this post


Link to post
Share on other sites
Krohm    5031
It's not so easy.
Thanks to the redesigned API D3D10 is, at least to me, consistently easier to learn. It took me a few weeks to read and understand the whole D3D9 SDK and some examples.
It took about 3 days for D3D10.

For hobby programming, I don't see any reason to not jump start from D3D10, it'll just be a more enjoyable experience. By the time you start distributing something, D3D10 will be commonplace.

Share this post


Link to post
Share on other sites
EmptyVoid    102
DirectX10 has allot of really nice features which will improve your productivity and it is easier to learn but there is a lack of reference material on the web.

Share this post


Link to post
Share on other sites
zach297    154
Quote:
Original post by Krohm
It's not so easy.
Thanks to the redesigned API D3D10 is, at least to me, consistently easier to learn. It took me a few weeks to read and understand the whole D3D9 SDK and some examples.
It took about 3 days for D3D10.

For hobby programming, I don't see any reason to not jump start from D3D10, it'll just be a more enjoyable experience. By the time you start distributing something, D3D10 will be commonplace.


Was it easier to learn D3D10 because you had already learned many of the concepts from D3D9 or did you learn D3D10 first? The point I was trying to make was that you could learn basic concepts easier in D3D9 than you could D3D10 purely because there is more documentation available.

Share this post


Link to post
Share on other sites
mdias    823
I would go with D3D9. It's compatible with XP and you can leave learning about shaders for just a little bit later.

Share this post


Link to post
Share on other sites
You are not alone in being confused; in fact I think everyone is.

XP is still outselling Vista...Vista may never actually take over the market..although I'm sure DX 10 or 11 will eventually become standard, not for a year or more...I think I'd go with DirectX 9. I have a dx10 card but i dont want to bother getting vista so I stick with dX9.

However, learning either one ought to allow you easily learn the other. The important thing is the basic methods of the API, not certain specifics..I think once you are experienced you will understand what is different and what needs to be changed to support the other version.

Share this post


Link to post
Share on other sites
Krohm    5031
No, this is a common misconception.
Sure, you can have a wrapper which creates the D3D10 object instead of the D3D9 one, wrap everything in exactly the same way AND pretend you're D3D10 but no, you won't.

Or, you can just have the guts around in your code, blindly change to D3D10 without understanding the deep conseguences and maybe carring over some horrible design choices to fit D3D9 limitations AND pretend to be D3D10-optimal. No, you won't.

Take for example how you manage stream ports: in D3D9 you need a vertex layout and you need to set each stream using SetStreamSource. In D3D10 all of this is significantly simplified by having an input layout resource which is directly used to set the input layout. Basically, a step has been removed.

D3D10 is full of those simplifications. I wish I could have started in D3D10 era: instead I had to work with messy drivers, undocumented bugs, terrible semantics.
Why do you beginners want to trash this luck? I wonder if you like pain?

Unless you pretend to become expert in D3D9 in less than two months there's simply no point in start learning D3D9. It's full of fixed function crap (so much extracting the useful subset actually takes to read the whole documentation). It uses some really old notations. It takes at least 10x as much effort to learn.

And I cannot believe you're saying people should keep XP. We all know this isn't going to give you anything. You will have to start using vista or post-vista OS sooner or later. I don't see why you should run away from the problem.

Share this post


Link to post
Share on other sites
Hodgman    51324
Quote:
Original post by Krohm
And I cannot believe you're saying people should keep XP. We all know this isn't going to give you anything. You will have to start using vista or post-vista OS sooner or later. I don't see why you should run away from the problem.
I'm not planning on using Windows Millennium Edition Vista, I'll wait for post-vista thanks ;)

Share this post


Link to post
Share on other sites
Bangladesh    122
One gripe I had when moving over from Dx9 to Dx10 was the lack of early tuts and some functions the (then) more mature Dx9 had that Dx10 lacked. Like the function that loads a .x-file from either file or memory, it was just easy to load things in Dx9. In Dx10 you had to do that on your own if you didn't want to use some of the premade loading-classes from the docs.

JollyJeffers had a nice post that solved the load-problem; he wrote a function that created a Dx9 NULLREF-device so one could use all the Dx9-stuff in your Dx10-app. Horrible to do under real production-time, but I've seen remarks in tech-demos from Nividia that uses the same approach.

But I think it's a little like choosing between C or C++. If you can choose, might as well choose the newest version.

Share this post


Link to post
Share on other sites
beun    160
Quote:
But I think it's a little like choosing between C or CPP. If you can choose, might as well choose the newest version.

[flaming]
That's a nice analogy. We all know that people chose CPP because it's newer, not better, than C, and that some people still use C because we all know that CPP only runs on Windows Vista.

If you want to make and publish games NOW, well, there's a recent topic with a nice graph: only 15% of the computers run Vista. That number will rise, but for now you're stuck with DX9.

BUT eventually you'll have to learn DX10/11. Actually, you'll always have to learn new technologies and APIs, people will always invent new things [smile].

Share this post


Link to post
Share on other sites
kunos    2254
Quote:
Original post by beun
Quote:
But I think it's a little like choosing between C or CPP. If you can choose, might as well choose the newest version.

If you want to make and publish games NOW, well, there's a recent topic with a nice graph: only 15% of the computers run Vista. That number will rise, but for now you're stuck with DX9.


But the OP states that he is "Starting to learn" DX. I doubt he is in any need to get a game out tomorrow.
Personally I think it is a waste of time to learn DX9 now.. if you just think about the effort to learn a totaly "dead" API targeting the FFP (btw.. most DX9 tutorials are about the FFP) you should agree it is just not worth.
DX10 is so much easier and "focused", less verbose, and it will prepare much better for DX11 or whatever it is coming in our way.

So while I agree with you about DX10 being not relevant for CURRENT professional production, I do think it is a much better investment for the future in terms of learning something useful.

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