Enum ark_api::render::TextureFormat
source · [−]#[repr(u32)]
#[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
sourceimpl 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
sourceimpl 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
. Read more
sourcefn 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
. Read more
sourceimpl Clone for TextureFormat
impl Clone for TextureFormat
sourcefn clone(&self) -> TextureFormat
fn clone(&self) -> TextureFormat
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TextureFormat
impl Debug for TextureFormat
sourceimpl PartialEq<TextureFormat> for TextureFormat
impl PartialEq<TextureFormat> for TextureFormat
sourcefn 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 ==
. Read more
impl Copy for TextureFormat
impl Eq for TextureFormat
impl NoUninit for TextureFormat
impl StructuralEq for TextureFormat
impl StructuralPartialEq for TextureFormat
Auto Trait Implementations
impl RefUnwindSafe for TextureFormat
impl Send for TextureFormat
impl Sync for TextureFormat
impl Unpin for TextureFormat
impl UnwindSafe for TextureFormat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more