Microsoft DirectX 8.1 (C++) |
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 );
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_INVALIDCALL |
D3DERR_OUTOFVIDEOMEMORY |
E_OUTOFMEMORY |
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.
Header: Declared in D3d8.h.
Import Library: Use D3d8.lib.
IDirect3DDevice8::ApplyStateBlock, IDirect3DDevice8::BeginStateBlock, IDirect3DDevice8::CaptureStateBlock, IDirect3DDevice8::EndStateBlock, IDirect3DDevice8::DeleteStateBlock