[−][src]Struct gpu::ClearProgram
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
impl !RefUnwindSafe for ClearProgram
impl !Send for ClearProgram
impl !Sync for ClearProgram
impl Unpin for ClearProgram
impl UnwindSafe for ClearProgram
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,