pub struct FormatDesc {
pub bits: u16,
pub dim: (u8, u8),
pub packed: bool,
pub aspects: Aspects,
}
Expand description
Description of a format.
Fields§
§bits: u16
Total number of bits.
- Depth/Stencil formats are opaque formats, where the total number of bits is unknown. A dummy value is used for these formats instead (sum of depth and stencil bits). For copy operations, the number of bits of the corresponding aspect should be used.
- The total number can be larger than the sum of individual format bits
(
color
,alpha
,depth
andstencil
) for packed formats. - For compressed formats, this denotes the number of bits per block.
dim: (u8, u8)
Dimensions (width, height) of the texel blocks.
packed: bool
The format representation depends on the endianness of the platform.
- On little-endian systems, the actual oreder of components is reverse of what a surface type specifies.
aspects: Aspects
Format aspects
Implementations§
Source§impl FormatDesc
impl FormatDesc
Sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
Check if the format is compressed.
Trait Implementations§
Source§impl Clone for FormatDesc
impl Clone for FormatDesc
Source§fn clone(&self) -> FormatDesc
fn clone(&self) -> FormatDesc
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FormatDesc
impl Debug for FormatDesc
Source§impl Hash for FormatDesc
impl Hash for FormatDesc
Source§impl Ord for FormatDesc
impl Ord for FormatDesc
Source§fn cmp(&self, other: &FormatDesc) -> Ordering
fn cmp(&self, other: &FormatDesc) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FormatDesc
impl PartialEq for FormatDesc
Source§impl PartialOrd for FormatDesc
impl PartialOrd for FormatDesc
impl Copy for FormatDesc
impl Eq for FormatDesc
impl StructuralPartialEq for FormatDesc
Auto Trait Implementations§
impl Freeze for FormatDesc
impl RefUnwindSafe for FormatDesc
impl Send for FormatDesc
impl Sync for FormatDesc
impl Unpin for FormatDesc
impl UnwindSafe for FormatDesc
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