Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/d3dx_helpers.h:
#include "d3dx9.h" #endif /* D3DX_D3D_VERSION == 9 */
+#if D3DX_D3D_VERSION == 10 +#define COBJMACROS +#include "d3dx10.h"
I'm a bit torn on this...
It would be nice if we could avoid including d3dx* headers from here. That way we're sure that we're not depending on anything version-specific in the generic code. It shouldn't usually make things more complicated, e.g. the `D3DX_FILTER_` defines could just be copied from the d3dx9 header and used unchanged instead of defining them to the `D3DX10_` (or `D3DX11_`) version.
The one annoying bit with this is the `ID3DXBuffer` / `ID3D10Blob` / `ID3DBlob` mess. I haven't thought this through but it might make the whole thing not worth it. Maybe you already tried something like this and discarded it; let me know.
Either way, I'd move the `#define COBJMACROS` out of the .h and into the .c files using it, otherwise it affects all the following includes which might come as a bit of a surprise.