Jump to content
  • Advertisement
Sign in to follow this  
Chris_F

Direct3D 10 vs Direct3D 11

This topic is 2507 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Well, I take it that the FX api was just a convenience, and offers nothing that you couldn't implement yourself.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!