Struct three_d::core::ClearState[][src]

pub struct ClearState {
    pub red: Option<f32>,
    pub green: Option<f32>,
    pub blue: Option<f32>,
    pub alpha: Option<f32>,
    pub depth: Option<f32>,
}

Defines which channels (red, green, blue, alpha and depth) to clear when starting to write to a render target or the screen and which values they are set to (the values must be between 0 and 1).

Fields

red: Option<f32>green: Option<f32>blue: Option<f32>alpha: Option<f32>depth: Option<f32>

Implementations

impl ClearState[src]

pub const fn none() -> Self[src]

Nothing will be cleared.

pub const fn depth(depth: f32) -> Self[src]

The depth will be cleared to the given value.

pub const fn color(red: f32, green: f32, blue: f32, alpha: f32) -> Self[src]

The color channels (red, green, blue and alpha) will be cleared to the given values.

pub const fn color_and_depth(
    red: f32,
    green: f32,
    blue: f32,
    alpha: f32,
    depth: f32
) -> Self
[src]

Both the color channels (red, green, blue and alpha) and depth will be cleared to the given values.

Trait Implementations

impl Clone for ClearState[src]

impl Copy for ClearState[src]

impl Debug for ClearState[src]

impl Default for ClearState[src]

impl PartialEq<ClearState> for ClearState[src]

impl StructuralPartialEq for ClearState[src]

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.