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,
    D::Size: Copy,
    P: Pixel
[src]

[src]

[src]

Convert a texture to its raw representation.

[src]

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.

[src]

Clear a whole texture with a pixel value.

[src]

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.

[src]

Upload texels to the whole texture.

[src]

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.

[src]

Upload raw texels to the whole texture.

[src]

Get the raw texels associated with this texture.

[src]

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]

[src]

Turn a color slot into a list of pixel formats.

[src]

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]

[src]

Turn a depth slot into a pixel format.

[src]

Reify a raw textures into a depth slot.

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

[src]

Formats the value using the given formatter.

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

The resulting type after dereferencing.

[src]

Dereferences the value.

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

[src]

Mutably dereferences the value.

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

[src]

Executes the destructor for this type. Read more