Skip to main content

TexFormat

Enum TexFormat 

Source
#[repr(u32)]
pub enum TexFormat {
Show 78 variants DepthComponent = 6_402, DepthStencil = 34_041, Alpha = 6_406, Alpha32f = 34_838, Alpha16f = 34_844, Red = 6_403, RedInteger = 36_244, RG = 33_319, RGInteger = 33_320, RGB = 6_407, RGBInteger = 36_248, RGBA = 6_408, RGBAInteger = 36_249, Luminance = 6_409, LuminanceAlpha = 6_410, Luminance32f = 34_840, Luminance16f = 34_846, LuminanceAlpha32f = 34_841, LuminanceAlpha16f = 34_847, CompressedRgbS3tcDxt1 = 33_776, CompressedRgbaS3tcDxt1 = 33_777, CompressedRgbaS3tcDxt3 = 33_778, CompressedRgbaS3tcDxt5 = 33_779, CompressedRgbEtc1 = 36_196, R8 = 33_321, R8SNorm = 36_756, R16f = 33_325, R32f = 33_326, R8ui = 33_330, R8i = 33_329, R16ui = 33_332, R16i = 33_331, R32ui = 33_334, R32i = 33_333, RG8 = 33_323, RG8SNorm = 36_757, RG16f = 33_327, RG32f = 33_328, RG8ui = 33_336, RG8i = 33_335, RG16ui = 33_338, RG16i = 33_337, RG32ui = 33_340, RG32i = 33_339, RGB8 = 32_849, SRGB8 = 35_905, RGB565 = 36_194, RGB8SNorm = 36_758, R11fG11fB10f = 35_898, RGB9E5 = 35_901, RGB16f = 34_843, RGB32f = 34_837, RGB8ui = 36_221, RGB8i = 36_239, RGB16ui = 36_215, RGB16i = 36_233, RGB32ui = 36_209, RGB32i = 36_227, RGBA8 = 32_856, SRGB8Alpha8 = 35_907, RGBA8SNorm = 36_759, RGB5A1 = 32_855, RGBA4 = 32_854, RGB10A2 = 32_857, RGBA16f = 34_842, RGBA32f = 34_836, RGBA8ui = 36_220, RGBA8i = 36_238, RGB10A2ui = 36_975, RGBA16ui = 36_214, RGBA16i = 36_232, RGBA32i = 36_226, RGBA32ui = 36_208, DepthComponent16 = 33_189, DepthComponent24 = 33_190, DepthComponent32f = 36_012, Depth24Stencil8 = 35_056, Depth32fStencil8 = 36_013,
}

Variants§

§

DepthComponent = 6_402

§

DepthStencil = 34_041

§

Alpha = 6_406

§

Alpha32f = 34_838

§

Alpha16f = 34_844

§

Red = 6_403

§

RedInteger = 36_244

§

RG = 33_319

§

RGInteger = 33_320

§

RGB = 6_407

§

RGBInteger = 36_248

§

RGBA = 6_408

§

RGBAInteger = 36_249

§

Luminance = 6_409

§

LuminanceAlpha = 6_410

§

Luminance32f = 34_840

§

Luminance16f = 34_846

§

LuminanceAlpha32f = 34_841

§

LuminanceAlpha16f = 34_847

§

CompressedRgbS3tcDxt1 = 33_776

§

CompressedRgbaS3tcDxt1 = 33_777

§

CompressedRgbaS3tcDxt3 = 33_778

§

CompressedRgbaS3tcDxt5 = 33_779

§

CompressedRgbEtc1 = 36_196

§

R8 = 33_321

§

R8SNorm = 36_756

§

R16f = 33_325

§

R32f = 33_326

§

R8ui = 33_330

§

R8i = 33_329

§

R16ui = 33_332

§

R16i = 33_331

§

R32ui = 33_334

§

R32i = 33_333

§

RG8 = 33_323

§

RG8SNorm = 36_757

§

RG16f = 33_327

§

RG32f = 33_328

§

RG8ui = 33_336

§

RG8i = 33_335

§

RG16ui = 33_338

§

RG16i = 33_337

§

RG32ui = 33_340

§

RG32i = 33_339

§

RGB8 = 32_849

§

SRGB8 = 35_905

§

RGB565 = 36_194

§

RGB8SNorm = 36_758

§

R11fG11fB10f = 35_898

§

RGB9E5 = 35_901

§

RGB16f = 34_843

§

RGB32f = 34_837

§

RGB8ui = 36_221

§

RGB8i = 36_239

§

RGB16ui = 36_215

§

RGB16i = 36_233

§

RGB32ui = 36_209

§

RGB32i = 36_227

§

RGBA8 = 32_856

§

SRGB8Alpha8 = 35_907

§

RGBA8SNorm = 36_759

§

RGB5A1 = 32_855

§

RGBA4 = 32_854

§

RGB10A2 = 32_857

§

RGBA16f = 34_842

§

RGBA32f = 34_836

§

RGBA8ui = 36_220

§

RGBA8i = 36_238

§

RGB10A2ui = 36_975

§

RGBA16ui = 36_214

§

RGBA16i = 36_232

§

RGBA32i = 36_226

§

RGBA32ui = 36_208

§

DepthComponent16 = 33_189

§

DepthComponent24 = 33_190

§

DepthComponent32f = 36_012

§

Depth24Stencil8 = 35_056

§

Depth32fStencil8 = 36_013

Implementations§

Source§

impl TexFormat

Source

pub fn from_gl_constant(constant: u32) -> Option<Self>

Source

pub fn as_gl_constant(&self) -> u32

Source§

impl TexFormat

Source

pub fn components(&self) -> u32

Returns how many components does this format need. For example, RGBA needs 4 components, while RGB requires 3.

Source

pub fn is_compressed(&self) -> bool

Returns whether this format is a known texture compression format.

Source

pub fn is_sized(&self) -> bool

Returns whether this format is a known sized or unsized format.

Source

pub fn to_unsized(self) -> TexFormat

Source

pub fn compatible_data_types(self) -> &'static [TexDataType]

Source

pub fn required_webgl_version(self) -> WebGLVersion

Source

pub fn usable_as_internal(self) -> bool

Source§

impl TexFormat

Source

pub fn component_type(self) -> Option<TexComponentType>

Returns the component type of a sized color format; None for unsized, depth, stencil and compressed formats.

Source

pub fn component_sizes(self) -> Option<[u8; 4]>

Returns the bits per red, green, blue and alpha component of a sized color format, with luminance counted as red; None for unsized, depth, stencil and compressed formats.

Source

pub fn is_srgb(self) -> bool

Source

pub fn effective_internal_format(self, data_type: TexDataType) -> TexFormat

Returns the sized format corresponding to this unsized format and data_type (OpenGL ES 3.0.6 table 3.12); a sized format is returned unchanged.

Trait Implementations§

Source§

impl Clone for TexFormat

Source§

fn clone(&self) -> TexFormat

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for TexFormat

Source§

impl Debug for TexFormat

Source§

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

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

impl<'de> Deserialize<'de> for TexFormat

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for TexFormat

Source§

impl Hash for TexFormat

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 MallocSizeOf for TexFormat

Source§

fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself.
Source§

impl PartialEq for TexFormat

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for TexFormat

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for TexFormat

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> MaybeBoxed<Box<T>> for T

Source§

fn maybe_boxed(self) -> Box<T>

Convert
Source§

impl<T> MaybeBoxed<T> for T

Source§

fn maybe_boxed(self) -> T

Convert
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more