RasterizerState Class
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Contains rasterizer state, which determines how to convert vector data (shapes) into raster data (pixels).
Inheritance Hierarchy
System.Object
Microsoft.Xna.Framework.Graphics.GraphicsResource
Microsoft.Xna.Framework.Graphics.RasterizerState
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in Microsoft.Xna.Framework.Graphics.dll)
Syntax
'Declaration
Public Class RasterizerState _
Inherits GraphicsResource
public class RasterizerState : GraphicsResource
The RasterizerState type exposes the following members.
Constructors
Name | Description | |
---|---|---|
RasterizerState | Initializes a new instance of the RasterizerState class. |
Top
Properties
Name | Description | |
---|---|---|
CullMode | Gets or sets the conditions for culling or removing triangles. | |
DepthBias | Gets or sets the depth bias for polygons, which is the amount of bias to apply to the depth of a primitive to alleviate depth testing problems for primitives of similar depth. The default value is 0. | |
FillMode | Get or sets the fill mode, which defines how a triangle is filled during rendering. The default is Solid. | |
IsDisposed | Gets a value that indicates whether the object is disposed. (Inherited from GraphicsResource.) | |
MultiSampleAntiAlias | Gets or sets a value that indicates whether multisample antialiasing is enabled. The default is true. | |
ScissorTestEnable | Get or sets a value that indicates whether scissor testing is enabled. The default is false. | |
SlopeScaleDepthBias | Gets or sets a bias value that takes into account the slope of a polygon. This bias value is applied to coplanar primitives to reduce aliasing and other rendering artifacts caused by z-fighting. The default is 0. |
Top
Methods
Name | Description | |
---|---|---|
Dispose() | Immediately releases the unmanaged resources used by this object. (Inherited from GraphicsResource.) | |
Dispose(Boolean) | Immediately releases the unmanaged resources used by this object. (Inherited from GraphicsResource.) | |
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 | |
---|---|---|
CullClockwise | A built-in state object with settings for culling primitives with clockwise winding order. | |
CullCounterClockwise | A built-in state object with settings for culling primitives with counter-clockwise winding order. | |
CullNone | A built-in state object with settings for not culling any primitives. |
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.