Share via


TextureLoader.FilterTexture(BaseTexture,Int32,Filter) Method (Microsoft.DirectX.Direct3D)

Filters mipmap levels of a texture.

Definition

Visual Basic Public Shared Sub FilterTexture( _
    ByVal baseTexture As BaseTexture, _
    ByVal srcLevel As Integer, _
    ByVal filter As Filter _
)
C# public static void FilterTexture(
    BaseTexture baseTexture,
    int srcLevel,
    Filter filter
);
C++ public:
static void FilterTexture(
    BaseTexturebaseTexture,
    int srcLevel,
    Filter filter
);
JScript public static function FilterTexture(
    baseTexture : BaseTexture,
    srcLevel : int,
    filter : Filter
);

Parameters

baseTexture Microsoft.DirectX.Direct3D.BaseTexture
A BaseTexture object that represents the texture object to filter.
srcLevel System.Int32
Level whose image is used to generate subsequent levels. A common value for this parameter is 0.
filter Microsoft.DirectX.Direct3D.Filter
One or more Filter values that control how the mipmap is filtered.

Remarks

A filter is recursively applied to each texture level to generate the next texture level.

Writing to a surface that is not on the "zero" level of the texture does not cause the dirty rectangle to be updated. If FilterTexture is called and the surface is not already dirty (which is unlikely under normal usage scenarios), the application must explicitly call Texture.AddDirtyRectangle on the texture.

Textures created in the default pool (Pool.Default) cannot be used with FilterTexture (unless created with Usage.Dynamic), because a lock operation on the object is necessary. Note that locks are prohibited on textures in the default pool (unless they are dynamic).

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.

InvalidDataException

The data is invalid.