Enum components::platform::core::DepthTestFunction
source · [−]#[non_exhaustive]
pub enum DepthTestFunction {
Never,
Less,
Equal,
Lequal,
Greater,
Notequal,
Gequal,
Always,
}
Expand description
Used to compare the depth of an incoming fragment
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 fn 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
sourceimpl Clone for DepthTestFunction
impl Clone for DepthTestFunction
sourcefn clone(&self) -> DepthTestFunction
fn clone(&self) -> DepthTestFunction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DepthTestFunction
impl Debug for DepthTestFunction
sourceimpl Display for DepthTestFunction
impl Display for DepthTestFunction
sourceimpl Hash for DepthTestFunction
impl Hash for DepthTestFunction
sourceimpl Ord for DepthTestFunction
impl Ord for DepthTestFunction
sourceimpl PartialOrd<DepthTestFunction> for DepthTestFunction
impl PartialOrd<DepthTestFunction> for DepthTestFunction
sourcefn partial_cmp(&self, other: &DepthTestFunction) -> Option<Ordering>
fn partial_cmp(&self, other: &DepthTestFunction) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for DepthTestFunction
impl Eq for DepthTestFunction
impl StructuralEq for DepthTestFunction
impl StructuralPartialEq for DepthTestFunction
Auto Trait Implementations
impl RefUnwindSafe for DepthTestFunction
impl Send for DepthTestFunction
impl Sync for DepthTestFunction
impl Unpin for DepthTestFunction
impl UnwindSafe for DepthTestFunction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Clamp<T> for T where
T: PartialOrd<T>,
impl<T> Clamp<T> for T where
T: PartialOrd<T>,
fn clamped(self, min: T, max: T) -> T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.