23 lines
437 B
C++
23 lines
437 B
C++
#include <psemek/gfx/texture.hpp>
|
|
#include <optional>
|
|
|
|
namespace psemek::gfx::detail
|
|
{
|
|
|
|
static std::optional<float> get_max_anisotropy()
|
|
{
|
|
if (!gl::exts::var_EXT_texture_filter_anisotropic) return std::nullopt;
|
|
|
|
float level;
|
|
gl::GetFloatv(gl::MAX_TEXTURE_MAX_ANISOTROPY_EXT, &level);
|
|
return level;
|
|
}
|
|
|
|
std::optional<float> max_anisotropy()
|
|
{
|
|
static std::optional<float> level = get_max_anisotropy();
|
|
|
|
return level;
|
|
}
|
|
|
|
}
|