pub struct SamplerInfo {
pub filter: FilterMethod,
pub wrap_mode: (WrapMode, WrapMode, WrapMode),
pub lod_bias: Lod,
pub lod_range: (Lod, Lod),
pub comparison: Option<Comparison>,
pub border: PackedColor,
}Expand description
Specifies how to sample from a texture.
Fields§
§filter: FilterMethodFilter method to use.
wrap_mode: (WrapMode, WrapMode, WrapMode)Wrapping mode for each of the U, V, and W axis (S, T, and R in OpenGL speak).
lod_bias: LodThis bias is added to every computed mipmap level (N + lod_bias). For example, if it would select mipmap level 2 and lod_bias is 1, it will use mipmap level 3.
lod_range: (Lod, Lod)This range is used to clamp LOD level used for sampling.
comparison: Option<Comparison>Comparison mode, used primary for a shadow map.
border: PackedColorBorder color is used when one of the wrap modes is set to border.
Implementations§
Source§impl SamplerInfo
impl SamplerInfo
Sourcepub fn new(filter: FilterMethod, wrap: WrapMode) -> SamplerInfo
pub fn new(filter: FilterMethod, wrap: WrapMode) -> SamplerInfo
Create a new sampler description with a given filter method and wrapping mode, using no LOD modifications.
Trait Implementations§
Source§impl Clone for SamplerInfo
impl Clone for SamplerInfo
Source§fn clone(&self) -> SamplerInfo
fn clone(&self) -> SamplerInfo
Returns a duplicate 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 SamplerInfo
impl Debug for SamplerInfo
Source§impl Hash for SamplerInfo
impl Hash for SamplerInfo
Source§impl PartialEq for SamplerInfo
impl PartialEq for SamplerInfo
Source§impl PartialOrd for SamplerInfo
impl PartialOrd for SamplerInfo
impl Copy for SamplerInfo
impl Eq for SamplerInfo
impl StructuralPartialEq for SamplerInfo
Auto Trait Implementations§
impl Freeze for SamplerInfo
impl RefUnwindSafe for SamplerInfo
impl Send for SamplerInfo
impl Sync for SamplerInfo
impl Unpin for SamplerInfo
impl UnwindSafe for SamplerInfo
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