Enum gfx::device::tex::Format
[−]
[src]
pub enum Format {
Float(Components, FloatSize),
Integer(Components, Bits, IntSubType),
Unsigned(Components, Bits, IntSubType),
Compressed(Compression),
R3_G3_B2,
R5_G6_B5,
RGB5_A1,
RGB10_A2,
RGB10_A2UI,
R11F_G11F_B10F,
RGB9_E5,
BGRA8,
SRGB8,
SRGB8_A8,
DEPTH16,
DEPTH24,
DEPTH32F,
DEPTH24_STENCIL8,
DEPTH32F_STENCIL8,
}Describes the layout of each texel within a surface/texture.
Variants
Float | Floating point. |
Integer | Signed integer. |
Unsigned | Unsigned integer. |
Compressed | Compressed data. |
R3_G3_B2 | 3 bits for RG, 2 for B. |
R5_G6_B5 | 5 bits for RB, 6 for G |
RGB5_A1 | 5 bits each for RGB, 1 for Alpha. |
RGB10_A2 | 10 bits each for RGB, 2 for Alpha. |
RGB10_A2UI | 10 bits each for RGB, 2 for Alpha, as unsigned integers. |
R11F_G11F_B10F | This uses special 11 and 10-bit floating-point values without sign bits. |
RGB9_E5 | This s an RGB format of type floating-point. The 3 color values have 9 bits of precision, and they share a single exponent. |
BGRA8 | Swizzled RGBA color format, used for interaction with Windows DIBs |
SRGB8 | Gamma-encoded RGB8 |
SRGB8_A8 | Gamma-encoded RGB8, unchanged alpha |
DEPTH16 | 16-bit bits depth |
DEPTH24 | 24 bits depth |
DEPTH32F | 32 floating-point bits depth |
DEPTH24_STENCIL8 | 24 bits for depth, 8 for stencil |
DEPTH32F_STENCIL8 | 32 floating point bits for depth, 8 for stencil |
Methods
impl Format
fn get_components(&self) -> Option<Components>
Extract the components format
fn is_color(&self) -> bool
Check if it's a color format.
fn has_depth(&self) -> bool
Check if it has a depth component.
fn has_stencil(&self) -> bool
Check if it has a stencil component.
fn is_compressed(&self) -> bool
Check if it's a compressed format.
fn does_convert_gamma(&self) -> bool
Check if it's a sRGB color space.