pub struct Swizzle {
pub r: ComponentSwizzle,
pub g: ComponentSwizzle,
pub b: ComponentSwizzle,
pub a: ComponentSwizzle,
}
Expand description
Specifies how the components of an image must be swizzled.
When creating an image view, it is possible to ask the implementation to modify the value returned when accessing a given component from within a shader.
If all the members are Identity
, then the view is said to have identity swizzling. This is
what the Default
trait implementation of this struct returns.
Views that don’t have identity swizzling may not be supported for some operations. For example
attaching a view to a framebuffer is only possible if the view is identity-swizzled.
Fields
r: ComponentSwizzle
First component.
g: ComponentSwizzle
Second component.
b: ComponentSwizzle
Third component.
a: ComponentSwizzle
Fourth component.
Trait Implementations
impl Copy for Swizzle
impl Eq for Swizzle
impl StructuralEq for Swizzle
impl StructuralPartialEq for Swizzle
Auto Trait Implementations
impl RefUnwindSafe for Swizzle
impl Send for Swizzle
impl Sync for Swizzle
impl Unpin for Swizzle
impl UnwindSafe for Swizzle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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> Content for T
impl<T> Content for T
sourcefn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
sourcefn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
sourcefn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.