IDirect3DBaseTexture9::SetAutoGenFilterType method (d3d9helper.h)

Set the filter type that is used for automatically generated mipmap sublevels.

Syntax

HRESULT SetAutoGenFilterType(
  [in] D3DTEXTUREFILTERTYPE FilterType
);

Parameters

[in] FilterType

Type: D3DTEXTUREFILTERTYPE

Filter type. See D3DTEXTUREFILTERTYPE. This method will fail if the filter type is invalid or not supported.

Return value

Type: HRESULT

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be D3DERR_INVALIDCALL.

Remarks

Changing the filter type "dirties" the mipmap sublevels and causes them to be regenerated.

The (default) filter type set at texture creation time is D3DTEXF_LINEAR. If the driver does not support a linear filter, the filter type will be set to D3DTEXF_POINT. All filter types supported by the driver for regular texture filtering are supported for autogeneration except D3DTEXF_NONE. SetAutoGenFilterType will fail unless the driver sets the appropriate D3DPTFILTERCAPS_MINFxxx caps. These values are specified in the TextureFilterCaps and/or CubeTextureFilterCaps members of D3DCAPS9.

For more information about texture filter types, see D3DTEXTUREFILTERTYPE.

This method has no effect if the texture is not created with D3DUSAGE_AUTOGENMIPMAP. In this case, no failure is returned. For more information about usage constants, see D3DUSAGE.

Requirements

Requirement Value
Target Platform Windows
Header d3d9helper.h (include D3D9.h)
Library D3D9.lib

See also

GenerateMipSubLevels

GetAutoGenFilterType

IDirect3DBaseTexture9