# Specifying D3DX9 and D3DX10 Routines

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

## Recommended Posts

I'm working on a DX10 project with a DX9 fallback, and I managed to set it up so it doens't try and load DX10 dlls, but now I have another problem. Many routines in d3dx9.h and d3dx10.h go by the same name. Once the program manages to setup a DX9 device, I try and use a D3DX routine, but ti calls the DX10 version, thus requiring the DX10 dlls. How can I make sure that when the app is using DX9 to use D3DX9 functions?

##### Share on other sites
Have you tried splitting up the source and only including one of the headers per source file? I know, it's a pain. I tried wrapping the include call in a namespace, but that didn't work - like this:

namespace D3DX9{   #include <D3DX9.h>};

However, since the D3DX9 functions are declared as extern "C", this doesn't seem to work ;(

##### Share on other sites
Because of how I ahve thign organized, that wouldn't do. There has to be a better way. I know the samples in the SDK do it, I just don't know how.

• 28
• 15
• 23
• 10
• 19