Compartir a través de


SamplerState Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Contains sampler state, which determines how to sample texture data.

Inheritance Hierarchy

System.Object
  Microsoft.Xna.Framework.Graphics.GraphicsResource
    Microsoft.Xna.Framework.Graphics.SamplerState

Namespace:  Microsoft.Xna.Framework.Graphics
Assembly:  Microsoft.Xna.Framework.Graphics (in Microsoft.Xna.Framework.Graphics.dll)

Syntax

'Declaration
Public Class SamplerState _
    Inherits GraphicsResource
public class SamplerState : GraphicsResource

The SamplerState type exposes the following members.

Constructors

  Name Description
Public method SamplerState Initializes a new instance of the SamplerState class.

Top

Properties

  Name Description
Public property AddressU Gets or sets the texture-address mode for the u-coordinate.
Public property AddressV Gets or sets the texture-address mode for the v-coordinate.
Public property Filter Gets or sets the type of filtering during sampling.
Public property IsDisposed Gets a value that indicates whether the object is disposed. (Inherited from GraphicsResource.)
Public property MaxAnisotropy Gets or sets the maximum anisotropy. The default value is 0.
Public property MaxMipLevel Gets or sets the level of detail (LOD) index of the largest map to use.
Public property MipMapLevelOfDetailBias Gets or sets the mipmap LOD bias. The default value is 0.

Top

Methods

  Name Description
Public method Dispose() Immediately releases the unmanaged resources used by this object. (Inherited from GraphicsResource.)
Protected method Dispose(Boolean) Immediately releases the unmanaged resources used by this object. (Inherited from GraphicsResource.)
Protected method Finalize Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object. (Inherited from GraphicsResource.)

Top

Fields

  Name Description
Public fieldStatic member AnisotropicClamp Contains default state for anisotropic filtering and texture coordinate clamping.
Public fieldStatic member AnisotropicWrap Contains default state for anisotropic filtering and texture coordinate wrapping.
Public fieldStatic member LinearClamp Contains default state for linear filtering and texture coordinate clamping.
Public fieldStatic member LinearWrap Contains default state for linear filtering and texture coordinate wrapping.
Public fieldStatic member PointClamp Contains default state for point filtering and texture coordinate clamping.
Public fieldStatic member PointWrap Contains default state for point filtering and texture coordinate wrapping.

Top

Version Information

Silverlight

Supported in: 5

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.