s&
info
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
explore
Discover Games
category
Workshop
sports_esports
Games
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
menu_book
Learn
docs
Documentation
api
Api Reference
school
Tutorials
manage_search
Code Search
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Graphics
CommandList
chevron_left
Graphics
class
CommandList
Constructors
functions
CommandList
Properties
data_object
Attributes
data_object
DebugName
data_object
Enabled
data_object
Flags
data_object
GlobalAttributes
data_object
Paint
data_object
ViewportSize
Methods
functions
Blit
functions
Clear
functions
ClearRenderTarget
functions
DispatchCompute
functions
DispatchComputeIndirect
functions
Draw
functions
DrawIndexed
functions
DrawIndexedInstanced
functions
DrawIndexedInstancedIndirect
functions
DrawInstancedIndirect
functions
DrawModel
functions
DrawModelInstanced
functions
DrawModelInstancedIndirect
functions
DrawQuad
functions
DrawReflection
functions
DrawRefraction
functions
DrawRenderer
functions
DrawScreenQuad
functions
DrawText
functions
DrawView
functions
GenerateMipMaps
functions
GetRenderTarget
remove_circle
GrabDepthTexture
remove_circle
GrabFrameTexture
functions
InsertList
functions
ReleaseRenderTarget
functions
Reset
functions
ResourceBarrierTransition
remove_circle
Set
remove_circle
SetCombo
remove_circle
SetConstantBuffer
remove_circle
SetGlobal
functions
SetRenderTarget
functions
UavBarrier
functions
ViewportSizeScaled
CommandList
class
Sandbox.Rendering
.
sealed
Sandbox.Engine
build
Constructors
1
CommandList
(
)
data_object
Properties
7
Attributes
AttributeAccess
Access to the local attributes. What these are depends on where the command list is being called. If we're calling from a renderable, these are the attributes for that renderable.
DebugName
string
Enabled
bool
Flags
Flag
GlobalAttributes
AttributeAccess
These are the attributes for the current view. Setting a variable here will let you pass it down to other places in the render pipeline.
Paint
HudPainter
Access to simple 2D painting functions to draw shapes and text.
ViewportSize
SizeHandle
A handle to the viewport size
functions
Methods
35
Blit
(
material
,
attributes
)
Clear
(
color
,
clearColor
,
clearDepth
,
clearStencil
)
Clear the current drawing context to given color.
ClearRenderTarget
(
)
Set the current render target. Setting this will bind the render target and change the viewport to match it.
DispatchCompute
(
compute
,
threadsX
,
threadsY
,
threadsZ
)
DispatchComputeIndirect
(
compute
,
indirectBuffer
,
indirectElementOffset
)
Draw
(
vertexBuffer
,
material
,
startVertex
,
vertexCount
,
attributes
,
primitiveType
)
DrawIndexed
(
vertexBuffer
,
indexBuffer
,
material
,
startIndex
,
indexCount
,
attributes
,
primitiveType
)
DrawIndexedInstanced
(
indexBuffer
,
material
,
instanceCount
,
attributes
,
primitiveType
)
Draws indexed geometry with instancing. Each instance shares the same index buffer.
DrawIndexedInstancedIndirect
(
vertexBuffer
,
indexBuffer
,
material
,
indirectBuffer
,
bufferOffset
,
attributes
,
primitiveType
)
DrawInstancedIndirect
(
vertexBuffer
,
material
,
indirectBuffer
,
bufferOffset
,
attributes
,
primitiveType
)
DrawModel
(
model
,
transform
,
attributes
)
Draws a single model at the given Transform immediately.
DrawModelInstanced
(
model
,
transforms
,
lodLevel
,
attributes
)
DrawModelInstancedIndirect
(
model
,
buffer
,
bufferOffset
,
attributes
)
Draws multiple instances of a model using GPU instancing with the number of instances being provided by indirect draw arguments. Use `SV_InstanceID` semantic in shaders to access the rendered instance.
DrawQuad
(
rect
,
material
,
color
)
DrawReflection
(
camera
,
plane
,
target
,
reflectionSetup
)
Render a planar reflection using the specified camera and the specified plane.
DrawRefraction
(
camera
,
plane
,
target
,
refractionSetup
)
Render a planar refraction using the specified camera and the specified plane. This is for all intents and purposes a regular view with a plane clipping it. Usually used for rendering under water.
DrawRenderer
(
renderer
,
rendererSetup
)
Render a Sandbox.Renderer with the specified overrides.
DrawScreenQuad
(
material
,
color
)
DrawText
(
scope
,
rect
,
flags
,
angleDegrees
)
Draws text within a rectangle using a prepared Sandbox.TextRendering.Scope.
DrawView
(
camera
,
target
,
viewSetup
)
Renders the view from a camera to the specified render target.
GenerateMipMaps
(
handle
,
method
)
Generates a mip-map chain for the specified render target. This will generate mipmaps for the color texture of the render target.
GetRenderTarget
(
name
,
format
,
numMips
,
sizeFactor
)
RenderTargetHandle
Get a screen sized temporary render target. You should release the returned handle when you're done to return the textures to the pool.
GrabDepthTexture
(
token
)
obsolete
RenderTargetHandle
Takes a copy of the depthbuffer and returns a handle to it
GrabFrameTexture
(
token
,
withMips
)
obsolete
RenderTargetHandle
Takes a copy of the framebuffer and returns a handle to it
InsertList
(
otherBuffer
)
Run this CommandList here
ReleaseRenderTarget
(
handle
)
We're no longer using this RT, return it to the pool
Reset
(
)
ResourceBarrierTransition
(
texture
,
state
,
mip
)
Executes a barrier transition for the given GPU Texture Resource. Transitions the texture resource to a new pipeline stage and access state.
Set
(
token
,
f
)
obsolete
SetCombo
(
token
,
value
)
obsolete
SetConstantBuffer
(
token
,
data
)
obsolete
SetGlobal
(
token
,
buffer
)
obsolete
SetRenderTarget
(
handle
)
Set the current render target. Setting this will bind the render target and change the viewport to match it.
UavBarrier
(
texture
)
Issues a UAV barrier for the given texture, ensuring writes from prior shader invocations are visible to subsequent ones without changing the resource layout.
ViewportSizeScaled
(
divisor
)
SizeHandle
A handle to the viewport size divided by a factor. Useful for dispatching at half or quarter resolution.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.