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.
Fields§
§back: StencilModeControl parameters of the stencil test.
Defaults to StencilMode::IGNORE.
bounds_test: boolControls whether [depth bounds testing] is enabled.
compare_op: CompareOpA 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: boolControls whether [depth testing] is enabled.
depth_write: boolControls whether [depth writes] are enabled when depth_test is true.
Depth writes are always disabled when depth_test is false.
front: StencilModeControl parameters of the stencil test.
Defaults to StencilMode::IGNORE.
min: OrderedFloat<f32>Minimum depth bound used in the [depth bounds test].
max: OrderedFloat<f32>Maximum depth bound used in the [depth bounds test].
stencil_test: boolControls whether [stencil testing] is enabled.
Implementations§
Source§impl DepthStencilInfo
impl DepthStencilInfo
Sourcepub const DEPTH_WRITE_LESS: Self
pub const DEPTH_WRITE_LESS: Self
Common depth-write mode for normal-Z depth buffers.
Sourcepub const DEPTH_WRITE_LESS_OR_EQUAL: Self
pub const DEPTH_WRITE_LESS_OR_EQUAL: Self
Common depth-write mode for normal-Z depth buffers when equal depth passes are accepted.
Sourcepub const DEPTH_WRITE_GREATER: Self
pub const DEPTH_WRITE_GREATER: Self
Common depth-write mode for reversed-Z depth buffers.
Sourcepub const DEPTH_WRITE_GREATER_OR_EQUAL: Self
pub const DEPTH_WRITE_GREATER_OR_EQUAL: Self
Common depth-write mode for reversed-Z depth buffers when equal depth passes are accepted.
Sourcepub const DEPTH_WRITE_LESS_IGNORE_STENCIL: Self = Self::DEPTH_WRITE_LESS
pub const DEPTH_WRITE_LESS_IGNORE_STENCIL: Self = Self::DEPTH_WRITE_LESS
A commonly used normal-Z depth-write mode with stencil ignored.
Sourcepub const fn depth_read(compare_op: CompareOp) -> Self
pub const fn depth_read(compare_op: CompareOp) -> Self
Creates a depth-read mode with stencil ignored.
Sourcepub const fn depth_write(compare_op: CompareOp) -> Self
pub const fn depth_write(compare_op: CompareOp) -> Self
Creates a depth-write mode with stencil ignored.
Sourcepub const fn depth_read_write(compare_op: CompareOp) -> Self
pub const fn depth_read_write(compare_op: CompareOp) -> Self
Creates a depth-read/write mode with stencil ignored.
Sourcepub fn builder() -> DepthStencilInfoBuilder
pub fn builder() -> DepthStencilInfoBuilder
Creates a default DepthStencilInfoBuilder.
Sourcepub fn into_builder(self) -> DepthStencilInfoBuilder
pub fn into_builder(self) -> DepthStencilInfoBuilder
Converts a DepthStencilInfo into a DepthStencilInfoBuilder.
Trait Implementations§
Source§impl Clone for DepthStencilInfo
impl Clone for DepthStencilInfo
Source§fn clone(&self) -> DepthStencilInfo
fn clone(&self) -> DepthStencilInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DepthStencilInfo
Source§impl Debug for DepthStencilInfo
impl Debug for DepthStencilInfo
Source§impl Default for DepthStencilInfo
impl Default for DepthStencilInfo
impl Eq for DepthStencilInfo
Source§impl From<DepthStencilInfo> for PipelineDepthStencilStateCreateInfo<'_>
impl From<DepthStencilInfo> for PipelineDepthStencilStateCreateInfo<'_>
Source§fn from(info: DepthStencilInfo) -> Self
fn from(info: DepthStencilInfo) -> Self
Source§impl Hash for DepthStencilInfo
impl Hash for DepthStencilInfo
Source§impl PartialEq for DepthStencilInfo
impl PartialEq for DepthStencilInfo
Source§fn eq(&self, other: &DepthStencilInfo) -> bool
fn eq(&self, other: &DepthStencilInfo) -> bool
self and other values to be equal, and is used by ==.