Filters mipmap levels of a texture.
HRESULT D3DXFilterTexture( LPDIRECT3DBASETEXTURE9 pBaseTexture, CONST PALETTEENTRY * pPalette, UINT SrcLevel, DWORD MipFilter );
If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA.
A filter is recursively applied to each texture level to generate the next texture level.
Writing to a non-level-zero surface of the texture will not cause the dirty rectangle to be updated. If D3DXFilterTexture is called and the surface was not already dirty (this is unlikely under normal usage scenarios), the application needs to explicitly call IDirect3DTexture9::AddDirtyRect on the texture.
Textures created in the default pool (D3DPOOL_DEFAULT) cannot be used with D3DXFilterTexture (unless created with D3DUSAGE_DYNAMIC) because a lock operation is needed on the object. Note that locks are prohibited on textures in the default pool (unless they are dynamic).
For details on PALETTEENTRY, see the Platform SDK. Note that as of DirectX 8.0, the peFlags member of the PALETTEENTRY structure does not function as documented in the Platform SDK. The peFlags member is now the alpha channel for 8-bit palletized formats.
There is only one texture filtering function, but two macros that call this method.
#define D3DXFilterCubeTexture D3DXFilterTexture #define D3DXFilterVolumeTexture D3DXFilterTexture
Header: Declared in D3dx9tex.h.