OpenGL各向异性过滤支持,矛盾的检查结果 [英] OpenGL anisotropic filtering support, contradictory check results

查看:124
本文介绍了OpenGL各向异性过滤支持,矛盾的检查结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当检查是否支持各向异性过滤时,我得到矛盾的结果.

When checking if anisotropic filtering is supported, I get contradictory results.

if(glewIsSupported("GL_EXT_texture_filter_anisotropic") || GLEW_EXT_texture_filter_anisotropic) {
        std::cout << "support anisotropic" << std::endl;
    }

GLfloat max;
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &max);
std::cout << max << std::endl;

此部分在我的计算机上的输出为:

The output for this section on my machine is:

16

表面上似乎支持16的各向异性过滤,但是glewIsSupported和glew扩展字符串却相反.

So seemingly an anisotropic filtering of 16 is supported, but glewIsSupported as well as the glew extension string say the opposite.

检查GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT是否足够,毛刺检查是否错误,或者发生了什么不同?

Is checking for GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT enough and is the glew check wrong, or is something different going on?

推荐答案

显然有一个

Apparently there is a known bug in glew where glGetString(GL_EXTENSIONS) is used even in an OpenGL 3+ context instead of glGetStringi that replaced the extension querying in OpenGL 3+.

因此,在修补之前,必须先手动完成扩展查询.

So until patched, extension querying must be done manually.

这篇关于OpenGL各向异性过滤支持,矛盾的检查结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆