Microsoft DirectX 8.1 (C++) |
Updates the values within an existing state block to the values set for the device.
HRESULT CaptureStateBlock( DWORD Token );
If the method succeeds, the return value is D3D_OK.
If a state block is currently being recorded the method fails and the return value can be D3DERR_INVALIDCALL.
The value 0xFFFFFFFF is an invalid state block handle.
This method captures updated values for states within an existing state block. It does not capture the entire state of the device.
CaptureStateBlock will not capture information for lights that are explicitly or implicitly created after the stateblock is created. For example, capturing the current state into a stateblock of type D3DSBT_ALL will not store information for lights that are created post-capture.
Header: Declared in D3d8.h.
Import Library: Use D3d8.lib.
IDirect3DDevice8::ApplyStateBlock, IDirect3DDevice8::BeginStateBlock, IDirect3DDevice8::CreateStateBlock, IDirect3DDevice8::EndStateBlock, IDirect3DDevice8::DeleteStateBlock