Struct three_d::core::render_states::RenderStates[][src]

pub struct RenderStates {
    pub write_mask: WriteMask,
    pub clip: Clip,
    pub depth_test: DepthTest,
    pub blend: Blend,
    pub cull: Cull,
}
Expand description

A set of render specific states that has to be specified at each render call.

Fields

write_mask: WriteMask

Defines which channels (red, green, blue, alpha and depth) to write to in a render call.

clip: Clip

Defines the rectangle of pixels to write to in a render call. If none, all pixels in the current render target are possibly written into.

depth_test: DepthTest

Defines the depth test in a render call. The depth test determines whether or not a fragment from the current render call should be discarded when comparing its depth with the depth of the current fragment.

blend: Blend

Defines which type of blending to use for a render call. Blending allows combining each color channel of a render call with the color already in the color channels of the render target. This is usually used to simulate transparency.

cull: Cull

Defines whether the triangles that are backfacing, frontfacing or both should be skipped in a render call.

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

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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)

recently added

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more