I'm thinking of downgrading the dxsdk requirements of my game from 9.0b (the latest) to 8.1. I don't use the advanced features of 9.0b so this change shouldn't be too complex, except.. I can't find the 8.1 SDK anywhere! MS seems to have pulled all the download links to it, and I can't see any older ones on the web as well.
Is there a recommended site for getting these older SDKs?
I think DX7 is still the one to aim for. If you can get it down to DX7, you're really reaching the biggest windows userbase. Sorry, don't know any sites for that.
It's all backwards-compatible, so you don't need the earlier SDKs. Stick with whatever SDK you have and just don't use anything that isn't in the version of DX you're aiming for.
If you don't use any DX9 interfaces, it'll work on anything using the 8.1 runtime. If you don't use any DX8 or DX9 interfaces, it'll run on anything using the 7 runtime.
Minimal Versions Available
For what it's worth, Allegro has some minimal DirectX SDK packages for download here. The flavors available are 7.0 and 8.0. I don't know if these would work, however.
I found the sdk is in game programming gems 3, but as Abscissa mentioned, it looks like you can just use the older interfaces rather than rolling back.
In fact, I don't think its possible to roll back, as DirectX buries itself deep in the system and refuses to allow itself to be extracted. Once you've got it, its there to stay.
It Is Possible
There is some pertinent information found in this thread on the subject. While it doesn't apply exactly, the methods can be used to roll back.
Originally Posted by gcarlton
Actually it "pays" to stick with the dx9*SDK* (not using DX9 of course) because the documentation for DX9 SHOWS you all the areas it has changed over DX8 which makes your job of porting/regressing easier. There are not TOO many changes (depending on what you are using in your engine). I did this to my framework (went from DX9 to DX8.1), a few things I can remember to look for (and are all mentioned in the dx9 documentation in the "what's new" area) are:
->SetFVF (DX9) is used instead of ->SetVertexShader (DX8)
Various DX calls will report (when going from DX9 to DX8) that the call has too many parameters or that no conversion is possible etc.. this is because the relevent functions in DX9 had more parameters added (usually a 0/null tacked on the end) so you will have to remove them.
The initialisation is slightly different and you have to do things a bit stricter with the formats and checking. (it was improved in DX9).
As I say it is in the dx9 docs anyway and took me about half a day to do, but it depends on how many features of D3D you use.
And yes, if you want you can also drop back to DX7 with the DX9sdk but this is harder to convert to.
Yeah, its actually not too bad, as most of the helpful D3DX stuff still exists in 8.1. Also CEGUI supports 8.1 as well as 9, so its easy on that front.
The biggest DX changes seem to have been in ps/vs/D3DXEffect improvements, skinning and animation, as well as a slightly more flexible DrawIndexedPrimitive. As it turns out I get away without needing any of those.
As you mentioned the setFVF thing came up, and enumerating the display modes is different in 8.1.
Yeah, you don't actually need to install an older version of the SDK, you can just use the DX9 SDK (btw, the newest version of DX9 is 9.0c, not b, and the SDK is now released on a bimonthly schedule, so I think the newest is June 2005) and DX8 interfaces. I just made a conversion from a DX9 based rendered to DX8 and it was relatively painless. It should be fine if you're using mostly fixed function rendering, if you're using shaders things will be much trickier.
Keep in mind however that unlike the DX libs (which are compatible across old versions), the D3DX stuff is NOT compatible even across builds. So D3DX code compiled in the April update will not run if you install the June update. You will get the famous "cannot find d3dx9_26.dll" crap, or "incorrect version of D3D and/or D3DX".
Make sure you save all those d3dx dlls every time you update DX
lol, sounds like more reason to just stick with DX 7
Originally Posted by vjvj
I've avoided the later SDKs for precisely this reason. I'm not budging from my last known "good" version where D3DX is a static library, and they can't make me!
I've got the same reasoning as well.
Originally Posted by gcarlton
My other excuse for not going to 9.0+ is just the fact IMHO that:
(a) your target market might not yet have 9.0 installed
(b) Once you're in the same "version-arena" as the AAA games, it's really fierce competition.
Again, it all comes down to the basics. Who is your target audience and what do they typically run?
If you're making a game that's definitely targeting the more "hardcore" players, then there's no reason to be afraid of using 9.0 if there's some features that make your game better for them.
Likewise, if you're targeting the less-hardcore-more-casual type player, then 8.1 is probably your best bet.
OT: Don't be afraid to send feedback to the directx team about the D3DX DLL stuff. They're a receptive bunch IMHO and are trying to figure out the best way to handle this sudden versioning problem/issue. They were forced to ship it inside a DLL due to security reasons (and the ability to update it via Windows Update) so I'm not too sure they're able to just switch it back to a static library. IIRC you can create your own installation package of the D3DX DLL which dramatically reduces download delivery size.