[][src]Enum glium::StencilTest

pub enum StencilTest {
    AlwaysPass,
    AlwaysFail,
    IfLess {
        mask: u32,
    },
    IfLessOrEqual {
        mask: u32,
    },
    IfMore {
        mask: u32,
    },
    IfMoreOrEqual {
        mask: u32,
    },
    IfEqual {
        mask: u32,
    },
    IfNotEqual {
        mask: u32,
    },
}

Specifies which comparison the GPU will do to determine whether a sample passes the stencil test. The general equation is (ref & mask) CMP (stencil & mask), where ref is the reference value (stencil_reference_value_clockwise or stencil_reference_value_counter_clockwise), CMP is the comparison chosen, and stencil is the current value in the stencil buffer.

Variants

AlwaysPass

The stencil test always passes.

AlwaysFail

The stencil test always fails.

IfLess

(ref & mask) < (stencil & mask)

Fields of IfLess

mask: u32

The mask that is and'ed with the reference value and stencil buffer.

IfLessOrEqual

(ref & mask) <= (stencil & mask)

Fields of IfLessOrEqual

mask: u32

The mask that is and'ed with the reference value and stencil buffer.

IfMore

(ref & mask) > (stencil & mask)

Fields of IfMore

mask: u32

The mask that is and'ed with the reference value and stencil buffer.

IfMoreOrEqual

(ref & mask) >= (stencil & mask)

Fields of IfMoreOrEqual

mask: u32

The mask that is and'ed with the reference value and stencil buffer.

IfEqual

(ref & mask) == (stencil & mask)

Fields of IfEqual

mask: u32

The mask that is and'ed with the reference value and stencil buffer.

IfNotEqual

(ref & mask) != (stencil & mask)

Fields of IfNotEqual

mask: u32

The mask that is and'ed with the reference value and stencil buffer.

Trait Implementations

impl Clone for StencilTest[src]

impl Copy for StencilTest[src]

impl Debug for StencilTest[src]

impl Eq for StencilTest[src]

impl PartialEq<StencilTest> for StencilTest[src]

impl StructuralEq for StencilTest[src]

impl StructuralPartialEq for StencilTest[src]

Auto Trait Implementations

impl RefUnwindSafe for StencilTest

impl Send for StencilTest

impl Sync for StencilTest

impl Unpin for StencilTest

impl UnwindSafe for StencilTest

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> Content for T where
    T: Copy
[src]

type Owned = T

A type that holds a sized version of the content.

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, 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.