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: u32,
// 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: u32
Methods
fn new(size: D::Size, mipmaps: u32, sampler: &Sampler) -> Self
fn from_raw(texture: C::ATexture, size: D::Size, mipmaps: u32) -> 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: &Vec<P::Encoding>) where D::Offset: Copy, D::Size: Copy
fn upload(&self, gen_mipmaps: bool, texels: &Vec<P::Encoding>) where D::Offset: Copy, D::Size: Copy
Trait Implementations
Formats the value using the given formatter.
fn drop(&mut self)
A method called when the value goes out of scope. Read more