Enum glium::draw_parameters::StencilTest
source · pub enum StencilTest {
AlwaysPass,
AlwaysFail,
IfLess {
mask: u32,
},
IfLessOrEqual {
mask: u32,
},
IfMore {
mask: u32,
},
IfMoreOrEqual {
mask: u32,
},
IfEqual {
mask: u32,
},
IfNotEqual {
mask: u32,
},
}
Expand description
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)
IfLessOrEqual
(ref & mask) <= (stencil & mask)
IfMore
(ref & mask) > (stencil & mask)
IfMoreOrEqual
(ref & mask) >= (stencil & mask)
IfEqual
(ref & mask) == (stencil & mask)
IfNotEqual
(ref & mask) != (stencil & mask)
Trait Implementations§
source§impl Clone for StencilTest
impl Clone for StencilTest
source§fn clone(&self) -> StencilTest
fn clone(&self) -> StencilTest
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StencilTest
impl Debug for StencilTest
source§impl PartialEq<StencilTest> for StencilTest
impl PartialEq<StencilTest> for StencilTest
source§fn eq(&self, other: &StencilTest) -> bool
fn eq(&self, other: &StencilTest) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for StencilTest
impl Eq for StencilTest
impl StructuralEq for StencilTest
impl StructuralPartialEq for StencilTest
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§
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
Mutably borrows from an owned value. Read more
source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere T: Copy,
source§fn read<F, E>(size: usize, f: F) -> Result<T, E>where
F: FnOnce(&mut T) -> Result<(), E>,
fn read<F, E>(size: usize, f: F) -> Result<T, E>where F: FnOnce(&mut T) -> Result<(), E>,
Prepares an output buffer, then turns this buffer into an
Owned
.source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Returns the size of each element.
source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Produces a pointer to the data.
source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.