Enum canvas_traits::webgl::TexDataType
source · #[repr(u32)]
pub enum TexDataType {
Show 16 variants
Byte,
Int,
Short,
UnsignedByte,
UnsignedInt,
UnsignedInt10f11f11fRev,
UnsignedInt2101010Rev,
UnsignedInt5999Rev,
UnsignedInt248,
UnsignedShort,
UnsignedShort4444,
UnsignedShort5551,
UnsignedShort565,
Float,
HalfFloat,
Float32UnsignedInt248Rev,
}
Variants§
Byte
Int
Short
UnsignedByte
UnsignedInt
UnsignedInt10f11f11fRev
UnsignedInt2101010Rev
UnsignedInt5999Rev
UnsignedInt248
UnsignedShort
UnsignedShort4444
UnsignedShort5551
UnsignedShort565
Float
HalfFloat
Float32UnsignedInt248Rev
Implementations§
source§impl TexDataType
impl TexDataType
pub fn from_gl_constant(constant: u32) -> Option<Self>
pub fn as_gl_constant(&self) -> u32
source§impl TexDataType
impl TexDataType
sourcepub fn sized_data_type(&self) -> SizedDataType
pub fn sized_data_type(&self) -> SizedDataType
Returns the compatible sized data type for this texture data type.
sourcepub fn element_size(&self) -> u32
pub fn element_size(&self) -> u32
Returns the size in bytes of each element of data.
sourcepub fn components_per_element(&self) -> u32
pub fn components_per_element(&self) -> u32
Returns how many components a single element may hold. For example, a UnsignedShort4444 holds four components, each with 4 bits of data.
pub fn required_webgl_version(self) -> WebGLVersion
Trait Implementations§
source§impl Clone for TexDataType
impl Clone for TexDataType
source§fn clone(&self) -> TexDataType
fn clone(&self) -> TexDataType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TexDataType
impl Debug for TexDataType
source§impl<'de> Deserialize<'de> for TexDataType
impl<'de> Deserialize<'de> for TexDataType
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 Hash for TexDataType
impl Hash for TexDataType
source§impl MallocSizeOf for TexDataType
impl MallocSizeOf for TexDataType
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<TexDataType> for TexDataType
impl PartialEq<TexDataType> for TexDataType
source§fn eq(&self, other: &TexDataType) -> bool
fn eq(&self, other: &TexDataType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for TexDataType
impl Serialize for TexDataType
impl Copy for TexDataType
impl Eq for TexDataType
impl StructuralEq for TexDataType
impl StructuralPartialEq for TexDataType
Auto Trait Implementations§
impl RefUnwindSafe for TexDataType
impl Send for TexDataType
impl Sync for TexDataType
impl Unpin for TexDataType
impl UnwindSafe for TexDataType
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