Struct sierra::Rasterizer

source ·
pub struct Rasterizer {
    pub viewport: State<Viewport>,
    pub scissor: State<Rect>,
    pub depth_clamp: bool,
    pub front_face: FrontFace,
    pub culling: Option<Culling>,
    pub polygon_mode: PolygonMode,
    pub depth_test: Option<DepthTest>,
    pub stencil_tests: Option<StencilTests>,
    pub depth_bounds: Option<State<Bounds>>,
    pub fragment_shader: Option<FragmentShader>,
    pub color_blend: ColorBlend,
}

Fields§

§viewport: State<Viewport>

Rendering viewport transformation. Determines how vertex coordinates are transformed to framebuffer coordinates.

§scissor: State<Rect>

Scissors for the viewport. Determines bounds for scissor test. If the test fails for generated fragment that fragment is discared.

§depth_clamp: bool

Should fragments out of bounds on Z axis are clamped or discared. If true - fragments are clamped. This also disables primitive clipping. Otherwise they are clipped.

If DepthClamp feature is not enabled this value must be false.

§front_face: FrontFace

How polygon front face is determined.

§culling: Option<Culling>

How polygons are culled before rasterization.

§polygon_mode: PolygonMode

How polygons are rasterized. See PolygonMode for description.

If fillModeNonSolid is not enabled this value must be PolygonMode::Fill.

§depth_test: Option<DepthTest>

Depth test and operations.

§stencil_tests: Option<StencilTests>

Stencil test and operations.

§depth_bounds: Option<State<Bounds>>

Depth-bounds test.

§fragment_shader: Option<FragmentShader>

Fragment shader used by the pipeline.

§color_blend: ColorBlend

Attachment color blending.

Implementations§

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
Returns the “default value” for a type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

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
Checks if this value is equivalent to the given key. 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.