Struct gfx_hal::pso::Rasterizer

source ·
pub struct Rasterizer {
    pub polygon_mode: PolygonMode,
    pub cull_face: Face,
    pub front_face: FrontFace,
    pub depth_clamping: bool,
    pub depth_bias: Option<State<DepthBias>>,
    pub conservative: bool,
}
Expand description

Rasterization state.

Fields

polygon_mode: PolygonMode

How to rasterize this primitive.

cull_face: Face

Which face should be culled.

front_face: FrontFace

Which vertex winding is considered to be the front face for culling.

depth_clamping: bool

Whether or not to enable depth clamping; when enabled, instead of fragments being omitted when they are outside the bounds of the z-plane, they will be clamped to the min or max z value.

depth_bias: Option<State<DepthBias>>

What depth bias, if any, to use for the drawn primitives.

conservative: bool

Controls how triangles will be rasterized depending on their overlap with pixels.

Implementations

Simple polygon-filling rasterizer state

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.