Struct gfx_core::texture::SamplerInfo [−][src]
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,
}Specifies how to sample from a texture.
Fields
filter: FilterMethod
Filter 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: Lod
This 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: PackedColor
Border color is used when one of the wrap modes is set to border.
Methods
impl SamplerInfo[src]
impl SamplerInfopub fn new(filter: FilterMethod, wrap: WrapMode) -> SamplerInfo[src]
pub fn new(filter: FilterMethod, wrap: WrapMode) -> SamplerInfoCreate a new sampler description with a given filter method and wrapping mode, using no LOD modifications.
Trait Implementations
impl Clone for SamplerInfo[src]
impl Clone for SamplerInfofn clone(&self) -> SamplerInfo[src]
fn clone(&self) -> SamplerInfoReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Copy for SamplerInfo[src]
impl Copy for SamplerInfoimpl Debug for SamplerInfo[src]
impl Debug for SamplerInfofn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Eq for SamplerInfo[src]
impl Eq for SamplerInfoimpl Hash for SamplerInfo[src]
impl Hash for SamplerInfofn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl PartialEq for SamplerInfo[src]
impl PartialEq for SamplerInfofn eq(&self, other: &SamplerInfo) -> bool[src]
fn eq(&self, other: &SamplerInfo) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &SamplerInfo) -> bool[src]
fn ne(&self, other: &SamplerInfo) -> boolThis method tests for !=.
impl PartialOrd for SamplerInfo[src]
impl PartialOrd for SamplerInfofn partial_cmp(&self, other: &SamplerInfo) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &SamplerInfo) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &SamplerInfo) -> bool[src]
fn lt(&self, other: &SamplerInfo) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &SamplerInfo) -> bool[src]
fn le(&self, other: &SamplerInfo) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &SamplerInfo) -> bool[src]
fn gt(&self, other: &SamplerInfo) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &SamplerInfo) -> bool[src]
fn ge(&self, other: &SamplerInfo) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Auto Trait Implementations
impl Send for SamplerInfo
impl Send for SamplerInfoimpl Sync for SamplerInfo
impl Sync for SamplerInfo