Enum canvas_traits::webgl::TexDataType
source · #[repr(u32)]pub enum TexDataType {
Show 16 variants
Byte = 5_120,
Int = 5_124,
Short = 5_122,
UnsignedByte = 5_121,
UnsignedInt = 5_125,
UnsignedInt10f11f11fRev = 35_899,
UnsignedInt2101010Rev = 33_640,
UnsignedInt5999Rev = 35_902,
UnsignedInt248 = 34_042,
UnsignedShort = 5_123,
UnsignedShort4444 = 32_819,
UnsignedShort5551 = 32_820,
UnsignedShort565 = 33_635,
Float = 5_126,
HalfFloat = 36_193,
Float32UnsignedInt248Rev = 36_269,
}
Variants§
Byte = 5_120
Int = 5_124
Short = 5_122
UnsignedByte = 5_121
UnsignedInt = 5_125
UnsignedInt10f11f11fRev = 35_899
UnsignedInt2101010Rev = 33_640
UnsignedInt5999Rev = 35_902
UnsignedInt248 = 34_042
UnsignedShort = 5_123
UnsignedShort4444 = 32_819
UnsignedShort5551 = 32_820
UnsignedShort565 = 33_635
Float = 5_126
HalfFloat = 36_193
Float32UnsignedInt248Rev = 36_269
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 for TexDataType
impl PartialEq for TexDataType
source§impl Serialize for TexDataType
impl Serialize for TexDataType
impl Copy for TexDataType
impl Eq for TexDataType
impl StructuralPartialEq for TexDataType
Auto Trait Implementations§
impl Freeze for TexDataType
impl RefUnwindSafe for TexDataType
impl Send for TexDataType
impl Sync for TexDataType
impl Unpin for TexDataType
impl UnwindSafe for TexDataType
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