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

Fields

§layer: u32

An array of 2D textures and an index into the array.

§

CubeMap

Fields

A cube map texture and a CubeMapSide indicating the side to use.

Implementations§

source§

impl DepthTexture<'_>

source

pub fn width(&self) -> u32

Returns the width of the depth texture in texels.

source

pub fn height(&self) -> u32

Returns the height of the depth texture in texels.

source

pub fn fragment_shader_source(&self) -> String

Returns the fragment shader source for using this texture in a shader.

source

pub fn id(&self) -> u16

Returns a unique ID for each variation of the shader source returned from DepthTexture::fragment_shader_source.

source

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>

source§

fn clone(&self) -> DepthTexture<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Copy for DepthTexture<'a>

Auto Trait Implementations§

§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> AutoreleaseSafe for Twhere T: ?Sized,

source§

impl<T> SerializableAny for Twhere T: 'static + Any + Clone + for<'a> Send + Sync,