Which DirectX version to learn

Started by
10 comments, last by simpler 11 years, 8 months ago
I recently finished a game I made with DirectX 9.0 and I'm in the spot of starting a new project. I have some concerns about which version I should dig deeper into.

I have made a couple of games with DirectX 9.0c of which only one is in 3D. I can't say I'm especially good with the DirectX API, but I've worked my way through Frank D Lunas "Introduction to 3D Game Programming..." book and made sure I understand all the topics in it. The next thing I want to focus on learning more about is 3D programming and it feels like a good time to decide which version of DirectX it's wisest to aim on.

Now my question is: Should I stick with 9.0c for my next project(s) or is it better to dive into DirectX 11 right away and get ready for the launch of Windows 8 and the addition of Metro style apps?

I hope you understand how I think, I'm thankful for any comments! smile.png
Advertisement
When I was on conference (it was april or may, I don't remember) the Microsoft representative said that ~50% of the market still uses windows xp (only microsoft os were counted in).
In my opinion go for dx11 (says person who still digs in dx9 smile.png )
That's pretty interesting numbers!

Two similar questions:

  1. When I develop Metro apps with DirectX can I still use dx9?
  2. When I develop normal apps for Windows 8, can I still use dx9?


Also, won't the use of dx11 make less people able to play my games? Not only the ones who got Windows XP but also those with graphic cards that doesn't support dx11?

I can understand that big companies got the resources to implement everything with dx9 as fallback if the user can't use dx11, but as a single person it feels impossible to do so. And it's not like I'm in the need of the extra technologics that dx11 offer.
Go for directx 11 if your purpose is to learn graphics.... There are these things called feature levels which will allow you to cover all the hardware you need.

Directx 11 will teach you the newest fundamental "ways of doing things", which imo is the best place to start.

NOW, if you are doing this for the soul purpose of making a game, use whatever you are best at/your game requires.

------------------------------

redwoodpixel.com

I'd suggest learning to use shaders in DX9 first.

You can't render anything in DX11 without a shader, and it's probably easier to learn to use shaders inside the API you're familiar with.

When I develop Metro apps with DirectX can I still use dx9?
When I develop normal apps for Windows 8, can I still use dx9?[/quote]

Only normal desktop apps support DX9. Metro only gives you access to a very limited set of APIs, for example you can't even compile shaders in DX11 when using Metro - you have to compile them at build time and load them in (well, technically, I think you could do it if you wrote your own compiler).

Go for directx 11 if your purpose is to learn graphics.... There are these things called feature levels which will allow you to cover all the hardware you need.

Directx 11 will teach you the newest fundamental "ways of doing things", which imo is the best place to start.

NOW, if you are doing this for the soul purpose of making a game, use whatever you are best at/your game requires.


I didn't know about feature levels, that's a pretty big deal! If I can cover all the hardware I need with dx11 then I don't see any reason to stay with dx9.


I'd suggest learning to use shaders in DX9 first.

You can't render anything in DX11 without a shader, and it's probably easier to learn to use shaders inside the API you're familiar with.


I think I got a somewhat decent understanding about how shaders work, I have played around with them and most of my games uses some kind of shader. I feel like now when I'm going learn more about them it's maybe better to do that on the latest version? We'll see how it goes!

Thanks for the fast replies smile.png

When I was on conference (it was april or may, I don't remember) the Microsoft representative said that ~50% of the market still uses windows xp (only microsoft os were counted in).


That figure of ~50% of users still using XP quoted by Microsoft very likely includes business customers: they're certainly not in your target audience. For a potential market for games things look somewhat different. The latest Steam hardware surveys are a much better guideline to base your decision on, and there we have nearly 80% with DX10/11 class systems; i.e. Windows Vista or 7 with a D3D 10 or 11 class GPU, and with XP usage being in the order of 13% and falling. The need to maintain support for downlevel systems is vastly overstated.


Also, won't the use of dx11 make less people able to play my games?


No; aside from the XP holdouts, so long as the user has Vista or 7 you can use feature levels to obtain support for both DX9 and 10 class hardware. Feature levels also mean that there's no reason whatsoever to even consider D3D10 or 10.1, so it becomes a straight-up choice between 9 or 11.

Since you seem to want to dive deeper into learning shaders my advice would be to go for 11. You can do it by continuing with 9 for sure, but you'll still have horrible things like D3DERR_DEVICELOST and old-style render states to deal with; 11 just makes the experience a whole lot nicer and enables you to focus more on getting stuff done rather than having to write annoying boilerplate.

The wildcard in the set of options is to drop D3D for now and look at some OpenGL. It's definitely worth considering, and knowing both APIs will be of benefit to you, but I think that for the time being you're maybe better off getting some more D3D experience under your belt. By all means keep that as an option for the one after though.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

There is a strong argument still for using Direct3D9 because XP is still in use even in the gaming world. Pretty much everyone, big studio and indie alike still targets it, because a 13% share is still statistically significant. Ignoring even ~13% as an indie can be problematic. Targeting D3D11 does reduce the number of people who can play your game; it just depends on your goals. If you're planning to sell the game, you may wish to consider targeting D3D9 for the time being. You might also consider learning D3D11 and creating an abstract rendering interface, implementing the ideals of D3D11 and translating that into D3D9 at the back end.

XP is losing ground every time a new survey is done by Valve. It's getting more and more appealing to drop D3D9 in favor of 11.
Depends. If you're starting a 2 year (or even 6 month) project right now then you'd be well advised to give some thought to what the XP share is going to be like at the end of that time. A cross-reference of those 13% XP machines with what GPUs they're using wouldn't be a bad idea either.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

Thanks mhagain and Flimflam for insightful replies! It feels like starting with D3D11 is the right option for me. However I got a bit confused when I read a comment on the book I plan to buy:

This book, although well written, is not for a person digging into the Windows 8 (yes 8) Direct3 or Direct2 that is found in Visual Studio 11 Express Beta that only runs on Windows 8.[/quote]

Won't I be able to use the things I learn in Frank D Lunas book on Windows 8? Is there another API for developing with D3D11 on Visual Studio 11? Hopefully someone can expand a bit on this, since I don't really understand what he means.

This topic is closed to new replies.

Advertisement