Struct opengl_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]

[src]

Creates a new texture.

[src]

Gets the OpenGL id of the texture.

[src]

Returns empty texture.

[src]

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

[src]

Loads image by relative file name to the asset root.

[src]

Creates a texture from image.

[src]

Updates image with a new one.

Trait Implementations

impl Drop for Texture
[src]

[src]

Executes the destructor for this type. Read more

impl ImageSize for Texture
[src]

[src]

Get the image size.

[src]

Gets the image width.

[src]

Gets the image height.

impl CreateTexture<()> for Texture
[src]

The error when creating texture.

[src]

Create texture from memory.

impl UpdateTexture<()> for Texture
[src]

The error when updating texture.

[src]

Update the texture. Read more