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>glRestoreVertexStateCollectionsDMP</title>
8  </head>
9  <body>
10<h1><CODE>glRestoreVertexStateCollectionsDMP</CODE> Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14GL_APICALL void GL_APIENTRY glRestoreVertexStateCollectionsDMP(
15     GLuint n,
16     GLuint offset,
17     GLuint * vscolls,
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 vertex state collection objects to restore from array</td>
37        </tr>
38        <tr>
39<td>in</td>
40<th>offset</th>
41<td>Offset to the vertex state collection objects to restore</td>
42        </tr>
43        <tr>
44<td>inout</td>
45<th>vscolls</th>
46<td>Array storing the vertex state 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 vertex state collection objects.</p><P>
64Set <span class="argument">n</span> to the size of the <span class="argument">vscolls</span> array (the number of vertex state collection objects to restore). Set <span class="argument">offset</span> to the offset of the vertex state 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">vscolls</span> to an array storing the vertex state collection objects to restore. Objects are restored in the same order as they were saved to <span class="argument">vscolls</span> by <CODE>glSaveVertexStateCollectionsDMP</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">vscolls</span> to an array that is excessively large.
67            </P><P>
68Set <span class="argument">flags</span> to <CODE>GL_RESTORE_VERTEX_STATE_COLLECTIONS_DMP</CODE>. New vertex state collection objects are generated and the entire state is restored in these new objects. The new vertex state collection objects with the restored state are generated in elements of the <span class="argument">vscolls</span> array that have a value of 0. Elements with nonzero values are not affected.
69            </P><P>
70Set <span class="argument">data</span> to a pointer to the region storing the saved data.
71            </P><P>
72The following errors occur in this function.
73<TABLE><TR><TH><CODE>GL_INVALID_VALUE</CODE></TH><TD>The <span class="argument">n</span>, <span class="argument">vscolls</span>, or <span class="argument">data</span> argument is 0; the sum of <span class="argument">n</span> and <span class="argument">offset</span> exceeds the number of vertex state collection objects saved in <span class="argument">data</span>; or <span class="argument">flags</span> is not <CODE>GL_RESTORE_VERTEX_STATE_COLLECTIONS_DMP</CODE>.</TD></TR><TR><TH><CODE>GL_INVALID_OPERATION</CODE></TH><TD>The <span class="argument">data</span> argument does not use the vertex state 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、vscolls、dataが0の場合、nとoffsetの和がdataに保存された頂点ステートコレクションオブジェクトの個数を超える場合、 およびflagsがGL_RESTORE_VERTEX_STATE_COLLECTIONS_DMPではない場合エラーGL_INVALID_VALUEを生成します。 dataに保存されたデータが頂点ステートコレクションのフォーマットではない場合エラーGL_INVALID_OPERATIONを生成します。 内部で使用するメモリの確保に失敗した場合エラーGL_OUT_OF_MEMORYを生成します。                 --></P><P>
74To delete the restored vertex state, you must separately delete each of the bound vertex buffer objects rather than <SPAN class="argument">vscoll</SPAN> alone. With the vertex state collections bound by a call to <CODE>glBindBuffer(GL_VERTEX_STATE_COLLECTION_DMP, vscoll)</CODE>, use <CODE>glGetIntegerv</CODE> and <CODE>glGetVertexAttribiv</CODE> to get the ID of each bound vertex buffer object and then call <CODE>glDeleteBuffers</CODE> on these IDs to delete them.
75            </P><P>
76You can call <CODE>glGetIntegerv</CODE> with <SPAN class="argument">pname</SPAN> set equal to <CODE>GL_ARRAY_BUFFER_BINDING</CODE> and <CODE>GL_ELEMENT_ARRAY_BUFFER_BINDING</CODE> to get the ID of each vertex buffer object. You can also call <CODE>glGetVertexAttribiv</CODE> with <SPAN class="argument">pname</SPAN> set equal to <CODE>GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING</CODE> to get the IDs of vertex buffer objects bound to a vertex array.
77            </P></div>
78<h2>Revision History</h2>
79    <div class="section">
80      <dl class="history">
81        <dt>2010/06/10</dt>
82<dd>Added a description of how to delete the restored vertex state.<br />
83        </dd>
84        <dt>2010/01/07</dt>
85<dd>Initial version.<br />
86        </dd>
87      </dl>
88    </div>
89  <hr><p>CONFIDENTIAL</p></body>
90</html>