Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd"> | |
3 | <!-- saved from url=(0013)about:internet --> | |
4 | <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="opengl-man.css" /><title>glGetUniformIndices</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /></head><body><div class="refentry" title="glGetUniformIndices"><a id="glGetUniformIndices"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glGetUniformIndices — retrieve the index of a named uniform block</p></div><div class="refsynopsisdiv" title="C Specification"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">GLuint <b class="fsfunc">glGetUniformIndices</b>(</code></td><td>GLuint <var class="pdparam">program</var>, </td></tr><tr><td> </td><td>GLsizei <var class="pdparam">uniformCount</var>, </td></tr><tr><td> </td><td>const GLchar **<var class="pdparam">uniformNames</var>, </td></tr><tr><td> </td><td>GLuint *<var class="pdparam">uniformIndices</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1" title="Parameters"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>program</code></em></span></dt><dd><p> | |
5 | Specifies the name of a program containing uniforms whose indices to query. | |
6 | </p></dd><dt><span class="term"><em class="parameter"><code>uniformCount</code></em></span></dt><dd><p> | |
7 | Specifies the number of uniforms whose indices to query. | |
8 | </p></dd><dt><span class="term"><em class="parameter"><code>uniformNames</code></em></span></dt><dd><p> | |
9 | Specifies the address of an array of pointers to buffers containing the names of the queried uniforms. | |
10 | </p></dd><dt><span class="term"><em class="parameter"><code>uniformIndices</code></em></span></dt><dd><p> | |
11 | Specifies the address of an array that will receive the indices of the uniforms. | |
12 | </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="description"></a><h2>Description</h2><p> | |
13 | <code class="function">glGetUniformIndices</code> retrieves the indices of a number of uniforms within <em class="parameter"><code>program</code></em>. | |
14 | </p><p> | |
15 | <em class="parameter"><code>program</code></em> must be the name of a program object for which the command | |
16 | <a class="citerefentry" href="glLinkProgram.xml"><span class="citerefentry"><span class="refentrytitle">glLinkProgram</span></span></a> must have been called in the past, although it is not required that | |
17 | <a class="citerefentry" href="glLinkProgram.xml"><span class="citerefentry"><span class="refentrytitle">glLinkProgram</span></span></a> must have succeeded. The link could have failed because the number | |
18 | of active uniforms exceeded the limit. | |
19 | </p><p> | |
20 | <em class="parameter"><code>uniformCount</code></em> indicates both the number of elements in the array of names <em class="parameter"><code>uniformNames</code></em> and the | |
21 | number of indices that may be written to <em class="parameter"><code>uniformIndices</code></em>. | |
22 | </p><p> | |
23 | <em class="parameter"><code>uniformNames</code></em> contains a list of <em class="parameter"><code>uniformCount</code></em> name strings identifying the uniform names to be | |
24 | queried for indices. For each name string in <em class="parameter"><code>uniformNames</code></em>, the index assigned to the active uniform of that name will | |
25 | be written to the corresponding element of <em class="parameter"><code>uniformIndices</code></em>. If a string in <em class="parameter"><code>uniformNames</code></em> is not | |
26 | the name of an active uniform, the special value <code class="constant">GL_INVALID_INDEX</code> will be written to the corresponding element of | |
27 | <em class="parameter"><code>uniformIndices</code></em>. | |
28 | </p><p> | |
29 | If an error occurs, nothing is written to <em class="parameter"><code>uniformIndices</code></em>. | |
30 | </p></div><div class="refsect1" title="Errors"><a id="errors"></a><h2>Errors</h2><p> | |
31 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>program</code></em> is not the name of a program object for which | |
32 | <a class="citerefentry" href="glLinkProgram.xml"><span class="citerefentry"><span class="refentrytitle">glLinkProgram</span></span></a> has been called in the past. | |
33 | </p></div><div class="refsect1" title="Notes"><a id="notes"></a><h2>Notes</h2><p> | |
34 | <code class="function">glGetUniformIndices</code> is available only if the GL version is 3.1 or greater. | |
35 | </p></div><div class="refsect1" title="See Also"><a id="seealso"></a><h2>See Also</h2><p> | |
36 | <a class="citerefentry" href="glGetActiveUniform.xml"><span class="citerefentry"><span class="refentrytitle">glGetActiveUniform</span></span></a>, | |
37 | <a class="citerefentry" href="glGetActiveUniformName.xml"><span class="citerefentry"><span class="refentrytitle">glGetActiveUniformName</span></span></a>, | |
38 | <a class="citerefentry" href="glLinkProgram.xml"><span class="citerefentry"><span class="refentrytitle">glLinkProgram</span></span></a> | |
39 | </p></div><div class="refsect1" title="Copyright"><a id="Copyright"></a><h2>Copyright</h2><p> | |
40 | Copyright <span class="trademark"></span>© 2010 Khronos Group. | |
41 | This material may be distributed subject to the terms and conditions set forth in | |
42 | the Open Publication License, v 1.0, 8 June 1999. | |
43 | <a class="ulink" href="http://opencontent.org/openpub/" target="_top">http://opencontent.org/openpub/</a>. | |
44 | </p></div></div></body></html> |