Microsoft DirectX 8.1 (Visual Basic) |
Applies an existing device-state block to the rendering device.
object.ApplyStateBlock( _ Token As Long)
If the method fails, an error is raised and Err.Number can be set to one of the following values.
Err.Number may be set to D3DERR_INVALIDCALL to indicate that the Token parameter is invalid or a macro is currently being recorded.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
The value &hFFFFFFFF& 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 Direct3DDevice8.BeginScene method and before calling Direct3DDevice8.EndScene.
Direct3DDevice8.BeginStateBlock, Direct3DDevice8.EndStateBlock, Direct3DDevice8.CaptureStateBlock, Direct3DDevice8.CreateStateBlock, Direct3DDevice8.DeleteStateBlock