Struct piston_window::Texture []

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> Texture<R> where
    R: Resources, 

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<R, C> UpdateTexture<Encoder<R, C>> for Texture<R> where
    C: Buffer<R>,
    R: Resources, 

The error when updating texture.

Update the texture. Read more

impl<R> PartialEq<Texture<R>> for Texture<R> where
    R: PartialEq<R> + Resources, 

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<R> ImageSize for Texture<R> where
    R: Resources, 

Get the image size.

[src]

Gets the image width.

[src]

Gets the image height.

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

The error when creating texture.

Create texture from memory.

impl<R> Clone for Texture<R> where
    R: Clone + Resources, 

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<R> Debug for Texture<R> where
    R: Debug + Resources, 

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<R> Send for Texture<R> where
    <R as Resources>::Buffer: Send + Sync,
    <R as Resources>::Mapping: Send,
    <R as Resources>::Sampler: Send + Sync,
    <R as Resources>::ShaderResourceView: Send + Sync,
    <R as Resources>::Texture: Send + Sync

impl<R> Sync for Texture<R> where
    <R as Resources>::Buffer: Send + Sync,
    <R as Resources>::Mapping: Send,
    <R as Resources>::Sampler: Send + Sync,
    <R as Resources>::ShaderResourceView: Send + Sync,
    <R as Resources>::Texture: Send + Sync