glRestoreProgramsDMP Function
GL_APICALL void GL_APIENTRY glRestoreProgramsDMP(
GLuint n,
GLuint offset,
GLuint * progs,
GLuint flags,
GLvoid * data
);
| Name | Description | |
|---|---|---|
| in | n | Number of program objects to restore from array |
| in | offset | Offset to the program objects to restore |
| inout | progs | Array storing the program objects to restore |
| in | flags | Settings for the state to restore |
| in | data | Pointer to the array storing the data to restore |
Restores the program object state.
Set n to the size of the progs array (the number of program objects to restore). Set offset to the offset of the program objects to restore. When restoring objects from saved data, set offset to the first object to restore.
Set progs to an array storing the program objects to restore. Objects are restored in the same order as they were saved to progs by glSaveProgramsDMP. 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 progs to an array that is excessively large.
You can set flags to GL_RESTORE_PROGRAMS_DMP. This causes new program objects to be generated and the entire state to be restored in those program objects. Program objects with restored states are generated in elements of the progs array that have a value of 0. Elements with nonzero values are not affected.
You can also set flags to the following values, or to a bitwise OR of any of the following values. In this case a partial state is restored, overwriting existing values. The restored state overwrites elements of the progs array that have a nonzero value; elements with a value of 0 are unaffected.
GL_RESTORE_UPDATE_LIGHTi_PROGRAM_STATE_DMP (0 ≤ i ≤ number of light sources-1) | Updates the values set for uniform variables whose names include dmp_FragmentLightSource[i] (where i is a light source ID). |
|---|---|
| GL_RESTORE_UPDATE_LIGHTING_PROGRAM_STATE_DMP | Updates the values set for uniform variables whose names include dmp_FragmentLighting or dmp_LightEnv. |
| GL_RESTORE_UPDATE_MATERIAL_PROGRAM_STATE_DMP | Updates the values set for uniform variables whose names include dmp_FragmentMaterial. |
| GL_RESTORE_UPDATE_TEXTURE_BLENDER_PROGRAM_STATE_DMP | Updates the values set for uniform variables whose names include dmp_TexEnv. |
| GL_RESTORE_UPDATE_TEXTURE_SAMPLER_PROGRAM_STATE_DMP | Updates the values set for uniform variables whose names include dmp_Texture[i] (where i is 0, 1, or 2), not including dmp_Texture[0].perspectiveShadow, dmp_Texture[0].shadowZBias, or dmp_Texture[0].shadowZScale. |
| GL_RESTORE_UPDATE_PROCEDURAL_TEXTURE_PROGRAM_STATE_DMP | Updates the values set for uniform variables whose names include dmp_Texture[3]. |
| GL_RESTORE_UPDATE_SHADOW_SAMPLING_PROGRAM_STATE_DMP | Updates the values set for the uniform variables dmp_Texture[0].perspectiveShadow, dmp_Texture[0].shadowZBias, and dmp_Texture[0].shadowZScale. |
| GL_RESTORE_UPDATE_PER_FRAGMENT_OPERATION_PROGRAM_STATE_DMP | Updates the values set for uniform variables whose names include dmp_FragOperation. |
| GL_RESTORE_UPDATE_GAS_ACCUMULATION_PROGRAM_STATE_DMP | Updates the values set for uniform variables whose names include dmp_Gas. |
| GL_RESTORE_UPDATE_FOG_PROGRAM_STATE_DMP | Updates the values set for uniform variables whose names include dmp_Fog. |
| GL_RESTORE_UPDATE_VERTEX_SHADER_STATE_DMP | Updates the values set for uniform variables defined by the vertex shader. |
| GL_RESTORE_UPDATE_GEOMETRY_SHADER_STATE_DMP | Updates the values set for uniform variables defined by the geometry shader. |
If GL_RESTORE_UPDATE_VERTEX_SHADER_STATE_DMP or GL_RESTORE_UPDATE_GEOMETRY_SHADER_STATE_DMP is specified, the shaders linked to the program when it is saved must be the same shaders linked to it when it is restored. Behavior is undefined when different shaders have been linked.
Set data to a pointer to the array storing the saved data.
This function generates the following errors.
| GL_INVALID_VALUE | The n, progs, or data argument is 0, or the sum of n and offset exceeds the amount of program state data saved in data. |
|---|---|
| GL_INVALID_OPERATION | The program state has a different format than data. |
| GL_INVALID_OPERATION | The progs argument specified an invalid or unlinked program object. |
| GL_OUT_OF_MEMORY | Failed to allocate memory that is used internally. |
CONFIDENTIAL