#[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

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<TexFormat> 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 StructuralEq for TexFormat

source§

impl StructuralPartialEq for TexFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Qwhere 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 Qwhere 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<Q, K> Equivalent<K> for Qwhere 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 Twhere 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> MaybeBoxed<Box<T, Global>> for T

source§

fn maybe_boxed(self) -> Box<T, Global>

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<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere 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 Twhere 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 Twhere 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 Twhere V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

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

source§

impl<T> Erased for T