Enum wgpu_types::AddressMode
source · #[repr(C)]
pub enum AddressMode {
ClampToEdge,
Repeat,
MirrorRepeat,
ClampToBorder,
}
Expand description
How edges should be handled in texture addressing.
Corresponds to WebGPU GPUAddressMode
.
Variants§
ClampToEdge
Clamp the value to the edge of the texture
-0.25 -> 0.0 1.25 -> 1.0
Repeat
Repeat the texture in a tiling fashion
-0.25 -> 0.75 1.25 -> 0.25
MirrorRepeat
Repeat the texture, mirroring it every repeat
-0.25 -> 0.25 1.25 -> 0.75
ClampToBorder
Clamp the value to the border of the texture
Requires feature Features::ADDRESS_MODE_CLAMP_TO_BORDER
-0.25 -> border 1.25 -> border
Trait Implementations§
source§impl Clone for AddressMode
impl Clone for AddressMode
source§fn clone(&self) -> AddressMode
fn clone(&self) -> AddressMode
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 AddressMode
impl Debug for AddressMode
source§impl Default for AddressMode
impl Default for AddressMode
source§fn default() -> AddressMode
fn default() -> AddressMode
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for AddressMode
impl<'de> Deserialize<'de> for AddressMode
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for AddressMode
impl Hash for AddressMode
source§impl PartialEq<AddressMode> for AddressMode
impl PartialEq<AddressMode> for AddressMode
source§fn eq(&self, other: &AddressMode) -> bool
fn eq(&self, other: &AddressMode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.