[][src]Struct luminance_front::pipeline::PipelineState

#[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,
}

Various customization options for pipelines.

Fields (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.

Implementations

impl PipelineState[src]

pub fn new() -> PipelineState[src]

Create a default PipelineState.

See the documentation of the Default for further details.

pub fn clear_color(&self) -> [f32; 4][src]

Get the clear color.

pub fn set_clear_color(self, clear_color: [f32; 4]) -> PipelineState[src]

Set the clear color.

pub fn is_clear_color_enabled(&self) -> bool[src]

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

pub fn enable_clear_color(self, clear_color_enabled: bool) -> PipelineState[src]

Enable clearing color buffers.

pub fn is_clear_depth_enabled(&self) -> bool[src]

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

pub fn enable_clear_depth(self, clear_depth_enabled: bool) -> PipelineState[src]

Enable clearing depth buffers.

pub fn viewport(&self) -> Viewport[src]

Get the viewport.

pub fn set_viewport(self, viewport: Viewport) -> PipelineState[src]

Set the viewport.

pub fn is_srgb_enabled(&self) -> bool[src]

Check whether sRGB linearization is enabled.

pub fn enable_srgb(self, srgb_enabled: bool) -> PipelineState[src]

Enable sRGB linearization.

Trait Implementations

impl Clone for PipelineState[src]

impl Debug for PipelineState[src]

impl Default for PipelineState[src]

fn default() -> PipelineState[src]

Default PipelineState:

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

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.