?/TD>
Microsoft DirectX 9.0

IDirect3DDevice9::CreateStateBlock Method


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

Syntax

HRESULT CreateStateBlock(      

    D3DSTATEBLOCKTYPE Type,     IDirect3DStateBlock9** ppSB );

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.
ppSB
[out, retval] Pointer to a state block interface.

Return Value

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_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
D3DERR_OUTOFVIDEOMEMORYMicrosoft?Direct3D?does not have enough display memory to perform the operation.
E_OUTOFMEMORYDirect3D could not allocate sufficient memory to complete the call.


Remarks

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.

See Also

IDirect3DDevice9::BeginStateBlock, IDirect3DDevice9::EndStateBlock


© 2002 Microsoft Corporation. All rights reserved.