Direct3D 10 vs Direct3D 11

Started by
4 comments, last by MJP 12 years, 2 months ago
I've been mostly familiar with OpenGL, but now I'm trying to learn how to work with Direct3D 11. At the moment I'm just going off of examples and tutorials I've found online. Unfortunately some of these are targeting D3D10 and others D3D11. I thought they would be fairly compatible, but now I'm somewhat confused about a few things.

1. I gather D3DXMATH is meant to die with D3D10? It's kind of annoying because I feel it's a bit easier to use and integrate with D3D than XNAMath (confusing name BTW!)

2. Are Effects no longer relevant with D3D11? Coming from OpenGL I have no real idea how widely used they were in D3D10, but they seem to be removed from D3D11, or at least somewhat deprecated. Should I even be using them in the first place?

3. Are Cbuffers supposed to be the way you pass all variables to shaders in D3D11, as opposed to effect variables?
Advertisement
1. They're not updating the D3DX math library anymore, but it still works if you want to use it. DirectXMath (which is the new name for XNAMath) is just more modern, and is still being developed.

2. In D3D9 effects were part of D3DX. In D3D10 they moved to be part of the core API. In D3D11 they got moved out of both, and is distributed as source code that you can compile. Some people still use it, but from what I understand it has some bugs and there's no central repository for collecting anybody's bug fixes. They also removed a bunch of functionality for the D3D11 version.

3. Constant buffers are the only way to pass data to shaders. It's like this in D3D10 as well. The effects framework just abstracts them in such a way that you don't have to deal with the them if you don't want to, so that you can just set individual variables. FYI if you declare global variables that aren't in a constant buffer, they get put in a special "global" constant buffer (called $Global).
So do you recommend simply not using FX at all?
If you find it useful then use it; you are still learning after all and you can always come back and learn about what makes the FX stuff work if it doesn't suit what you want to learn now.
Well, I take it that the FX api was just a convenience, and offers nothing that you couldn't implement yourself.
Absolutely, it's just a wrapper around shader compilation and runtime state/constant buffer management. Many games have their own systems for accomplishing the same goal. If you're not interested in writing one yourself, you could start with it and roll your own later. Or you could even start adding your own modifications, depending on what the open-source license permits.
It seems my call to create a depth stencil view is failing for some reason.

This topic is closed to new replies.

Advertisement