Struct three_d::core::texture::DepthTexture2DArray
source · pub struct DepthTexture2DArray { /* private fields */ }Expand description
An array of 2D depth textures that can be rendered into and read from. See also RenderTarget and DepthTarget.
Implementations§
source§impl DepthTexture2DArray
impl DepthTexture2DArray
sourcepub fn new<T: DepthTextureDataType>(
context: &Context,
width: u32,
height: u32,
depth: u32,
wrap_s: Wrapping,
wrap_t: Wrapping
) -> Self
pub fn new<T: DepthTextureDataType>( context: &Context, width: u32, height: u32, depth: u32, wrap_s: Wrapping, wrap_t: Wrapping ) -> Self
Creates a new array of depth textures.
sourcepub fn as_depth_target<'a>(&'a mut self, layer: u32) -> DepthTarget<'a>
pub fn as_depth_target<'a>(&'a mut self, layer: u32) -> DepthTarget<'a>
Returns a DepthTarget which can be used to clear, write to and read from the given layer of 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.