#[repr(u8)]pub enum PixelFormat {
Rgba = 0,
}
Expand description
Descriptions of pixel data layouts, used to interpret the byte arrays passed into uploading functions.
Variants§
Rgba = 0
8-bit per channel RGBA colors, arranged in order: [red, green, blue, alpha, red, ...]
.
Implementations§
Source§impl PixelFormat
impl PixelFormat
Sourcepub const fn bytes_per_pixel(self) -> usize
pub const fn bytes_per_pixel(self) -> usize
Returns the amount of bytes each pixel takes up in a pixel buffer if that buffer is using this pixel format.
E.g. for 8-bit RGBA, this returns 4, as each of the four channels takes up eight bits.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnwindSafe for PixelFormat
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