#[non_exhaustive]pub enum DepthTestFunction {
Never,
Less,
Equal,
Lequal,
Greater,
Notequal,
Gequal,
Always,
}
Expand description
When using depth testing one of these functions is used to compare
the depth of an incoming fragment against the depth value currently
stored in the depth buffer. The function is changed using
DepthState::set_test_function
.
The test is only done when depth testing is explicitly enabled. (See
DepthState::set_test_enabled
)
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Never
Never passes.
Less
Passes if the fragment’s depth value is less than the value currently in the depth buffer.
Equal
Passes if the fragment’s depth value is equal to the value currently in the depth buffer.
Lequal
Passes if the fragment’s depth value is less or equal to the value currently in the depth buffer.
Greater
Passes if the fragment’s depth value is greater than the value currently in the depth buffer.
Notequal
Passes if the fragment’s depth value is not equal to the value currently in the depth buffer.
Gequal
Passes if the fragment’s depth value greater than or equal to the value currently in the depth buffer.
Always
Always passes.
Trait Implementations§
Source§impl Clone for DepthTestFunction
impl Clone for DepthTestFunction
Source§fn clone(&self) -> DepthTestFunction
fn clone(&self) -> DepthTestFunction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DepthTestFunction
impl Debug for DepthTestFunction
Source§impl Display for DepthTestFunction
impl Display for DepthTestFunction
Source§impl<'a> FromValue<'a> for DepthTestFunction
impl<'a> FromValue<'a> for DepthTestFunction
Source§unsafe fn from_value(value: &Value) -> Self
unsafe fn from_value(value: &Value) -> Self
Source§impl<'a> FromValueOptional<'a> for DepthTestFunction
impl<'a> FromValueOptional<'a> for DepthTestFunction
Source§impl Hash for DepthTestFunction
impl Hash for DepthTestFunction
Source§impl Ord for DepthTestFunction
impl Ord for DepthTestFunction
Source§fn cmp(&self, other: &DepthTestFunction) -> Ordering
fn cmp(&self, other: &DepthTestFunction) -> 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 DepthTestFunction
impl PartialEq for DepthTestFunction
Source§impl PartialOrd for DepthTestFunction
impl PartialOrd for DepthTestFunction
Source§impl SetValue for DepthTestFunction
impl SetValue for DepthTestFunction
Source§impl StaticType for DepthTestFunction
impl StaticType for DepthTestFunction
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Copy for DepthTestFunction
impl Eq for DepthTestFunction
impl StructuralPartialEq for DepthTestFunction
Auto Trait Implementations§
impl Freeze for DepthTestFunction
impl RefUnwindSafe for DepthTestFunction
impl Send for DepthTestFunction
impl Sync for DepthTestFunction
impl Unpin for DepthTestFunction
impl UnwindSafe for DepthTestFunction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.