GLGETACTIVEATOMICCOU(3G)

πŸ’… GLGETACTIVEATOMICCOU(3G) β€” like, the whole vibe

okay bestie, welcome to the 3G manual page for glGetActiveAtomicCounterBufferiv, and yes the page header really does abbreviate it to GLGETACTIVEATOMICCOU because man page titles have a character budget and honestly they chose violence. 🫢


✨ NAME ✨

glGetActiveAtomicCounterBufferiv β€” retrieve information about the set of active atomic counter buffers for a program. that's it, that's the whole job, and it does it iconically. πŸŽ€


🌸 C SPECIFICATION 🌸

void glGetActiveAtomicCounterBufferiv(GLuint program,
                                      GLuint bufferIndex, GLenum pname,
                                      GLint *params);

πŸ¦‹ PARAMETERS πŸ¦‹

  • program β€” the name of a program object from which to retrieve information. it's giving "which program are we gossiping about". πŸ‘€
  • bufferIndex β€” specifies index of an active atomic counter buffer. bestie, this is a position, not a name, so mind your indexing.
  • pname β€” specifies which parameter of the atomic counter buffer to retrieve. this is the "okay but what do you wanna know" argument.
  • params β€” specifies the address of a variable into which to write the retrieved information. the answer gets yeeted in here. ✨

πŸ’– 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. and here's the cute part: 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, and this function will still talk to you. lowkey forgiving of it honestly. πŸ₯Ί

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(). so yes, you do have to do the homework first. πŸ™ˆ

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. no half-written chaos, no crumbs left behind, we love a clean exit. ✨


πŸŽ€ so what do you actually get back, per pname πŸŽ€

  • 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, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER then a boolean value indicating whether the atomic counter buffer identified by bufferIndex is referenced by the vertex, tessellation control, tessellation evaluation, geometry, fragment or compute processing stages of program, respectively, is returned. so, like, a yes/no per stage. βœ…

⭐ NOTES ⭐

  • glGetActiveAtomicCounterBufferiv is available only if the GL version is 4.2 or higher.
  • GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER is available only if the GL version is 4.3 or higher.
fr fr check your version first bestie, the vibe check here is literally "is this token even legal on my context". πŸ’€

πŸ”₯ 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.
not me generating a GL_INVALID_VALUE because I forgot to link first 😭 the error IS the consequences of your actions, diva.

🧚 VERSION SUPPORT 🧚

the original page lays this out as a big grid, and since we're in a terminal, here's the tea in list form, unedited in content:

  • Function / Feature Name: glGetActiveAtomicCounterBufferiv
  • OpenGL 2.0: - (nope)
  • OpenGL 2.1: - (nope)
  • OpenGL 3.0: - (nope)
  • OpenGL 3.1: - (nope)
  • OpenGL 3.2: - (nope)
  • OpenGL 3.3: - (nope)
  • OpenGL 4.0: - (nope)
  • OpenGL 4.1: - (nope)
  • OpenGL 4.2: βœ” (slay)
  • OpenGL 4.3: βœ” (slay)
  • OpenGL 4.4: βœ” (slay)
  • OpenGL 4.5: βœ” (slay)

so it's a 4.2-and-up girly and it ate from that point on. πŸ‘‘


🌈 SEE ALSO 🌈

  • glGetProgram()
  • glGetActiveSubroutineUniform()
  • glGetActiveSubroutineUniformName()
  • glGetUniformLocation()

go read those too, iykyk 🫢


Copyright Β© 2011-2014 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/.

Copyright Β© 2011-2014 Khronos Group.


πŸ’œ and that's the page, bestie. this was [FIXME: source], dated 08/09/2021, filed under GLGETACTIVEATOMICCOU(3G) β€” the FIXMEs are load-bearing and honestly, iconic. periodt. πŸ’…
πŸ“¦ where this page comes from