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(&mut self) -> DepthTarget<'_>
pub fn as_depth_target(&mut self) -> DepthTarget<'_>
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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DepthTexture2D
impl RefUnwindSafe for DepthTexture2D
impl Send for DepthTexture2D
impl Sync for DepthTexture2D
impl Unpin for DepthTexture2D
impl UnwindSafe for DepthTexture2D
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more