Skip to content
Snippets Groups Projects
Commit 72b1fae9 authored by Rodolfo Bogado's avatar Rodolfo Bogado
Browse files

Use core extensions when available to set max anisotropic filtering level

parent 4e6c64bf
No related branches found
No related tags found
No related merge requests found
...@@ -787,8 +787,13 @@ void RasterizerOpenGL::SamplerInfo::SyncWithConfig(const Tegra::Texture::FullTex ...@@ -787,8 +787,13 @@ void RasterizerOpenGL::SamplerInfo::SyncWithConfig(const Tegra::Texture::FullTex
} }
} }
if (info.tic.use_header_opt_control == 0) { if (info.tic.use_header_opt_control == 0) {
glSamplerParameterf(s, GL_TEXTURE_MAX_ANISOTROPY_EXT, if (GLAD_GL_ARB_texture_filter_anisotropic) {
static_cast<float>(1 << info.tic.max_anisotropy.Value())); glSamplerParameterf(s, GL_TEXTURE_MAX_ANISOTROPY,
static_cast<float>(1 << info.tic.max_anisotropy.Value()));
} else if (GLAD_GL_EXT_texture_filter_anisotropic) {
glSamplerParameterf(s, GL_TEXTURE_MAX_ANISOTROPY_EXT,
static_cast<float>(1 << info.tic.max_anisotropy.Value()));
}
glSamplerParameterf(s, GL_TEXTURE_MIN_LOD, glSamplerParameterf(s, GL_TEXTURE_MIN_LOD,
static_cast<float>(info.tic.res_min_mip_level.Value())); static_cast<float>(info.tic.res_min_mip_level.Value()));
glSamplerParameterf(s, GL_TEXTURE_MAX_LOD, glSamplerParameterf(s, GL_TEXTURE_MAX_LOD,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment