D3DTEXTUREFILTER

The D3DTEXTUREFILTER enumerated type defines the supported texture filter modes used by the D3DRENDERSTATE_TEXTUREMAG render state in the D3DRENDERSTATETYPE enumerated type.

typedef enum _D3DTEXTUREFILTER { 
    D3DFILTER_NEAREST          = 1, 
    D3DFILTER_LINEAR           = 2, 
    D3DFILTER_MIPNEAREST       = 3, 
    D3DFILTER_MIPLINEAR        = 4, 
    D3DFILTER_LINEARMIPNEAREST = 5, 
    D3DFILTER_LINEARMIPLINEAR  = 6, 
    D3DFILTER_FORCE_DWORD   = 0x7fffffff, 
} D3DTEXTUREFILTER; 
 

Members

D3DFILTER_NEAREST
The texel with coordinates nearest to the desired pixel value is used. This is a point filter with no mipmapping.

This applies to both zooming in and zooming out. If either zooming in or zooming out is supported, then both must be supported.

D3DFILTER_LINEAR
A weighted average of a 2×2 area of texels surrounding the desired pixel is used. This is a bilinear filter with no mipmapping.

This applies to both zooming in and zooming out. If either zooming in or zooming out is supported, then both must be supported.

D3DFILTER_MIPNEAREST
The closest mipmap level is chosen and a point filter is applied.
D3DFILTER_MIPLINEAR
The closest mipmap level is chosen and a bilinear filter is applied within it.
D3DFILTER_LINEARMIPNEAREST
The two closest mipmap levels are chosen and then a linear blend is used between point filtered samples of each level.
D3DFILTER_LINEARMIPLINEAR
The two closest mipmap levels are chosen and then combined using a bilinear filter.
D3DFILTER_FORCE_DWORD
Forces this enumerated type to be 32 bits in size.

Remarks

All of these filter modes are valid with the D3DRENDERSTATE_TEXTUREMIN render state, but only the first two (D3DFILTER_NEAREST and D3DFILTER_LINEAR) are valid with D3DRENDERSTATE_TEXTUREMAG.

QuickInfo

  Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in d3dtypes.h.