how to detect if openGL/card supports non power of 2?

本小妞迷上赌 提交于 2019-12-23 19:42:46

问题


What is the best way to detect if a graphics card and compiled openGL binary supports textures which are not a power of 2 at run time?


回答1:


You can check with glGet for ARB_texture_non_power_of_two or use GLEW.

Edit to reflect the comments: As of OpenGL 2.0 this feature is required and ARB_texture_non_power_of_two need not be defined. How to find the current version is described here. As Jerry points out: Depending on the GPU the feature might be implemented in software and the performance wont be great if you use textures with a non-power-of-two size.



来源:https://stackoverflow.com/questions/3046597/how-to-detect-if-opengl-card-supports-non-power-of-2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!