Struct gfx::tex::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

Filter method to use.

wrap_mode

Wrapping mode for each of the U, V, and W axis (S, T, and R in OpenGL speak).

lod_bias

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

This range is used to clamp LOD level used for sampling.

comparison

Comparison mode, used primary for a shadow map.

border

Border color is used when one of the wrap modes is set to border.

Methods

impl SamplerInfo

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

Derived Implementations

impl PartialOrd<SamplerInfo> for SamplerInfo

fn partial_cmp(&self, __arg_0: &SamplerInfo) -> Option<Ordering>

fn lt(&self, __arg_0: &SamplerInfo) -> bool

fn le(&self, __arg_0: &SamplerInfo) -> bool

fn gt(&self, __arg_0: &SamplerInfo) -> bool

fn ge(&self, __arg_0: &SamplerInfo) -> bool

impl PartialEq<SamplerInfo> for SamplerInfo

fn eq(&self, __arg_0: &SamplerInfo) -> bool

fn ne(&self, __arg_0: &SamplerInfo) -> bool

impl Hash for SamplerInfo

fn hash<__H>(&self, __arg_0: &mut __H) where __H: Hasher

impl Eq for SamplerInfo

impl Debug for SamplerInfo

fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>

impl Copy for SamplerInfo

impl Clone for SamplerInfo

fn clone(&self) -> SamplerInfo

1.0.0fn clone_from(&mut self, source: &Self)