Enum cogl::DepthTestFunction[][src]

#[non_exhaustive]
pub enum DepthTestFunction {
    Never,
    Less,
    Equal,
    Lequal,
    Greater,
    Notequal,
    Gequal,
    Always,
    // some variants omitted
}

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)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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

impl Clone for DepthTestFunction[src]

impl Copy for DepthTestFunction[src]

impl Debug for DepthTestFunction[src]

impl Display for DepthTestFunction[src]

impl Eq for DepthTestFunction[src]

impl<'a> FromValue<'a> for DepthTestFunction[src]

impl<'a> FromValueOptional<'a> for DepthTestFunction[src]

impl Hash for DepthTestFunction[src]

impl Ord for DepthTestFunction[src]

impl PartialEq<DepthTestFunction> for DepthTestFunction[src]

impl PartialOrd<DepthTestFunction> for DepthTestFunction[src]

impl SetValue for DepthTestFunction[src]

impl StaticType for DepthTestFunction[src]

impl StructuralEq for DepthTestFunction[src]

impl StructuralPartialEq for DepthTestFunction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: SetValue + Send + ToValue + ?Sized
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.