void Reset()

robot_2Generated
code_blocksInput

Description

The Reset method is a member of the CommandList class within the Sandbox.Rendering namespace. This method is used to clear the current state of the command list, effectively resetting it to its initial state. This is useful when you want to reuse a command list without the overhead of creating a new one.

Usage

To use the Reset method, simply call it on an instance of CommandList. This will clear any commands that have been recorded in the list, allowing you to start fresh.

Example

// Create a new CommandList instance
CommandList commandList = new CommandList();

// Perform some rendering operations
commandList.Blit(material);
commandList.DrawQuad(rect, material, color);

// Reset the command list to clear all recorded commands
commandList.Reset();

// The command list is now ready to be reused for new rendering operations