Skip to content

Latest commit

 

History

History
108 lines (74 loc) · 5.12 KB

nf-d3d9-idirect3ddevice9-present.md

File metadata and controls

108 lines (74 loc) · 5.12 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:d3d9.IDirect3DDevice9.Present
IDirect3DDevice9::Present (d3d9.h)
The IDirect3DDevice9::Present method (d3d9.h) presents the contents of the next buffer in the sequence of back buffers owned by the device.
IDirect3DDevice9 interface [Direct3D 9]
Present method
IDirect3DDevice9.Present
IDirect3DDevice9::Present
Present
Present method [Direct3D 9]
Present method [Direct3D 9]
IDirect3DDevice9 interface
d3d9helper/IDirect3DDevice9::Present
dec6b9d2-0577-093b-3855-599ed58adc87
direct3d9.idirect3ddevice9__present
direct3d9\idirect3ddevice9__present.htm
direct3d9
VS|directx_sdk|~\idirect3ddevice9__present.htm
08/11/2022
IDirect3DDevice9 interface [Direct3D 9],Present method, IDirect3DDevice9.Present, IDirect3DDevice9::Present, Present, Present method [Direct3D 9], Present method [Direct3D 9],IDirect3DDevice9 interface, d3d9helper/IDirect3DDevice9::Present, dec6b9d2-0577-093b-3855-599ed58adc87, direct3d9.idirect3ddevice9__present
d3d9.h
D3D9.h
Windows
D3D9.lib
Windows
19H1
IDirect3DDevice9::Present
d3d9/IDirect3DDevice9::Present
c++
APIRef
kbSyntax
COM
D3D9.lib
D3D9.dll
IDirect3DDevice9.Present

IDirect3DDevice9::Present

-description

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

-parameters

-param pSourceRect [in]

Type: const RECT*

Pointer to a value that must be NULL unless the swap chain was created with D3DSWAPEFFECT_COPY. pSourceRect is a pointer to a RECT structure containing 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.

-param pDestRect [in]

Type: const RECT*

Pointer to a value that must be NULL unless the swap chain was created with D3DSWAPEFFECT_COPY. pDestRect is a pointer to a RECT structure containing 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.

-param hDestWindowOverride [in]

Type: HWND

Pointer to a destination window whose client area is taken as the target for this presentation. If this value is NULL, the runtime uses the hDeviceWindow member of D3DPRESENT_PARAMETERS for the presentation.

-param pDirtyRegion [in]

Type: const RGNDATA*

Value must be NULL unless the swap chain was created with D3DSWAPEFFECT_COPY. For more information about swap chains, see Flipping Surfaces (Direct3D 9) and D3DSWAPEFFECT. If this value is non-NULL, the contained region is expressed in back buffer coordinates. The rectangles within the region are the minimal set of pixels that need to be updated. This method takes these rectangles into account when optimizing the presentation by copying only the pixels within the region, or some suitably expanded set of rectangles. This is an aid to optimization only, and the application should not rely on the region being copied exactly. The implementation can choose to copy the whole source rectangle.

-returns

Type: HRESULT

Possible return values include: D3D_OK or D3DERR_DEVICEREMOVED (see D3DERR).

-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.

Present will fail, returning D3DERR_INVALIDCALL, if called between BeginScene and EndScene pairs unless the render target is not the current render target (such as the back buffer you get from creating an additional swap chain). This is a new behavior for Direct3D 9.

-see-also

IDirect3DDevice9

Lost Devices (Direct3D 9)

Multihead (Direct3D 9)

Reset