Struct three::custom::state::Rasterizer
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
impl Rasterizer
impl Rasterizer
pub fn new_fill() -> Rasterizer
pub fn new_fill() -> Rasterizer
Create a new filling rasterizer.
pub fn with_cull_back(self) -> Rasterizer
pub fn with_cull_back(self) -> Rasterizer
Add back face culling.
pub fn with_offset(self, slope: f32, units: i32) -> Rasterizer
pub fn with_offset(self, slope: f32, units: i32) -> Rasterizer
Add polygon offset.
Trait Implementations
impl Clone for Rasterizer
impl Clone for Rasterizer
fn clone(&self) -> Rasterizer
fn clone(&self) -> Rasterizer
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Debug for Rasterizer
impl Debug for Rasterizer
impl Hash for Rasterizer
impl Hash for Rasterizer
impl PartialEq<Rasterizer> for Rasterizer
impl PartialEq<Rasterizer> for Rasterizer
fn eq(&self, other: &Rasterizer) -> bool
fn eq(&self, other: &Rasterizer) -> bool
impl PartialOrd<Rasterizer> for Rasterizer
impl PartialOrd<Rasterizer> for Rasterizer
fn partial_cmp(&self, other: &Rasterizer) -> Option<Ordering>
fn partial_cmp(&self, other: &Rasterizer) -> Option<Ordering>
1.0.0 · sourcefn 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 moreimpl Copy for Rasterizer
impl Eq for Rasterizer
impl StructuralEq for Rasterizer
impl StructuralPartialEq for Rasterizer
Auto Trait Implementations
impl RefUnwindSafe for Rasterizer
impl Send for Rasterizer
impl Sync for Rasterizer
impl Unpin for Rasterizer
impl UnwindSafe for Rasterizer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
Sets
value
as a parameter of self
.