This extension provides a set of atomic counters.
This extension provides GLSL built-in functions to query and increment/decrement these atomic counters.
This enables a shader to write to unique offsets (append to a buffer object) or read from unique offsets (consume from a buffer object).
Opaque handles to atomic counters are declared at global scope and are qualified with the uniform qualifier.
Unlike other user-defined uniforms declared at global scope, they take NO storage from the default partition, they have NO location, and they may NOT be set with the Uniform* commands. Atomic counters may also NOT be grouped into uniform blocks.
Active atomic counters can be discovered by the commands GetUniformIndices, GetActiveUniformName, GetActiveUniform and
GetActiveUniformsiv.
Like samplers, the opaque handles of the atomic counters and are ONLY used in some GLSL built-in functions.
The atomic counters pointed to by the opaque handles are bound to buffer binding points and buffer offsets through the layout qualifiers in the shading language, or they are implicitly assigned by the compiler.
Through the OpenGL API, buffer objects may be bound to these binding points with BindBufferBase or BindBufferRange.
The contents of the atomic counters are stored in the buffer objects. The contents of atomic counters may be set and queried with buffer object manipulation functions (e.g. BufferData, BufferSubData, MapBuffer or MapBufferRange).
Requires OpenGL 3.. Promoted to core in OpenGL 4..
| Modifier and Type | Field and Description |
|---|---|
| public static final int | GL_ACTIVE_ATOMIC_COUNTER_BUFFERS
Accepted by the |
| public static final int | GL_ATOMIC_COUNTER_BUFFER
Accepted by the |
| public static final int | GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES
Accepted by the |
| public static final int | GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS
Accepted by the |
| public static final int | GL_ATOMIC_COUNTER_BUFFER_BINDING
Accepted by the |
| public static final int | GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE
Accepted by the |
| public static final int | GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER
Accepted by the |
| public static final int | GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER
Accepted by the |
| public static final int | GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER
Accepted by the |
| public static final int | GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER
Accepted by the |
| public static final int | GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER
Accepted by the |
| public static final int | GL_ATOMIC_COUNTER_BUFFER_SIZE
Accepted by the |
| public static final int | GL_ATOMIC_COUNTER_BUFFER_START
Accepted by the |
| public static final int | GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS
Accepted by the |
| public static final int | GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE
Accepted by the |
| public static final int | GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS
Accepted by the |
| public static final int | GL_MAX_COMBINED_ATOMIC_COUNTERS
Accepted by the |
| public static final int | GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS
Accepted by the |
| public static final int | GL_MAX_FRAGMENT_ATOMIC_COUNTERS
Accepted by the |
| public static final int | GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS
Accepted by the |
| public static final int | GL_MAX_GEOMETRY_ATOMIC_COUNTERS
Accepted by the |
| public static final int | GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS
Accepted by the |
| public static final int | GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS
Accepted by the |
| public static final int | GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS
Accepted by the |
| public static final int | GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS
Accepted by the |
| public static final int | GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS
Accepted by the |
| public static final int | GL_MAX_VERTEX_ATOMIC_COUNTERS
Accepted by the |
| public static final int | GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX
Accepted by the |
| public static final int | GL_UNSIGNED_INT_ATOMIC_COUNTER
Returned in |
| Access | Constructor and Description |
|---|---|
| protected |
| GL_ACTIVE_ATOMIC_COUNTER_BUFFERS | back to summary |
|---|---|
| public static final int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS Accepted by the | |
| GL_ATOMIC_COUNTER_BUFFER | back to summary |
|---|---|
| public static final int GL_ATOMIC_COUNTER_BUFFER Accepted by the | |
| GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES | back to summary |
|---|---|
| public static final int GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES Accepted by the | |
| GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS | back to summary |
|---|---|
| public static final int GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS Accepted by the | |
| GL_ATOMIC_COUNTER_BUFFER_BINDING | back to summary |
|---|---|
| public static final int GL_ATOMIC_COUNTER_BUFFER_BINDING Accepted by the | |
| GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE | back to summary |
|---|---|
| public static final int GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE Accepted by the | |
| GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER | back to summary |
|---|---|
| public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER Accepted by the | |
| GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER | back to summary |
|---|---|
| public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER Accepted by the | |
| GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER | back to summary |
|---|---|
| public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER Accepted by the | |
| GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER | back to summary |
|---|---|
| public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER Accepted by the | |
| GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER | back to summary |
|---|---|
| public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER Accepted by the | |
| GL_ATOMIC_COUNTER_BUFFER_SIZE | back to summary |
|---|---|
| public static final int GL_ATOMIC_COUNTER_BUFFER_SIZE Accepted by the | |
| GL_ATOMIC_COUNTER_BUFFER_START | back to summary |
|---|---|
| public static final int GL_ATOMIC_COUNTER_BUFFER_START Accepted by the | |
| GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS | back to summary |
|---|---|
| public static final int GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS Accepted by the | |
| GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE | back to summary |
|---|---|
| public static final int GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE Accepted by the | |
| GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS | back to summary |
|---|---|
| public static final int GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS Accepted by the | |
| GL_MAX_COMBINED_ATOMIC_COUNTERS | back to summary |
|---|---|
| public static final int GL_MAX_COMBINED_ATOMIC_COUNTERS Accepted by the | |
| GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS | back to summary |
|---|---|
| public static final int GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS Accepted by the | |
| GL_MAX_FRAGMENT_ATOMIC_COUNTERS | back to summary |
|---|---|
| public static final int GL_MAX_FRAGMENT_ATOMIC_COUNTERS Accepted by the | |
| GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS | back to summary |
|---|---|
| public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS Accepted by the | |
| GL_MAX_GEOMETRY_ATOMIC_COUNTERS | back to summary |
|---|---|
| public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTERS Accepted by the | |
| GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS | back to summary |
|---|---|
| public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS Accepted by the | |
| GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS | back to summary |
|---|---|
| public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS Accepted by the | |
| GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS | back to summary |
|---|---|
| public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS Accepted by the | |
| GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS | back to summary |
|---|---|
| public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS Accepted by the | |
| GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS | back to summary |
|---|---|
| public static final int GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS Accepted by the | |
| GL_MAX_VERTEX_ATOMIC_COUNTERS | back to summary |
|---|---|
| public static final int GL_MAX_VERTEX_ATOMIC_COUNTERS Accepted by the | |
| GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX | back to summary |
|---|---|
| public static final int GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX Accepted by the | |
| GL_UNSIGNED_INT_ATOMIC_COUNTER | back to summary |
|---|---|
| public static final int GL_UNSIGNED_INT_ATOMIC_COUNTER Returned in | |
| ARBShaderAtomicCounters | back to summary |
|---|---|
| protected ARBShaderAtomicCounters() | |
| glGetActiveAtomicCounterBufferi | back to summary | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| public static int glGetActiveAtomicCounterBufferi(int program, int bufferIndex, int pname) Obtains information about the set of active atomic counter buffers for a program.
| |||||||||
| glGetActiveAtomicCounterBufferiv | back to summary | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| public static void glGetActiveAtomicCounterBufferiv(int program, int bufferIndex, int pname, IntBuffer params) Obtains information about the set of active atomic counter buffers for a program.
| |||||||||
| glGetActiveAtomicCounterBufferiv | back to summary |
|---|---|
| public static void glGetActiveAtomicCounterBufferiv(int program, int bufferIndex, int pname, int[] params) Array version of: | |
| nglGetActiveAtomicCounterBufferiv | back to summary |
|---|---|
| public static void nglGetActiveAtomicCounterBufferiv(int program, int bufferIndex, int pname, long params) Unsafe version of: | |