Enum canvas_traits::webgl::TexFormat
source · #[repr(u32)]
pub enum TexFormat {
Show 78 variants
DepthComponent,
DepthStencil,
Alpha,
Alpha32f,
Alpha16f,
Red,
RedInteger,
RG,
RGInteger,
RGB,
RGBInteger,
RGBA,
RGBAInteger,
Luminance,
LuminanceAlpha,
Luminance32f,
Luminance16f,
LuminanceAlpha32f,
LuminanceAlpha16f,
CompressedRgbS3tcDxt1,
CompressedRgbaS3tcDxt1,
CompressedRgbaS3tcDxt3,
CompressedRgbaS3tcDxt5,
CompressedRgbEtc1,
R8,
R8SNorm,
R16f,
R32f,
R8ui,
R8i,
R16ui,
R16i,
R32ui,
R32i,
RG8,
RG8SNorm,
RG16f,
RG32f,
RG8ui,
RG8i,
RG16ui,
RG16i,
RG32ui,
RG32i,
RGB8,
SRGB8,
RGB565,
RGB8SNorm,
R11fG11fB10f,
RGB9E5,
RGB16f,
RGB32f,
RGB8ui,
RGB8i,
RGB16ui,
RGB16i,
RGB32ui,
RGB32i,
RGBA8,
SRGB8Alpha8,
RGBA8SNorm,
RGB5A1,
RGBA4,
RGB10A2,
RGBA16f,
RGBA32f,
RGBA8ui,
RGBA8i,
RGB10A2ui,
RGBA16ui,
RGBA16i,
RGBA32i,
RGBA32ui,
DepthComponent16,
DepthComponent24,
DepthComponent32f,
Depth24Stencil8,
Depth32fStencil8,
}
Variants§
DepthComponent
DepthStencil
Alpha
Alpha32f
Alpha16f
Red
RedInteger
RG
RGInteger
RGB
RGBInteger
RGBA
RGBAInteger
Luminance
LuminanceAlpha
Luminance32f
Luminance16f
LuminanceAlpha32f
LuminanceAlpha16f
CompressedRgbS3tcDxt1
CompressedRgbaS3tcDxt1
CompressedRgbaS3tcDxt3
CompressedRgbaS3tcDxt5
CompressedRgbEtc1
R8
R8SNorm
R16f
R32f
R8ui
R8i
R16ui
R16i
R32ui
R32i
RG8
RG8SNorm
RG16f
RG32f
RG8ui
RG8i
RG16ui
RG16i
RG32ui
RG32i
RGB8
SRGB8
RGB565
RGB8SNorm
R11fG11fB10f
RGB9E5
RGB16f
RGB32f
RGB8ui
RGB8i
RGB16ui
RGB16i
RGB32ui
RGB32i
RGBA8
SRGB8Alpha8
RGBA8SNorm
RGB5A1
RGBA4
RGB10A2
RGBA16f
RGBA32f
RGBA8ui
RGBA8i
RGB10A2ui
RGBA16ui
RGBA16i
RGBA32i
RGBA32ui
DepthComponent16
DepthComponent24
DepthComponent32f
Depth24Stencil8
Depth32fStencil8
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.
source§impl PartialEq<TexFormat> for TexFormat
impl PartialEq<TexFormat> for TexFormat
impl Copy for TexFormat
impl Eq for TexFormat
impl StructuralEq for TexFormat
impl StructuralPartialEq for TexFormat
Auto Trait Implementations§
impl RefUnwindSafe for TexFormat
impl Send for TexFormat
impl Sync for TexFormat
impl Unpin for TexFormat
impl UnwindSafe for TexFormat
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
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