Skip to content

Latest commit

 

History

History
93 lines (70 loc) · 2.98 KB

nf-d3d9-idirect3dstateblock9-capture.md

File metadata and controls

93 lines (70 loc) · 2.98 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.IDirect3DStateBlock9.Capture
IDirect3DStateBlock9::Capture (d3d9.h)
The IDirect3DStateBlock9::Capture (d3d9.h) method captures the current value of states that are included in a stateblock.
2f57837a-b161-c1f5-e5ba-7e4fda75185f
Capture
Capture method [Direct3D 9]
Capture method [Direct3D 9]
IDirect3DStateBlock9 interface
IDirect3DStateBlock9 interface [Direct3D 9]
Capture method
IDirect3DStateBlock9.Capture
IDirect3DStateBlock9::Capture
d3d9helper/IDirect3DStateBlock9::Capture
direct3d9.idirect3dstateblock9__capture
direct3d9\idirect3dstateblock9__capture.htm
direct3d9
VS|directx_sdk|~\idirect3dstateblock9__capture.htm
08/11/2022
2f57837a-b161-c1f5-e5ba-7e4fda75185f, Capture, Capture method [Direct3D 9], Capture method [Direct3D 9],IDirect3DStateBlock9 interface, IDirect3DStateBlock9 interface [Direct3D 9],Capture method, IDirect3DStateBlock9.Capture, IDirect3DStateBlock9::Capture, d3d9helper/IDirect3DStateBlock9::Capture, direct3d9.idirect3dstateblock9__capture
d3d9.h
D3D9.h
Windows
D3D9.lib
Windows
19H1
IDirect3DStateBlock9::Capture
d3d9/IDirect3DStateBlock9::Capture
c++
APIRef
kbSyntax
COM
D3D9.lib
D3D9.dll
IDirect3DStateBlock9.Capture

IDirect3DStateBlock9::Capture

-description

Capture the current value of states that are included in a stateblock.

-returns

Type: HRESULT

If the method succeeds, the return value is D3D_OK. If the method fails because capture cannot be done while in record mode, the return value is D3DERR_INVALIDCALL.

-remarks

The Capture method captures current values for states within an existing state block. It does not capture the entire state of the device. For example:


IDirect3DStateBlock9* pStateBlock = NULL;

pd3dDevice->BeginStateBlock();
// Add the ZENABLE state to the stateblock 
pd3dDevice->SetRenderState ( D3DRS_ZENABLE, D3DZB_TRUE );
pd3dDevice->EndStateBlock ( &pStateBlock );
    
// Change the current value that is stored in the state block
pd3dDevice->SetRenderState ( D3DRS_ZENABLE, D3DZB_FALSE );
pStateBlock->Capture();			

pStateBlock->Release();

Creating an empty stateblock and calling the Capture method does nothing if no states have been set.

The Capture method will not capture information for lights that are explicitly or implicitly created after the stateblock is created.

-see-also

IDirect3DStateBlock9