Struct luminance::pipeline::PipelineState[][src]

#[non_exhaustive]
pub struct PipelineState { pub clear_color: [f32; 4], pub clear_color_enabled: bool, pub clear_depth_enabled: bool, pub viewport: Viewport, pub srgb_enabled: bool, pub clear_scissor: Option<ScissorRegion>, }
Expand description

Various customization options for pipelines.

Fields (Non-exhaustive)

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
clear_color: [f32; 4]

Color to use when clearing buffers.

clear_color_enabled: bool

Whether clearing color buffers.

clear_depth_enabled: bool

Whether clearing depth buffers.

viewport: Viewport

Viewport to use when rendering.

srgb_enabled: bool

Whether sRGB should be enabled.

clear_scissor: Option<ScissorRegion>

Whether to use scissor test when clearing buffers.

Implementations

Create a default PipelineState.

See the documentation of the Default for further details.

Get the clear color.

Set the clear color.

Check whether the pipeline’s framebuffer’s color buffers will be cleared.

Enable clearing color buffers.

Check whether the pipeline’s framebuffer’s depth buffer will be cleared.

Enable clearing depth buffers.

Get the viewport.

Set the viewport.

Check whether sRGB linearization is enabled.

Enable sRGB linearization.

Get the scissor configuration, if any.

Set the scissor configuration.

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

Default PipelineState:

  • Clear color is [0, 0, 0, 1].
  • Color is always cleared.
  • Depth is always cleared.
  • The viewport uses the whole framebuffer’s.
  • sRGB encoding is disabled.
  • No scissor test is performed.

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)

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.