[][src]Struct gfx_hal::format::FormatDesc

pub struct FormatDesc {
    pub bits: u16,
    pub dim: (u8, u8),
    pub packed: bool,
    pub aspects: Aspects,
}

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 and stencil) 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

Methods

impl FormatDesc[src]

pub fn is_compressed(&self) -> bool[src]

Check if the format is compressed.

Trait Implementations

impl Clone for FormatDesc[src]

impl Copy for FormatDesc[src]

impl Eq for FormatDesc[src]

impl Ord for FormatDesc[src]

impl PartialEq<FormatDesc> for FormatDesc[src]

impl PartialOrd<FormatDesc> for FormatDesc[src]

impl Debug for FormatDesc[src]

impl Hash for FormatDesc[src]

impl StructuralPartialEq for FormatDesc[src]

impl StructuralEq for FormatDesc[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]