Partager via


IDirect3DDevice8::CreateStateBlock

This method creates a new state block that contains the values for all device states, vertex-related states, or pixel-related states.

HRESULT CreateStateBlock(
  D3DSTATEBLOCKTYPE Type,
  DWORD* pToken
);

Parameters

  • Type
    [in] Type of state data that the method should capture. This parameter can be set to a value defined in the D3DSTATEBLOCKTYPE enumerated type.
  • pToken
    [out, retval] Pointer to a DWORD value to contain the state block handle if the method succeeds.

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:

Remarks

The value 0xFFFFFFFF is an invalid state block handle.

Vertex-related device states typically refer to those states that affect how the system processes vertices. Pixel-related states generally refer to device states that affect how the system processes pixel or depth-buffer data during rasterization. Some states are contained in both groups.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8.h.
Link Library: D3d8.lib.

See Also

D3DSTATEBLOCKTYPE | IDirect3DDevice8::ApplyStateBlock | IDirect3DDevice8::BeginStateBlock | IDirect3DDevice8::CaptureStateBlock | IDirect3DDevice8::EndStateBlock | IDirect3DDevice8::DeleteStateBlock | IDirect3DDevice8

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.