Microsoft DirectX 8.1 (C++) |
Applies an existing device-state block to the rendering device.
HRESULT ApplyStateBlock( DWORD Token );
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value can be D3DERR_INVALIDCALL.
The value 0xFFFFFFFF is an invalid state block handle.
Applications cannot apply a device-state block while recording another block.
As with all operations that affect the state of the rendering device, it is recommended that you apply state blocks during scene rendering—that is, after calling the IDirect3DDevice8::BeginScene method and before calling IDirect3DDevice8::EndScene.
Header: Declared in D3d8.h.
Import Library: Use D3d8.lib.
IDirect3DDevice8::BeginStateBlock, IDirect3DDevice8::EndStateBlock, IDirect3DDevice8::CaptureStateBlock, IDirect3DDevice8::CreateStateBlock, IDirect3DDevice8::DeleteStateBlock