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
impl TexFormat
pub fn from_gl_constant(constant: u32) -> Option<Self>
pub fn as_gl_constant(&self) -> u32
source§impl TexFormat
impl TexFormat
sourcepub fn components(&self) -> u32
pub fn components(&self) -> u32
Returns how many components does this format need. For example, RGBA needs 4 components, while RGB requires 3.
sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
Returns whether this format is a known texture compression format.
pub fn to_unsized(self) -> TexFormat
pub fn compatible_data_types(self) -> &'static [TexDataType]
pub fn required_webgl_version(self) -> WebGLVersion
pub fn usable_as_internal(self) -> bool
Trait Implementations§
source§impl<'de> Deserialize<'de> for TexFormat
impl<'de> Deserialize<'de> for TexFormat
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 MallocSizeOf for TexFormat
impl MallocSizeOf for TexFormat
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
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.
impl Copy for TexFormat
impl Eq for TexFormat
impl StructuralPartialEq for TexFormat
Auto Trait Implementations§
impl Freeze for TexFormat
impl RefUnwindSafe for TexFormat
impl Send for TexFormat
impl Sync for TexFormat
impl Unpin for TexFormat
impl UnwindSafe for TexFormat
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert