#[repr(C)]pub struct SDL_GPUDepthStencilTargetInfo {
pub texture: *mut SDL_GPUTexture,
pub clear_depth: f32,
pub load_op: SDL_GPULoadOp,
pub store_op: SDL_GPUStoreOp,
pub stencil_load_op: SDL_GPULoadOp,
pub stencil_store_op: SDL_GPUStoreOp,
pub cycle: bool,
pub clear_stencil: Uint8,
pub mip_level: Uint8,
pub layer: Uint8,
}Expand description
A structure specifying the parameters of a depth-stencil target used by a render pass.
The load_op field determines what is done with the depth contents of the texture at the beginning of the render pass.
- LOAD: Loads the depth values currently in the texture.
- CLEAR: Clears the texture to a single depth.
- DONT_CARE: The driver will do whatever it wants with the memory. This is a good option if you know that every single pixel will be touched in the render pass.
The store_op field determines what is done with the depth results of the render pass.
- STORE: Stores the depth results in the texture.
- DONT_CARE: The driver will do whatever it wants with the depth results. This is often a good option for depth/stencil textures that don’t need to be reused again.
The stencil_load_op field determines what is done with the stencil contents of the texture at the beginning of the render pass.
- LOAD: Loads the stencil values currently in the texture.
- CLEAR: Clears the stencil values to a single value.
- DONT_CARE: The driver will do whatever it wants with the memory. This is a good option if you know that every single pixel will be touched in the render pass.
The stencil_store_op field determines what is done with the stencil results of the render pass.
- STORE: Stores the stencil results in the texture.
- DONT_CARE: The driver will do whatever it wants with the stencil results. This is often a good option for depth/stencil textures that don’t need to be reused again.
Note that depth/stencil targets do not support multisample resolves.
Due to ABI limitations, depth textures with more than 255 layers are not supported.
Available Since: This struct is available since SDL 3.2.0.
See Also: SDL_BeginGPURenderPass
Fields§
§texture: *mut SDL_GPUTexture< The texture that will be used as the depth stencil target by the render pass.
clear_depth: f32< The value to clear the depth component to at the beginning of the render pass. Ignored if SDL_GPU_LOADOP_CLEAR is not used.
load_op: SDL_GPULoadOp< What is done with the depth contents at the beginning of the render pass.
store_op: SDL_GPUStoreOp< What is done with the depth results of the render pass.
stencil_load_op: SDL_GPULoadOp< What is done with the stencil contents at the beginning of the render pass.
stencil_store_op: SDL_GPUStoreOp< What is done with the stencil results of the render pass.
cycle: bool< true cycles the texture if the texture is bound and any load ops are not LOAD
clear_stencil: Uint8< The value to clear the stencil component to at the beginning of the render pass. Ignored if SDL_GPU_LOADOP_CLEAR is not used.
mip_level: Uint8< The mip level to use as the depth stencil target.
layer: Uint8< The layer index to use as the depth stencil target.
Trait Implementations§
Source§impl Clone for SDL_GPUDepthStencilTargetInfo
impl Clone for SDL_GPUDepthStencilTargetInfo
Source§fn clone(&self) -> SDL_GPUDepthStencilTargetInfo
fn clone(&self) -> SDL_GPUDepthStencilTargetInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more