Struct three_d::core::texture::DepthTexture2D
source · pub struct DepthTexture2D { /* private fields */ }Expand description
A 2D depth texture that can be rendered into and read from. See also RenderTarget and DepthTarget.
Implementations§
source§impl DepthTexture2D
impl DepthTexture2D
sourcepub fn new<T: DepthTextureDataType>(
context: &Context,
width: u32,
height: u32,
wrap_s: Wrapping,
wrap_t: Wrapping
) -> Self
pub fn new<T: DepthTextureDataType>( context: &Context, width: u32, height: u32, wrap_s: Wrapping, wrap_t: Wrapping ) -> Self
Constructs a new 2D depth texture.
sourcepub fn as_depth_target<'a>(&'a mut self) -> DepthTarget<'a>
pub fn as_depth_target<'a>(&'a mut self) -> DepthTarget<'a>
Returns a DepthTarget which can be used to clear, write to and read from this texture. Combine this together with a ColorTarget with RenderTarget::new to be able to write to both a depth and color target at the same time.