1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../css/manpage.css" type="text/css" /> 7<title>glRestoreProgramsDMP</title> 8 </head> 9 <body> 10<h1><CODE>glRestoreProgramsDMP</CODE> Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14GL_APICALL void GL_APIENTRY glRestoreProgramsDMP( 15 GLuint n, 16 GLuint offset, 17 GLuint * progs, 18 GLuint flags, 19 GLvoid * data 20); 21</pre> 22 </div> 23<h2>Arguments</h2> 24 <div class="section"> 25 <table class="arguments"> 26 <thead> 27 <tr> 28 <td width="15" /> 29<th>Name</th> 30<td>Description</td> 31 </tr> 32 </thead> 33 <tr> 34<td>in</td> 35<th>n</th> 36<td>Number of program objects to restore from array</td> 37 </tr> 38 <tr> 39<td>in</td> 40<th>offset</th> 41<td>Offset to the program objects to restore</td> 42 </tr> 43 <tr> 44<td>inout</td> 45<th>progs</th> 46<td>Array storing the program objects to restore</td> 47 </tr> 48 <tr> 49<td>in</td> 50<th>flags</th> 51<td>Settings for the state to restore</td> 52 </tr> 53 <tr> 54<td>in</td> 55<th>data</th> 56<td>Pointer to the array storing the data to restore</td> 57 </tr> </table> 58 </div> 59<h2>Return Values</h2> 60<div class="section">No values are returned. </div> 61<h2>Description</h2> 62 <div class="section"> 63<p>Restores the program object state.</p><P> 64Set <code>n</code> to the size of the <code>progs</code> array (the number of program objects to restore). Set <code>offset</code> to the offset of the program objects to restore. When restoring objects from saved data, set <span class="argument">offset</span> to the first object to restore. 65 </P><P> 66Set <code>progs</code> to an array storing the program objects to restore. Objects are restored in the same order as they were saved to <code>progs</code> by <code>glSaveProgramsDMP</code>. You can choose to restore all or only some of the saved objects at once. Use <span class="argument">offset</span> to restore a single object from data in which multiple objects are saved (or in similar situations). By setting <span class="argument">offset</span> 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 <code>progs</code> to an array that is excessively large. 67 </P><P> 68You can set <code>flags</code> to <code>GL_RESTORE_PROGRAMS_DMP</code>. 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 <code>progs</code> array that have a value of 0. Elements with nonzero values are not affected. 69 </P><P> 70You can also set <span class="argument">flags</span> 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 <code>progs</code> array that have a nonzero value; elements with a value of 0 are unaffected. 71<TABLE><TR><TH>GL_RESTORE_UPDATE_LIGHTi_PROGRAM_STATE_DMP (<CODE>0 ≤ i ≤ number of light sources-1</CODE>)</TH><TD>Updates the values set for uniform variables whose names include <code>dmp_FragmentLightSource[i]</code> (where <code>i</code> is a light source ID).</TD></TR><TR><TH>GL_RESTORE_UPDATE_LIGHTING_PROGRAM_STATE_DMP</TH><TD>Updates the values set for uniform variables whose names include <code>dmp_FragmentLighting</code> or <code>dmp_LightEnv</code>.</TD></TR><TR><TH>GL_RESTORE_UPDATE_MATERIAL_PROGRAM_STATE_DMP</TH><TD>Updates the values set for uniform variables whose names include <code>dmp_FragmentMaterial</code>.</TD></TR><TR><TH>GL_RESTORE_UPDATE_TEXTURE_BLENDER_PROGRAM_STATE_DMP</TH><TD>Updates the values set for uniform variables whose names include <code>dmp_TexEnv</code>.</TD></TR><TR><TH>GL_RESTORE_UPDATE_TEXTURE_SAMPLER_PROGRAM_STATE_DMP</TH><TD>Updates the values set for uniform variables whose names include <code>dmp_Texture[i]</code> (where <code>i</code> is 0, 1, or 2), not including <code>dmp_Texture[0].perspectiveShadow</code>, <code>dmp_Texture[0].shadowZBias</code>, or <code>dmp_Texture[0].shadowZScale</code>.</TD></TR><TR><TH>GL_RESTORE_UPDATE_PROCEDURAL_TEXTURE_PROGRAM_STATE_DMP</TH><TD>Updates the values set for uniform variables whose names include <code>dmp_Texture[3]</code>.</TD></TR><TR><TH>GL_RESTORE_UPDATE_SHADOW_SAMPLING_PROGRAM_STATE_DMP</TH><TD>Updates the values set for the uniform variables <code>dmp_Texture[0].perspectiveShadow</code>, <code>dmp_Texture[0].shadowZBias</code>, and <code>dmp_Texture[0].shadowZScale</code>.</TD></TR><TR><TH>GL_RESTORE_UPDATE_PER_FRAGMENT_OPERATION_PROGRAM_STATE_DMP</TH><TD>Updates the values set for uniform variables whose names include <code>dmp_FragOperation</code>.</TD></TR><TR><TH>GL_RESTORE_UPDATE_GAS_ACCUMULATION_PROGRAM_STATE_DMP</TH><TD>Updates the values set for uniform variables whose names include <code>dmp_Gas</code>.</TD></TR><TR><TH>GL_RESTORE_UPDATE_FOG_PROGRAM_STATE_DMP</TH><TD>Updates the values set for uniform variables whose names include <code>dmp_Fog</code>.</TD></TR><TR><TH>GL_RESTORE_UPDATE_VERTEX_SHADER_STATE_DMP</TH><TD>Updates the values set for uniform variables defined by the vertex shader.</TD></TR><TR><TH>GL_RESTORE_UPDATE_GEOMETRY_SHADER_STATE_DMP</TH><TD>Updates the values set for uniform variables defined by the geometry shader.</TD></TR></TABLE><!-- source または、flagsにGL_RESTORE_UPDATE_LIGHTi_PROGRAM_STATE_DMP(iは0から光源数-1)、GL_RESTORE_UPDATE_LIGHTING_PROGRAM_STATE_DMP、 GL_RESTORE_UPDATE_MATERIAL_PROGRAM_STATE_DMP、GL_RESTORE_UPDATE_TEXTURE_BLENDER_PROGRAM_STATE_DMP、 GL_RESTORE_UPDATE_TEXTURE_SAMPLER_PROGRAM_STATE_DMP、GL_RESTORE_UPDATE_PROCEDURAL_TEXTURE_PROGRAM_STATE_DMP、 GL_RESTORE_UPDATE_SHADOW_SAMPLING_PROGRAM_STATE_DMP、GL_RESTORE_UPDATE_PER_FRAGMENT_OPERATION_PROGRAM_STATE_DMP、 GL_RESTORE_UPDATE_GAS_ACCUMULATION_PROGRAM_STATE_DMP、GL_RESTORE_UPDATE_FOG_PROGRAM_STATE_DMP、 GL_RESTORE_UPDATE_VERTEX_SHADER_STATE_DMP、GL_RESTORE_UPDATE_GEOMETRY_SHADER_STATE_DMP、およびこれらの論理和が指定できます。 この場合、一部のステートが復元され上書きされます。 progsで指定された配列の中の0以外の値が格納されている要素に、復元されたステートが上書きされ、0が格納されている要素には影響しません。GL_RESTORE_UPDATE_LIGHTi_PROGRAM_STATE_DMPは、dmp_FragmentLightSource[i]を含む名前のユニフォームの設定値(iは光源のID)を更新します。 GL_RESTORE_UPDATE_LIGHTING_PROGRAM_STATE_DMPは、dmp_FragmentLighting、dmp_LightEnvを含む名前のユニフォームの設定値を更新します。 GL_RESTORE_UPDATE_MATERIAL_PROGRAM_STATE_DMPは、dmp_FragmentMaterialを含む名前のユニフォームの設定値を更新します。 GL_RESTORE_UPDATE_TEXTURE_BLENDER_PROGRAM_STATE_DMPは、dmp_TexEnvを含む名前のユニフォームの設定値を更新します。 GL_RESTORE_UPDATE_TEXTURE_SAMPLER_PROGRAM_STATE_DMPは、dmp_Texture[0].perspectiveShadow、dmp_Texture[0].shadowZBias、 dmp_Texture[0].shadowZScale以外のdmp_Texture[i](iは0、1、2)を含む名前のユニフォームの設定値を更新します。 GL_RESTORE_UPDATE_PROCEDURAL_TEXTURE_PROGRAM_STATE_DMPは、dmp_Texture[3]を含む名前のユニフォームの設定値を更新します。 GL_RESTORE_UPDATE_SHADOW_SAMPLING_PROGRAM_STATE_DMPは、ユニフォームdmp_Texture[0].perspectiveShadow、dmp_Texture[0].shadowZBias、dmp_Texture[0].shadowZScaleの設定値を更新します。 GL_RESTORE_UPDATE_PER_FRAGMENT_OPERATION_PROGRAM_STATE_DMPは、dmp_FragOperationを含む名前のユニフォームの設定値を更新します。 GL_RESTORE_UPDATE_GAS_ACCUMULATION_PROGRAM_STATE_DMPは、dmp_Gasを含む名前のユニフォームの設定値を更新します。 GL_RESTORE_UPDATE_FOG_PROGRAM_STATE_DMPは、dmp_Fogを含む名前のユニフォームの設定値を更新します。 GL_RESTORE_UPDATE_VERTEX_SHADER_STATE_DMPは、頂点シェーダで定義されたユニフォームの設定値を更新します。 GL_RESTORE_UPDATE_GEOMETRY_SHADER_STATE_DMPは、ジオメトリシェーダで定義されたユニフォームの設定値を更新します。 --></P><P> 72If <code>GL_RESTORE_UPDATE_VERTEX_SHADER_STATE_DMP</code> or <code>GL_RESTORE_UPDATE_GEOMETRY_SHADER_STATE_DMP</code> 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. 73 </P><P> 74Set <code>data</code> to a pointer to the array storing the saved data. 75 </P><P> 76This function generates the following errors. 77<TABLE><TR><TH>GL_INVALID_VALUE</TH><TD>The <code>n</code>, <code>progs</code>, or <code>data</code> argument is 0, or the sum of <code>n</code> and <code>offset</code> exceeds the amount of program state data saved in <code>data</code>.</TD></TR><TR><TH>GL_INVALID_OPERATION</TH><TD>The program state has a different format than <code>data</code>.</TD></TR><TR><TH>GL_INVALID_OPERATION</TH><TD>The <code>progs</code> argument specified an invalid or unlinked program object.</TD></TR><TR><TH>GL_OUT_OF_MEMORY</TH><TD>Failed to allocate memory that is used internally.</TD></TR></TABLE><!-- source n、progs、dataが0の場合、およびnとoffsetの和がdataに保存されたプログラムステートの個数を超える場合エラーGL_INVALID_VALUEを生成します。 dataに保存されたデータがプログラムステートのフォーマットではない場合エラーGL_INVALID_OPERATIONを生成します。 progsに不正なプログラムオブジェクト、またはリンクされていないプログラムオブジェクトを指定した場合エラーGL_INVALID_OPERATIONを生成します。 内部で使用するメモリの確保に失敗した場合エラーGL_OUT_OF_MEMORYを生成します。 --></P></div> 78<h2>Revision History</h2> 79 <div class="section"> 80 <dl class="history"> 81 <dt>2010/01/07</dt> 82<dd>Initial version.<br /> 83 </dd> 84 </dl> 85 </div> 86 <hr><p>CONFIDENTIAL</p></body> 87</html>