   Backwards compatibility with DX8 (using DX9)?
  I've seen some professional games, namely the Source Engine, allow DX8-compatible modes in their games. How would I do this? Is it hard? I'd prefer that my users not have to get a fancy new computer to play a simple 2D game.   
  To be perfectly honest, it's not exactly a stretch to assume your users have a DirectX9 compatible card. Any machine made within the last 6 years would have compatible hardware.If you're really worried about it, it's not hard at all to support but there's no magic compatibility switch to flip that allows your game to use DX8 instead. What you'll have to do is essentially write two different rendering engines. One that utilizes DX8 and one that utilizes DX9.   ;  It can be a pain, yes.  You either have to use compile-time polymorphism (using #ifdefs) or run-time polymorphism (interfaces) to make it so that your rendering code works with both versions of the API.Also DX9 hardware started coming out in 2002, so I would think there are plenty of DX9-capable PC's that are neither fancy nor new.   ;  What they're supporting is DX8 level hardware, i.e., shader model 1. They also support DX7 level hardware using texture stages. It's all done with the DX9 API, so you might need different code paths, but nothing like using DX8 itself (all Microsoft OS's from Windows 98 support DX9).As the others have said, you can probably target shader model 2 hardware without a problem, but since you're doing a simple 2D game, using texture stages should be enough and allow you to run on all the cards released in the last 10 years.   ;  Also, compile time polymorphism can be done with templates.  #ifdefs are yucky!   ;Quote:Original post by ET3DWhat they're supporting is DX8 level hardware, i.e., shader model 1. They also support DX7 level hardware using texture stages. It's all done with the DX9 API, so you might need different code paths, but nothing like using DX8 itself (all Microsoft OS's from Windows 98 support DX9).As the others have said, you can probably target shader model 2 hardware without a problem, but since you're doing a simple 2D game, using texture stages should be enough and allow you to run on all the cards released in the last 10 years.While technically correct, I would like to point out some driver thingy.Until DX 8.0 (inclusive) you didn't need to update the drivers. You could have an old video card made for DX 6.0 and it would run fine on a program made for DX 8.0 as long as it doesn't use the new features and stick with the old ones (like you suggested).However in DX 9.0a the interface changed in a way where Direc3D9 will refuse to load if you don't update your GPU driver.The only and main example I have (since I suffered it) is the SiS 620, in which the company drop the driver development and it can't run D3D9 games.However it's a card from 1998 and I wouldn't worry about this being a problem at all. Besides a driver problem, not hardware. The NVIDIA Vanta is from around the same age (well, a bit newer) and it doesn't have this problem (because NVIDIA kept the drivers up to date)Personally, I would go for DX9 mode while avoiding using fancy stuff like shaders, many texturing stages, etc. for compatibility with old hardware. Of course, if that's your target marketCheerioDark Sylinc   ;Quote:Original post by Matias GoldbergWhile technically correct, I would like to point out some driver thingy.Until DX 8.0 (inclusive) you didn't need to update the drivers. You could have an old video card made for DX 6.0 and it would run fine on a program made for DX 8.0 as long as it doesn't use the new features and stick with the old ones (like you suggested).However in DX 9.0a the interface changed in a way where Direc3D9 will refuse to load if you don't update your GPU driver.The general rule (until Direct3D 10 breaks anything) was that a Direct3D runtime supports the last 3 driver interfaces. Therefore you need at last a Direct3D 7 driver for Direct3D 9. Unfortunately there are some features that don’t work if you are running on an older driver. While checking the caps is quite common today most games assume that you have a Direct3D 9 driver and don’t implement fallbacks for older drivers.;Quote:Original post by ET3DWhat they're supporting is DX8 level hardware, i.e., shader model 1. They also support DX7 level hardware using texture stages. It's all done with the DX9 API, so you might need different code paths, but nothing like using DX8 itself (all Microsoft OS's from Windows 98 support DX9).As the others have said, you can probably target shader model 2 hardware without a problem, but since you're doing a simple 2D game, using texture stages should be enough and allow you to run on all the cards released in the last 10 years.So you're saying that as long as I don't use any shaders, it should work fine on Shader Model 1 or less?   