pub struct RenderStates {
pub write_mask: WriteMask,
pub depth_test: DepthTest,
pub blend: Blend,
pub cull: Cull,
}Expand description
A set of render specific states that has to be specified at each render call.
Fields§
§write_mask: WriteMaskDefines which channels (red, green, blue, alpha and depth) to write to in a render call.
depth_test: DepthTestDefines the depth test in a render call. The depth test determines whether or not a fragment from the current render call should be discarded when comparing its depth with the depth of the current fragment.
blend: BlendDefines which type of blending to use for a render call. Blending allows combining each color channel of a render call with the color already in the color channels of the render target. This is usually used to simulate transparency.
cull: CullDefines whether the triangles that are backfacing, frontfacing or both should be skipped in a render call.
Trait Implementations§
Source§impl Clone for RenderStates
impl Clone for RenderStates
Source§fn clone(&self) -> RenderStates
fn clone(&self) -> RenderStates
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RenderStates
impl Debug for RenderStates
Source§impl Default for RenderStates
impl Default for RenderStates
Source§fn default() -> RenderStates
fn default() -> RenderStates
Returns the “default value” for a type. Read more
impl Copy for RenderStates
Auto Trait Implementations§
impl Freeze for RenderStates
impl RefUnwindSafe for RenderStates
impl Send for RenderStates
impl Sync for RenderStates
impl Unpin for RenderStates
impl UnwindSafe for RenderStates
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more