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;
141 INLINE SamplerState::WrapMode SamplerState::
149 INLINE SamplerState::WrapMode SamplerState::
158 INLINE SamplerState::WrapMode SamplerState::
168 INLINE SamplerState::FilterType SamplerState::
169 get_minfilter()
const {
178 INLINE SamplerState::FilterType SamplerState::
179 get_magfilter()
const {
188 INLINE
int SamplerState::
189 get_anisotropic_degree()
const {
190 return _anisotropic_degree;
198 INLINE
int SamplerState::
199 get_effective_anisotropic_degree()
const {
200 if (_anisotropic_degree != 0) {
201 return _anisotropic_degree;
203 return texture_anisotropic_degree;
211 INLINE
const LColor &SamplerState::
212 get_border_color()
const {
213 return _border_color;
220 INLINE PN_stdfloat SamplerState::
221 get_min_lod()
const {
229 INLINE PN_stdfloat SamplerState::
230 get_max_lod()
const {
238 INLINE PN_stdfloat SamplerState::
239 get_lod_bias()
const {
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::
set_min_lod
Sets the minimum level of detail that will be used when sampling this texture.
set_anisotropic_degree
Specifies the level of anisotropic filtering to apply to the SamplerState.
set_lod_bias
Sets the value that will be added to the level of detail when sampling the 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_magfilter
Sets the filtering method that should be used when viewing the SamplerState up close.
set_wrap_w
The W wrap direction is only used for 3-d SamplerStates.
get_effective_minfilter
Returns the filter mode of the texture for minification, with special treatment for FT_default.
set_minfilter
Sets the filtering method that should be used when viewing the SamplerState from a distance.
bool uses_mipmaps() const
Returns true if the minfilter settings on this sampler indicate the use of mipmapping,...
set_wrap_u
This setting determines what happens when the SamplerState is sampled with a U value outside the rang...
set_border_color
Specifies the solid color of the SamplerState's border.
Represents a set of settings that indicate how a texture is sampled.
static const SamplerState & get_default()
Returns a reference to the global default immutable SamplerState object.
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...
SamplerState()
Creates a new SamplerState initialized to the default values.
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.