Struct tetra::graphics::StencilState [−][src]
pub struct StencilState {
pub enabled: bool,
pub action: StencilAction,
pub test: StencilTest,
pub reference_value: u8,
pub write_mask: u8,
pub read_mask: u8,
}
Expand description
Represents a global stencil configuration.
Fields
enabled: bool
Whether stencil testing is enabled.
When set to true
, pixels drawn will be hidden
or visible depending on the stencil test and the
contents of the stencil buffer.
action: StencilAction
How drawing operations will affect the stencil buffer.
test: StencilTest
How drawn pixels will be compared to the contents of the stencil buffer to determine if they’re visible.
reference_value: u8
The value used for most StencilTest
s and
StencilAction::Replace
.
write_mask: u8
A bitmask that will be ANDed with stencil values before they’re written to the buffer.
read_mask: u8
A bitmask that will be ANDed with both the reference value and the stencil value before a stencil test occurs.
Implementations
Creates a stencil configuration that will disable use of the stencil buffer.
Creates a stencil configuration that will write pixels to the stencil buffer.
Creates a stencil configuration that will compare drawn pixels to the contents of the stencil buffer to determine which pixels are visible.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for StencilState
impl Send for StencilState
impl Sync for StencilState
impl Unpin for StencilState
impl UnwindSafe for StencilState
Blanket Implementations
Mutably borrows from an owned value. Read more