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

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>,
}
Expand description

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.

Implementations

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Builds a pointer to this type from a raw pointer.

Returns true if the size is suitable to store a type like this.

Returns the size of an individual element.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.