pub enum PixelKind {
Show 35 variants
R32F,
R32UI,
R16F,
D32F,
D16,
D24S8,
RGBA8,
SRGBA8,
RGB8,
SRGB8,
BGRA8,
BGR8,
RG8,
LA8,
LA16,
RG16,
R8,
L8,
L16,
R8UI,
R16,
RGB16,
RGBA16,
DXT1RGB,
DXT1RGBA,
DXT3RGBA,
DXT5RGBA,
RGB32F,
RGBA32F,
RGB16F,
RGBA16F,
R8RGTC,
RG8RGTC,
R11G11B10F,
RGB10A2,
}
Expand description
Pixel kind of GPU texture.
Variants§
R32F
Floating point 32-bit pixel.
R32UI
Unsigned integer 32-bit pixel.
R16F
Floating point 16-bit pixel.
D32F
Floating point 32-bit depth pixel.
D16
Integer 16-bit depth pixel.
D24S8
Integer 24-bit depth pixel + 8-bit stencil.
RGBA8
Red, Green, Blue, Alpha; all by 8-bit.
SRGBA8
Red, Green, Blue, Alpha in sRGB color space; all by 8-bit.
RGB8
Red, Green, Blue; all by 8-bit.
SRGB8
Red, Green, Blue in sRGB color space; all by 8-bit.
BGRA8
Blue, Green, Red, Alpha; all by 8-bit.
BGR8
Blue, Green, Red; all by 8-bit.
RG8
Red, Green; all by 8-bit.
LA8
Luminance, Alpha; all by 8-bit.
LA16
Luminance, Alpha; all by 16-bit.
RG16
Red, Green; all by 16-bit.
R8
Red, Green; 16-bit.
L8
Luminance; 8-bit.
L16
Luminance; 16-bit.
R8UI
Red, unsigned integer; 8-bit.
R16
Red, signed integer; 16-bit.
RGB16
Red, Green, Blue; all by 16-bit.
RGBA16
Red, Green, Blue, Alpha; all by 8-bit.
DXT1RGB
Compressed S3TC DXT1 RGB.
DXT1RGBA
Compressed S3TC DXT1 RGBA.
DXT3RGBA
Compressed S3TC DXT3 RGBA.
DXT5RGBA
Compressed S3TC DXT5 RGBA.
RGB32F
Floating-point RGB texture with 32-bit depth.
RGBA32F
Floating-point RGBA texture with 32-bit depth.
RGB16F
Floating-point RGB texture with 16-bit depth.
RGBA16F
Floating-point RGBA texture with 16-bit depth.
R8RGTC
Compressed R8 texture (RGTC).
RG8RGTC
Compressed RG8 texture (RGTC).
R11G11B10F
Floating-point RGB texture with 11-bit for Red and Green channels, 10-bit for Blue channel.
RGB10A2
Red, Green, Blue (8-bit) + Alpha (2-bit).
Implementations§
Source§impl PixelKind
impl PixelKind
Sourcepub fn is_compressed(self) -> bool
pub fn is_compressed(self) -> bool
Returns true
if the pixel kind is compressed, false
- otherwise.
Sourcepub fn element_kind(self) -> PixelElementKind
pub fn element_kind(self) -> PixelElementKind
Returns element kind of the pixel.
Trait Implementations§
impl Copy for PixelKind
impl StructuralPartialEq for PixelKind
Auto Trait Implementations§
impl Freeze for PixelKind
impl RefUnwindSafe for PixelKind
impl Send for PixelKind
impl Sync for PixelKind
impl Unpin for PixelKind
impl UnwindSafe for PixelKind
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Any
. Could be used to downcast a trait object
to a particular type.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Any
. Could be used to downcast a trait object
to a particular type.fn into_any(self: Box<T>) -> Box<dyn Any>
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere
T: 'static,
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> 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> ⓘ
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> ⓘ
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> MessageData for T
impl<T> MessageData for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ScriptMessagePayload for T
impl<T> ScriptMessagePayload for T
Source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
self
as &dyn Any
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
self
as &dyn Any
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.