GraphicsDevice Members

The following tables list the members exposed by the GraphicsDevice type.

Public Constructors

Name Description
Public Method GraphicsDevice Creates a new instance of GraphicsDevice

Public Properties

Name Description
Public Property ClipPlanes Retrieves the clipping planes of the current GraphicsDevice.
Public Property CreationParameters Retrieves the creation parameters of the GraphicsDevice.
Public Property DepthStencilBuffer Gets or sets the depth stencil surface of this GraphicsDevice.
Public Property DisplayMode Retrieves the display mode's spatial resolution, color resolution, and refresh frequency.
Public Property DriverLevel Returns the driver level.
Public Property GraphicsDeviceCapabilities Gets the capabilities of the graphics device.
Public Property GraphicsDeviceStatus Retrieves the status of the device
Public Property Indices Gets or sets index data.
Public Property IsDisposed Gets a value that indicates whether the object is disposed.
Public Property PixelShader Gets or sets the current pixel shader.
Public Property PresentationParameters Gets the presentation parameters associated with this graphics device.
Public Property RasterStatus Retrieves information that describes the raster of the monitor on which the swap chain is presented.
Public Property RenderState Retrieves a render-state value for a GraphicsDevice.
Public Property SamplerStates Retrieves a collection of SamplerState objects for the current GraphicsDevice.
Public Property ScissorRectangle Gets or sets the rectangle used for scissor testing.
Public Property SoftwareVertexProcessing Gets or sets the vertex processing mode.
Public Property Textures Returns the collection of textures that have been assigned to the texture stages of the device.
Public Property VertexDeclaration Gets or sets a vertex shader declaration.
Public Property VertexSamplerStates Gets the collection of vertex sampler states.
Public Property VertexShader Gets or sets the current vertex shader.
Public Property VertexTextures Gets the collection of vertex textures that support texture lookup in the vertex shader using the texldl - vs texture load statement. The vertex engine contains four texture sampler stages.
Public Property Vertices Gets the vertex stream collection.
Public Property Viewport Gets or sets a viewport identifying the portion of the render target to receive draw calls.

Public Methods

Name Description
Public Method Clear Overloaded. Clears the viewport depth buffer, and erases the stencil buffer.
Public Method Dispose Overloaded. Immediately releases the unmanaged resources used by this object.
Public Method DrawIndexedPrimitives Renders the specified geometric primitive, based on indexing into an array of vertices.
Public Method DrawPrimitives Renders a sequence of non-indexed geometric primitives of the specified type from the current set of data input streams.
Public Method DrawUserIndexedPrimitives Overloaded. Renders the specified geometric primitive with data specified by the user.
Public Method DrawUserPrimitives Renders the given geometric primitive with data specified by the user.
Public Method Equals Overloaded. Returns a value that indicates whether the current instance is equal to a specified object.
Public Method EvictManagedResources Evicts all managed resources, including Microsoft Direct3D resources and those that are driver managed.
Public Method GetGammaRamp Gets the gamma correction ramp.
Public Method GetHashCode Gets the hash code for this instance.
Public Method GetPixelShaderBooleanConstant Gets an array of Boolean values from the pixel shader constant Boolean registers.
Public Method GetPixelShaderInt32Constant Gets an array of Int32 values from the pixel shader constant integer registers.
Public Method GetPixelShaderMatrixArrayConstant Gets an array of Matrix values from the pixel shader constant float registers.
Public Method GetPixelShaderMatrixConstant Gets a Matrix value from the pixel shader constant float registers.
Public Method GetPixelShaderQuaternionArrayConstant Gets an array of Quaternion values from the pixel shader constant float registers.
Public Method GetPixelShaderQuaternionConstant Gets a Quaternion value from the pixel shader constant float registers.
Public Method GetPixelShaderSingleConstant Gets an array of Single values from the pixel shader constant float registers.
Public Method GetPixelShaderVector2ArrayConstant Gets an array of Vector2 values from the pixel shader constant float registers.
Public Method GetPixelShaderVector2Constant Gets a Vector2 value from the pixel shader constant float registers.
Public Method GetPixelShaderVector3ArrayConstant Gets an array of Vector3 values from the pixel shader constant float registers.
Public Method GetPixelShaderVector3Constant Gets a Vector3 value from the pixel shader constant float registers.
Public Method GetPixelShaderVector4ArrayConstant Gets an array of Vector4 values from the pixel shader constant float registers.
Public Method GetPixelShaderVector4Constant Gets a Vector4 value from the pixel shader constant float registers.
Public Method GetRenderTarget Gets a render target surface.
Public Method GetType (Inherited from Object.)
Public Method GetVertexShaderBooleanConstant Gets an array of Boolean values from the vertex shader constant Boolean registers.
Public Method GetVertexShaderInt32Constant Gets an array of Int32 values from the vertex shader constant integer registers.
Public Method GetVertexShaderMatrixArrayConstant Gets an array of Matrix values from the vertex shader constant float registers.
Public Method GetVertexShaderMatrixConstant Gets a Matrix value from the vertex shader constant float registers.
Public Method GetVertexShaderQuaternionArrayConstant Gets an array of Quaternion values from the vertex shader constant float registers.
Public Method GetVertexShaderQuaternionConstant Gets a Quaternion value from the vertex shader constant float registers.
Public Method GetVertexShaderSingleConstant Gets an array of Single values from the vertex shader constant float registers.
Public Method GetVertexShaderVector2ArrayConstant Gets an array of Vector2 values from the vertex shader constant float registers.
Public Method GetVertexShaderVector2Constant Gets a Vector2 value from the vertex shader constant float registers.
Public Method GetVertexShaderVector3ArrayConstant Gets an array of Vector3 values from the vertex shader constant float registers.
Public Method GetVertexShaderVector3Constant Gets a Vector3 value from the vertex shader constant float registers.
Public Method GetVertexShaderVector4ArrayConstant Gets an array of Vector4 values from the vertex shader constant float registers.
Public Method GetVertexShaderVector4Constant Gets a Vector4 value from the vertex shader constant float registers.
Public Method Static op_Equality Compares two objects to determine whether they are the same.
Public Method Static op_Inequality Compares two objects to determine whether they are different.
Public Method Present Overloaded. Presents the display with the contents of the next buffer in the sequence of back buffers owned by the GraphicsDevice.
Public Method ReferenceEquals (Inherited from Object.)
Public Method Reset Overloaded. Resets the presentation parameters for the current GraphicsDevice.
Public Method ResolveBackBuffer Overloaded. Copies the current back buffer contents to a texture.
Public Method ResolveRenderTarget Signifies that the device has finished drawing to a render target and prepares the render target for a call to RenderTarget2D.GetTexture or RenderTargetCube.GetTexture.
Public Method SetGammaRamp Sets the gamma correction ramp.
Public Method SetPixelShaderConstant Overloaded. Sets a pixel shader constant.
Public Method SetRenderTarget Overloaded. Sets a new color buffer for a GraphicsDevice.
Public Method SetVertexShaderConstant Overloaded. Sets a vertex shader constant.
Public Method ToString Retrieves a string representation of this object.

Protected Methods

Name Description
Protected Method Finalize Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object.
Protected Method MemberwiseClone (Inherited from Object.)
Protected Method raise_DeviceLost Occurs when a GraphicsDevice is about to be lost (for example, immediately before a reset).
Protected Method raise_DeviceReset Occurs after a GraphicsDevice is reset, allowing an application to re-create all resources.
Protected Method raise_DeviceResetting Occurs when a GraphicsDevice is resetting
Protected Method raise_Disposing Raises the Disposing event when called from within a derived class.
Protected Method raise_ResourceCreated Occurs when ResourceCreated is called.
Protected Method raise_ResourceDestroyed Occurs when ResourceDestroyed is called.

Public Events

Name Description
Public Event DeviceLost Occurs when a GraphicsDevice is about to be lost (for example, immediately before a reset).
Public Event DeviceReset Occurs after a GraphicsDevice is reset, allowing an application to recreate all resources.
Public Event DeviceResetting Occurs when a GraphicsDevice is resetting, allowing the application to cancel the default handling of the reset.
Public Event 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.
Public Event ResourceCreated Occurs when a resource is created.
Public Event ResourceDestroyed Occurs when a resource is destroyed.

See Also

Reference

GraphicsDevice Class
Microsoft.Xna.Framework.Graphics Namespace