Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm just starting to get into 3D programming with Direct3D. What version of D3D should I pick up?

11 looks pretty neat, but 9 and 10 still seems to be pretty present. Given the current state of the game development industry, which version does it make more sense to start using?

share|improve this question
    
"Which technology to use" questions are not good Q/A questions. –  Byte56 Jun 24 '13 at 17:11

5 Answers 5

up vote 12 down vote accepted

That depends on whether or not you want to design an engine to produce a game to be done in three years, or one year or six months, and whether or not you're thinking of console ports. It'll be relatively easy to throw out a 360 port of your game from Direct3D9, but you'll need to do a lot more originating from D3D11. Remember that D3D11 locks out all XP users, if not necessarily all D3D9 hardware.

The most recent Steam survey suggests that about 16% of people still use Windows XP. Can you afford to cut them out? By the time your game is done, how will this have changed? Are you going to use features that depend on the higher level API? These are questions that you will need to answer yourself.

Direct3D 9 is pretty damn accessible and you can reach a lot of people with a D3D9 game, but it's days are numbered, especially on the PC. If you're not interested in targetting those people, then there's little point to it.

Oh, and don't bother with DX10. There's no reason at all to use it over DX11. Unless you want to use D2D/DirectWrite, which is not unreasonable.

Of course, it's worth mentioning that in DX11, there are no replacements for classes that, as a hobbyist myself, I found extremely useful in DX9. Such as ID3DXMesh, ID3DXSprite, ID3DXFont, have to compile ID3DXEffect from source, etc. Microsoft recommends DirectWrite to replace ID3DXFont, but of course, they forgot to actually make DX11 compatible with the new Direct2D/DirectWrite systems, which in my opinion was blindingly stupid.

share|improve this answer
    
Why did they remove the effect framework ? It was a very useful class IMO. –  dotminic Feb 4 '11 at 1:39
    
@__dominic: It's not removed, but you have to compile it yourself. –  DeadMG Feb 4 '11 at 1:53
1  
@__dominic: As DeadMG pointed out, the effect framework was not removed, it was factored out into a standalone set of code files you can compile yourself -- this was allegedly done to allow it to be versioned more fluidly than the D3D core, and ease deployment issues (particularly around D3DX). –  Josh Petrie Feb 4 '11 at 1:55
1  
I think worse than cutting out 25% of XP users is that only 17% have DX11 GPU's (as of now). –  DMan Feb 5 '11 at 1:03
2  
@DMan: D3D11 can run on downlevel hardware, including D3D9 hardware. –  DeadMG Feb 5 '11 at 12:30

I heard that dx9 with win xp system is single core based system. It is old tech. I recommand you dx11.

share|improve this answer
3  
This answer doesn't add anything productive, and it's unclear (and potentially wrong and misleading) what you're suggesting regarding a "single core system." –  Josh Petrie Jan 25 '13 at 7:03
1  
Plus "I heard that..." is not a credible source of evidence (or pretty much anything, really). –  Darth Satan Jan 25 '13 at 10:19

If you're completely new to 3D programming, and especially if you're new to COM and Windows programming, I would strongly advice against learning DirectX now. In my experience, DirectX is an extremely powerful tool, but it has a very steep learning curve, which you must consider in addition to the learning curves of Windows programming, 3D programming and many others. If you start with DirectX, you might feel overwhelmed by all the details of making boilerplate code, so I advice against it.

Instead, I would recommend a simpler API that allows you to focus more on learning about 3D programming. XNA is quite nice, and since it lies on top of DirectX, once you move to DirectX, you'll have some ideas that will make the DirectX learning curve much easier to take on.

Now, if you have experience in 3D programming, such as with OpenGL, and you know how to do COM programming, I'd recommend DirectX 11. Anything but the latest version is obsolete, and any experience you get from it will be useful for a shorter span of time.

But then again, true experience comes from variety, so I'd recommend you learn both DirectX and OpenGL, and also XNA if you want, and as many APIs as you can. That way, you will have an abstract knowledge of how 3D programming works with different tools, and you will be able to use the right tool for each job.

share|improve this answer

I recommend DX11 or DX10. The difference is very small. You can just do more things with DX11 (hw tessalation, better gpgpu, output to multiple textures on pixel shader..). DirectX 9 has another architecture and is little outdated at the moment. If you are asking about current game dev industry: for curently developed pc games is DX9 dead.

But i have to say:
Don't care about api, once you really understand how graphics works, learning new api would take max one month. Even shorter time.

share|improve this answer
3  
DX9 isn't outdated. There are still a ton of potential users on XP. It may not be in development any more, and is going to become outdated in the next few years, but for now it isn't. –  The Communist Duck Feb 4 '11 at 16:04
1  
@thecommunistduck I agree,but DX9 is totally outdated for learning it. Because once beginer who start learning it now,will know it well...it will be outdated. And sure i told it bad in my answer. –  Notabene Feb 4 '11 at 16:57

tldr: Learn D3D11.

The difference between 10 and 11 is pretty small, in terms of the shape of the API. D3D11 allows you to use down-leveling to write code against the D3D11 API that will run all the way back to D3D9 class hardware (note that you will still require Vista or better however). So you may as well learn the newer API, which I feel is cleaner and more uniform anyhow.

However, if you don't have Vista or better, or you eventually want your own code to run on XP (to for example distribute your game to XP users), you're going to have to use D3D9. The XP market is probably shrinking, though, so I'd say go for 11 if you can.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.