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,
    pub line_width: State<f32>,
}
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.

line_width: State<f32>

Controls width of rasterized line segments.

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 !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.