glRestoreTextureCollectionsDMP Function

Syntax

GL_APICALL void GL_APIENTRY glRestoreTextureCollectionsDMP(
     GLuint n,
     GLuint offset,
     GLuint * txcolls,
     GLuint flags,
     GLvoid * data
);

Arguments

Name Description
in n Number of texture collection objects to restore from array
in offset Offset to the texture collection objects to restore
inout txcolls Array storing the texture collection objects to restore
in flags Settings for the state to restore
in data Pointer to the region storing the data to restore

Return Values

There is no return value.

Description

Restores the state of texture collection objects.

Set n to the size of the txcolls array (the number of texture collection objects to restore). Set offset to the offset of the texture collection objects to restore. When restoring objects from saved data, set offset to the first object to restore.

Set txcolls to an array storing the texture collection objects to restore. Objects are restored in the same order as they were saved to txcolls by glSaveTextureCollectionsDMP. You can choose to restore all or only some of the saved objects at once. Use offset to restore a single object from data in which multiple objects are saved (or in similar situations). By setting offset to the index of an object that is saved near the end of the array, you can restore that object first. This eliminates the need to set txcolls to an array that is excessively large.

You can set flags to GL_RESTORE_TEXTURE_COLLECTIONS_DMP to restore the entire state of the texture collection objects.

You can also set flags to the following values, or to a bitwise OR of any of the following values.

GL_RESTORE_TEXTURE_COLLECTION_1D_TEXTURES_DMPRestores lookup table objects.
GL_RESTORE_TEXTURE_COLLECTION_2D_TEXTURES_DMPRestores 2D texture objects.
GL_RESTORE_TEXTURE_COLLECTION_CUBE_TEXTURES_DMPRestores cube-map texture objects.

New texture collection objects with the restored state are generated in elements of the txcolls array that have a value of 0. Elements with nonzero values are not affected.

Set data to a pointer to the region storing the saved data.

The following errors occur in this function.

GL_INVALID_VALUEThe n, txcolls, or data argument is 0, or the sum of n and offset is greater than the number of texture collection objects saved in data.
GL_INVALID_OPERATIONThe data argument does not use the texture collection format.
GL_OUT_OF_MEMORYFailed to allocate memory that is used internally.

To delete the restored texture state, you must separately delete each of the bound texture objects rather than txcoll alone. With the texture collections bound by a call to glBindTexture(GL_TEXTURE_COLLECTION_DMP, txcoll), use glGetIntegerv to get the ID of each bound texture object and then call glDeleteTextures on these IDs to delete them.

You can call glGetIntegerv with pname set equal to GL_TEXTURE_BINDING_2D, GL_TEXTURE_BINDING_CUBE_MAP, and GL_TEXTURE_BINDING_LUTn_DMP to get the IDs of 2D texture objects, cube map textures, and lookup table objects respectively.

Revision History

2010/06/10
Added a description of how to delete the restored texture state.
2010/01/07
Initial version.

CONFIDENTIAL