rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man3 / glGetActiveUniformName.xml
CommitLineData
7faf1d71
AW
1<?xml version="1.0" encoding="UTF-8"?>\r
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r
4<refentry id="glGetActiveUniformName">\r
5 <refmeta>\r
6 <refmetainfo>\r
7 <copyright>\r
8 <year>2010</year>\r
9 <holder>Khronos Group</holder>\r
10 </copyright>\r
11 </refmetainfo>\r
12 <refentrytitle>glGetActiveUniformName</refentrytitle>\r
13 <manvolnum>3G</manvolnum>\r
14 </refmeta>\r
15 <refnamediv>\r
16 <refname>glGetActiveUniformName</refname>\r
17 <refpurpose>query the name of an active uniform</refpurpose>\r
18 </refnamediv>\r
19 <refsynopsisdiv><title>C Specification</title>\r
20 <funcsynopsis>\r
21 <funcprototype>\r
22 <funcdef>void <function>glGetActiveUniformName</function></funcdef>\r
23 <paramdef>GLuint <parameter>program</parameter></paramdef>\r
24 <paramdef>GLuint <parameter>uniformIndex</parameter></paramdef>\r
25 <paramdef>GLsizei <parameter>bufSize</parameter></paramdef>\r
26 <paramdef>GLsizei *<parameter>length</parameter></paramdef>\r
27 <paramdef>GLchar *<parameter>uniformName</parameter></paramdef>\r
28 </funcprototype>\r
29 </funcsynopsis>\r
30 </refsynopsisdiv>\r
31 <!-- eqn: ignoring delim $$ -->\r
32 <refsect1 id="parameters"><title>Parameters</title>\r
33 <variablelist>\r
34 <varlistentry>\r
35 <term><parameter>program</parameter></term>\r
36 <listitem>\r
37 <para>\r
38 Specifies the program containing the active uniform index <parameter>uniformIndex</parameter>.\r
39 </para>\r
40 </listitem>\r
41 </varlistentry>\r
42 <varlistentry>\r
43 <term><parameter>uniformIndex</parameter></term>\r
44 <listitem>\r
45 <para>\r
46 Specifies the index of the active uniform whose name to query.\r
47 </para>\r
48 </listitem>\r
49 </varlistentry>\r
50 <varlistentry>\r
51 <term><parameter>bufSize</parameter></term>\r
52 <listitem>\r
53 <para>\r
54 Specifies the size of the buffer, in units of <code>GLchar</code>, of the buffer whose address is specified in <parameter>uniformName</parameter>.\r
55 </para>\r
56 </listitem>\r
57 </varlistentry>\r
58 <varlistentry>\r
59 <term><parameter>length</parameter></term>\r
60 <listitem>\r
61 <para>\r
62 Specifies the address of a variable that will receive the number of characters that were or would have been written to the buffer addressed by <parameter>uniformName</parameter>.\r
63 </para>\r
64 </listitem>\r
65 </varlistentry>\r
66 <varlistentry>\r
67 <term><parameter>uniformName</parameter></term>\r
68 <listitem>\r
69 <para>\r
70 Specifies the address of a buffer into which the GL will place the name of the active uniform at <parameter>uniformIndex</parameter> within <parameter>program</parameter>.\r
71 </para>\r
72 </listitem>\r
73 </varlistentry>\r
74 </variablelist>\r
75 </refsect1>\r
76 <refsect1 id="description"><title>Description</title>\r
77 <para>\r
78 <function>glGetActiveUniformName</function> returns the name of the active uniform at <parameter>uniformIndex</parameter> within <parameter>program</parameter>.\r
79 If <parameter>uniformName</parameter> is not <code>NULL</code>, up to <parameter>bufSize</parameter> characters (including a nul-terminator) will be written into\r
80 the array whose address is specified by <parameter>uniformName</parameter>. If <parameter>length</parameter> is not <code>NULL</code>, the number of characters\r
81 that were (or would have been) written into <parameter>uniformName</parameter> (not including the nul-terminator) will be placed in the variable whose address\r
82 is specified in <parameter>length</parameter>. If <parameter>length</parameter> is <code>NULL</code>, no length is returned. The length of the longest uniform\r
83 name in <parameter>program</parameter> is given by the value of <constant>GL_ACTIVE_UNIFORM_MAX_LENGTH</constant>, which can be queried with\r
84 <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>.\r
85 </para>\r
86 <para>\r
87 If <function>glGetActiveUniformName</function> is not successful, nothing is written to <parameter>length</parameter> or <parameter>uniformName</parameter>.\r
88 </para>\r
89 <para>\r
90 <parameter>program</parameter> must be the name of a program for which the command <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>\r
91 has been issued in the past. It is not necessary for <parameter>program</parameter> to have been linked successfully. The link could have failed because\r
92 the number of active uniforms exceeded the limit.\r
93 </para>\r
94 <para>\r
95 <parameter>uniformIndex</parameter> must be an active uniform index of the program <parameter>program</parameter>, in the range zero to\r
96 <constant>GL_ACTIVE_UNIFORMS</constant> - 1. The value of <constant>GL_ACTIVE_UNIFORMS</constant> can be queried with\r
97 <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>.\r
98 </para>\r
99 </refsect1>\r
100 <refsect1 id="errors"><title>Errors</title>\r
101 <para>\r
102 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>uniformIndex</parameter> is greater than or equal to the value\r
103 of <constant>GL_ACTIVE_UNIFORMS</constant>.\r
104 </para>\r
105 <para>\r
106 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>bufSize</parameter> is negative.\r
107 </para>\r
108 <para>\r
109 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>program</parameter> is not the name of a program object for which\r
110 <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> has been issued.\r
111 </para>\r
112 </refsect1>\r
113 <refsect1 id="seealso"><title>See Also</title>\r
114 <para>\r
115 <citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>,\r
116 <citerefentry><refentrytitle>glGetUniformIndices</refentrytitle></citerefentry>,\r
117 <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>,\r
118 <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>\r
119 </para>\r
120 </refsect1>\r
121 <refsect1 id="Copyright"><title>Copyright</title>\r
122 <para>\r
123 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r
124 This material may be distributed subject to the terms and conditions set forth in \r
125 the Open Publication License, v 1.0, 8 June 1999.\r
126 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r
127 </para>\r
128 </refsect1>\r
129</refentry>\r