logo
pub struct StencilState {
    pub enable_dynamic: bool,
    pub front: StencilOpState,
    pub back: StencilOpState,
}
Expand description

The state in a graphics pipeline describing how the stencil test should behave when enabled.

Dynamic state can only be enabled or disabled for both faces at once. Therefore, the dynamic state values in StencilOpState, must match: the values for front and back must either both be Fixed or both be Dynamic.

Fields

enable_dynamic: bool

Sets whether stencil testing should be enabled and disabled dynamically. If set to false, stencil testing is always enabled.

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

front: StencilOpState

The stencil operation state to use for points and lines, and for triangles whose front is facing the user.

back: StencilOpState

The stencil operation state to use for triangles whose back is facing the user.

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

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.