Struct glium::texture::RawImage1d [] [src]

pub struct RawImage1d<'a, T: Clone + 'a> {
    pub data: Cow<'a, [T]>,
    pub width: u32,
    pub format: ClientFormat,
}

Represents raw data for a two-dimensional image.

Fields

data

A contiguous array of pixel data.

The data must start by the left pixel and progress left-to-right.

data.len() must be equal to width * format.get_size() / mem::size_of::<T>().

width

Number of pixels per column.

format

Formats of the pixels.

Trait Implementations

impl<'a, P: PixelValue + Clone> Texture1dDataSource<'a> for RawImage1d<'a, P>

type Data = P

fn into_raw(self) -> RawImage1d<'a, P>