Skip to main content

SDL_GPUDepthStencilTargetInfo

Struct SDL_GPUDepthStencilTargetInfo 

Source
#[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

Source§

fn clone(&self) -> SDL_GPUDepthStencilTargetInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SDL_GPUDepthStencilTargetInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SDL_GPUDepthStencilTargetInfo

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for SDL_GPUDepthStencilTargetInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.