Enum webrender::internal_types::TextureSource
source · pub enum TextureSource {
Invalid,
TextureCache(CacheTextureId, Swizzle),
External(DeferredResolveIndex, ImageBufferKind),
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(DeferredResolveIndex, ImageBufferKind)
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 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§fn eq(&self, other: &TextureSource) -> bool
fn eq(&self, other: &TextureSource) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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> 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