Share via


SwapChain.Present Method (Rectangle, Boolean)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Presents the contents of the next buffer in the sequence of back buffers owned by the swap chain.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Syntax

'Declaration
Public Sub Present ( _
    rectPresent As Rectangle, _
    sourceRectangle As Boolean _
)
'Usage
Dim instance As SwapChain
Dim rectPresent As Rectangle
Dim sourceRectangle As Boolean

instance.Present(rectPresent, sourceRectangle)
public void Present(
    Rectangle rectPresent,
    bool sourceRectangle
)
public:
void Present(
    Rectangle rectPresent, 
    bool sourceRectangle
)
member Present : 
        rectPresent:Rectangle * 
        sourceRectangle:bool -> unit 

Parameters

  • rectPresent
    Type: System.Drawing.Rectangle
    A Rectangle structure that contains the source rectangle. This value must be omitted unless the swap chain was created with Copy with a SwapEffect. If the value is omitted, the entire source surface is presented. If the rectangle exceeds the source surface, it is clipped to fit.
  • sourceRectangle
    Type: System.Boolean
    Set to true if a Rectangle is being passed to the rectPresent parameter; otherwise, false.

Exceptions

Exception Condition
DriverInternalErrorException

Internal driver error. Applications should generally shut down when receiving this error.

InvalidCallException

The method call is invalid. For example, a method's parameter may contain an invalid value.

OutOfMemoryException

Direct3D could not allocate sufficient memory to complete the call.

Remarks

This method is a shortcut to Present for a Device. The swap chain method has been updated to include a flag that allows the application to request that the method return immediately when the driver reports that it cannot schedule a presentation.

If necessary, a stretch operation is applied to transfer the pixels in the source rectangle to the destination rectangle in the target window's client area.

The Present method of a Device fails if it is called between its BeginScene and EndScene pair; unless the render target is not the current render target such as the back buffer that results from the creation of an additional swap chain.

.NET Framework Security

Platforms

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

SwapChain Class

SwapChain Members

Present Overload

Microsoft.WindowsMobile.DirectX.Direct3D Namespace