TSdlGpuColorTargetInfo
A record specifying the parameters of a color target used by a render pass.
The LoadOp field determines what is done with the texture at the beginning of the render pass.
- Load: Loads the data currently in the texture. Not recommended for multisample textures as it requires significant memory bandwidth.
- Clear: Clears the texture to a single color.
- DontCare: The driver will do whatever it wants with the texture memory. This is a good option if you know that every single pixel will be touched in the render pass.
The StoreOp field determines what is done with the color results of the render pass.
- Store: Stores the results of the render pass in the texture. Not recommended for multisample textures as it requires significant memory bandwidth.
- DontCare: The driver will do whatever it wants with the texture memory. This is often a good option for depth/stencil textures.
- Resolve: Resolves a multisample texture into resolve_texture, which must have a sample count of 1. Then the driver may discard the multisample texture memory. This is the most performant method of resolving a multisample target.
- ResolveAndStore: Resolves a multisample texture into the ResolveTexture, which must have a sample count of 1. Then the driver stores the multisample texture's contents. Not recommended as it requires significant memory bandwidth.
Definition
Unit: Neslib.Sdl3.Gpu
See Also
Properties
Name | Description |
---|---|
ClearColor | The color to clear the color target to at the start of the render pass. Ignored if TSdlGpuLoadOp.Clear is not used. |
Cycle | True cycles the texture if the texture is bound and LoadOp is not Load. |
CycleResolveTexture | True cycles the resolve texture if the resolve texture is bound. Ignored if a Resolve* StoreOp is not used. |
LayerOrDepthPlane | The layer index or depth plane to use as a color target. This value is treated as a layer index on 2D array and cube textures, and as a depth plane on 3D textures. |
LoadOp | What is done with the contents of the color target at the beginning of the render pass. |
MipLevel | The mip level to use as a color target. |
ResolveLayer | The layer index of the resolve texture to use for the resolve operation. Ignored if a Resolve* StoreOp is not used. |
ResolveMipLevel | The mip level of the resolve texture to use for the resolve operation. Ignored if a Resolve* StoreOp is not used. |
ResolveTexture | The texture that will receive the results of a multisample resolve operation. Ignored if a Resolve* StoreOp is not used. |
StoreOp | What is done with the results of the render pass. |
Texture | The texture that will be used as a color target by a render pass. |
Property Descriptions
ClearColor
The color to clear the color target to at the start of the render pass. Ignored if TSdlGpuLoadOp.Clear is not used.
property ClearColor: TSdlColorF read GetClearColor write SetClearColor
Type: TSdlColorF
Cycle
True cycles the texture if the texture is bound and LoadOp is not Load.
property Cycle: Boolean read FHandle.cycle write FHandle.cycle
Type: Boolean
CycleResolveTexture
True cycles the resolve texture if the resolve texture is bound. Ignored if a Resolve* StoreOp is not used.
property CycleResolveTexture: Boolean read FHandle.cycle_resolve_texture write FHandle.cycle_resolve_texture
Type: Boolean
LayerOrDepthPlane
The layer index or depth plane to use as a color target. This value is treated as a layer index on 2D array and cube textures, and as a depth plane on 3D textures.
property LayerOrDepthPlane: Integer read FHandle.layer_or_depth_plane write FHandle.layer_or_depth_plane
Type: Integer
LoadOp
What is done with the contents of the color target at the beginning of the render pass.
property LoadOp: TSdlGpuLoadOp read GetLoadOp write SetLoadOp
Type: TSdlGpuLoadOp
MipLevel
The mip level to use as a color target.
property MipLevel: Integer read FHandle.mip_level write FHandle.mip_level
Type: Integer
ResolveLayer
The layer index of the resolve texture to use for the resolve operation. Ignored if a Resolve* StoreOp is not used.
property ResolveLayer: Integer read FHandle.resolve_layer write FHandle.resolve_layer
Type: Integer
ResolveMipLevel
The mip level of the resolve texture to use for the resolve operation. Ignored if a Resolve* StoreOp is not used.
property ResolveMipLevel: Integer read FHandle.resolve_mip_level write FHandle.resolve_mip_level
Type: Integer
ResolveTexture
The texture that will receive the results of a multisample resolve operation. Ignored if a Resolve* StoreOp is not used.
property ResolveTexture: TSdlGpuTexture read GetResolveTexture write SetResolveTexture
Type: TSdlGpuTexture
StoreOp
What is done with the results of the render pass.
property StoreOp: TSdlGpuStoreOp read GetStoreOp write SetStoreOp
Type: TSdlGpuStoreOp
Texture
The texture that will be used as a color target by a render pass.
property Texture: TSdlGpuTexture read GetTexture write SetTexture
Type: TSdlGpuTexture