19 _border_color(0, 0, 0, 1),
23 _minfilter(FT_default),
24 _magfilter(FT_default),
28 _anisotropic_degree(0)
97 _anisotropic_degree = anisotropic_degree;
107 _border_color = color;
135 _lod_bias = lod_bias;
190 return _anisotropic_degree;
200 if (_anisotropic_degree != 0) {
201 return _anisotropic_degree;
203 return texture_anisotropic_degree;
213 return _border_color;
258 switch (filter_type) {
259 case SamplerState::FT_nearest_mipmap_nearest:
260 case SamplerState::FT_linear_mipmap_nearest:
261 case SamplerState::FT_nearest_mipmap_linear:
262 case SamplerState::FT_linear_mipmap_linear:
273 INLINE
bool SamplerState::
281 INLINE
bool SamplerState::
289 INLINE
bool SamplerState::
Represents a set of settings that indicate how a texture is sampled.
get_max_lod
Returns the maximum level of detail that will be observed when sampling this texture.
static bool is_mipmap(FilterType type)
Returns true if the indicated filter type requires the use of mipmaps, or false if it does not.
set_wrap_v
This setting determines what happens when the SamplerState is sampled with a V value outside the rang...
set_max_lod
Sets the maximum level of detail that will be used when sampling this texture.
static const SamplerState & get_default()
Returns a reference to the global default immutable SamplerState object.
get_minfilter
Returns the filter mode of the texture for minification.
get_wrap_v
Returns the wrap mode of the texture in the V direction.
set_anisotropic_degree
Specifies the level of anisotropic filtering to apply to the SamplerState.
set_border_color
Specifies the solid color of the SamplerState's border.
get_anisotropic_degree
Returns the degree of anisotropic filtering that should be applied to the texture.
set_wrap_w
The W wrap direction is only used for 3-d SamplerStates.
get_magfilter
Returns the filter mode of the texture for magnification.
get_wrap_w
Returns the wrap mode of the texture in the W direction.
set_min_lod
Sets the minimum level of detail that will be used when sampling this texture.
set_minfilter
Sets the filtering method that should be used when viewing the SamplerState from a distance.
set_wrap_u
This setting determines what happens when the SamplerState is sampled with a U value outside the rang...
SamplerState()
Creates a new SamplerState initialized to the default values.
bool uses_mipmaps() const
Returns true if the minfilter settings on this sampler indicate the use of mipmapping,...
get_lod_bias
Returns the bias that will be added to the texture level of detail when sampling this texture.
set_magfilter
Sets the filtering method that should be used when viewing the SamplerState up close.
get_min_lod
Returns the minimum level of detail that will be observed when sampling this texture.
int compare_to(const SamplerState &other) const
Returns a number less than zero if this sampler sorts before the other one, greater than zero if it s...
get_effective_minfilter
Returns the filter mode of the texture for minification, with special treatment for FT_default.
get_effective_anisotropic_degree
Returns the degree of anisotropic filtering that should be applied to the texture.
get_wrap_u
Returns the wrap mode of the texture in the U direction.
set_lod_bias
Sets the value that will be added to the level of detail when sampling the texture.
get_border_color
Returns the solid color of the texture's border.