Struct glium::texture::RawImage3d [] [src]

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

Represents raw data for a two-dimensional image.

Fields

data

A contiguous array of pixel data.

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

width

Number of pixels per column.

height

Number of pixels per row.

depth

Number of pixels per depth.

format

Formats of the pixels.

Methods

impl<'a, T: Clone + 'a> RawImage3d<'a, T>

fn from_vec_raw2d(arr: &Vec<RawImage2d<'a, T>>) -> RawImage3d<'a, T>

Transforms a Vec into a RawImage3d

Trait Implementations

impl<'a, P: PixelValue + Clone> Texture3dDataSource<'a> for RawImage3d<'a, P>

type Data = P

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