问题
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