pub struct Rasterizer {
pub front_face: FrontFace,
pub cull_face: CullFace,
pub method: RasterMethod,
pub offset: Option<Offset>,
pub samples: Option<MultiSample>,
}Expand description
Primitive rasterization state. Note that GL allows different raster method to be used for front and back, while this abstraction does not.
Fields§
§front_face: FrontFaceWhich vertex winding is considered to be the front face for culling.
cull_face: CullFaceWhich face should be culled.
method: RasterMethodHow to rasterize this primitive.
offset: Option<Offset>Any polygon offset to apply.
samples: Option<MultiSample>Multi-sampling mode.
Implementations§
Source§impl Rasterizer
impl Rasterizer
Sourcepub fn new_fill() -> Rasterizer
pub fn new_fill() -> Rasterizer
Create a new filling rasterizer.
Sourcepub fn with_cull_back(self) -> Rasterizer
pub fn with_cull_back(self) -> Rasterizer
Add back face culling.
Sourcepub fn with_offset(self, slope: f32, units: i32) -> Rasterizer
pub fn with_offset(self, slope: f32, units: i32) -> Rasterizer
Add polygon offset.
Trait Implementations§
Source§impl Clone for Rasterizer
impl Clone for Rasterizer
Source§fn clone(&self) -> Rasterizer
fn clone(&self) -> Rasterizer
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 Rasterizer
impl Debug for Rasterizer
Source§impl Hash for Rasterizer
impl Hash for Rasterizer
Source§impl PartialEq for Rasterizer
impl PartialEq for Rasterizer
Source§impl PartialOrd for Rasterizer
impl PartialOrd for Rasterizer
impl Copy for Rasterizer
impl Eq for Rasterizer
impl StructuralPartialEq for Rasterizer
Auto Trait Implementations§
impl Freeze for Rasterizer
impl RefUnwindSafe for Rasterizer
impl Send for Rasterizer
impl Sync for Rasterizer
impl Unpin for Rasterizer
impl UnwindSafe for Rasterizer
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