[−][src]Struct web_glitz::render_pass::DepthStencilBuffer
Represents a depth-stencil buffer that stores both depth and stencil values in a framebuffer for a custom render target.
Methods
impl<F> DepthStencilBuffer<F> where
F: DepthStencilRenderable,
[src]
F: DepthStencilRenderable,
pub fn clear_command(
&self,
depth: f32,
stencil: i32,
region: Region2D
) -> ClearDepthStencilCommand
[src]
&self,
depth: f32,
stencil: i32,
region: Region2D
) -> ClearDepthStencilCommand
Returns a command that clears all depth values in the region
to depth
and all stencil
values in the region
to stencil
.
Values outside the region are unaffected. See also [clear_depth_command] for a command that clears only depth values, and [clear_stencil_command] for a command that clears only stencil values.
Examples
The following command will clear the entire depth-stencil buffer to a depth value of 1.0
and a stencil value of 0
:
let command = buffer.clear_command(1.0, 0, Region2D::Fill);
It's also possible to only clear a specific rectangular area of the buffer:
let command = buffer.clear_command(1.0, 0, Region2D::Area((0, 0), 100, 100));
See also Region2D.
pub fn clear_depth_command(
&self,
depth: f32,
region: Region2D
) -> ClearDepthCommand
[src]
&self,
depth: f32,
region: Region2D
) -> ClearDepthCommand
Returns a command that clears all depth values in the region
to depth
.
Stencil values and depth values outside the region are unaffected. See also [clear_stencil_command] for a command that clears stencil values, and [clear_command] for a command that clears both depth and stencil values.
Examples
The following command will clear the entire depth-stencil buffer to a depth value of 1.0
:
let command = buffer.clear_depth_command(1.0, Region2D::Fill);
The stencil values in the depth-stencil buffer will not change.
It's also possible to only clear a specific rectangular area of the buffer:
let command = buffer.clear_depth_command(1.0, Region2D::Area((0, 0), 100, 100));
See also Region2D.
pub fn clear_stencil_command(
&self,
stencil: i32,
region: Region2D
) -> ClearStencilCommand
[src]
&self,
stencil: i32,
region: Region2D
) -> ClearStencilCommand
Returns a command that clears all stencil values in the region
to stencil
.
Depth values and stencil values outside the region are unaffected. See also [clear_depth_command] for a command that clears depth values, and [clear_command] for a command that clears both depth and stencil values.
Examples
The following command will clear the entire depth-stencil buffer to a stencil value of 0
:
let command = buffer.clear_stencil_command(0, Region2D::Fill);
The depth values in the depth-stencil buffer will not change.
It's also possible to only clear a specific rectangular area of the buffer:
let command = buffer.clear_stencil_command(0, Region2D::Area((0, 0), 100, 100));
See also Region2D.
Trait Implementations
impl<F> RenderingOutputBuffer for DepthStencilBuffer<F> where
F: DepthStencilRenderable,
[src]
F: DepthStencilRenderable,
Auto Trait Implementations
impl<F> Send for DepthStencilBuffer<F> where
F: Send,
F: Send,
impl<F> Unpin for DepthStencilBuffer<F>
impl<F> Sync for DepthStencilBuffer<F> where
F: Sync,
F: Sync,
impl<F> UnwindSafe for DepthStencilBuffer<F> where
F: UnwindSafe,
F: UnwindSafe,
impl<F> RefUnwindSafe for DepthStencilBuffer<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
Blanket Implementations
impl<D, T> IntoBuffer<T> for D where
D: Borrow<T> + 'static,
T: Copy + 'static,
[src]
D: Borrow<T> + 'static,
T: Copy + 'static,
fn into_buffer<Rc>(Self, &Rc, UsageHint) -> Buffer<T> where
Rc: RenderingContext + Clone + 'static,
[src]
Rc: RenderingContext + Clone + 'static,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,