DirectX 9, 10, or 11?

Started by
5 comments, last by NickGravelyn 13 years, 7 months ago
hi all,

I'm going to pick up a DirectX book and get started in a couple of weeks. I have read that using DirectX 10 means that your game will not run on Windows XP.

What is the advantage to using DirectX 10 over 9 if it will exclude Windows XP users?

I have also noticed that there are no books on DirectX 11. Is there a reason for this?

Long story short, which should I choose and why?
Advertisement
If you want to support WinXP, your only choice is DX9 (or OpenGL).

If you want a more up-to-date API that more closely resembles current hardware, go with DX11.
DirectX9/10 switch incompatibly is a well known fact for every PC gamers, most of them go and buy DirectX10+ video cards and install a 64bits Windows7 to play the latest games at maxed details/speed since the way the OS handle graphic acceleration changed quite a lot in Vista. On the other end, I'm sure a vast majority of computers are still on XP, with cards not supporting DirectX10. It actually depends of the public you target, for high-end hardcore games, you go with the latest tech, for casual games you better not touch DirectX at all.

DirectX11 actually have an answer to this problem, it support a "feature level" switch which allow DirectX9 video card to play the game anyway, the programmer just have to program a separate code path for things DX9 card don't support. I don't think it works on XP though.

DirectX10 completely removed the fixed pipeline functions, so you have to create your own shaders to handle things like lights/shadows and such instead of using the "generic" fixed pipeline effect. It's a bit more complex, but gives much more possibilities. DirectX10 biggest benefits, among others, allow the use of Shader Model 4.

As for books, when you understand the 3D theory and how to use external libraries, I think the DirectX SDK is the best documentation available.
According to the specifications, I see that my video card (XFX Geforce 8800 GTX) supports DirectX 10. What happens if I play a game requiring DirectX 11?

1. Exactly what OS and hardware checking is necessary to determine if a game using a certain version of DirectX will run?

2. What about porting a game to Xbox 360? Does the version of DirectX used have any effect on this?

There are no books at all on DirectX 11. For a beginner, this is not a good thing. I imagine it would be very difficult to jump into the documentation, without some sort of guidance that a book might offer.

[Edited by - bbr125 on October 30, 2010 3:28:03 PM]
Quote:What happens if I play a game requiring DirectX 11?
If the game requires features only in D3D 11, as opposed to just using that API and requiring D3D 10 features, you are out of luck.

Quote:Exactly what OS and hardware checking is necessary to determine if a game using a certain version of DirectX will run?
As noted, D3D 10 and above requires Vista. As for hardware, you have to look at the actual hardware and drivers for that hardware.

Quote:What about porting a game to Xbox 360? Does the version of DirectX used have any effect on this?
You wouldn't be using D3D. You would be using Xna.

Quote:I imagine it would be very difficult to jump into the documentation, without some sort of guidance that a book might offer.
Not at all. Have you looked at the documentation and samples?
Key things to consider here, look at the steam engines distribution of people with DX10 capable machines to DX9 capable machines. Around 15 percent have DX9 shader capabilities and 94.9 have that or above. Only 5.6% have hardware capable of doing everything DX11 offers.

DX11 is so new tutorials covering it haven't been released yet in great quantity.

Heres abit of an explanation of the core differences I am aware of that really count.

DIRECT X9

DX9 has the fixed function pipeline and can support shader model 3 on the GPU, this allows for alot of large and complex effects to be carried out.

The graphics card is passed by your program geometry that in DX9 is passed to a vertex shader that performs task on each vertex, this data is then passed on to a pixel shader (or fragment shader in Open GL) which allows for per pixel lighting effects to be performed (such as refraction and nice diffuse lighting. There is however a limit to the size of the number of instructions you can perform per "pass" of your shader as it draws. So you may find yourself drawing to offscreen textures then drawing onto those in a second pass then drawing to the screen based on your scenes complexity.

DIRECT X10

In DX10 you can use shader model 4 enabling you to have an infinite number of instructions per shader pass. You also are able to shunt more of the grunt work onto the graphics card such as realtime tesselation and quad based particle systems. This is because shader model 4 includes a third shader that allows you to add verticies to the current verticies that have been processed before going onto the pixel shader allowing you to generate more data without increasing the overhead in data being thrown from CPU to GPU (which can be a bottleneck in complex scenes).

DIRECT X11

In DX11 you can use shader model 5, as you might have guessed there is another shader in this too. This one is the compute shader, it allows you to perform fullblown calculations like on the CPU. This lets you do anything from AI to sound calculations or basically any task that you can heavily multithread (even encryption or security brute force attack stuff).

WHERE YOU SHOULD START

If you are new to everything stick to DX9 at least to start out it will be a while before it is truley outmoded as people are slow to move to DX10 however be aware that defaults for shaders in the MSDN refer to DX10 so I guess Microsoft recognise that as the standard now. DX11 will be slow to really gain momentum because like you said there is not alot of coverage on it available yet, but its coming. I havent sunk my teeth into it yet im going to DX10 in my next program for sure, but if I had to learn it all again I wouldn't try and go straight to DX10 I could easily have over whelmed myself with crap to remember rather than building on a sturdy base of capability.
My two cents:

If you're just starting, you're likely a ways off from shipping software and as such the current market numbers really shouldn't concern you. After all, you're trying to learn, not market a product.

I recommend starting with D3D 10 or 11 to get your feet wet with the modern versions of D3D that have shed the fixed function pipeline and as such will keep you from learning outdated APIs that will just make it a little harder to move to 10 or 11 in the future. D3D10 is likely to have more educational materials but shouldn't be too hard to transition to 11 at a later point, so that might be a good starting point.

This topic is closed to new replies.

Advertisement