Struct luminance::texture::Texture[][src]

pub struct Texture<L, D, P> where
    L: Layerable,
    D: Dimensionable,
    P: Pixel
{ /* fields omitted */ }

Texture.

L refers to the layering type; D refers to the dimension; P is the pixel format for the texels.

Methods

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

Convert a texture to its raw representation.

Number of mipmaps in the texture.

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<L, D, P> ColorSlot<L, D> for Texture<L, D, P> where
    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<L, D, P> DepthSlot<L, D> for Texture<L, D, P> where
    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<L, D, P> Deref for Texture<L, D, P> where
    L: Layerable,
    D: Dimensionable,
    P: Pixel
[src]

The resulting type after dereferencing.

Dereferences the value.

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

Mutably dereferences the value.

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

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<L, D, P> !Send for Texture<L, D, P>

impl<L, D, P> !Sync for Texture<L, D, P>