Struct vulkano::sampler::ComponentMapping
source · [−]pub struct ComponentMapping {
pub r: ComponentSwizzle,
pub g: ComponentSwizzle,
pub b: ComponentSwizzle,
pub a: ComponentSwizzle,
}
Expand description
A mapping between components of a source format and components read by a shader.
Fields
r: ComponentSwizzle
First component.
g: ComponentSwizzle
Second component.
b: ComponentSwizzle
Third component.
a: ComponentSwizzle
Fourth component.
Implementations
sourceimpl ComponentMapping
impl ComponentMapping
sourcepub fn is_identity(&self) -> bool
pub fn is_identity(&self) -> bool
Returns true
if all components are identity swizzled,
meaning that all the members are Identity
or the name of that member.
Certain operations require views that are identity swizzled, and will return an error otherwise. For example, attaching a view to a framebuffer is only possible if the view is identity swizzled.
sourcepub fn r_is_identity(&self) -> bool
pub fn r_is_identity(&self) -> bool
Returns true
if the red component mapping is identity swizzled.
sourcepub fn g_is_identity(&self) -> bool
pub fn g_is_identity(&self) -> bool
Returns true
if the green component mapping is identity swizzled.
sourcepub fn b_is_identity(&self) -> bool
pub fn b_is_identity(&self) -> bool
Returns true
if the blue component mapping is identity swizzled.
sourcepub fn a_is_identity(&self) -> bool
pub fn a_is_identity(&self) -> bool
Returns true
if the alpha component mapping is identity swizzled.
Trait Implementations
sourceimpl Clone for ComponentMapping
impl Clone for ComponentMapping
sourcefn clone(&self) -> ComponentMapping
fn clone(&self) -> ComponentMapping
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ComponentMapping
impl Debug for ComponentMapping
sourceimpl Default for ComponentMapping
impl Default for ComponentMapping
sourcefn default() -> ComponentMapping
fn default() -> ComponentMapping
Returns the “default value” for a type. Read more
sourceimpl From<ComponentMapping> for ComponentMapping
impl From<ComponentMapping> for ComponentMapping
sourcefn from(value: ComponentMapping) -> Self
fn from(value: ComponentMapping) -> Self
Performs the conversion.
sourceimpl PartialEq<ComponentMapping> for ComponentMapping
impl PartialEq<ComponentMapping> for ComponentMapping
sourcefn eq(&self, other: &ComponentMapping) -> bool
fn eq(&self, other: &ComponentMapping) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ComponentMapping) -> bool
fn ne(&self, other: &ComponentMapping) -> bool
This method tests for !=
.
impl Copy for ComponentMapping
impl Eq for ComponentMapping
impl StructuralEq for ComponentMapping
impl StructuralPartialEq for ComponentMapping
Auto Trait Implementations
impl RefUnwindSafe for ComponentMapping
impl Send for ComponentMapping
impl Sync for ComponentMapping
impl Unpin for ComponentMapping
impl UnwindSafe for ComponentMapping
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more