Microsoft DirectX 8.1 (C++) |
Filters the mipmap levels of a texture.
HRESULT D3DXFilterTexture( LPDIRECT3DTEXTURE8 pTexture, 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 values.
D3DERR_INVALIDCALL |
D3DXERR_INVALIDDATA |
A box filter or a point filter is recursively applied to each texture level to generate the next texture level. All other filters use SrcLevel to generate all the sysequenct mip levels.
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 IDirect3DTexture8::AddDirtyRect on the texture.
Volume textures created in the default pool (D3DPOOL_DEFAULT) cannot be used with D3DXFilterTexture because a lock operation is needed on the object. Note that locks are prohibited on textures in the default pool.
Header: Declared in D3dx8tex.h.
Import Library: Use D3dx8.lib.