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]

Create a texture from its backend representation.

Convert a texture to its raw 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.

Methods from Deref<Target=RawTexture>

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: Debug, D: Debug, P: Debug> Debug for Texture<L, D, P> where L: Layerable,
        D: Dimensionable,
        P: Pixel,
        D::Size: Debug
[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

The method called to dereference a value

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

The method called to mutably dereference a value

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

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