18 #ifndef ION_GFX_SAMPLER_H_
19 #define ION_GFX_SAMPLER_H_
33 kAutoMipmappingChanged = kNumBaseChanges,
90 auto_mipmapping_enabled_.Set(enable);
94 return auto_mipmapping_enabled_.Get();
100 compare_mode_.Set(mode);
108 compare_function_.Set(func);
114 max_anisotropy_.Set(aniso);
121 min_filter_.Set(mode);
128 mag_filter_.Set(mode);
176 Field<bool> auto_mipmapping_enabled_;
177 RangedField<float> max_anisotropy_;
178 Field<float> min_lod_;
179 Field<float> max_lod_;
180 RangedField<CompareFunction> compare_function_;
181 RangedField<CompareMode> compare_mode_;
182 RangedField<FilterMode> min_filter_;
183 RangedField<FilterMode> mag_filter_;
184 RangedField<WrapMode> wrap_r_;
185 RangedField<WrapMode> wrap_s_;
186 RangedField<WrapMode> wrap_t_;
195 #endif // ION_GFX_SAMPLER_H_
bool IsAutogenerateMipmapsEnabled() const
Gets whether this Sampler should use mipmapping. The default is false.
CompareMode
Texture comparison modes for depth textures.
void SetAutogenerateMipmapsEnabled(bool enable)
Sets whether OpenGL should automatically generate mipmaps for this Sampler.
FilterMode GetMinFilter() const
Gets the minification mode. The default is kNearest.
void SetWrapT(const WrapMode &mode)
Sets the wrap along the t-coordinate.
void SetMaxLod(float lod)
Sets the maximum level of detail parameter, which limits the selection of the lowest resolution (high...
void SetMinFilter(const FilterMode &mode)
Sets the minification mode.
float GetMinLod() const
Gets the minimum level of detail parameter. The default is -1000.
WrapMode GetWrapR() const
Gets the wrap along the r-coordinate. The default is kRepeat.
void SetMaxAnisotropy(float aniso)
Sets the maximum degree of anisotropy used when filtering textures.
void SetMinLod(float lod)
Sets the minimum level of detail parameter, which limits the selection of the highest resolution (low...
void SetWrapS(const WrapMode &mode)
Sets the wrap along the s-coordinate.
WrapMode
Texture filter modes.
base::ReferentPtr< Sampler >::Type SamplerPtr
Convenience typedef for shared pointer to a Sampler.
WrapMode GetWrapS() const
Gets the wrap along the s-coordinate. The default is kRepeat.
CompareMode GetCompareMode() const
void SetCompareMode(CompareMode mode)
Sets/returns the comparison mode to use for the texture using this sampler.
FilterMode GetMagFilter() const
Gets the magnification mode. The default is kNearest.
WrapMode GetWrapT() const
Gets the wrap along the t-coordinate. The default is kRepeat.
float GetMaxLod() const
Gets the maximum level of detail parameter. The default is 1000.
float GetMaxAnisotropy() const
Gets the maximum anisotropy parameter. The default is 1.
Changes
Changes that affect this resource.
CompareFunction GetCompareFunction() const
These are only usable with the minification filter.
void SetCompareFunction(CompareFunction func)
Sets/returns the comparison function to use when texture comparison is enabled, e.g., when this is used with a depth texture.
void SetMagFilter(const FilterMode &mode)
Sets the magnification mode.
A SharedPtr is a smart shared pointer to an instance of some class that implements reference counting...
FilterMode
Texture filter modes.
void SetWrapR(const WrapMode &mode)
Sets the wrap along the r-coordinate (useful only for 3D textures).
ResourceHolder is an internal base class for objects that hold resources managed by an outside entity...
A Sampler object represents texture parameters that control how texture data is accessed in shaders...
CompareFunction
Texture comparison functions for depth textures.