| Microsoft DirectX 8.1 (Visual Basic) |
Creates a new state block that contains the values for all device states, vertex-related states, or pixel-related states.
object.CreateStateBlock( _
BlockType As CONST_D3DSTATEBLOCKTYPE) As Long
A Long value containing the state block handle if the method succeeds.
If the method fails, an error is raised and Err.Number can be set to one of the following values.
| D3DERR_INVALIDCALL |
| D3DERR_OUTOFVIDEOMEMORY |
| E_OUTOFMEMORY |
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
The value &hFFFFFFFF& 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.
Direct3DDevice8.ApplyStateBlock, Direct3DDevice8.BeginStateBlock, Direct3DDevice8.CaptureStateBlock, Direct3DDevice8.EndStateBlock, Direct3DDevice8.DeleteStateBlock