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">
9 <holder>Khronos Group.
</holder>
12 <refentrytitle>glGetActiveAtomicCounterBufferiv
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glGetActiveAtomicCounterBufferiv
</refname>
17 <refpurpose>retrieve information about the set of active atomic counter buffers for a program
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
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>
30 <!-- eqn: ignoring delim $$ -->
31 <refsect1 id=
"parameters"><title>Parameters
</title>
34 <term><parameter>program
</parameter></term>
37 The name of a program object from which to retrieve information.
42 <term><parameter>bufferIndex
</parameter></term>
45 Specifies index of an active atomic counter buffer.
50 <term><parameter>pname
</parameter></term>
53 Specifies which parameter of the atomic counter buffer to retrieve.
58 <term><parameter>params
</parameter></term>
61 Specifies the address of a variable into which to write the retrieved information.
67 <refsect1 id=
"description"><title>Description
</title>
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.
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>.
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.
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.
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.
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.
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>.
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.
118 <refsect1 id=
"notes"><title>Notes
</title>
120 <function>glGetActiveAtomicCounterBufferiv
</function> is available only if the
121 GL version is
4.2 or higher.
124 <constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER
</constant> is available
125 only of the GL version is
4.3 or higher.
128 <refsect1 id=
"errors"><title>Errors
</title>
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.
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>.
138 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>pname
</parameter> is not one of the accepted tokens.
141 <refsect1 id=
"seealso"><title>See Also
</title>
143 <citerefentry><refentrytitle>glGetProgram
</refentrytitle></citerefentry>,
144 <citerefentry><refentrytitle>glGetActiveSubroutineUniform
</refentrytitle></citerefentry>,
145 <citerefentry><refentrytitle>glGetActiveSubroutineUniformName
</refentrytitle></citerefentry>,
146 <citerefentry><refentrytitle>glGetUniformLocation
</refentrytitle></citerefentry>
149 <refsect1 id=
"Copyright"><title>Copyright
</title>
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>.