DirectX SDK |
The Direct3DDevice7.ApplyStateBlock method applies an existing device-state block to the rendering device.
object.ApplyStateBlock( _ blockHandle As Long)
If the method fails, an error is raised and Err.Number may be set to DDERR_INVALIDPARAMS to indicate that the blockHandle parameter is invalid or a macro is currently being recorded.
Applications cannot apply a device state block while recording another block.
This method was introduced with the Direct3DDevice7 interface.
As with all operations that affect the state of the rendering device, it is recommend that you apply state blocks during scene rendering—that is, after calling the Direct3DDevice7.BeginScene method, and before calling Direct3DDevice7.EndScene.
Direct3DDevice7.BeginStateBlock, Direct3DDevice7.CaptureStateBlock, Direct3DDevice7.CreateStateBlock, Direct3DDevice7.DeleteStateBlock, Direct3DDevice7.EndStateBlock, State Blocks