[][src]Struct gpu::ClearProgram

pub struct ClearProgram { /* fields omitted */ }

A program that clears colors, depth and stencil of a framebuffer.

Implementations

impl ClearProgram[src]

pub const COLOR: u32[src]

Color buffer bit.

pub const DEPTH: u32[src]

Depth buffer bit.

pub const STENCIL: u32[src]

Stencil buffer bit.

pub fn new(context: &Context) -> Self[src]

Creates a new ClearProgram.

pub fn set_color(&mut self, color: (f32, f32, f32, f32))[src]

Sets the color clear value.

pub fn color(&self) -> (f32, f32, f32, f32)[src]

Gets the color clear value.

pub fn set_depth(&mut self, depth: f32)[src]

Sets the depth clear value.

pub fn depth(&self) -> f32[src]

Gets the depth clear value.

pub fn set_stencil(&mut self, stencil: i32)[src]

Sets the stencil clear value.

pub fn stencil(&self) -> i32[src]

Gets the stencil clear value.

pub fn clear(&self, framebuffer: &mut Framebuffer, clear_mask: u32)[src]

Clear the target Framebuffer using the buffer bit mask. Here is an example that clears color, depth and stencil in a single call:

This example is not tested
clear(framebuffer, ClearProgram::COLOR | ClearProgram::DEPTH | ClearProgram::STENCIL)

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, 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.