pub struct SamplerDesc {
pub min_filter: Filter,
pub mag_filter: Filter,
pub mip_map_mode: MipMapMode,
pub address_mode: [AddressMode; 3],
pub anisotropy: Option<f32>,
pub min_lod: f32,
pub max_lod: f32,
pub normalized: bool,
}Expand description
Describes how to sample the texture.
Fields§
§min_filter: FilterFilter to use when sampling the texture with pixels smaller than fragment.
mag_filter: FilterFilter to use when sampling the texture with pixels larger than fragment.
mip_map_mode: MipMapModeMip-map mode to use when sampling the texture.
address_mode: [AddressMode; 3]Address mode to use when sampling the texture, for each dimension.
anisotropy: Option<f32>Maximum anisotropy level to use when sampling the texture.
min_lod: f32Minimum level of detail to use when sampling the texture.
max_lod: f32Maximum level of detail to use when sampling the texture.
normalized: boolWhether to normalize the texture coordinates. If true, 0.0 and 1.0 are treated as edges of the texture. Otherwise 1.0 is size of one texel.
Implementations§
Source§impl SamplerDesc
impl SamplerDesc
Trait Implementations§
Source§impl Clone for SamplerDesc
impl Clone for SamplerDesc
Source§fn clone(&self) -> SamplerDesc
fn clone(&self) -> SamplerDesc
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SamplerDesc
Source§impl Debug for SamplerDesc
impl Debug for SamplerDesc
Source§impl Default for SamplerDesc
impl Default for SamplerDesc
impl Eq for SamplerDesc
Source§impl Hash for SamplerDesc
impl Hash for SamplerDesc
Source§impl PartialEq for SamplerDesc
impl PartialEq for SamplerDesc
Auto Trait Implementations§
impl Freeze for SamplerDesc
impl RefUnwindSafe for SamplerDesc
impl Send for SamplerDesc
impl Sync for SamplerDesc
impl Unpin for SamplerDesc
impl UnsafeUnpin for SamplerDesc
impl UnwindSafe for SamplerDesc
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.