On 26 July 2010 23:05, Owen Rudge owen@owenrudge.net wrote:
- if ((filter & 0xFFFF) > D3DX_FILTER_BOX && filter != D3DX_DEFAULT)
return D3DERR_INVALIDCALL;
- if ((mipfilter & 0xFFFF) > D3DX_FILTER_BOX && mipfilter != D3DX_DEFAULT)
return D3DERR_INVALIDCALL;
- if (!filter || !mipfilter)
return D3DERR_INVALIDCALL;
I think those should be handled implicitly by D3DXLoadSurfaceFromFileInMemory() / D3DXFilterTexture().
- if (filter == D3DX_DEFAULT)
filter = D3DX_FILTER_TRIANGLE | D3DX_FILTER_DITHER;
- if (mipfilter == D3DX_DEFAULT)
mipfilter = D3DX_FILTER_BOX;
Same.
- if (width == 0 || width == D3DX_DEFAULT_NONPOW2)
width = imginfo.Width;
Probably depends on the device supporting NPOT textures again.
- if ((pool != D3DPOOL_DEFAULT) && (usage != D3DUSAGE_DYNAMIC))
Dynamic textures are a device capability.
(Yeah, this is a mostly unchanged copy of my earlier comments.)