TSdlGpuRenderPass
A render pass.
This handle is transient and should not be held or referenced after Finish is called.
Definition
Unit: Neslib.Sdl3.Gpu
See Also
Operators
Name | Description |
---|---|
Equal(TSdlGpuRenderPass, TSdlGpuRenderPass) | Used to compare against another TSdlGpuRenderPass. |
Equal(TSdlGpuRenderPass, Pointer) | Used to compare against nil . |
Implicit | Used to set the value to nil . |
NotEqual(TSdlGpuRenderPass, TSdlGpuRenderPass) | Used to compare against another TSdlGpuRenderPass. |
NotEqual(TSdlGpuRenderPass, Pointer) | Used to compare against nil . |
Methods
Name | Description |
---|---|
BindFragmentSamplers | Binds texture-sampler pairs for use on the fragment shader. |
BindFragmentStorageBuffers | Binds storage buffers for use on the fragment shader. |
BindFragmentStorageTextures | Binds storage textures for use on the fragment shader. |
BindIndexBuffer | Binds an index buffer on a command buffer for use with subsequent draw calls. |
BindPipeline | Binds a graphics pipeline on a render pass to be used in rendering. |
BindVertexBuffers | Binds vertex buffers on a command buffer for use with subsequent draw calls. |
BindVertexSamplers | Binds texture-sampler pairs for use on the vertex shader. |
BindVertexStorageBuffers | Binds storage buffers for use on the vertex shader. |
BindVertexStorageTextures | Binds storage textures for use on the vertex shader. |
DrawIndexedPrimitives(TSdlGpuBuffer, Integer, Integer) | Draws data using bound graphics state with an index buffer enabled and with draw parameters set from a buffer. |
DrawIndexedPrimitives(Integer, Integer, Integer, Integer, Integer) | Draws data using bound graphics state with an index buffer and instancing enabled. |
DrawPrimitives(TSdlGpuBuffer, Integer, Integer) | Draws data using bound graphics state and with draw parameters set from a buffer. |
DrawPrimitives(Integer, Integer, Integer, Integer) | Draws data using bound graphics state. |
Finish | Ends the render pass. |
SetBlendConstants | Sets the current blend constants on a command buffer. Used with TSdlGpuBlendFactor.ConstantColor and TSdlGpuBlendFactor.OneMinusConstantColor . |
SetScissor | Sets the current scissor state on a command buffer. |
SetStencilReference | Sets the current stencil reference value on a command buffer. |
SetViewport | Sets the current viewport state on a command buffer. |
Operator Descriptions
Equal(TSdlGpuRenderPass, TSdlGpuRenderPass)
Used to compare against another TSdlGpuRenderPass.
class operator Equal(const ALeft, ARight: TSdlGpuRenderPass): Boolean; inline; static
Parameters
ALeft
: TSdlGpuRenderPass
ARight
: TSdlGpuRenderPass
Returns
Boolean
Equal(TSdlGpuRenderPass, Pointer)
Used to compare against nil
.
class operator Equal(const ALeft: TSdlGpuRenderPass; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft
: TSdlGpuRenderPass
ARight
: Pointer
Returns
Boolean
Implicit(Pointer)
Used to set the value to nil
.
class operator Implicit(const AValue: Pointer): TSdlGpuRenderPass; inline; static
Parameters
AValue
: Pointer
Returns
NotEqual(TSdlGpuRenderPass, TSdlGpuRenderPass)
Used to compare against another TSdlGpuRenderPass.
class operator NotEqual(const ALeft, ARight: TSdlGpuRenderPass): Boolean; inline; static
Parameters
ALeft
: TSdlGpuRenderPass
ARight
: TSdlGpuRenderPass
Returns
Boolean
NotEqual(TSdlGpuRenderPass, Pointer)
Used to compare against nil
.
class operator NotEqual(const ALeft: TSdlGpuRenderPass; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft
: TSdlGpuRenderPass
ARight
: Pointer
Returns
Boolean
Method Descriptions
BindFragmentSamplers(Integer, TArray<TSdlGpuTextureSamplerBinding>)
Binds texture-sampler pairs for use on the fragment shader.
The textures must have been created with TSdlGpuTextureUsage.Sampler.
Be sure your shader is set up according to the requirements documented TSdlGpuShader.
procedure BindFragmentSamplers(const AFirstSlot: Integer; const ATextureSamplerBindings: TArray<TSdlGpuTextureSamplerBinding>); inline
Parameters
AFirstSlot
: Integer
: The fragment sampler slot to begin binding from.
ATextureSamplerBindings
: TArray<TSdlGpuTextureSamplerBinding>
: An array of texture-sampler binding records.
See Also
BindFragmentStorageBuffers(Integer, TArray<TSdlGpuBuffer>)
Binds storage buffers for use on the fragment shader.
These buffers must have been created with TSdlGpuBufferUsage.GraphicsStorageRead.
Be sure your shader is set up according to the requirements documented TSdlGpuShader.
procedure BindFragmentStorageBuffers(const AFirstSlot: Integer; const AStorageBuffers: TArray<TSdlGpuBuffer>); inline
Parameters
AFirstSlot
: Integer
: The fragment storage buffer slot to begin binding from.
AStorageBuffers
: TArray<TSdlGpuBuffer>
: An array of storage buffers.
See Also
BindFragmentStorageTextures(Integer, TArray<TSdlGpuTexture>)
Binds storage textures for use on the fragment shader.
These textures must have been created with TSdlGpuTextureUsage.GraphicsStorageRead.
Be sure your shader is set up according to the requirements documented TSdlGpuShader.
procedure BindFragmentStorageTextures(const AFirstSlot: Integer; const AStorageTextures: TArray<TSdlGpuTexture>); inline
Parameters
AFirstSlot
: Integer
: The fragment storage texture slot to begin binding from.
AStorageTextures
: TArray<TSdlGpuTexture>
: An array of storage textures.
See Also
BindIndexBuffer(TSdlGpuBufferBinding, TSdlGpuIndexElementSize)
Binds an index buffer on a command buffer for use with subsequent draw calls.
procedure BindIndexBuffer(const ABinding: TSdlGpuBufferBinding; const AIndexElementSize: TSdlGpuIndexElementSize); inline
Parameters
ABinding
: TSdlGpuBufferBinding
: A record containing an index buffer and offset.
AIndexElementSize
: TSdlGpuIndexElementSize
: Whether the index values in the buffer are 16- or 32-bit.
BindPipeline(TSdlGpuGraphicsPipeline)
Binds a graphics pipeline on a render pass to be used in rendering.
A graphics pipeline must be bound before making any draw calls.
procedure BindPipeline(const AGraphicsPipeline: TSdlGpuGraphicsPipeline); inline
Parameters
AGraphicsPipeline
: TSdlGpuGraphicsPipeline
: The graphics pipeline to bind.
BindVertexBuffers(Integer, TArray<TSdlGpuBufferBinding>)
Binds vertex buffers on a command buffer for use with subsequent draw calls.
procedure BindVertexBuffers(const AFirstSlot: Integer; const ABindings: TArray<TSdlGpuBufferBinding>); inline
Parameters
AFirstSlot
: Integer
: The vertex buffer slot to begin binding from.
ABindings
: TArray<TSdlGpuBufferBinding>
: An array of TSdlGpuBufferBinding records containing vertex buffers and offset values.
BindVertexSamplers(Integer, TArray<TSdlGpuTextureSamplerBinding>)
Binds texture-sampler pairs for use on the vertex shader.
The textures must have been created with TSdlGpuTextureUsage.Sampler.
Be sure your shader is set up according to the requirements documented TSdlGpuShader.
procedure BindVertexSamplers(const AFirstSlot: Integer; const ATextureSamplerBindings: TArray<TSdlGpuTextureSamplerBinding>); inline
Parameters
AFirstSlot
: Integer
: The vertex sampler slot to begin binding from.
ATextureSamplerBindings
: TArray<TSdlGpuTextureSamplerBinding>
: An array of texture-sampler binding records.
See Also
BindVertexStorageBuffers(Integer, TArray<TSdlGpuBuffer>)
Binds storage buffers for use on the vertex shader.
These buffers must have been created with TSdlGpuBufferUsage.GraphicsStorageRead.
Be sure your shader is set up according to the requirements documented TSdlGpuShader.
procedure BindVertexStorageBuffers(const AFirstSlot: Integer; const AStorageBuffers: TArray<TSdlGpuBuffer>); inline
Parameters
AFirstSlot
: Integer
: The vertex storage buffer slot to begin binding from.
AStorageBuffers
: TArray<TSdlGpuBuffer>
: An array of buffers.
See Also
BindVertexStorageTextures(Integer, TArray<TSdlGpuTexture>)
Binds storage textures for use on the vertex shader.
These textures must have been created with TSdlGpuTextureUsage.GraphicsStorageRead.
Be sure your shader is set up according to the requirements documented TSdlGpuShader.
procedure BindVertexStorageTextures(const AFirstSlot: Integer; const AStorageTextures: TArray<TSdlGpuTexture>); inline
Parameters
AFirstSlot
: Integer
: The vertex storage texture slot to begin binding from.
AStorageTextures
: TArray<TSdlGpuTexture>
: An array of storage textures.
See Also
DrawIndexedPrimitives(TSdlGpuBuffer, Integer, Integer)
Draws data using bound graphics state with an index buffer enabled and with draw parameters set from a buffer.
The buffer must consist of tightly-packed draw parameter sets that each match the layout of TSdlGpuIndexedIndirectDrawCommand. You must not call this method before binding a graphics pipeline.
procedure DrawIndexedPrimitives(const ABuffer: TSdlGpuBuffer; const AOffset, ADrawCount: Integer); overload; inline
Parameters
ABuffer
: TSdlGpuBuffer
: A buffer containing draw parameters.
AOffset
: Integer
: The offset to start reading from the draw buffer.
ADrawCount
: Integer
: The number of draw parameter sets that should be read from the draw buffer.
Remarks
This function is available since SDL 3.2.0.
DrawIndexedPrimitives(Integer, Integer, Integer, Integer, Integer)
Draws data using bound graphics state with an index buffer and instancing enabled.
You must not call this method before binding a graphics pipeline.
Note that the AFirstVertex
and AFirstInstance
parameters are NOT compatible with built-in vertex/instance ID variables in shaders (for example, SV_VertexID); GPU APIs and shader languages do not define these built-in variables consistently, so if your shader depends on them, the only way to keep behavior consistent and portable is to always pass 0 for the correlating parameter in the draw calls.
procedure DrawIndexedPrimitives(const ANumIndices, ANumInstances, AFirstIndex, AVertexOffset, AFirstInstance: Integer); overload; inline
Parameters
ANumIndices
: Integer
: The number of indices to draw per instance.
ANumInstances
: Integer
: The number of instances to draw.
AFirstIndex
: Integer
: The starting index within the index buffer.
AVertexOffset
: Integer
: Value added to vertex index before indexing into the vertex buffer.
AFirstInstance
: Integer
: The ID of the first instance to draw.
DrawPrimitives(TSdlGpuBuffer, Integer, Integer)
Draws data using bound graphics state and with draw parameters set from a buffer.
The buffer must consist of tightly-packed draw parameter sets that each match the layout of TSdlGpuIndirectDrawCommand. You must not call this method before binding a graphics pipeline.
procedure DrawPrimitives(const ABuffer: TSdlGpuBuffer; const AOffset, ADrawCount: Integer); overload; inline
Parameters
ABuffer
: TSdlGpuBuffer
: A buffer containing draw parameters.
AOffset
: Integer
: The offset to start reading from the draw buffer.
ADrawCount
: Integer
: The number of draw parameter sets that should be read from the draw buffer.
DrawPrimitives(Integer, Integer, Integer, Integer)
Draws data using bound graphics state.
You must not call this method before binding a graphics pipeline.
Note that the AFirstVertex
and AFirstInstance
parameters are NOT compatible with built-in vertex/instance ID variables in shaders (for example, SV_VertexID); GPU APIs and shader languages do not define these built-in variables consistently, so if your shader depends on them, the only way to keep behavior consistent and portable is to always pass 0 for the correlating parameter in the draw calls.
procedure DrawPrimitives(const ANumVertices, ANumInstances, AFirstVertex, AFirstInstance: Integer); overload; inline
Parameters
ANumVertices
: Integer
: The number of vertices to draw.
ANumInstances
: Integer
: The number of instances that will be drawn.
AFirstVertex
: Integer
: The index of the first vertex to draw.
AFirstInstance
: Integer
: The ID of the first instance to draw.
Finish
Ends the render pass.
All bound graphics state on the render pass command buffer is unset. The render pass is now invalid.
procedure Finish; inline
SetBlendConstants(TSdlColorF)
Sets the current blend constants on a command buffer. Used with TSdlGpuBlendFactor.ConstantColor
and TSdlGpuBlendFactor.OneMinusConstantColor
.
procedure SetBlendConstants(const ABlendConstants: TSdlColorF); inline
Parameters
ABlendConstants
: TSdlColorF
: The blend constant color.
See Also
SetScissor(TSdlRect)
Sets the current scissor state on a command buffer.
procedure SetScissor(const AScissor: TSdlRect); inline
Parameters
AScissor
: TSdlRect
: The scissor area to set.
SetStencilReference(Byte)
Sets the current stencil reference value on a command buffer.
procedure SetStencilReference(const AReference: Byte); inline
Parameters
AReference
: Byte
: The stencil reference value to set.
SetViewport(TSdlGpuViewport)
Sets the current viewport state on a command buffer.
procedure SetViewport(const AViewport: TSdlGpuViewport); inline
Parameters
AViewport
: TSdlGpuViewport
: The viewport to set.