Skip to main content

DepthStencilInfo

Struct DepthStencilInfo 

Source
pub struct DepthStencilInfo {
    pub back: StencilMode,
    pub bounds_test: bool,
    pub compare_op: CompareOp,
    pub depth_test: bool,
    pub depth_write: bool,
    pub front: StencilMode,
    pub min: OrderedFloat<f32>,
    pub max: OrderedFloat<f32>,
    pub stencil_test: bool,
}
Expand description

Specifies the [depth bounds tests], [stencil test], and [depth test] pipeline state.

See VkPipelineDepthStencilStateCreateInfo.

Fields§

§back: StencilMode

Control parameters of the stencil test.

Defaults to StencilMode::IGNORE.

§bounds_test: bool

Controls whether [depth bounds testing] is enabled.

See VkPipelineDepthStencilStateCreateInfo.

§compare_op: CompareOp

A value specifying the comparison operator to use in the [depth comparison] step of the [depth test].

See VkPipelineDepthStencilStateCreateInfo.

Defaults to vk::CompareOp::NEVER.

§depth_test: bool

Controls whether [depth testing] is enabled.

See VkPipelineDepthStencilStateCreateInfo.

§depth_write: bool

Controls whether [depth writes] are enabled when depth_test is true.

Depth writes are always disabled when depth_test is false.

See VkPipelineDepthStencilStateCreateInfo.

§front: StencilMode

Control parameters of the stencil test.

Defaults to StencilMode::IGNORE.

§min: OrderedFloat<f32>

Minimum depth bound used in the [depth bounds test].

See VkPipelineDepthStencilStateCreateInfo.

§max: OrderedFloat<f32>

Maximum depth bound used in the [depth bounds test].

See VkPipelineDepthStencilStateCreateInfo.

§stencil_test: bool

Controls whether [stencil testing] is enabled.

See VkPipelineDepthStencilStateCreateInfo.

Implementations§

Source§

impl DepthStencilInfo

Source

pub const IGNORE: Self

Specifies a no-depth/no-stencil mode.

This is the default state.

Source

pub const DEPTH_WRITE_LESS: Self

Common depth-write mode for normal-Z depth buffers.

Source

pub const DEPTH_WRITE_LESS_OR_EQUAL: Self

Common depth-write mode for normal-Z depth buffers when equal depth passes are accepted.

Source

pub const DEPTH_WRITE_GREATER: Self

Common depth-write mode for reversed-Z depth buffers.

Source

pub const DEPTH_WRITE_GREATER_OR_EQUAL: Self

Common depth-write mode for reversed-Z depth buffers when equal depth passes are accepted.

Source

pub const DEPTH_WRITE_LESS_IGNORE_STENCIL: Self = Self::DEPTH_WRITE_LESS

A commonly used normal-Z depth-write mode with stencil ignored.

Source

pub const fn depth_read(compare_op: CompareOp) -> Self

Creates a depth-read mode with stencil ignored.

Source

pub const fn depth_write(compare_op: CompareOp) -> Self

Creates a depth-write mode with stencil ignored.

Source

pub const fn depth_read_write(compare_op: CompareOp) -> Self

Creates a depth-read/write mode with stencil ignored.

Source

pub fn builder() -> DepthStencilInfoBuilder

Creates a default DepthStencilInfoBuilder.

Source

pub fn into_builder(self) -> DepthStencilInfoBuilder

Converts a DepthStencilInfo into a DepthStencilInfoBuilder.

Trait Implementations§

Source§

impl Clone for DepthStencilInfo

Source§

fn clone(&self) -> DepthStencilInfo

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for DepthStencilInfo

Source§

impl Debug for DepthStencilInfo

Source§

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

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

impl Default for DepthStencilInfo

Source§

fn default() -> Self

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

impl Eq for DepthStencilInfo

Source§

impl From<DepthStencilInfo> for PipelineDepthStencilStateCreateInfo<'_>

Source§

fn from(info: DepthStencilInfo) -> Self

Converts to this type from the input type.
Source§

impl Hash for DepthStencilInfo

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for DepthStencilInfo

Source§

fn eq(&self, other: &DepthStencilInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for DepthStencilInfo

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.