Jump to content
  • Advertisement
Sign in to follow this  
noodleBowl

Directx 11, DirectX 9, and legacy hardware

This topic is 2113 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 have been wondering about this for a while, should I be using DirectX 11 or DirectX 9?

Assuming all types of hardware is what I want to target which version of DirectX should I be using?

I think DirectX 11 can be set to use DirectX 9, but does this mean that I have to do double the programming?

Something like if we cant use DirectX 11 then use all code that makes DirectX 9 devices and uses DirectX 9 draw functions?

Share this post


Link to post
Share on other sites
Advertisement
DitectX11 supports fallback on old Dx9 and DX10 hardware. You can set concrete features level and write your application by means of restricted DX11 library.

Share this post


Link to post
Share on other sites

The key deciding factor here should be: do you want to run on Windows XP?
 
Feeding into that is: do you actually need to run on Windows XP, and nobody but yourself can answer that; you really need to profile your target audience, gain an understanding of what kind of OS and hardware they have, what kind they're likely to have when you actually release, and are you prepared to lose whatever percentage are still on XP (if that percentage is low enough it can be a reasonable trade-off).
 
Assuming that you don't need to run on XP, no, you don't have write everything twice.  The same D3D11 API can target D3D9 class hardware, but with a reduced feature set.  Commonly what you'll do is either write to the lowest-common-denominator (which you'd be doing if using 9 anyway) or write alternative render paths for some of your stuff, such as a high-quality path (for D3D10/11 hardware) and a low-quality path (for D3D9 hardware).  But the basics - loading textures, creating buffers, issuing draw calls - remains the same in both cases.
 
Be aware that D3D11's feature level 9 only goes up to shader model 2 - that's a good deal more restrictive than what you'd get if using D3D9 itself, so that may also tilt your decision.
 
Also be aware that your stated objective of "all types of hardware is what I want to target" is completely unrealistic.  You're still occasionally going to find people out there with cruddy old GeForce 4 MXs, for example, and wanting to include those is just going to unreasonably constrain your own work (no pixel shaders, two texture stages).  It's perfectly reasonable to set a lower-bound below which you will not go, and nowadays good lower-bounds seem to be D3D9/SM3 (low-end/old hardware), D3D10 (low/mid) or D3D11 (mid/high).


Answers like yours are an asset to us all. Thumbs up.

Share this post


Link to post
Share on other sites

The key deciding factor here should be: do you want to run on Windows XP?

 

Feeding into that is: do you actually need to run on Windows XP, and nobody but yourself can answer that; you really need to profile your target audience, gain an understanding of what kind of OS and hardware they have, what kind they're likely to have when you actually release, and are you prepared to lose whatever percentage are still on XP (if that percentage is low enough it can be a reasonable trade-off).

 

Assuming that you don't need to run on XP, no, you don't have write everything twice.  The same D3D11 API can target D3D9 class hardware, but with a reduced feature set.  Commonly what you'll do is either write to the lowest-common-denominator (which you'd be doing if using 9 anyway) or write alternative render paths for some of your stuff, such as a high-quality path (for D3D10/11 hardware) and a low-quality path (for D3D9 hardware).  But the basics - loading textures, creating buffers, issuing draw calls - remains the same in both cases.

 

Be aware that D3D11's feature level 9 only goes up to shader model 2 - that's a good deal more restrictive than what you'd get if using D3D9 itself, so that may also tilt your decision.

 

Also be aware that your stated objective of "all types of hardware is what I want to target" is completely unrealistic.  You're still occasionally going to find people out there with cruddy old GeForce 4 MXs, for example, and wanting to include those is just going to unreasonably constrain your own work (no pixel shaders, two texture stages).  It's perfectly reasonable to set a lower-bound below which you will not go, and nowadays good lower-bounds seem to be D3D9/SM3 (low-end/old hardware), D3D10 (low/mid) or D3D11 (mid/high).

 

This was a perfect explanation. Thank you!

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!