pub trait Texture3dDataSink<T> {
    // Required method
    fn from_raw(data: Cow<'_, [T]>, width: u32, height: u32, depth: u32) -> Self
       where [T]: ToOwned;
}
Expand description

Trait that describes types that can be built from one-dimensional texture data.

The parameter indicates the type of pixels accepted by this sink.

You are especially encouraged to implement this trait with the parameter (u8, u8, u8, u8), as this is the only format that is guaranteed to be supported by OpenGL when reading pixels.

Required Methods§

source

fn from_raw(data: Cow<'_, [T]>, width: u32, height: u32, depth: u32) -> Selfwhere [T]: ToOwned,

Builds a new object from raw data.

Implementations on Foreign Types§

source§

impl<P> Texture3dDataSink<P> for Vec<Vec<Vec<P>>>where P: Copy + Clone,

source§

fn from_raw(_data: Cow<'_, [P]>, _width: u32, _height: u32, _depth: u32) -> Self

Implementors§