Struct opengles_graphics::Texture [] [src]

pub struct Texture { /* fields omitted */ }

Wraps OpenGL texture data. The texture gets deleted when running out of scope.

In order to create a texture the function GenTextures must be loaded. This is done automatically by the window back-ends in Piston.

Methods

impl Texture
[src]

Creates a new texture.

Gets the OpenGL id of the texture.

Returns empty texture.

Loads image from memory, the format is 8-bit greyscale.

Loads image by relative file name to the asset root.

Creates a texture from image.

Updates image with a new one.

Trait Implementations

impl Drop for Texture
[src]

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

impl ImageSize for Texture
[src]

Get the image size.

Gets the image width.

Gets the image height.

impl CreateTexture<()> for Texture
[src]

The error when creating texture.

Create texture from memory.

impl UpdateTexture<()> for Texture
[src]

The error when updating texture.

Update the texture. Read more