Struct three_d::DepthTargetTexture2D [−][src]
pub struct DepthTargetTexture2D { /* fields omitted */ }
Expand description
A 2D depth texture that can be rendered into and read from. See also RenderTarget.
Implementations
impl DepthTargetTexture2D
[src]
impl DepthTargetTexture2D
[src]pub fn new(
context: &Context,
width: usize,
height: usize,
wrap_s: Wrapping,
wrap_t: Wrapping,
format: DepthFormat
) -> Result<Self, Error>
[src]
pub fn new(
context: &Context,
width: usize,
height: usize,
wrap_s: Wrapping,
wrap_t: Wrapping,
format: DepthFormat
) -> Result<Self, Error>
[src]Constructs a new 2D depth target texture.
pub fn write<F: FnOnce() -> Result<(), Error>>(
&self,
clear_state: Option<f32>,
render: F
) -> Result<(), Error>
[src]
pub fn write<F: FnOnce() -> Result<(), Error>>(
&self,
clear_state: Option<f32>,
render: F
) -> Result<(), Error>
[src]Write the depth of whatever rendered in the render
closure into the texture.
Before writing, the texture is cleared based on the given clear state.
pub fn copy_to<T: TextureValueType>(
&self,
destination: CopyDestination<'_, '_, '_, '_, T>,
viewport: Viewport
) -> Result<(), Error>
[src]
pub fn copy_to<T: TextureValueType>(
&self,
destination: CopyDestination<'_, '_, '_, '_, T>,
viewport: Viewport
) -> Result<(), Error>
[src]Copies the content of the depth texture to the specified destination at the given viewport.
Errors
Will return an error if the destination is a color texture.
Trait Implementations
impl Drop for DepthTargetTexture2D
[src]
impl Drop for DepthTargetTexture2D
[src]