pub struct ImageBuffer {
pub width: u32,
pub height: u32,
pub image_type: u32,
pub usage: u32,
pub format: ImageFormat,
pub generate_mips: bool,
pub address: [u32; 3],
pub filter: u32,
pub source: String,
pub levels: Vec<Vec<u8>>,
}Expand description
A texture: its size, format and levels (mip maps, and the six faces of a cube map).
Fields§
§width: u32The width in pixels.
height: u32The height in pixels.
image_type: u320 = 2D; otherwise a cube map (levels are 6 faces x mips).
usage: u32How the engine uses the texture.
format: ImageFormatThe pixel format.
generate_mips: boolWhether the engine makes the mip levels itself.
address: [u32; 3]The address (wrap) mode on each axis.
filter: u32The filter mode.
source: StringThe original image file the texture was made from.
levels: Vec<Vec<u8>>The data of each level: faces × mips, face by face.
Implementations§
Trait Implementations§
Source§impl Clone for ImageBuffer
impl Clone for ImageBuffer
Source§fn clone(&self) -> ImageBuffer
fn clone(&self) -> ImageBuffer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ImageBuffer
impl RefUnwindSafe for ImageBuffer
impl Send for ImageBuffer
impl Sync for ImageBuffer
impl Unpin for ImageBuffer
impl UnsafeUnpin for ImageBuffer
impl UnwindSafe for ImageBuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more