Enum three_d::core::texture::DepthTexture
source · 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<'_>
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 use_uniforms(&self, program: &Program)
pub fn use_uniforms(&self, program: &Program)
Sends the uniform data needed for this texture to the fragment shader.
sourcepub fn resolution(&self) -> (u32, u32)
pub fn resolution(&self) -> (u32, u32)
The resolution of the underlying texture if there is any.
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 more