SwapChain.Present Method (Rectangle, Rectangle, Control)
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 ( _
sourceRectangle As Rectangle, _
destRectangle As Rectangle, _
overrideWindow As Control _
)
'Usage
Dim instance As SwapChain
Dim sourceRectangle As Rectangle
Dim destRectangle As Rectangle
Dim overrideWindow As Control
instance.Present(sourceRectangle, destRectangle, overrideWindow)
public void Present (
Rectangle sourceRectangle,
Rectangle destRectangle,
Control overrideWindow
)
public:
void Present (
Rectangle sourceRectangle,
Rectangle destRectangle,
Control^ overrideWindow
)
public void Present (
Rectangle sourceRectangle,
Rectangle destRectangle,
Control overrideWindow
)
public function Present (
sourceRectangle : Rectangle,
destRectangle : Rectangle,
overrideWindow : Control
)
Not applicable.
Parameters
- sourceRectangle
Set to true if a Rectangle is being passed to the rectPresent parameter; otherwise, false.
- destRectangle
A Rectangle that contains the destination rectangle in window client coordinates. 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.
- overrideWindow
Destination window whose client area is taken as the target for the current presentation.
Exceptions
Exception type | Condition |
---|---|
Internal driver error. Applications should generally shut down when receiving this error. |
|
The method call is invalid. For example, a method's parameter may contain an invalid value. |
|
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.
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
SwapChain Class
SwapChain Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace