[][src]Struct glium::texture::TextureAnyImage

pub struct TextureAnyImage<'a> { /* fields omitted */ }

Represents a specific 2D image of a texture. 1D textures are considered as having a height of 1.

Implementations

impl<'a> TextureAnyImage<'a>[src]

pub fn get_texture(&self) -> &'a TextureAny[src]

Returns the texture.

pub fn get_level(&self) -> u32[src]

Returns the level of the texture.

pub fn get_layer(&self) -> u32[src]

Returns the layer of the texture.

pub fn get_cubemap_layer(&self) -> Option<CubeLayer>[src]

Returns the cubemap layer of this image, or None if the texture is not a cubemap.

pub fn get_width(&self) -> u32[src]

Returns the width of this texture slice.

pub fn get_height(&self) -> Option<u32>[src]

Returns the height of this texture slice.

pub fn get_samples(&self) -> Option<u32>[src]

Returns the number of samples of the texture.

pub fn raw_read<T, P>(&self, rect: &Rect) -> T where
    T: Texture2dDataSink<P>,
    P: PixelValue
[src]

Reads the content of the image.

Panic

  • Panics if the rect is out of range.
  • Panics if it fails to read the texture.

pub fn raw_read_to_pixel_buffer<P>(&self, rect: &Rect, dest: &PixelBuffer<P>) where
    P: PixelValue
[src]

Reads the content of the image to a pixel buffer.

Panic

  • Panics if the rect is out of range.
  • Panics if the buffer is not large enough.
  • Panics if it fails to read the texture.

pub fn raw_clear_buffer<D>(&self, data: D) where
    D: Into<ClearBufferData>, 
[src]

Clears the content of the texture to a specific value.

Panic

Panics if data does not match the kind of texture. For example passing a [i32; 4] when using a regular (float) texture.

Trait Implementations

impl<'a> Clone for TextureAnyImage<'a>[src]

impl<'a> Copy for TextureAnyImage<'a>[src]

impl<'t> Into<TextureAnyImage<'t>> for Texture1dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedTexture1dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedTexture2dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for SrgbTexture2dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedSrgbTexture2dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for IntegralTexture2dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for UnsignedTexture2dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthTexture2dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for StencilTexture2dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthStencilTexture2dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for Texture2dMultisampleMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for IntegralTexture2dMultisampleMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for SrgbTexture1dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for SrgbTexture2dMultisampleMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for UnsignedTexture2dMultisampleMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthTexture2dMultisampleMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for StencilTexture2dMultisampleMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthStencilTexture2dMultisampleMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for Texture3dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedTexture3dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for SrgbTexture3dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedSrgbTexture3dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for IntegralTexture3dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedSrgbTexture1dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for UnsignedTexture3dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthTexture3dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthStencilTexture3dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for Texture1dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedTexture1dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for SrgbTexture1dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedSrgbTexture1dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for IntegralTexture1dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for UnsignedTexture1dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthTexture1dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for IntegralTexture1dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for StencilTexture1dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthStencilTexture1dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for Texture2dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedTexture2dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for SrgbTexture2dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedSrgbTexture2dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for IntegralTexture2dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for UnsignedTexture2dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthTexture2dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for StencilTexture2dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for UnsignedTexture1dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthStencilTexture2dArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for Texture2dMultisampleArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for SrgbTexture2dMultisampleArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for IntegralTexture2dMultisampleArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for UnsignedTexture2dMultisampleArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthTexture2dMultisampleArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for StencilTexture2dMultisampleArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthStencilTexture2dMultisampleArrayLayerMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CubemapImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedCubemapImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthTexture1dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for SrgbCubemapImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedSrgbCubemapImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for IntegralCubemapImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for UnsignedCubemapImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthCubemapImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for StencilCubemapImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthStencilCubemapImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CubemapArrayImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedCubemapArrayImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for SrgbCubemapArrayImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for StencilTexture1dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for CompressedSrgbCubemapArrayImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for IntegralCubemapArrayImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for UnsignedCubemapArrayImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthCubemapArrayImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for StencilCubemapArrayImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthStencilCubemapArrayImage<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for DepthStencilTexture1dMipmap<'t>[src]

impl<'t> Into<TextureAnyImage<'t>> for Texture2dMipmap<'t>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for TextureAnyImage<'a>

impl<'a> !Send for TextureAnyImage<'a>

impl<'a> !Sync for TextureAnyImage<'a>

impl<'a> Unpin for TextureAnyImage<'a>

impl<'a> !UnwindSafe for TextureAnyImage<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Content for T where
    T: Copy
[src]

type Owned = T

A type that holds a sized version of the content.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.