[][src]Struct web_glitz::rendering::DefaultRGBBuffer

pub struct DefaultRGBBuffer { /* fields omitted */ }

Represents the color buffer for a [DefaultRenderTarget] without an alpha channel.

Implementations

impl DefaultRGBBuffer[src]

pub fn clear_command(
    &self,
    clear_value: [f32; 4],
    region: Region2D
) -> ClearFloatCommand
[src]

Returns a command that clears a region of the buffer to clear_value.

All pixels in the region are set to the clear_value; values outside the region are unaffected.

Examples

The following command will clear the entire buffer to "transparent black":

let command = buffer.clear_command([0.0, 0.0, 0.0, 0.0], Region2D::Fill);

It's also possible to only clear a specific rectangular area of the buffer:

let command = buffer.clear_command([0.0, 0.0, 0.0, 0.0], Region2D::Area((0, 0), 100, 100));

See also Region2D.

Trait Implementations

impl<T> BlitColorCompatible<DefaultRGBBuffer> for T where
    T: BlitSource,
    T::Format: FloatRenderable
[src]

impl BlitColorTarget for DefaultRGBBuffer[src]

impl<T> ResolveColorCompatible<DefaultRGBBuffer> for T where
    T: ResolveSource<Format = RGB8>, 
[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<D, T> IntoBuffer<T> for D where
    D: Borrow<T> + 'static,
    T: Copy + 'static, 
[src]

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.