Struct glium::texture::TextureAnyImage
[−]
[src]
pub struct TextureAnyImage<'a> { // some fields omitted }
Represents a specific 2D image of a texture. 1D textures are considered as having a height of 1.
Methods
impl<'a> TextureAnyImage<'a>
[src]
fn get_texture(&self) -> &'a TextureAny
[−]
Returns the texture.
fn get_level(&self) -> u32
[−]
Returns the level of the texture.
fn get_layer(&self) -> u32
[−]
Returns the layer of the texture.
fn get_cubemap_layer(&self) -> Option<CubeLayer>
[−]
Returns the cubemap layer of this image, or None
if the texture is not a cubemap.
fn get_width(&self) -> u32
[−]
Returns the width of this texture slice.
fn get_height(&self) -> Option<u32>
[−]
Returns the height of this texture slice.
fn get_samples(&self) -> Option<u32>
[−]
Returns the number of samples of the texture.
fn raw_read<T, P>(&self, rect: &Rect) -> T where T: Texture2dDataSink<P>, P: PixelValue
[−]
fn raw_read_to_pixel_buffer<P>(&self, rect: &Rect, dest: &PixelBuffer<P>) where P: PixelValue
[−]
Reads the content of the image to a pixel buffer.
Panic
- Panicks if the rect is out of range.
- Panicks if the buffer is not large enough.
fn raw_clear_buffer<D>(&self, data: D) where D: Into<ClearBufferData>
[−]
Clears the content of the texture to a specific value.
Panic
Panicks 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]
fn clone(&self) -> TextureAnyImage<'a>
[−]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[−]
Performs copy-assignment from source
. Read more