Struct luminance::texture::Texture
[−]
[src]
pub struct Texture<C, L, D, P> where C: HasTexture, L: Layerable, D: Dimensionable, P: Pixel { pub repr: C::ATexture, pub size: D::Size, pub mipmaps: usize, // some fields omitted }
Texture.
L
refers to the layering type; D
refers to the dimension; P
is the pixel format for the
texels.
Fields
repr: C::ATexture
size: D::Size
mipmaps: usize
Methods
impl<C, L, D, P> Texture<C, L, D, P> where C: HasTexture, L: Layerable, D: Dimensionable, D::Size: Copy, P: Pixel
[src]
fn new(size: D::Size, mipmaps: usize, sampler: &Sampler) -> Self
fn from_raw(texture: C::ATexture, size: D::Size, mipmaps: usize) -> Self
fn clear_part(&self, gen_mipmaps: bool, offset: D::Offset, size: D::Size, pixel: P::Encoding) where D::Offset: Copy, D::Size: Copy, P::Encoding: Copy
fn clear(&self, gen_mipmaps: bool, pixel: P::Encoding) where D::Offset: Copy, D::Size: Copy, P::Encoding: Copy
fn upload_part(&self, gen_mipmaps: bool, offset: D::Offset, size: D::Size, texels: &[P::Encoding]) where D::Offset: Copy, D::Size: Copy
fn upload(&self, gen_mipmaps: bool, texels: &[P::Encoding]) where D::Offset: Copy, D::Size: Copy
fn upload_part_raw(&self, gen_mipmaps: bool, offset: D::Offset, size: D::Size, texels: &[P::RawEncoding]) where D::Offset: Copy, D::Size: Copy
fn upload_raw(&self, gen_mipmaps: bool, texels: &[P::RawEncoding]) where D::Offset: Copy, D::Size: Copy
fn get_raw_texels(&self) -> Vec<P::RawEncoding> where P: Pixel, P::RawEncoding: Copy
Trait Implementations
impl<'a, C, L, D, P> Uniformable<C> for &'a Texture<C, L, D, P> where C: HasUniform, L: Layerable, D: Dimensionable, P: Pixel
[src]
fn update(u: &Uniform<C, Self>, x: Self)
Update the uniform with a new value.
fn reify_type() -> Type
Retrieve the Type
of the uniform.
fn dim() -> Dim
Retrieve the Dim
of the uniform.