class CommandList

robot_2Generated
code_blocksInput

Description

The CommandList class in the Sandbox.Rendering namespace is a core component for managing rendering commands in s&box. It provides a comprehensive set of methods to manipulate rendering states, draw models, and manage resources efficiently. This class is sealed, meaning it cannot be inherited.

Members

Instance Members

Member NameSummary
ResetResets the command list to its initial state.
BlitCopies a source texture to a destination using a specified material.
DrawQuadDraws a quad with a specified material, rectangle, and color.
DrawScreenQuadDraws a full-screen quad using a specified material and color.
SetSets a shader parameter using a token and a value.
SetComboSets a shader combo using a token and a value.
SetConstantBufferSets a constant buffer for a shader using a token and data.
SetGlobalSets a global shader parameter using a token and a value.
GrabFrameTextureGrabs the current frame texture for use in rendering.
GrabDepthTextureGrabs the current depth texture for use in rendering.
InsertListInserts another command list into the current one.
DrawModelDraws a model with a specified transform and render attributes.
DrawModelInstancedDraws a model with instancing using multiple transforms.
DrawModelInstancedIndirectDraws a model with instancing using an indirect buffer.
DrawDraws primitives from a vertex buffer using a material and attributes.
DrawIndexedDraws indexed primitives from a vertex and index buffer using a material and attributes.
DrawInstancedIndirectDraws instanced primitives using an indirect buffer.
DrawIndexedInstancedIndirectDraws indexed instanced primitives using an indirect buffer.
GetRenderTargetRetrieves a render target handle with specified parameters.
ReleaseRenderTargetReleases a previously acquired render target handle.
SetRenderTargetSets the current render target to a specified handle.
DispatchComputeDispatches a compute shader with specified thread counts.
DispatchComputeIndirectDispatches a compute shader using an indirect buffer.
TransferRenderTargetTransfers a render target to another command list.
ClearClears the current render target with specified options.
ResourceBarrierTransitionTransitions a resource to a different state.

Properties

Property NameSummary
DebugNameGets or sets the debug name of the command list.
EnabledGets or sets a value indicating whether the command list is enabled.
FlagsGets or sets the flags associated with the command list.
ViewportSizeA handle to the viewport size.