DirectX SDK

IDirect3DDevice7::BeginStateBlock

The IDirect3DDevice7::BeginStateBlock method signals Direct3D to begin recording a device state block.

HRESULT BeginStateBlock();

Parameters

None.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be one of the following values:

D3DERR_INBEGINSTATEBLOCK
DDERR_OUTOFMEMORY

Remarks

This method was introduced with the IDirect3DDevice7 interface.

Applications can ensure that all recorded states are valid by calling the IDirect3DDevice7::ValidateDevice method prior to calling this method.

The following methods can be recorded in a state block (that is, after calling IDirect3DDevice7::BeginStateBlock and before IDirect3DDevice7::EndStateBlock):

The ordering of state changes in a state block is not guaranteed. If the same state is specified multiple times in a state block, only the last value is used.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Version: Requires DirectX 7.0.
  Header: Declared in d3d.h.

See Also

IDirect3DDevice7::ApplyStateBlock, IDirect3DDevice7::EndStateBlock, IDirect3DDevice7::CaptureStateBlock, IDirect3DDevice7::CreateStateBlock, IDirect3DDevice7::DeleteStateBlock, State Blocks