GraphicsDevice Members
The following tables list the members exposed by the GraphicsDevice type.
Public Constructors
Name | Description | |
---|---|---|
GraphicsDevice | Creates an instance of this object. |
Public Properties
Name | Description | |
---|---|---|
Adapter | Gets the graphics adapter. | |
BlendFactor | Gets or sets the color used for a constant-blend factor during alpha blending. The default value is Color.White. | |
BlendState | Gets or sets a system-defined instance of a blend state object initialized for alpha blending. The default value is BlendState.Opaque. | |
DepthStencilState | Gets or sets a system-defined instance of a depth-stencil state object. The default value is DepthStencilState.Default. | |
DisplayMode | Retrieves the display mode's spatial resolution, color resolution, and refresh frequency. | |
GraphicsDeviceStatus | Retrieves the status of the device. | |
GraphicsProfile | Gets the graphics profile. The default value is GraphicsProfile.Reach. | |
Indices | Gets or sets index data. The default value is null. | |
IsDisposed | Gets a value that indicates whether the object is disposed. | |
MultiSampleMask | Gets or sets a bitmask controlling modification of the samples in a multisample render target. The default value is -1 (0xffffffff). | |
PresentationParameters | Gets the presentation parameters associated with this graphics device. | |
RasterizerState | Gets or sets rasterizer state. The default value is RasterizerState.CullCounterClockwise. | |
ReferenceStencil | Gets or sets a reference value for stencil testing. The default value is zero. | |
SamplerStates | Retrieves a collection of SamplerState objects for the current GraphicsDevice. | |
ScissorRectangle | Gets or sets the rectangle used for scissor testing. By default, the size matches the render target size. | |
Textures | Returns the collection of textures that have been assigned to the texture stages of the device. | |
VertexSamplerStates | Gets the collection of vertex sampler states. | |
VertexTextures | Gets the collection of vertex textures that support texture lookup in the vertex shader using the texldl statement. The vertex engine contains four texture sampler stages. | |
Viewport | Gets or sets a viewport identifying the portion of the render target to receive draw calls. |
Public Methods
Name | Description | |
---|---|---|
Clear | Overloaded. Clears resource buffers. | |
Dispose | Overloaded. Immediately releases the unmanaged resources used by this object. | |
DrawIndexedPrimitives | Renders the specified geometric primitive, based on indexing into an array of vertices. | |
DrawInstancedPrimitives | Draws a series of instanced models. | |
DrawPrimitives | Renders a sequence of non-indexed geometric primitives of the specified type from the current set of data input streams. | |
DrawUserIndexedPrimitives | Overloaded. Renders geometric primitives. | |
DrawUserPrimitives | Overloaded. Renders geometric primitives. | |
Equals | (Inherited from Object.) | |
GetBackBufferData | Overloaded. Gets the contents of the back buffer. | |
GetHashCode | (Inherited from Object.) | |
GetRenderTargets | Gets a render target surface. | |
GetType | (Inherited from Object.) | |
GetVertexBuffers | Gets the vertex buffers. | |
Present | Overloaded. Presents the display with the contents of the next buffer in the sequence of back buffers owned by the GraphicsDevice. | |
Reset | Overloaded. Resets the presentation parameters for the current GraphicsDevice. | |
SetRenderTarget | Overloaded. Sets a new color buffer for a GraphicsDevice. | |
SetRenderTargets | Sets an array of render targets. | |
SetVertexBuffer | Overloaded. Sets or binds a vertex buffer to a device. | |
SetVertexBuffers | Sets the vertex buffers. | |
ToString | (Inherited from Object.) |
Protected Methods
Name | Description | |
---|---|---|
Finalize | Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object. | |
MemberwiseClone | (Inherited from Object.) |
Public Events
Name | Description | |
---|---|---|
DeviceLost | Occurs when a GraphicsDevice is about to be lost (for example, immediately before a reset). | |
DeviceReset | Occurs after a GraphicsDevice is reset, allowing an application to recreate all resources. | |
DeviceResetting | Occurs when a GraphicsDevice is resetting, allowing the application to cancel the default handling of the reset. | |
Disposing | Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime. | |
ResourceCreated | Occurs when a resource is created. | |
ResourceDestroyed | Occurs when a resource is destroyed. |
Extension Methods
Name | Description | |
---|---|---|
SetSharingMode | Enable/disable sharing a graphics device between Silverlight and XNA. |
See Also
Reference
GraphicsDevice Class
Microsoft.Xna.Framework.Graphics Namespace