Direct3DDevice8.Present
Presents the contents of the next in the sequence of back buffers owned by the device.
object.Present( _
SourceRect As Any, _
DestRect As Any, _
DestWindowOverride As Long, _
DirtyRegion As Any)
Parts
- object
- Object expression that resolves to a Direct3DDevice8 object.
- SourceRect
- Value that must be ByVal 0 unless the swap chain was created with D3DSWAPEFFECT_COPY or D3DSWAPEFFECT_COPY_VSYNC. SourceRect is a type containing the source rectangle. If ByVal 0, the entire source surface is presented. If the rectangle exceeds the source surface, the rectangle is clipped to the source surface.
- DestRect
- Value that must be ByVal 0 unless the swap chain was created with D3DSWAPEFFECT_COPY or D3DSWAPEFFECT_COPY_VSYNC. DestRect is a type containing the destination rectangle, in window client coordinates. If ByVal 0, the entire client area is filled. If the rectangle exceeds the destination client area, the rectangle is clipped to the destination client area.
- DestWindowOverride
- Destination window whose client area is taken as the target for this presentation. If this value is 0 (zero), then the hWndDeviceWindow member of D3DPRESENT_PARAMETERS is taken.
- DirtyRegion
- This parameter is not used and should be set to ByVal 0.
Error Codes
If the method fails, an error is raised and Err.Number can be set to one of the following values.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
Remarks
If necessary, a stretch operation is applied to transfer the pixels within the source rectangle to the destination rectangle in the client area of the target window.
The following code fragment shows how to call the default case for Present.
Dim device As Direct3DDevice8
device.Present ByVal 0, ByVal 0, 0, ByVal 0
For the default case, note that you must specify ByVal 0 for the parameters that expect type Any. If you specify 0 (zero) for a parameter of type Any, an error will be generated and the method will fail.
See Also
Direct3DDevice8.Reset