Class ARBShaderAtomicCounters
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.0. Promoted to core in OpenGL 4.2.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAccepted by thepnameparameter of GetProgramiv.static final intAccepted by thetargetparameter of BindBufferBase and BindBufferRange.static final intAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.static final intAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.static final intAccepted by thepnameparameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, GetInteger64i_v, GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, GetDoublev, and GetActiveAtomicCounterBufferiv.static final intAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.static final intAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.static final intAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.static final intAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.static final intAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.static final intAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.static final intAccepted by thepnameparameter of GetIntegeri_64v.static final intAccepted by thepnameparameter of GetIntegeri_64v.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.static final intAccepted by thepnameparameter of GetActiveUniformsiv.static final intReturned inparamsby GetActiveUniform and GetActiveUniformsiv. -
Method Summary
Modifier and TypeMethodDescriptionstatic intglGetActiveAtomicCounterBufferi(int program, int bufferIndex, int pname) Obtains information about the set of active atomic counter buffers for a program.static voidglGetActiveAtomicCounterBufferiv(int program, int bufferIndex, int pname, int[] params) Array version of:GetActiveAtomicCounterBufferivstatic voidglGetActiveAtomicCounterBufferiv(int program, int bufferIndex, int pname, IntBuffer params) Obtains information about the set of active atomic counter buffers for a program.static voidnglGetActiveAtomicCounterBufferiv(int program, int bufferIndex, int pname, long params) Unsafe version of:GetActiveAtomicCounterBufferiv
-
Field Details
-
GL_ATOMIC_COUNTER_BUFFER
public static final int GL_ATOMIC_COUNTER_BUFFERAccepted by thetargetparameter of BindBufferBase and BindBufferRange.- See Also:
-
GL_ATOMIC_COUNTER_BUFFER_BINDING
public static final int GL_ATOMIC_COUNTER_BUFFER_BINDINGAccepted by thepnameparameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, GetInteger64i_v, GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, GetDoublev, and GetActiveAtomicCounterBufferiv.- See Also:
-
GL_ATOMIC_COUNTER_BUFFER_START
public static final int GL_ATOMIC_COUNTER_BUFFER_STARTAccepted by thepnameparameter of GetIntegeri_64v.- See Also:
-
GL_ATOMIC_COUNTER_BUFFER_SIZE
public static final int GL_ATOMIC_COUNTER_BUFFER_SIZEAccepted by thepnameparameter of GetIntegeri_64v.- See Also:
-
GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE
public static final int GL_ATOMIC_COUNTER_BUFFER_DATA_SIZEAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.- See Also:
-
GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS
public static final int GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERSAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.- See Also:
-
GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES
public static final int GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICESAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.- See Also:
-
GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER
public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADERAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.- See Also:
-
GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER
public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADERAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.- See Also:
-
GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER
public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADERAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.- See Also:
-
GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER
public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADERAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.- See Also:
-
GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER
public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADERAccepted by thepnameparameter of GetActiveAtomicCounterBufferiv.- See Also:
-
GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS
public static final int GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERSAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS
public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERSAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS
public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERSAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS
public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERSAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS
public static final int GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERSAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS
public static final int GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERSAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_MAX_VERTEX_ATOMIC_COUNTERS
public static final int GL_MAX_VERTEX_ATOMIC_COUNTERSAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS
public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTERSAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS
public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERSAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_MAX_GEOMETRY_ATOMIC_COUNTERS
public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTERSAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_MAX_FRAGMENT_ATOMIC_COUNTERS
public static final int GL_MAX_FRAGMENT_ATOMIC_COUNTERSAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_MAX_COMBINED_ATOMIC_COUNTERS
public static final int GL_MAX_COMBINED_ATOMIC_COUNTERSAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE
public static final int GL_MAX_ATOMIC_COUNTER_BUFFER_SIZEAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS
public static final int GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGSAccepted by thepnameparameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
-
GL_ACTIVE_ATOMIC_COUNTER_BUFFERS
public static final int GL_ACTIVE_ATOMIC_COUNTER_BUFFERSAccepted by thepnameparameter of GetProgramiv.- See Also:
-
GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX
public static final int GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEXAccepted by thepnameparameter of GetActiveUniformsiv.- See Also:
-
GL_UNSIGNED_INT_ATOMIC_COUNTER
public static final int GL_UNSIGNED_INT_ATOMIC_COUNTERReturned inparamsby GetActiveUniform and GetActiveUniformsiv.- See Also:
-
-
Method Details
-
nglGetActiveAtomicCounterBufferiv
public static void nglGetActiveAtomicCounterBufferiv(int program, int bufferIndex, int pname, long params) Unsafe version of:GetActiveAtomicCounterBufferiv -
glGetActiveAtomicCounterBufferiv
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.- Parameters:
program- the name of a program object for which the commandLinkProgramhas been issued in the pastbufferIndex- the index of an active atomic counter bufferpname- the parameter to query. One of:params- a buffer in which to place the returned value
-
glGetActiveAtomicCounterBufferi
public static int glGetActiveAtomicCounterBufferi(int program, int bufferIndex, int pname) Obtains information about the set of active atomic counter buffers for a program.- Parameters:
program- the name of a program object for which the commandLinkProgramhas been issued in the pastbufferIndex- the index of an active atomic counter bufferpname- the parameter to query. One of:
-
glGetActiveAtomicCounterBufferiv
public static void glGetActiveAtomicCounterBufferiv(int program, int bufferIndex, int pname, int[] params) Array version of:GetActiveAtomicCounterBufferiv
-