GraphicsDevice.Present Method (Nullable<Rectangle>, Nullable<Rectangle>, IntPtr)
Specifies the window target for a presentation and presents the display with the contents of the next buffer in the sequence of back buffers owned by the GraphicsDevice.
Syntax
'Declaration
Public Sub Present ( _
sourceRectangle As Nullable(Of Rectangle), _
destinationRectangle As Nullable(Of Rectangle), _
overrideWindowHandle As IntPtr _
)
public void Present (
Nullable<Rectangle> sourceRectangle,
Nullable<Rectangle> destinationRectangle,
IntPtr overrideWindowHandle
)
public:
void Present(
Nullable<Rectangle> sourceRectangle,
Nullable<Rectangle> destinationRectangle,
IntPtr overrideWindowHandle
)
Parameters
- sourceRectangle
Type: Nullable<Rectangle>
The source rectangle. If null, the entire source surface is presented. If the rectangle exceeds the source surface, the rectangle is clipped to the source surface. - destinationRectangle
Type: Nullable<Rectangle>
The destination rectangle, in window client coordinates. If null, the entire client area is filled. If the rectangle exceeds the destination client area, the rectangle is clipped to the destination client area. - overrideWindowHandle
Type: IntPtr
Destination window containing the client area that is the target for this presentation. If not specified, this is DeviceWindowHandle.
Exceptions
Exception type | Condition |
---|---|
ObjectDisposedException | Present was called after the GraphicsDevice was disposed. |
DeviceLostException | The GraphicsDevice is lost but cannot be reset at this time. Therefore, rendering is not possible. |
Requirements
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
See Also
Reference
GraphicsDevice Class
GraphicsDevice Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Windows Phone