Resident textures?

爱⌒轻易说出口 提交于 2019-12-13 01:16:38

问题


What are resident textures in OpenGL? The author of the book I'm reading doesn't explain the idea behind resident textures and what they really do. He basically says that I want all textures to be resident and non-resident textures are bad.

Help me understand this subject.


回答1:


Resident textures are textures that are still stored in active memory. In other words, OpenGL doesn't have to shuffle memory around to make room for the textures that you want to become active.

There is an OpenGL function that you can call to see if a texture is active:

GLboolean glAreTexturesResident(GLsizei n, 
const GLuint * textures, 
GLboolean * residences);

More information on that function here: glAreTexturesResident

and A detailed article on resident textures here: Understanding and Using OpenGL Texture Objects



来源:https://stackoverflow.com/questions/11960014/resident-textures

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