Microsoft DirectX 8.1 (C++)

IDirect3DDevice8::CaptureStateBlock

Updates the values within an existing state block to the values set for the device.

HRESULT CaptureStateBlock(
  DWORD Token
);

Parameters

Token
[in] Handle to the state block into which the device state is captured.

Return Values

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.

Remarks

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.

Requirements

  Header: Declared in D3d8.h.
  Import Library: Use D3d8.lib.

See Also

IDirect3DDevice8::ApplyStateBlock, IDirect3DDevice8::BeginStateBlock, IDirect3DDevice8::CreateStateBlock, IDirect3DDevice8::EndStateBlock, IDirect3DDevice8::DeleteStateBlock