Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> | |
4 | <refentry id="glGetActiveAtomicCounterBufferiv"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>2011</year> | |
9 | <holder>Khronos Group.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glGetActiveAtomicCounterBufferiv</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glGetActiveAtomicCounterBufferiv</refname> | |
17 | <refpurpose>retrieve information about the set of active atomic counter buffers for a program</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glGetActiveAtomicCounterBufferiv</function></funcdef> | |
23 | <paramdef>Gluint <parameter>program</parameter></paramdef> | |
24 | <paramdef>GLuint <parameter>bufferIndex</parameter></paramdef> | |
25 | <paramdef>GLenum <parameter>pname</parameter></paramdef> | |
26 | <paramdef>GLint *<parameter>params</parameter></paramdef> | |
27 | </funcprototype> | |
28 | </funcsynopsis> | |
29 | </refsynopsisdiv> | |
30 | <!-- eqn: ignoring delim $$ --> | |
31 | <refsect1 id="parameters"><title>Parameters</title> | |
32 | <variablelist> | |
33 | <varlistentry> | |
34 | <term><parameter>program</parameter></term> | |
35 | <listitem> | |
36 | <para> | |
37 | The name of a program object from which to retrieve information. | |
38 | </para> | |
39 | </listitem> | |
40 | </varlistentry> | |
41 | <varlistentry> | |
42 | <term><parameter>bufferIndex</parameter></term> | |
43 | <listitem> | |
44 | <para> | |
45 | Specifies index of an active atomic counter buffer. | |
46 | </para> | |
47 | </listitem> | |
48 | </varlistentry> | |
49 | <varlistentry> | |
50 | <term><parameter>pname</parameter></term> | |
51 | <listitem> | |
52 | <para> | |
53 | Specifies which parameter of the atomic counter buffer to retrieve. | |
54 | </para> | |
55 | </listitem> | |
56 | </varlistentry> | |
57 | <varlistentry> | |
58 | <term><parameter>params</parameter></term> | |
59 | <listitem> | |
60 | <para> | |
61 | Specifies the address of a variable into which to write the retrieved information. | |
62 | </para> | |
63 | </listitem> | |
64 | </varlistentry> | |
65 | </variablelist> | |
66 | </refsect1> | |
67 | <refsect1 id="description"><title>Description</title> | |
68 | <para> | |
69 | <function>glGetActiveAtomicCounterBufferiv</function> retrieves information about the set of active | |
70 | atomic counter buffers for a program object. <parameter>program</parameter> is the name of a program | |
71 | object for which the command <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> | |
72 | has been issued in the past. It is not necessary for <parameter>program</parameter> to have been linked | |
73 | successfully. The link may have failed because the number of active atomic counters exceeded the limits. | |
74 | </para> | |
75 | <para> | |
76 | <parameter>bufferIndex</parameter> specifies the index of an active atomic counter buffer and must be in | |
77 | the range zero to the value of <constant>GL_ACTIVE_ATOMIC_COUNTER_BUFFERS</constant> minus one. The value | |
78 | of <constant>GL_ACTIVE_ATOMIC_COUNTER_BUFFERS</constant> for <parameter>program</parameter> indicates the | |
79 | number of active atomic counter buffer and can be queried with | |
80 | <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>. | |
81 | </para> | |
82 | <para> | |
83 | If no error occurs, the parameter(s) specified by <parameter>pname</parameter> are returned in <parameter>params</parameter>. | |
84 | If an error is generated, the contents of <parameter>params</parameter> are not modified. | |
85 | </para> | |
86 | <para> | |
87 | If <parameter>pname</parameter> is <constant>GL_ATOMIC_COUNTER_BUFFER_BINDING</constant>, then the index of the | |
88 | counter buffer binding point associated with the active atomic counter buffer <parameter>bufferIndex</parameter> | |
89 | for <parameter>program</parameter> is returned. | |
90 | </para> | |
91 | <para> | |
92 | If <parameter>pname</parameter> is <constant>GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE</constant>, then the implementation-dependent | |
93 | minimum total buffer object size, in baseic machine units, required to hold all active atomic counters in the | |
94 | atomic counter binding point identified by <parameter>bufferIndex</parameter> is returned. | |
95 | </para> | |
96 | <para> | |
97 | If <parameter>pname</parameter> is <constant>GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS</constant>, then the number of active | |
98 | atomic counters for the atomic counter buffer identified by <parameter>bufferIndex</parameter> is returned. | |
99 | </para> | |
100 | <para> | |
101 | If <parameter>pname</parameter> is <constant>GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES</constant>, | |
102 | then a list of the active atomic counter indices for the atomic counter buffer identified by <parameter>bufferIndex</parameter> | |
103 | is returned. The number of elements that will be written into <parameter>params</parameter> is the value of | |
104 | <constant>GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS</constant> for <parameter>bufferIndex</parameter>. | |
105 | </para> | |
106 | <para> | |
107 | If <parameter>pname</parameter> is <constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER</constant>, | |
108 | <constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER</constant>, | |
109 | <constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER</constant>, | |
110 | <constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER</constant>, | |
111 | <constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER</constant>, | |
112 | <constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER</constant> then a boolean value indicating | |
113 | whether the atomic counter buffer identified by <parameter>bufferIndex</parameter> is referenced by the vertex, | |
114 | tessellation control, tessellation evaluation, geometry, fragment or compute processing stages of <parameter>program</parameter>, | |
115 | respectively, is returned. | |
116 | </para> | |
117 | </refsect1> | |
118 | <refsect1 id="notes"><title>Notes</title> | |
119 | <para> | |
120 | <function>glGetActiveAtomicCounterBufferiv</function> is available only if the | |
121 | GL version is 4.2 or higher. | |
122 | </para> | |
123 | <para> | |
124 | <constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER</constant> is available | |
125 | only of the GL version is 4.3 or higher. | |
126 | </para> | |
127 | </refsect1> | |
128 | <refsect1 id="errors"><title>Errors</title> | |
129 | <para> | |
130 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>program</parameter> is not the name of a program | |
131 | object for which <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> has been called in the past. | |
132 | </para> | |
133 | <para> | |
134 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>bufferIndex</parameter> is greater than or equal to | |
135 | the value of <constant>GL_ACTIVE_ATOMIC_COUNTER_BUFFERS</constant> for <parameter>program</parameter>. | |
136 | </para> | |
137 | <para> | |
138 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not one of the accepted tokens. | |
139 | </para> | |
140 | </refsect1> | |
141 | <refsect1 id="seealso"><title>See Also</title> | |
142 | <para> | |
143 | <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>, | |
144 | <citerefentry><refentrytitle>glGetActiveSubroutineUniform</refentrytitle></citerefentry>, | |
145 | <citerefentry><refentrytitle>glGetActiveSubroutineUniformName</refentrytitle></citerefentry>, | |
146 | <citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry> | |
147 | </para> | |
148 | </refsect1> | |
149 | <refsect1 id="Copyright"><title>Copyright</title> | |
150 | <para> | |
151 | Copyright <trademark class="copyright"></trademark> 2011 Khronos Group. | |
152 | This material may be distributed subject to the terms and conditions set forth in | |
153 | the Open Publication License, v 1.0, 8 June 1999. | |
154 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. | |
155 | </para> | |
156 | </refsect1> | |
157 | </refentry> |