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: FrontFace
Which vertex winding is considered to be the front face for culling.
cull_face: CullFace
Which face should be culled.
method: RasterMethod
How 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more