[][src]Struct luminance::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,
    pub clear_scissor: Option<ScissorRegion>,
}

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.

clear_scissor: Option<ScissorRegion>

Whether to use scissor test when clearing buffers.

Implementations

impl PipelineState[src]

pub fn new() -> Self[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]) -> Self[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) -> Self[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) -> Self[src]

Enable clearing depth buffers.

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

Get the viewport.

pub fn set_viewport(self, viewport: Viewport) -> Self[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) -> Self[src]

Enable sRGB linearization.

pub fn scissor(&self) -> &Option<ScissorRegion>[src]

Get the scissor configuration, if any.

pub fn set_scissor(self, scissor: impl Into<Option<ScissorRegion>>) -> Self[src]

Set the scissor configuration.

Trait Implementations

impl Clone for PipelineState[src]

impl Debug for PipelineState[src]

impl Default for PipelineState[src]

pub fn default() -> Self[src]

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

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.