NAME

glAreTexturesResident - determine if textures are loaded in texture memory

C SPECIFICATION

GLboolean ggllAArreeTTeexxttuurreessRReessiiddeenntt( GLsizei _n,
                                 const GLuint _*_t_e_x_t_u_r_e_s,
                                 GLboolean _*_r_e_s_i_d_e_n_c_e_s )

PARAMETERS

_n
Specifies the number of textures to be queried.
_t_e_x_t_u_r_e_s
Specifies an array containing the names of the textures to be queried.
_r_e_s_i_d_e_n_c_e_s
Specifies an array in which the texture residence status is returned. The residence status of a texture named by an element of _t_e_x_t_u_r_e_s is returned in the corresponding element of _r_e_s_i_d_e_n_c_e_s.

DESCRIPTION

GL 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.

ggllAArreeTTeexxttuurreessRReessiiddeenntt queries the texture residence status of the _n textures named by the elements of _t_e_x_t_u_r_e_s. If all the named textures are resident, ggllAArreeTTeexxttuurreessRReessiiddeenntt returns GGLL__TTRRUUEE, and the contents of _r_e_s_i_d_e_n_c_e_s are undisturbed. If not all the named textures are resident, ggllAArreeTTeexxttuurreessRReessiiddeenntt returns GGLL__FFAALLSSEE, and detailed status is returned in the _n elements of _r_e_s_i_d_e_n_c_e_s. If an element of _r_e_s_i_d_e_n_c_e_s is GGLL__TTRRUUEE, then the texture named by the corresponding element of _t_e_x_t_u_r_e_s is resident.

The residence status of a single bound texture may also be queried by calling ggllGGeettTTeexxPPaarraammeetteerr with the _t_a_r_g_e_t argument set to the target to which the texture is bound, and the _p_n_a_m_e argument set to GGLL__TTEEXXTTUURREE__RREESSIIDDEENNTT. This is the only way that the residence status of a default texture can be queried.

NOTES

ggllAArreeTTeexxttuurreessRReessiiddeenntt is available only if the GL version is 1.1 or greater.

ggllAArreeTTeexxttuurreessRReessiiddeenntt returns the residency status of the textures at the time of invocation. It does not guarantee that the textures will remain resident at any other time.

If textures reside in virtual memory (there is no texture memory), they are considered always resident.

Some implementations may not load a texture until the first use of that texture.

ERRORS

GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if _n is negative.

GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if any element in _t_e_x_t_u_r_e_s is 0 or does not name a texture. In that case, the function returns GGLL__FFAALLSSEE and the contents of _r_e_s_i_d_e_n_c_e_s is indeterminate.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllAArreeTTeexxttuurreessRReessiiddeenntt is executed between the execution of ggllBBeeggiinn and the corresponding execution of ggllEEnndd.

ASSOCIATED GETS

ggllGGeettTTeexxPPaarraammeetteerr with parameter name GGLL__TTEEXXTTUURREE__RREESSIIDDEENNTT retrieves the residence status of a currently bound texture.

SEE ALSO

ggllBBiinnddTTeexxttuurree((33GG)), ggllGGeettTTeexxPPaarraammeetteerr((33GG)), ggllPPrriioorriittiizzeeTTeexxttuurreess((33GG)), ggllTTeexxIImmaaggee11DD((33GG)), ggllTTeexxIImmaaggee22DD((33GG)), ggllTTeexxIImmaaggee33DD((33GG)), ggllTTeexxPPaarraammeetteerr((33GG))