Microsoft DirectX 8.1 (Visual Basic)

Direct3DDevice8.BeginStateBlock

Signals Microsoft® Direct3D® to begin recording a device-state block.

object.BeginStateBlock()

Parts

object
Object expression that resolves to a Direct3DDevice8 object.

Error Codes

If the method fails, an error is raised and Err.Number can be set to one of the following values.

D3DERR_INVALIDCALL
E_OUTOFMEMORY

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Remarks

Applications can ensure that all recorded states are valid by calling the Direct3DDevice8.ValidateDevice method prior to calling this method.

The following methods can be recorded in a state block, after calling BeginStateBlock and before Direct3DDevice8.EndStateBlock.

The ordering of state changes in a state block is not guaranteed. If the same state is specified multiple times in a state block, only the last value is used.

See Also

Direct3DDevice8.ApplyStateBlock, Direct3DDevice8.EndStateBlock, Direct3DDevice8.CaptureStateBlock, Direct3DDevice8.CreateStateBlock, Direct3DDevice8.DeleteStateBlock