#[repr(C)]pub struct RasterizerState { /* private fields */ }
Implementations§
Source§impl RasterizerState
impl RasterizerState
pub fn new() -> Self
Sourcepub fn with_fill_mode(self, fill_mode: FillMode) -> Self
pub fn with_fill_mode(self, fill_mode: FillMode) -> Self
Whether polygons will be filled in or drawn as lines.
Sourcepub fn with_cull_mode(self, cull_mode: CullMode) -> Self
pub fn with_cull_mode(self, cull_mode: CullMode) -> Self
The facing direction in which triangles will be culled.
Sourcepub fn with_front_face(self, front_face: FrontFace) -> Self
pub fn with_front_face(self, front_face: FrontFace) -> Self
The vertex winding that will cause a triangle to be determined as front-facing.
Sourcepub fn with_depth_bias_constant_factor(self, value: f32) -> Self
pub fn with_depth_bias_constant_factor(self, value: f32) -> Self
A scalar factor controlling the depth value added to each fragment.
Sourcepub fn with_depth_bias_clamp(self, value: f32) -> Self
pub fn with_depth_bias_clamp(self, value: f32) -> Self
The maximum depth bias of a fragment.
Sourcepub fn with_depth_slope_factor(self, value: f32) -> Self
pub fn with_depth_slope_factor(self, value: f32) -> Self
A scalar factor applied to a fragment’s slope in depth calculations.
Sourcepub fn with_enable_depth_bias(self, value: bool) -> Self
pub fn with_enable_depth_bias(self, value: bool) -> Self
True to bias fragment depth values.
Sourcepub fn with_enable_depth_clip(self, value: bool) -> Self
pub fn with_enable_depth_clip(self, value: bool) -> Self
True to enable depth clip, false to enable depth clamp.
Trait Implementations§
Source§impl Default for RasterizerState
impl Default for RasterizerState
Source§fn default() -> RasterizerState
fn default() -> RasterizerState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RasterizerState
impl RefUnwindSafe for RasterizerState
impl Send for RasterizerState
impl Sync for RasterizerState
impl Unpin for RasterizerState
impl UnwindSafe for RasterizerState
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