MTLPixelFormat

Struct MTLPixelFormat 

Source
#[repr(transparent)]
pub struct MTLPixelFormat(pub NSUInteger);
Available on crate feature MTLPixelFormat only.
Expand description

Tuple Fields§

§0: NSUInteger

Implementations§

Source§

impl MTLPixelFormat

Source

pub const Invalid: Self

Source

pub const A8Unorm: Self

Source

pub const R8Unorm: Self

Source

pub const R8Unorm_sRGB: Self

Source

pub const R8Snorm: Self

Source

pub const R8Uint: Self

Source

pub const R8Sint: Self

Source

pub const R16Unorm: Self

Source

pub const R16Snorm: Self

Source

pub const R16Uint: Self

Source

pub const R16Sint: Self

Source

pub const R16Float: Self

Source

pub const RG8Unorm: Self

Source

pub const RG8Unorm_sRGB: Self

Source

pub const RG8Snorm: Self

Source

pub const RG8Uint: Self

Source

pub const RG8Sint: Self

Source

pub const B5G6R5Unorm: Self

Source

pub const A1BGR5Unorm: Self

Source

pub const ABGR4Unorm: Self

Source

pub const BGR5A1Unorm: Self

Source

pub const R32Uint: Self

Source

pub const R32Sint: Self

Source

pub const R32Float: Self

Source

pub const RG16Unorm: Self

Source

pub const RG16Snorm: Self

Source

pub const RG16Uint: Self

Source

pub const RG16Sint: Self

Source

pub const RG16Float: Self

Source

pub const RGBA8Unorm: Self

Source

pub const RGBA8Unorm_sRGB: Self

Source

pub const RGBA8Snorm: Self

Source

pub const RGBA8Uint: Self

Source

pub const RGBA8Sint: Self

Source

pub const BGRA8Unorm: Self

Source

pub const BGRA8Unorm_sRGB: Self

Source

pub const RGB10A2Unorm: Self

Source

pub const RGB10A2Uint: Self

Source

pub const RG11B10Float: Self

Source

pub const RGB9E5Float: Self

Source

pub const BGR10A2Unorm: Self

Source

pub const BGR10_XR: Self

Source

pub const BGR10_XR_sRGB: Self

Source

pub const RG32Uint: Self

Source

pub const RG32Sint: Self

Source

pub const RG32Float: Self

Source

pub const RGBA16Unorm: Self

Source

pub const RGBA16Snorm: Self

Source

pub const RGBA16Uint: Self

Source

pub const RGBA16Sint: Self

Source

pub const RGBA16Float: Self

Source

pub const BGRA10_XR: Self

Source

pub const BGRA10_XR_sRGB: Self

Source

pub const RGBA32Uint: Self

Source

pub const RGBA32Sint: Self

Source

pub const RGBA32Float: Self

Source

pub const BC1_RGBA: Self

Source

pub const BC1_RGBA_sRGB: Self

Source

pub const BC2_RGBA: Self

Source

pub const BC2_RGBA_sRGB: Self

Source

pub const BC3_RGBA: Self

Source

pub const BC3_RGBA_sRGB: Self

Source

pub const BC4_RUnorm: Self

Source

pub const BC4_RSnorm: Self

Source

pub const BC5_RGUnorm: Self

Source

pub const BC5_RGSnorm: Self

Source

pub const BC6H_RGBFloat: Self

Source

pub const BC6H_RGBUfloat: Self

Source

pub const BC7_RGBAUnorm: Self

Source

pub const BC7_RGBAUnorm_sRGB: Self

Source

pub const PVRTC_RGB_2BPP: Self

👎Deprecated: Usage of ASTC/ETC2/BC formats is recommended instead.
Source

pub const PVRTC_RGB_2BPP_sRGB: Self

👎Deprecated: Usage of ASTC/ETC2/BC formats is recommended instead.
Source

pub const PVRTC_RGB_4BPP: Self

👎Deprecated: Usage of ASTC/ETC2/BC formats is recommended instead.
Source

pub const PVRTC_RGB_4BPP_sRGB: Self

👎Deprecated: Usage of ASTC/ETC2/BC formats is recommended instead.
Source

pub const PVRTC_RGBA_2BPP: Self

👎Deprecated: Usage of ASTC/ETC2/BC formats is recommended instead.
Source

pub const PVRTC_RGBA_2BPP_sRGB: Self

👎Deprecated: Usage of ASTC/ETC2/BC formats is recommended instead.
Source

pub const PVRTC_RGBA_4BPP: Self

👎Deprecated: Usage of ASTC/ETC2/BC formats is recommended instead.
Source

pub const PVRTC_RGBA_4BPP_sRGB: Self

👎Deprecated: Usage of ASTC/ETC2/BC formats is recommended instead.
Source

pub const EAC_R11Unorm: Self

Source

pub const EAC_R11Snorm: Self

Source

pub const EAC_RG11Unorm: Self

Source

pub const EAC_RG11Snorm: Self

Source

pub const EAC_RGBA8: Self

Source

pub const EAC_RGBA8_sRGB: Self

Source

pub const ETC2_RGB8: Self

Source

pub const ETC2_RGB8_sRGB: Self

Source

pub const ETC2_RGB8A1: Self

Source

pub const ETC2_RGB8A1_sRGB: Self

Source

pub const ASTC_4x4_sRGB: Self

Source

pub const ASTC_5x4_sRGB: Self

Source

pub const ASTC_5x5_sRGB: Self

Source

pub const ASTC_6x5_sRGB: Self

Source

pub const ASTC_6x6_sRGB: Self

Source

pub const ASTC_8x5_sRGB: Self

Source

pub const ASTC_8x6_sRGB: Self

Source

pub const ASTC_8x8_sRGB: Self

Source

pub const ASTC_10x5_sRGB: Self

Source

pub const ASTC_10x6_sRGB: Self

Source

pub const ASTC_10x8_sRGB: Self

Source

pub const ASTC_10x10_sRGB: Self

Source

pub const ASTC_12x10_sRGB: Self

Source

pub const ASTC_12x12_sRGB: Self

Source

pub const ASTC_4x4_LDR: Self

Source

pub const ASTC_5x4_LDR: Self

Source

pub const ASTC_5x5_LDR: Self

Source

pub const ASTC_6x5_LDR: Self

Source

pub const ASTC_6x6_LDR: Self

Source

pub const ASTC_8x5_LDR: Self

Source

pub const ASTC_8x6_LDR: Self

Source

pub const ASTC_8x8_LDR: Self

Source

pub const ASTC_10x5_LDR: Self

Source

pub const ASTC_10x6_LDR: Self

Source

pub const ASTC_10x8_LDR: Self

Source

pub const ASTC_10x10_LDR: Self

Source

pub const ASTC_12x10_LDR: Self

Source

pub const ASTC_12x12_LDR: Self

Source

pub const ASTC_4x4_HDR: Self

Source

pub const ASTC_5x4_HDR: Self

Source

pub const ASTC_5x5_HDR: Self

Source

pub const ASTC_6x5_HDR: Self

Source

pub const ASTC_6x6_HDR: Self

Source

pub const ASTC_8x5_HDR: Self

Source

pub const ASTC_8x6_HDR: Self

Source

pub const ASTC_8x8_HDR: Self

Source

pub const ASTC_10x5_HDR: Self

Source

pub const ASTC_10x6_HDR: Self

Source

pub const ASTC_10x8_HDR: Self

Source

pub const ASTC_10x10_HDR: Self

Source

pub const ASTC_12x10_HDR: Self

Source

pub const ASTC_12x12_HDR: Self

Source

pub const GBGR422: Self

A pixel format where the red and green channels are subsampled horizontally. Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.

This format is equivalent to YUY2, YUYV, yuvs, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_REV_APPLE. The component order, from lowest addressed byte to highest, is Y0, Cb, Y1, Cr. There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1). 422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures. When sampling, ClampToEdge is the only usable wrap mode.

Source

pub const BGRG422: Self

A pixel format where the red and green channels are subsampled horizontally. Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.

This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1. There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1). 422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures. When sampling, ClampToEdge is the only usable wrap mode.

Source

pub const Depth16Unorm: Self

A pixel format where the red and green channels are subsampled horizontally. Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.

This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1. There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1). 422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures. When sampling, ClampToEdge is the only usable wrap mode.

Source

pub const Depth32Float: Self

A pixel format where the red and green channels are subsampled horizontally. Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.

This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1. There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1). 422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures. When sampling, ClampToEdge is the only usable wrap mode.

Source

pub const Stencil8: Self

A pixel format where the red and green channels are subsampled horizontally. Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.

This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1. There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1). 422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures. When sampling, ClampToEdge is the only usable wrap mode.

Source

pub const Depth24Unorm_Stencil8: Self

A pixel format where the red and green channels are subsampled horizontally. Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.

This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1. There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1). 422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures. When sampling, ClampToEdge is the only usable wrap mode.

Source

pub const Depth32Float_Stencil8: Self

A pixel format where the red and green channels are subsampled horizontally. Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.

This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1. There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1). 422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures. When sampling, ClampToEdge is the only usable wrap mode.

Source

pub const X32_Stencil8: Self

A pixel format where the red and green channels are subsampled horizontally. Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.

This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1. There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1). 422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures. When sampling, ClampToEdge is the only usable wrap mode.

Source

pub const X24_Stencil8: Self

A pixel format where the red and green channels are subsampled horizontally. Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.

This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1. There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1). 422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures. When sampling, ClampToEdge is the only usable wrap mode.

Source

pub const Unspecialized: Self

A pixel format where the red and green channels are subsampled horizontally. Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.

This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1. There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1). 422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures. When sampling, ClampToEdge is the only usable wrap mode.

Trait Implementations§

Source§

impl Clone for MTLPixelFormat

Source§

fn clone(&self) -> MTLPixelFormat

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MTLPixelFormat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Encode for MTLPixelFormat

Source§

const ENCODING: Encoding = NSUInteger::ENCODING

The Objective-C type-encoding for this type.
Source§

impl Hash for MTLPixelFormat

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for MTLPixelFormat

Source§

fn cmp(&self, other: &MTLPixelFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for MTLPixelFormat

Source§

fn eq(&self, other: &MTLPixelFormat) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for MTLPixelFormat

Source§

fn partial_cmp(&self, other: &MTLPixelFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl RefEncode for MTLPixelFormat

Source§

const ENCODING_REF: Encoding

The Objective-C type-encoding for a reference of this type. Read more
Source§

impl Copy for MTLPixelFormat

Source§

impl Eq for MTLPixelFormat

Source§

impl StructuralPartialEq for MTLPixelFormat

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> EncodeArgument for T
where T: Encode,

Source§

const ENCODING_ARGUMENT: Encoding = T::ENCODING

The Objective-C type-encoding for this type.
Source§

impl<T> EncodeReturn for T
where T: Encode,

Source§

const ENCODING_RETURN: Encoding = T::ENCODING

The Objective-C type-encoding for this type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,