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

Methods

impl<C, L, D, P> Texture<C, L, D, P> where C: HasTexture, L: Layerable, D: Dimensionable, D::Size: Copy, P: Pixel
[src]

Create a texture from its backend representation.

Clear a part of a texture.

The part being cleared is defined by a rectangle in which the offset represents the left-upper corner and the size gives the dimension of the rectangle. All the covered texels by this rectangle will be cleared to the pixel value.

Clear a whole texture with a pixel value.

Upload texels to a part of a texture.

The part being updated is defined by a rectangle in which the offset represents the left-upper corner and the size gives the dimension of the rectangle. All the covered texels by this rectangle will be updated by the texels slice.

Upload texels to the whole texture.

Upload raw texels to a part of a texture.

This function is similar to upload_part but it works on P::RawEncoding instead of P::Encoding. This useful when the texels are represented as a contiguous array of raw components of the texels.

Upload raw texels to the whole texture.

Get the raw texels associated with this texture.

Trait Implementations

impl<C, L, D, P> ColorSlot<C, L, D> for Texture<C, L, D, P> where C: HasFramebuffer + HasTexture, L: Layerable, D: Dimensionable, D::Size: Copy, P: ColorPixel + RenderablePixel
[src]

Turn a color slot into a list of pixel formats.

Reify a list of raw textures into a color slot.

impl<C, L, D, P> DepthSlot<C, L, D> for Texture<C, L, D, P> where C: HasFramebuffer + HasTexture, L: Layerable, D: Dimensionable, D::Size: Copy, P: DepthPixel
[src]

Turn a depth slot into a pixel format.

Reify a raw textures into a depth slot.

impl<C: Debug, L: Debug, D: Debug, P: Debug> Debug for Texture<C, L, D, P> where C: HasTexture, L: Layerable, D: Dimensionable, P: Pixel, C::ATexture: Debug, D::Size: Debug
[src]

Formats the value using the given formatter.

impl<C, L, D, P> Drop for Texture<C, L, D, P> where C: HasTexture, L: Layerable, D: Dimensionable, P: Pixel
[src]

A method called when the value goes out of scope. Read more