pub enum TextureSource {
Invalid,
TextureCache(CacheTextureId, Swizzle),
External(TextureSourceExternal),
Dummy,
}
Expand description
Identifies the source of an input texture to a shader.
Variants§
Invalid
Equivalent to None
, allowing us to avoid using Option
s everywhere.
TextureCache(CacheTextureId, Swizzle)
An entry in the texture cache.
External(TextureSourceExternal)
An external image texture, mananged by the embedding.
Dummy
Select a dummy 1x1 white texture. This can be used by image shaders that want to draw a solid color.
Implementations§
Source§impl TextureSource
impl TextureSource
fn combine(&self, other: TextureSource) -> TextureSource
Source§impl TextureSource
impl TextureSource
pub fn image_buffer_kind(&self) -> ImageBufferKind
pub fn uses_normalized_uvs(&self) -> bool
pub fn is_compatible(&self, other: &TextureSource) -> bool
Trait Implementations§
Source§impl Clone for TextureSource
impl Clone for TextureSource
Source§fn clone(&self) -> TextureSource
fn clone(&self) -> TextureSource
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 TextureSource
impl Debug for TextureSource
Source§impl Hash for TextureSource
impl Hash for TextureSource
Source§impl PartialEq for TextureSource
impl PartialEq for TextureSource
Source§impl Serialize for TextureSource
impl Serialize for TextureSource
impl Copy for TextureSource
impl Eq for TextureSource
impl StructuralPartialEq for TextureSource
Auto Trait Implementations§
impl Freeze for TextureSource
impl RefUnwindSafe for TextureSource
impl Send for TextureSource
impl Sync for TextureSource
impl Unpin for TextureSource
impl UnwindSafe for TextureSource
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§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 more