Antkeeper
0.0.1
|
Sampler object. More...
#include <sampler.hpp>
Public Member Functions | |
sampler (sampler_filter mag_filter=sampler_filter::linear, sampler_filter min_filter=sampler_filter::nearest, sampler_mipmap_mode mipmap_mode=sampler_mipmap_mode::linear, sampler_address_mode address_mode_u=sampler_address_mode::repeat, sampler_address_mode address_mode_v=sampler_address_mode::repeat, sampler_address_mode address_mode_w=sampler_address_mode::repeat, float mip_lod_bias=0.0f, float max_anisotropy=0.0f, bool compare_enabled=false, gl::compare_op compare_op=gl::compare_op::less, float min_lod=-1000.0f, float max_lod=1000.0f, const std::array< float, 4 > &border_color={0.0f, 0.0f, 0.0f, 0.0f}) | |
Constructs a sampler object. More... | |
~sampler () | |
Destroys a sampler object. More... | |
sampler (const sampler &)=delete | |
sampler (sampler &&)=delete | |
sampler & | operator= (const sampler &)=delete |
sampler & | operator= (sampler &&)=delete |
void | set_mag_filter (sampler_filter filter) |
Sets the magnification filter to apply to lookups. More... | |
void | set_min_filter (sampler_filter filter) |
Sets the minification filter to apply to lookups. More... | |
void | set_mipmap_mode (sampler_mipmap_mode mode) |
Sets the mipmap filter to apply to lookups. More... | |
void | set_address_mode_u (sampler_address_mode mode) |
Sets the addressing mode for U-coordinates outside [0, 1) . More... | |
void | set_address_mode_v (sampler_address_mode mode) |
Sets the addressing mode for V-coordinates outside [0, 1) . More... | |
void | set_address_mode_w (sampler_address_mode mode) |
Sets the addressing mode for W-coordinates outside [0, 1) . More... | |
void | set_mip_lod_bias (float bias) |
Sets the bias to be added to mipmap LOD calculation. More... | |
void | set_max_anisotropy (float anisotropy) |
Sets the anisotropy clamp value. More... | |
void | set_compare_enabled (bool enabled) |
Enables or disables a comparison against a reference value during lookups. More... | |
void | set_compare_op (gl::compare_op op) |
Sets the comparison operator to apply to fetched data, if compare is enabled. More... | |
void | set_min_lod (float lod) |
Sets the minimum clamp value of the computed LOD. More... | |
void | set_max_lod (float lod) |
Sets the maximum clamp value of the computed LOD. More... | |
void | set_border_color (const std::array< float, 4 > &color) |
Sets the border color used for texture lookups. More... | |
constexpr sampler_filter | get_mag_filter () const noexcept |
Returns the magnification filter to apply to lookups. More... | |
constexpr sampler_filter | get_min_filter () const noexcept |
Returns the minification filter to apply to lookups. More... | |
constexpr sampler_mipmap_mode | get_mipmap_mode () const noexcept |
Returns the mipmap filter to apply to lookups. More... | |
constexpr sampler_address_mode | get_address_mode_u () const noexcept |
Returns the addressing mode for U-coordinates outside [0, 1) . More... | |
constexpr sampler_address_mode | get_address_mode_v () const noexcept |
Returns the addressing mode for V-coordinates outside [0, 1) . More... | |
constexpr sampler_address_mode | get_address_mode_w () const noexcept |
Returns the addressing mode for W-coordinates outside [0, 1) . More... | |
constexpr float | get_mip_lod_bias () const noexcept |
Returns the bias to be added to mipmap LOD calculation. More... | |
constexpr float | get_max_anisotropy () const noexcept |
Returns the anisotropy clamp value. More... | |
constexpr float | get_compare_enabled () const noexcept |
Returns true if comparison against a reference value during lookups is enabled, false otherwise. More... | |
constexpr compare_op | get_compare_op () const noexcept |
Returns the comparison operator to apply to fetched data, if compare is enabled. More... | |
constexpr float | get_min_lod () const noexcept |
Returns the minimum clamp value of the computed LOD. More... | |
constexpr float | get_max_lod () const noexcept |
Returns the maximum clamp value of the computed LOD. More... | |
constexpr const std::array< float, 4 > & | get_border_color () const noexcept |
Returns the border color used for texture lookups. More... | |
Friends | |
class | pipeline |
class | gl_shader_texture_1d |
class | gl_shader_texture_2d |
class | gl_shader_texture_3d |
class | gl_shader_texture_cube |
Sampler object.
Definition at line 34 of file sampler.hpp.
|
explicit |
Constructs a sampler object.
mag_filter | Magnification filter to apply to lookups. |
min_filter | Minification filter to apply to lookups. |
mipmap_mode | Mipmap filter to apply to lookups. |
address_mode_u | Addressing mode for U-coordinates outside [0, 1) . |
address_mode_v | Addressing mode for V-coordinates outside [0, 1) . |
address_mode_w | Addressing mode for W-coordinates outside [0, 1) . |
mip_lod_bias | Bias to be added to mipmap LOD calculation. |
max_anisotropy | Anisotropy clamp value. |
compare_enabled | true to enable comparison against a reference value during lookups, false otherwise. |
compare_op | Comparison operator to apply to fetched data, if compare is enabled. |
min_lod | Minimum clamp value of the computed LOD. |
max_lod | Maximum clamp value of the computed LOD. |
border_color | Border color used for texture lookups. |
Definition at line 67 of file sampler.cpp.
gl::sampler::~sampler | ( | ) |
Destroys a sampler object.
Definition at line 101 of file sampler.cpp.
|
delete |
|
delete |
|
inlineconstexprnoexcept |
Returns the addressing mode for U-coordinates outside [0, 1)
.
Definition at line 189 of file sampler.hpp.
|
inlineconstexprnoexcept |
Returns the addressing mode for V-coordinates outside [0, 1)
.
Definition at line 195 of file sampler.hpp.
|
inlineconstexprnoexcept |
Returns the addressing mode for W-coordinates outside [0, 1)
.
Definition at line 201 of file sampler.hpp.
|
inlineconstexprnoexcept |
Returns the border color used for texture lookups.
Definition at line 243 of file sampler.hpp.
|
inlineconstexprnoexcept |
Returns true
if comparison against a reference value during lookups is enabled, false
otherwise.
Definition at line 219 of file sampler.hpp.
|
inlineconstexprnoexcept |
Returns the comparison operator to apply to fetched data, if compare is enabled.
Definition at line 225 of file sampler.hpp.
|
inlineconstexprnoexcept |
Returns the magnification filter to apply to lookups.
Definition at line 171 of file sampler.hpp.
|
inlineconstexprnoexcept |
Returns the anisotropy clamp value.
Definition at line 213 of file sampler.hpp.
|
inlineconstexprnoexcept |
Returns the maximum clamp value of the computed LOD.
Definition at line 237 of file sampler.hpp.
|
inlineconstexprnoexcept |
Returns the minification filter to apply to lookups.
Definition at line 177 of file sampler.hpp.
|
inlineconstexprnoexcept |
Returns the minimum clamp value of the computed LOD.
Definition at line 231 of file sampler.hpp.
|
inlineconstexprnoexcept |
Returns the bias to be added to mipmap LOD calculation.
Definition at line 207 of file sampler.hpp.
|
inlineconstexprnoexcept |
Returns the mipmap filter to apply to lookups.
Definition at line 183 of file sampler.hpp.
void gl::sampler::set_address_mode_u | ( | sampler_address_mode | mode | ) |
Sets the addressing mode for U-coordinates outside [0, 1)
.
Addressing | mode for U-coordinates outside [0, 1) . |
Definition at line 136 of file sampler.cpp.
void gl::sampler::set_address_mode_v | ( | sampler_address_mode | mode | ) |
Sets the addressing mode for V-coordinates outside [0, 1)
.
Addressing | mode for V-coordinates outside [0, 1) . |
Definition at line 146 of file sampler.cpp.
void gl::sampler::set_address_mode_w | ( | sampler_address_mode | mode | ) |
Sets the addressing mode for W-coordinates outside [0, 1)
.
Addressing | mode for W-coordinates outside [0, 1) . |
Definition at line 156 of file sampler.cpp.
void gl::sampler::set_border_color | ( | const std::array< float, 4 > & | color | ) |
Sets the border color used for texture lookups.
color | Border color used for texture lookups. |
Definition at line 221 of file sampler.cpp.
void gl::sampler::set_compare_enabled | ( | bool | enabled | ) |
Enables or disables a comparison against a reference value during lookups.
enabled | true to enable comparison against a reference value during lookups, false otherwise. |
Definition at line 184 of file sampler.cpp.
void gl::sampler::set_compare_op | ( | gl::compare_op | op | ) |
Sets the comparison operator to apply to fetched data, if compare is enabled.
op | Comparison operator to apply to fetched data, if compare is enabled. |
Definition at line 193 of file sampler.cpp.
void gl::sampler::set_mag_filter | ( | sampler_filter | filter | ) |
Sets the magnification filter to apply to lookups.
filter | Magnification filter to apply to lookups. |
Definition at line 106 of file sampler.cpp.
void gl::sampler::set_max_anisotropy | ( | float | anisotropy | ) |
Sets the anisotropy clamp value.
anisotropy | Anisotropy clamp value. |
Definition at line 175 of file sampler.cpp.
void gl::sampler::set_max_lod | ( | float | lod | ) |
Sets the maximum clamp value of the computed LOD.
lod | Maximum clamp value of the computed LOD. |
Definition at line 212 of file sampler.cpp.
void gl::sampler::set_min_filter | ( | sampler_filter | filter | ) |
Sets the minification filter to apply to lookups.
filter | Minification filter to apply to lookups. |
Definition at line 116 of file sampler.cpp.
void gl::sampler::set_min_lod | ( | float | lod | ) |
Sets the minimum clamp value of the computed LOD.
lod | Minimum clamp value of the computed LOD. |
Definition at line 203 of file sampler.cpp.
void gl::sampler::set_mip_lod_bias | ( | float | bias | ) |
Sets the bias to be added to mipmap LOD calculation.
bias | Bias to be added to mipmap LOD calculation. |
Definition at line 166 of file sampler.cpp.
void gl::sampler::set_mipmap_mode | ( | sampler_mipmap_mode | mode | ) |
Sets the mipmap filter to apply to lookups.
mode | Mipmap filter to apply to lookups. |
Definition at line 126 of file sampler.cpp.
|
friend |
Definition at line 250 of file sampler.hpp.
|
friend |
Definition at line 251 of file sampler.hpp.
|
friend |
Definition at line 252 of file sampler.hpp.
|
friend |
Definition at line 253 of file sampler.hpp.
|
friend |
Definition at line 249 of file sampler.hpp.