[][src]Struct vulkano::pipeline::depth_stencil::Stencil

pub struct Stencil {
    pub compare: Compare,
    pub pass_op: StencilOp,
    pub fail_op: StencilOp,
    pub depth_fail_op: StencilOp,
    pub compare_mask: Option<u32>,
    pub write_mask: Option<u32>,
    pub reference: Option<u32>,
}

Configuration of a stencil test.

Fields

compare: Compare

The comparison to perform between the existing stencil value in the stencil buffer, and the reference value (given by reference).

pass_op: StencilOp

The operation to perform when both the depth test and the stencil test passed.

fail_op: StencilOp

The operation to perform when the stencil test failed.

depth_fail_op: StencilOp

The operation to perform when the stencil test passed but the depth test failed.

compare_mask: Option<u32>

Selects the bits of the unsigned integer stencil values participating in the stencil test.

Ignored if compare is Never or Always.

If None, then this value is dynamic and will need to be set when drawing. Doesn't apply if compare is Never or Always.

Note that if this value is Some in stencil_front, it must also be Some in stencil_back (but the content can be different). If this value is None in stencil_front, then it must also be None in stencil_back. This rule doesn't apply if compare is Never or Always.

write_mask: Option<u32>

Selects the bits of the unsigned integer stencil values updated by the stencil test in the stencil framebuffer attachment.

If None, then this value is dynamic and will need to be set when drawing.

Note that if this value is Some in stencil_front, it must also be Some in stencil_back (but the content can be different). If this value is None in stencil_front, then it must also be None in stencil_back.

reference: Option<u32>

Reference value that is used in the unsigned stencil comparison.

If None, then this value is dynamic and will need to be set when drawing.

Note that if this value is Some in stencil_front, it must also be Some in stencil_back (but the content can be different). If this value is None in stencil_front, then it must also be None in stencil_back.

Methods

impl Stencil[src]

pub fn always_keep(&self) -> bool[src]

Returns true if the stencil operation will always result in Keep.

Trait Implementations

impl Default for Stencil[src]

impl Clone for Stencil[src]

impl Copy for Stencil[src]

impl Debug for Stencil[src]

Auto Trait Implementations

impl Send for Stencil

impl Unpin for Stencil

impl Sync for Stencil

impl UnwindSafe for Stencil

impl RefUnwindSafe for Stencil

Blanket Implementations

impl<T> Content for T[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for T[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.

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

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

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