pub enum DepthTexture<'a> {
Single(&'a DepthTexture2D),
Array {
texture: &'a DepthTexture2DArray,
layer: u32,
},
CubeMap {
texture: &'a DepthTextureCubeMap,
side: CubeMapSide,
},
}
Expand description
A reference to some type of texture containing depths.
Variants§
Single(&'a DepthTexture2D)
A single 2D texture.
Array
An array of 2D textures and an index into the array.
CubeMap
A cube map texture and a CubeMapSide indicating the side to use.
Implementations§
Source§impl DepthTexture<'_>
impl DepthTexture<'_>
Sourcepub fn fragment_shader_source(&self) -> String
pub fn fragment_shader_source(&self) -> String
Returns the fragment shader source for using this texture in a shader.
Sourcepub fn id(&self) -> u16
pub fn id(&self) -> u16
Returns a unique ID for each variation of the shader source returned from DepthTexture::fragment_shader_source.
Sourcepub fn use_uniforms(&self, program: &Program)
pub fn use_uniforms(&self, program: &Program)
Sends the uniform data needed for this texture to the fragment shader.
Trait Implementations§
Source§impl<'a> Clone for DepthTexture<'a>
impl<'a> Clone for DepthTexture<'a>
Source§fn clone(&self) -> DepthTexture<'a>
fn clone(&self) -> DepthTexture<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<'a> Copy for DepthTexture<'a>
Auto Trait Implementations§
impl<'a> Freeze for DepthTexture<'a>
impl<'a> RefUnwindSafe for DepthTexture<'a>
impl<'a> Send for DepthTexture<'a>
impl<'a> Sync for DepthTexture<'a>
impl<'a> Unpin for DepthTexture<'a>
impl<'a> UnwindSafe for DepthTexture<'a>
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