GLAPI/glGetActiveAtomicCounterBuffer: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
m Bot: Adding better formatting.
m Bot: Adding better formatting.
Line 24: Line 24:
'''glGetActiveAtomicCounterBufferiv''' retrieves information about the set of active atomic counter buffers for a program object. {{param|program}} is the name of a program object for which the command {{apifunc|glLinkProgram}} has been issued in the past. It is not necessary for {{param|program}} to have been linked successfully. The link may have failed because the number of active atomic counters exceeded the limits.
'''glGetActiveAtomicCounterBufferiv''' retrieves information about the set of active atomic counter buffers for a program object. {{param|program}} is the name of a program object for which the command {{apifunc|glLinkProgram}} has been issued in the past. It is not necessary for {{param|program}} to have been linked successfully. The link may have failed because the number of active atomic counters exceeded the limits.


{{param|bufferIndex}} specifies the index of an active atomic counter buffer and must be in the range zero to the value of {{code|GL_ACTIVE_ATOMIC_COUNTER_BUFFERS}} minus one. The value of {{code|GL_ACTIVE_ATOMIC_COUNTER_BUFFERS}} for {{param|program}} indicates the number of active atomic counter buffer and can be queried with {{apifunc|glGetProgram}}.
{{param|bufferIndex}} specifies the index of an active atomic counter buffer and must be in the range zero to the value of {{enum|GL_ACTIVE_ATOMIC_COUNTER_BUFFERS}} minus one. The value of {{enum|GL_ACTIVE_ATOMIC_COUNTER_BUFFERS}} for {{param|program}} indicates the number of active atomic counter buffer and can be queried with {{apifunc|glGetProgram}}.


If no error occurs, the parameter(s) specified by {{param|pname}} are returned in {{param|params}}. If an error is generated, the contents of {{param|params}} are not modified.
If no error occurs, the parameter(s) specified by {{param|pname}} are returned in {{param|params}}. If an error is generated, the contents of {{param|params}} are not modified.


If {{param|pname}} is {{code|GL_ATOMIC_COUNTER_BUFFER_BINDING}}, then the index of the counter buffer binding point associated with the active atomic counter buffer {{param|bufferIndex}} for {{param|program}} is returned.
If {{param|pname}} is {{enum|GL_ATOMIC_COUNTER_BUFFER_BINDING}}, then the index of the counter buffer binding point associated with the active atomic counter buffer {{param|bufferIndex}} for {{param|program}} is returned.


If {{param|pname}} is {{code|GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE}}, then the implementation-dependent minimum total buffer object size, in baseic machine units, required to hold all active atomic counters in the atomic counter binding point identified by {{param|bufferIndex}} is returned.
If {{param|pname}} is {{enum|GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE}}, then the implementation-dependent minimum total buffer object size, in baseic machine units, required to hold all active atomic counters in the atomic counter binding point identified by {{param|bufferIndex}} is returned.


If {{param|pname}} is {{code|GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS}}, then the number of active atomic counters for the atomic counter buffer identified by {{param|bufferIndex}} is returned.
If {{param|pname}} is {{enum|GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS}}, then the number of active atomic counters for the atomic counter buffer identified by {{param|bufferIndex}} is returned.


If {{param|pname}} is {{code|GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES}}, then a list of the active atomic counter indices for the atomic counter buffer identified by {{param|bufferIndex}} is returned. The number of elements that will be written into {{param|params}} is the value of {{code|GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS}} for {{param|bufferIndex}}.
If {{param|pname}} is {{enum|GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES}}, then a list of the active atomic counter indices for the atomic counter buffer identified by {{param|bufferIndex}} is returned. The number of elements that will be written into {{param|params}} is the value of {{enum|GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS}} for {{param|bufferIndex}}.


If {{param|pname}} is {{code|GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER}}, {{code|GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER}}, {{code|GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER}}, {{code|GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER}}, or {{code|GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER}}, then a boolean value indicating whether the atomic counter buffer identified by {{param|bufferIndex}} is referenced by the vertex, tessellation control, tessellation evaluation, geometry or fragment processing stages of {{param|program}}, respectively, is returned.
If {{param|pname}} is {{enum|GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER}}, {{enum|GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER}}, {{enum|GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER}}, {{enum|GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER}}, or {{enum|GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER}}, then a boolean value indicating whether the atomic counter buffer identified by {{param|bufferIndex}} is referenced by the vertex, tessellation control, tessellation evaluation, geometry or fragment processing stages of {{param|program}}, respectively, is returned.


== Notes ==
== Notes ==
Line 44: Line 44:
== Errors ==
== Errors ==


{{code|GL_INVALID_VALUE}} is generated if {{param|program}} is not the name of a program object for which {{apifunc|glLinkProgram}} has been called in the past.
{{enum|GL_INVALID_VALUE}} is generated if {{param|program}} is not the name of a program object for which {{apifunc|glLinkProgram}} has been called in the past.


{{code|GL_INVALID_VALUE}} is generated if {{param|bufferIndex}} is greater than or equal to the value of {{code|GL_ACTIVE_ATOMIC_COUNTER_BUFFERS}} for {{param|program}}.
{{enum|GL_INVALID_VALUE}} is generated if {{param|bufferIndex}} is greater than or equal to the value of {{enum|GL_ACTIVE_ATOMIC_COUNTER_BUFFERS}} for {{param|program}}.


{{code|GL_INVALID_ENUM}} is generated if {{param|pname}} is not one of the accepted tokens.
{{enum|GL_INVALID_ENUM}} is generated if {{param|pname}} is not one of the accepted tokens.


== See Also ==
== See Also ==

Revision as of 17:22, 29 April 2012

glGetActiveAtomicCounterBufferiv
Core in version 4.6
Core since version 4.2
Core ARB extension ARB_shader_atomic_counters

glGetActiveAtomicCounterBufferiv: retrieve information about the set of active atomic counter buffers for a program

Function Definition

 void glGetActiveAtomicCounterBufferiv(Gluint program​, GLuint bufferIndex​, GLenum pname​, GLint *params​);
program
The name of a program object from which to retrieve information.
bufferIndex
Specifies index of an active atomic counter buffer.
pname
Specifies which parameter of the atomic counter buffer to retrieve.
params
Specifies the address of a variable into which to write the retrieved information.

Description

glGetActiveAtomicCounterBufferiv retrieves information about the set of active atomic counter buffers for a program object. program​ is the name of a program object for which the command glLinkProgram has been issued in the past. It is not necessary for program​ to have been linked successfully. The link may have failed because the number of active atomic counters exceeded the limits.

bufferIndex​ specifies the index of an active atomic counter buffer and must be in the range zero to the value of GL_ACTIVE_ATOMIC_COUNTER_BUFFERS minus one. The value of GL_ACTIVE_ATOMIC_COUNTER_BUFFERS for program​ indicates the number of active atomic counter buffer and can be queried with glGetProgram.

If no error occurs, the parameter(s) specified by pname​ are returned in params​. If an error is generated, the contents of params​ are not modified.

If pname​ is GL_ATOMIC_COUNTER_BUFFER_BINDING, then the index of the counter buffer binding point associated with the active atomic counter buffer bufferIndex​ for program​ is returned.

If pname​ is GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE, then the implementation-dependent minimum total buffer object size, in baseic machine units, required to hold all active atomic counters in the atomic counter binding point identified by bufferIndex​ is returned.

If pname​ is GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS, then the number of active atomic counters for the atomic counter buffer identified by bufferIndex​ is returned.

If pname​ is GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES, then a list of the active atomic counter indices for the atomic counter buffer identified by bufferIndex​ is returned. The number of elements that will be written into params​ is the value of GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS for bufferIndex​.

If pname​ is GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER, or GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER, then a boolean value indicating whether the atomic counter buffer identified by bufferIndex​ is referenced by the vertex, tessellation control, tessellation evaluation, geometry or fragment processing stages of program​, respectively, is returned.

Notes

glGetActiveAtomicCounterBufferiv is available only if the GL version is 4.2 or higher.

Errors

GL_INVALID_VALUE is generated if program​ is not the name of a program object for which glLinkProgram has been called in the past.

GL_INVALID_VALUE is generated if bufferIndex​ is greater than or equal to the value of GL_ACTIVE_ATOMIC_COUNTER_BUFFERS for program​.

GL_INVALID_ENUM is generated if pname​ is not one of the accepted tokens.

See Also

glGetProgram, glGetActiveSubroutineUniform, glGetActiveSubroutineUniformName, glGetUniformLocation

Copyright

Copyright © 2011 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.