Struct screen_13::driver::graphic::DepthStencilMode
source · pub struct DepthStencilMode {
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: StencilMode
Control parameters of the stencil test.
bounds_test: bool
Controls whether depth bounds testing is enabled.
compare_op: CompareOp
A value specifying the comparison operator to use in the depth comparison step of the depth test.
depth_test: bool
Controls whether depth testing is enabled.
depth_write: bool
Controls whether depth writes are enabled when depth_test
is true
.
Depth writes are always disabled when depth_test
is false
.
front: StencilMode
Control parameters of the stencil test.
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: bool
Controls whether stencil testing is enabled.
Implementations§
source§impl DepthStencilMode
impl DepthStencilMode
sourcepub const DEPTH_READ: Self = _
pub const DEPTH_READ: Self = _
A commonly used depth/stencil mode
sourcepub const DEPTH_WRITE: Self = _
pub const DEPTH_WRITE: Self = _
A commonly used depth/stencil mode
sourcepub fn new() -> DepthStencilModeBuilder
pub fn new() -> DepthStencilModeBuilder
Specifies a default depth/stencil mode which is equal to DepthStencilMode::IGNORE
.
Trait Implementations§
source§impl Clone for DepthStencilMode
impl Clone for DepthStencilMode
source§fn clone(&self) -> DepthStencilMode
fn clone(&self) -> DepthStencilMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DepthStencilMode
impl Debug for DepthStencilMode
source§impl Hash for DepthStencilMode
impl Hash for DepthStencilMode
source§impl Ord for DepthStencilMode
impl Ord for DepthStencilMode
source§fn cmp(&self, other: &DepthStencilMode) -> Ordering
fn cmp(&self, other: &DepthStencilMode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for DepthStencilMode
impl PartialEq for DepthStencilMode
source§fn eq(&self, other: &DepthStencilMode) -> bool
fn eq(&self, other: &DepthStencilMode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for DepthStencilMode
impl PartialOrd for DepthStencilMode
source§fn partial_cmp(&self, other: &DepthStencilMode) -> Option<Ordering>
fn partial_cmp(&self, other: &DepthStencilMode) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for DepthStencilMode
impl Eq for DepthStencilMode
impl StructuralPartialEq for DepthStencilMode
Auto Trait Implementations§
impl RefUnwindSafe for DepthStencilMode
impl Send for DepthStencilMode
impl Sync for DepthStencilMode
impl Unpin for DepthStencilMode
impl UnwindSafe for DepthStencilMode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.