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>
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>(&self, rect: &Rect) -> T where T: Texture2dDataSink<(u8, u8, u8, u8)>
fn raw_read_to_pixel_buffer(&self, rect: &Rect, dest: &PixelBuffer<(u8, u8, u8, u8)>)
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.