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>glRestoreTextureCollectionsDMP</title> 8 </head> 9 <body> 10<h1><CODE>glRestoreTextureCollectionsDMP</CODE> Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14GL_APICALL void GL_APIENTRY glRestoreTextureCollectionsDMP( 15 GLuint n, 16 GLuint offset, 17 GLuint * txcolls, 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 texture collection objects to restore from array</td> 37 </tr> 38 <tr> 39<td>in</td> 40<th>offset</th> 41<td>Offset to the texture collection objects to restore</td> 42 </tr> 43 <tr> 44<td>inout</td> 45<th>txcolls</th> 46<td>Array storing the texture collection 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 region storing the data to restore</td> 57 </tr> </table> 58 </div> 59<h2>Return Values</h2> 60<div class="section">There is no return value. </div> 61<h2>Description</h2> 62 <div class="section"> 63<p>Restores the state of texture collection objects.</p><P> 64Set <SPAN class="argument">n</SPAN> to the size of the <span class="argument">txcolls</span> array (the number of texture collection objects to restore). Set <span class="argument">offset</span> to the offset of the texture collection 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 <span class="argument">txcolls</span> to an array storing the texture collection objects to restore. Objects are restored in the same order as they were saved to <span class="argument">txcolls</span> by <CODE>glSaveTextureCollectionsDMP</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 <span class="argument">txcolls</span> to an array that is excessively large. 67 </P><P> 68You can set <span class="argument">flags</span> to <CODE>GL_RESTORE_TEXTURE_COLLECTIONS_DMP</CODE> to restore the entire state of the texture collection objects. 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. 71<TABLE><TR><TH><CODE>GL_RESTORE_TEXTURE_COLLECTION_1D_TEXTURES_DMP</CODE></TH><TD>Restores lookup table objects.</TD></TR><TR><TH><CODE>GL_RESTORE_TEXTURE_COLLECTION_2D_TEXTURES_DMP</CODE></TH><TD>Restores 2D texture objects.</TD></TR><TR><TH><CODE>GL_RESTORE_TEXTURE_COLLECTION_CUBE_TEXTURES_DMP</CODE></TH><TD>Restores cube-map texture objects.</TD></TR></TABLE><!-- source または、flagsにGL_RESTORE_TEXTURE_COLLECTION_1D_TEXTURES_DMP、GL_RESTORE_TEXTURE_COLLECTION_2D_TEXTURES_DMP、 GL_RESTORE_TEXTURE_COLLECTION_CUBE_TEXTURES_DMP、およびこれらの論理和が指定できます。この場合、一部のステートが復元されます。 GL_RESTORE_TEXTURE_COLLECTION_1D_TEXTURES_DMPを指定した場合、参照テーブルオブジェクトが復元されます。 GL_RESTORE_TEXTURE_COLLECTION_2D_TEXTURES_DMPを指定した場合、2Dテクスチャオブジェクトが復元されます。 GL_RESTORE_TEXTURE_COLLECTION_CUBE_TEXTURES_DMPを指定した場合、キューブマップテクスチャオブジェクトが復元されます。 --></P><P> 72New texture collection objects with the restored state are generated in elements of the <span class="argument">txcolls</span> array that have a value of 0. Elements with nonzero values are not affected. 73 </P><P> 74Set <span class="argument">data</span> to a pointer to the region storing the saved data. 75 </P><P> 76The following errors occur in this function. 77<TABLE><TR><TH><CODE>GL_INVALID_VALUE</CODE></TH><TD>The <span class="argument">n</span>, <span class="argument">txcolls</span>, or <span class="argument">data</span> argument is 0, or the sum of <span class="argument">n</span> and <span class="argument">offset</span> is greater than the number of texture collection objects saved in <span class="argument">data</span>.</TD></TR><TR><TH><CODE>GL_INVALID_OPERATION</CODE></TH><TD>The <span class="argument">data</span> argument does not use the texture collection format.</TD></TR><TR><TH><CODE>GL_OUT_OF_MEMORY</CODE></TH><TD>Failed to allocate memory that is used internally.</TD></TR></TABLE><!-- source n、txcolls、dataが0の場合、nとoffsetの和がdataに保存されたテクスチャコレクションオブジェクトの個数を超える場合エラーGL_INVALID_VALUEを生成します。 dataに保存されたデータがテクスチャコレクションのフォーマットではない場合エラーGL_INVALID_OPERATIONを生成します。 内部で使用するメモリの確保に失敗した場合エラーGL_OUT_OF_MEMORYを生成します。 --></P><P> 78To delete the restored texture state, you must separately delete each of the bound texture objects rather than <SPAN class="argument">txcoll</SPAN> alone. With the texture collections bound by a call to <CODE>glBindTexture(GL_TEXTURE_COLLECTION_DMP, txcoll)</CODE>, use <CODE>glGetIntegerv</CODE> to get the ID of each bound texture object and then call <CODE>glDeleteTextures</CODE> on these IDs to delete them. 79 </P><P> 80You can call <CODE>glGetIntegerv</CODE> with <SPAN class="argument">pname</SPAN> set equal to <CODE>GL_TEXTURE_BINDING_2D</CODE>, <CODE>GL_TEXTURE_BINDING_CUBE_MAP</CODE>, and <CODE>GL_TEXTURE_BINDING_LUTn_DMP</CODE> to get the IDs of 2D texture objects, cube map textures, and lookup table objects respectively. 81 </P></div> 82<h2>Revision History</h2> 83 <div class="section"> 84 <dl class="history"> 85 <dt>2010/06/10</dt> 86<dd>Added a description of how to delete the restored texture state.<br /> 87 </dd> 88 <dt>2010/01/07</dt> 89<dd>Initial version.<br /> 90 </dd> 91 </dl> 92 </div> 93 <hr><p>CONFIDENTIAL</p></body> 94</html>