glAreTexturesResident

[New - Windows 95, OEM Service Release 2]

The glAreTexturesResident function determines whether specified texture objects are resident.

GLboolean glAreTexturesResident(

    GLsizei n,

 

    GLuint * textures

 

    GLboolean * residences

 

   );

 

 

Parameters

n

The number of textures to be queried.

textures

The address of an array containing the names of the textures to be queried.

residences

The address of an array in which the texture residence status is returned. The residence status of a texture named by an element of textures is returned in the corresponding element of residences.

 

Remarks

On machines with a limited amount of texture memory, OpenGL establishes a ``working set'' of textures that are resident in texture memory. These textures can be bound to a texture target much more efficiently than textures that are not resident.

The glAreTexturesResident function queries the texture residence status of the n textures named by the elements of textures. If all the named textures are resident, glAreTexturesResident returns GL_TRUE, and the contents of residences are undisturbed. If any of the named textures are not resident, glAreTexturesResident returns GL_FALSE, and detailed status is returned in the n elements of residences.

If an element of residences is GL_TRUE, then the texture named by the corresponding element of textures is resident.

To query the residence status of a single bound texture, call glGetTexParameterDPEWNY with the target parameter set to the target texture to which the target is bound and set the pname parameter to GL_TEXTURE_RESIDENT. You must use this method to query the resident status of a default texture.

You cannot include glAreTexturesResident in display lists.

 

Note  The glAreTexturesResident function is only available in OpenGL version 1.1 or later.

 

Error Codes

The following are the error codes generated and their conditions.

Error Code

Condition

GL_INVALID_VALUE

n was a negative value.

GL_INVALID_VALUE

An element in textures was zero or did not contain a texture name.

GL_INVALID_OPERATION

glAreTexturesResident was called between a call to glBegin and the corresponding call to glEnd.

 

See Also

glBegin, glBindTexture, glEnd, glGetTexParameter, glPrioritizeTextures, glTexImage1D, glTexImage2D