Partager via


Device.BeginStateBlock() Method (Microsoft.DirectX.Direct3D)

Signals Microsoft Direct3D to begin recording a device state block.

Definition

Visual Basic Public Sub BeginStateBlock()
C# public void BeginStateBlock();
C++ public:
void BeginStateBlock();
JScript public function BeginStateBlock();

Remarks

To ensure that all recorded states are valid, an application can call the Device.ValidateDevice method prior to calling this method.

The following properties and methods can be recorded in a state block, after calling Device.BeginStateBlock and before calling Device.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.

Exceptions

InvalidCallException

The method call is invalid. For example, a parameter might contain an invalid value.

OutOfVideoMemoryException

Direct3D could not allocate sufficient memory to complete the call.

See Also