Struct gfx::state::Rasterizer
source · 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 copy 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<Rasterizer> for Rasterizer
impl PartialEq<Rasterizer> for Rasterizer
source§fn eq(&self, other: &Rasterizer) -> bool
fn eq(&self, other: &Rasterizer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<Rasterizer> for Rasterizer
impl PartialOrd<Rasterizer> for Rasterizer
source§fn partial_cmp(&self, other: &Rasterizer) -> Option<Ordering>
fn partial_cmp(&self, other: &Rasterizer) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more