logo
pub struct StencilOpState {
    pub ops: StateMode<StencilOps>,
    pub compare_mask: StateMode<u32>,
    pub write_mask: StateMode<u32>,
    pub reference: StateMode<u32>,
}
Expand description

Stencil test operations for a single face.

Fields

ops: StateMode<StencilOps>

The stencil operations to perform.

If set to Dynamic, the device API version must be at least 1.3, or the extended_dynamic_state feature must be enabled on the device.

compare_mask: StateMode<u32>

A bitmask that selects the bits of the unsigned integer stencil values participating in the stencil test. Ignored if compare_op is Never or Always.

write_mask: StateMode<u32>

A bitmask that selects the bits of the unsigned integer stencil values updated by the stencil test in the stencil framebuffer attachment. Ignored if the relevant operation is Keep.

reference: StateMode<u32>

Reference value that is used in the unsigned stencil comparison. The stencil test is considered to pass if the compare_op between the stencil buffer value and this reference value yields true.

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

Creates a StencilOpState with no dynamic state, compare_op set to Never, the stencil operations set to Keep, and the masks and reference values set to u32::MAX.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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)

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.