Struct gfx::state::Rasterizer[][src]

pub struct Rasterizer {
    pub front_face: FrontFace,
    pub cull_face: CullFace,
    pub method: RasterMethod,
    pub offset: Option<Offset>,
    pub samples: Option<MultiSample>,
}

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[src]

pub fn new_fill() -> Rasterizer[src]

Create a new filling rasterizer.

pub fn with_cull_back(self) -> Rasterizer[src]

Add back face culling.

pub fn with_offset(self, slope: f32, units: i32) -> Rasterizer[src]

Add polygon offset.

Trait Implementations

impl Clone for Rasterizer[src]

impl Copy for Rasterizer[src]

impl Debug for Rasterizer[src]

impl Eq for Rasterizer[src]

impl Hash for Rasterizer[src]

impl PartialEq<Rasterizer> for Rasterizer[src]

impl PartialOrd<Rasterizer> for Rasterizer[src]

impl StructuralEq for Rasterizer[src]

impl StructuralPartialEq for Rasterizer[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.