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>glGetUniformiv</title>
8  </head>
9  <body>
10<h1><CODE>glGetUniformiv</CODE> Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14GL_APICALL void GL_APIENTRY glGetUniformiv(
15     GLuint program,
16     GLint location,
17     GLint * params
18);
19</pre>
20    </div>
21<h2>Parameters</h2>
22    <div class="section">
23      <table class="arguments">
24        <thead>
25          <tr>
26            <td width="15" />
27<th>Name</th>
28<td>Description</td>
29          </tr>
30        </thead>
31        <tr>
32<td>in</td>
33<th>program</th>
34<td>Program object.</td>
35        </tr>
36        <tr>
37<td>in</td>
38<th>location</th>
39<td>Location of uniform variable.</td>
40        </tr>
41        <tr>
42<td>out</td>
43<th>params</th>
44<td>Array storing the obtained values.</td>
45        </tr> </table>
46    </div>
47<h2>Return Values</h2>
48<div class="section">There is no return value. </div>
49<h2>Description</h2>
50    <div class="section">
51<p>Gets values for uniforms that use a data type other than floating-point numbers.</p><P>
52<span class="argument">program</span> specifies the program object. <span class="argument">location</span> specifies the uniform variable's location. Data is obtained in the array specified by <span class="argument">params</span>.
53            </P><P>
54The number of elements obtained in <span class="argument">params</span> varies with the uniform type. There are two elements for <code>GL_BOOL_VEC2</code> and <code>GL_INT_VEC2</code>, three elements for <code>GL_BOOL_VEC3</code> and <code>GL_INT_VEC3</code>, and four elements for <code>GL_BOOL_VEC4</code> and <code>GL_INT_VEC4</code>. In all other cases there is one element. This function can only get a single array element from uniform variable arrays. To specify the element to get, add its offset in the array to <span class="argument">location</span>. The <span class="argument">location</span> obtained by <code>glGetUniformLocation</code> specifies the first element in the array. Add <code>i</code> to <span class="argument">location</span> to specify the (<code>i+1</code>) element. (A &quot;uniform variable array&quot; is a uniform variable that <code>pragma bind_symbol</code> has bound to multiple registers in a vertex shader. It is <I>not</I> a uniform variable that has been bound to multiple components of a <I>single</I> register. )
55            </P><P>
56The following errors occur in this function.
57<TABLE><TR><TH><CODE>GL_INVALID_VALUE</CODE></TH><TD>The <span class="argument">program</span> argument was set to an invalid value.</TD></TR><TR><TH><CODE>GL_INVALID_OPERATION</CODE></TH><TD>Either <span class="argument">program</span> is not the current program or it has not been linked properly.</TD></TR><TR><TH><CODE>GL_INVALID_OPERATION</CODE></TH><TD>The <span class="argument">location</span> argument was set to an invalid value.</TD></TR></TABLE><!-- source                                      programに不正な値を指定した場合エラーGL_INVALID_VALUEを生成します。 programがカレントのプログラムではない場合、または正しくリンクされていない場合エラーGL_INVALID_OPERATIONを生成します。 locationに不正な値を指定した場合エラーGL_INVALID_OPERATIONを生成します。 locationが-1の場合、本APIの呼び出しは無視されます。                 --></P></div>
58<h2>Revision History</h2>
59    <div class="section">
60      <dl class="history">
61        <dt>2010/01/07</dt>
62<dd>Initial version.<br />
63        </dd>
64      </dl>
65    </div>
66  <hr><p>CONFIDENTIAL</p></body>
67</html>