GLGETACTIVEUNIFORMNA(3G)

๐Ÿ’– NAME ๐Ÿ’–

okay so bestie, welcome to GLGETACTIVEUNIFORMNA(3G) โ€” the manual page for glGetActiveUniformName, which queries the name of an active uniform. โœจ

โœจ C SPECIFICATION โœจ

void glGetActiveUniformName(GLuint program, GLuint uniformIndex,
                            GLsizei bufSize, GLsizei *length,
                            GLchar *uniformName);

๐ŸŽ€ PARAMETERS ๐ŸŽ€

  • program โ€” specifies the program containing the active uniform index uniformIndex. That's the main character here. ๐Ÿ‘‘
  • uniformIndex โ€” specifies the index of the active uniform whose name to query. iykyk. ๐Ÿ”ฅ
  • bufSize โ€” specifies the size of the buffer, in units of GLchar, of the buffer whose address is specified in uniformName. They really said "units of GLchar" and meant it. ๐Ÿ’…
  • length โ€” specifies the address of a variable that will receive the number of characters that were or would have been written to the buffer addressed by uniformName. It's giving "receipts, but for character counts." ๐Ÿงพ
  • uniformName โ€” specifies the address of a buffer into which the GL will place the name of the active uniform at uniformIndex within program. The GL is literally putting the name there. ๐Ÿซถ

๐ŸŒธ DESCRIPTION ๐ŸŒธ

glGetActiveUniformName returns the name of the active uniform at uniformIndex within program. If uniformName is not NULL, up to bufSize characters (including a nul-terminator) will be written into the array whose address is specified by uniformName. If length is not NULL, the number of characters that were (or would have been) written into uniformName (not including the nul-terminator) will be placed in the variable whose address is specified in length. If length is NULL, no length is returned. ๐Ÿ’–

The length of the longest uniform name in program is given by the value of GL_ACTIVE_UNIFORM_MAX_LENGTH, which can be queried with glGetProgram(). iconic little lookup behavior, no cap. ๐Ÿ”

If glGetActiveUniformName is not successful, nothing is written to length or uniformName. Not even a little. ๐Ÿ˜ญ

program must be the name of a program for which the command glLinkProgram() has been issued in the past. It is not necessary for program to have been linked successfully. The link could have failed because the number of active uniforms exceeded the limit. bestie, it can be a failed-link era program and still be valid for this call. ๐Ÿ’€

uniformIndex must be an active uniform index of the program program, in the range zero to the value of GL_ACTIVE_UNIFORMS minus one. The value of GL_ACTIVE_UNIFORMS can be queried with glGetProgram(). math is math. ๐Ÿงฎ

๐Ÿšจ ERRORS ๐Ÿšจ

  • GL_INVALID_VALUE is generated if uniformIndex is greater than or equal to the value of GL_ACTIVE_UNIFORMS. nope, out of range, not today. ๐Ÿ™ˆ
  • GL_INVALID_VALUE is generated if bufSize is negative. negative buffer size is a vibe check failure, fr fr. ๐Ÿ’…
  • GL_INVALID_VALUE is generated if program is not the name of a program object for which glLinkProgram() has been issued. like, did you even link, bestie? ๐Ÿ˜ญ

๐ŸŒˆ VERSION SUPPORT ๐ŸŒˆ

Version support for the function/feature name glGetActiveUniformName:

  • OpenGL 2.0: -
  • OpenGL 2.1: -
  • OpenGL 3.0: -
  • OpenGL 3.1: โœ”
  • OpenGL 3.2: โœ”
  • OpenGL 3.3: โœ”
  • OpenGL 4.0: โœ”
  • OpenGL 4.1: โœ”
  • OpenGL 4.2: โœ”
  • OpenGL 4.3: โœ”
  • OpenGL 4.4: โœ”
  • OpenGL 4.5: โœ”

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

  • glGetActiveUniform()
  • glGetUniformIndices()
  • glGetProgram()
  • glLinkProgram()

Copyright ยฉ 2010-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 ยฉ 2010-2014 Khronos Group


okay bestie, thatโ€™s the whole page ๐Ÿ’… โ€” source/version [FIXME: source], date 08/09/2021, and the manual tag is GLGETACTIVEUNIFORMNA(3G). periodt ๐Ÿ’–

๐Ÿ“ฆ where this page comes from