24 _border_color(0, 0, 0, 1),
28 _minfilter(FT_default),
29 _magfilter(FT_default),
33 _anisotropic_degree(0)
121 _anisotropic_degree = anisotropic_degree;
134 _border_color = color;
171 _lod_bias = lod_bias;
245 return _anisotropic_degree;
258 if (_anisotropic_degree != 0) {
259 return _anisotropic_degree;
261 return texture_anisotropic_degree;
274 return _border_color;
330 switch (filter_type) {
331 case SamplerState::FT_nearest_mipmap_nearest:
332 case SamplerState::FT_linear_mipmap_nearest:
333 case SamplerState::FT_nearest_mipmap_linear:
334 case SamplerState::FT_linear_mipmap_linear:
347 INLINE
bool SamplerState::
357 INLINE
bool SamplerState::
367 INLINE
bool SamplerState::
void set_max_lod(PN_stdfloat max_lod)
Sets the maximum level of detail that will be used when sampling this texture.
void set_wrap_u(WrapMode wrap)
This setting determines what happens when the SamplerState is sampled with a U value outside the rang...
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...
void set_magfilter(FilterType filter)
Sets the filtering method that should be used when viewing the SamplerState up close.
WrapMode get_wrap_v() const
Returns the wrap mode of the texture in the V direction.
const LColor & get_border_color() const
Returns the solid color of the texture's border.
FilterType get_magfilter() const
Returns the filter mode of the texture for magnification.
bool uses_mipmaps() const
Returns true if the minfilter settings on this sampler indicate the use of mipmapping, false otherwise.
static bool is_mipmap(FilterType type)
Returns true if the indicated filter type requires the use of mipmaps, or false if it does not...
void set_minfilter(FilterType filter)
Sets the filtering method that should be used when viewing the SamplerState from a distance...
void set_anisotropic_degree(int anisotropic_degree)
Specifies the level of anisotropic filtering to apply to the SamplerState.
void set_wrap_w(WrapMode wrap)
The W wrap direction is only used for 3-d SamplerStates.
void set_wrap_v(WrapMode wrap)
This setting determines what happens when the SamplerState is sampled with a V value outside the rang...
void set_min_lod(PN_stdfloat min_lod)
Sets the minimum level of detail that will be used when sampling this texture.
int get_anisotropic_degree() const
Returns the degree of anisotropic filtering that should be applied to the texture.
FilterType get_minfilter() const
Returns the filter mode of the texture for minification.
int get_effective_anisotropic_degree() const
Returns the degree of anisotropic filtering that should be applied to the texture.
WrapMode get_wrap_u() const
Returns the wrap mode of the texture in the U direction.
Represents a set of settings that indicate how a texture is sampled.
This is the base class for all three-component vectors and points.
PN_stdfloat get_max_lod() const
Returns the maximum level of detail that will be observed when sampling this texture.
static const SamplerState & get_default()
Returns a reference to the global default immutable SamplerState object.
SamplerState()
Creates a new SamplerState initialized to the default values.
FilterType get_effective_minfilter() const
Returns the filter mode of the texture for minification, with special treatment for FT_default...
PN_stdfloat get_min_lod() const
Returns the minimum level of detail that will be observed when sampling this texture.
void set_lod_bias(PN_stdfloat lod_bias)
Sets the value that will be added to the level of detail when sampling the texture.
void set_border_color(const LColor &color)
Specifies the solid color of the SamplerState's border.
WrapMode get_wrap_w() const
Returns the wrap mode of the texture in the W direction.
PN_stdfloat get_lod_bias() const
Returns the bias that will be added to the texture level of detail when sampling this texture...