Struct gfx_texture::Texture [] [src]

pub struct Texture<R> where R: Resources {
    pub surface: Texture<R, R8_G8_B8_A8>,
    pub sampler: Sampler<R>,
    pub view: ShaderResourceView<R, [f32; 4]>,
}

Represents a texture.

Fields

Pixel storage for texture.

Sampler for texture.

View used by shader.

Methods

impl<R: Resources> Texture<R>
[src]

Returns empty texture.

Creates a texture from path.

Creates a texture from image.

Creates texture from memory alpha.

Updates the texture with an image.

Trait Implementations

impl<F, R> CreateTexture<F> for Texture<R> where F: Factory<R>, R: Resources
[src]

The error when creating texture.

Create texture from memory.

impl<R, C> UpdateTexture<Encoder<R, C>> for Texture<R> where R: Resources,
        C: CommandBuffer<R>
[src]

The error when updating texture.

Update the texture. Read more

impl<R> ImageSize for Texture<R> where R: Resources
[src]

Get the image size.

Gets the image width.

Gets the image height.