Enum ark_api::render::TextureFormat
source · #[non_exhaustive]
pub enum TextureFormat {
R8G8B8A8_SRGB,
R8G8B8A8_UNORM,
}Expand description
Describes how a texture stores its data.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
R8G8B8A8_SRGB
32-bit-per-pixel, fixed-point pixel format assuming premultiplied alpha. SRGB encoded.
R8G8B8A8_UNORM
32-bit-per-pixel, fixed-point pixel format assuming premultiplied alpha. Linear.
Implementations§
source§impl TextureFormat
impl TextureFormat
sourcepub fn bytes_per_pixel(&self) -> u64
pub fn bytes_per_pixel(&self) -> u64
The amount of storage required for a single texture pixel.
Trait Implementations§
source§impl CheckedBitPattern for TextureFormat
impl CheckedBitPattern for TextureFormat
§type Bits = u32
type Bits = u32
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.source§fn is_valid_bit_pattern(
bits: &<TextureFormat as CheckedBitPattern>::Bits
) -> bool
fn is_valid_bit_pattern( bits: &<TextureFormat as CheckedBitPattern>::Bits ) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.source§impl Clone for TextureFormat
impl Clone for TextureFormat
source§fn clone(&self) -> TextureFormat
fn clone(&self) -> TextureFormat
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 TextureFormat
impl Debug for TextureFormat
source§impl PartialEq<TextureFormat> for TextureFormat
impl PartialEq<TextureFormat> for TextureFormat
source§fn eq(&self, other: &TextureFormat) -> bool
fn eq(&self, other: &TextureFormat) -> bool
This method tests for
self and other values to be equal, and is used
by ==.