Enum canvas_traits::webgl::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

Trait Implementations§

source§

impl Clone for TexFormat

source§

fn clone(&self) -> TexFormat

Returns a copy 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 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 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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
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 Copy for TexFormat

source§

impl Eq for TexFormat

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

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

Checks if this value is equivalent to the given key. Read more
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> 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> 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.
§

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

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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>,

§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

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

source§

impl<T> MaybeSendSync for T