GLGETUNIFORMSUBROUTI(3G)

🌸 NAME 🌸

okay so welcome to the GLGETUNIFORMSUBROUTI(3G) manual page β€” yes, the header has a [FIXME: manual] tag, iconic. Anyway, bestie, the actual NAME situation is:

  • glGetUniformSubroutine β€” retrieve the value of a subroutine uniform of a given shader stage of the current program. πŸ’…βœ¨

🧾 C SPECIFICATION 🧾

the C signature is literally this, no cap:

void glGetUniformSubroutineuiv(GLenum shadertype, GLint location,
                               GLuint *values);

πŸŽ€ PARAMETERS πŸŽ€

  • shadertype β€” specifies the shader stage from which to query for subroutine uniform index. <hotpink>bestie, it must be one of</hotpink> GL_VERTEX_SHADER, GL_TESS_CONTROL_SHADER, GL_TESS_EVALUATION_SHADER, GL_GEOMETRY_SHADER or GL_FRAGMENT_SHADER.
  • location β€” specifies the location of the subroutine uniform. πŸ“
  • values β€” specifies the address of a variable to receive the value or values of the subroutine uniform. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here’s the vibe: glGetUniformSubroutine retrieves the value of the subroutine uniform at location location for shader stage shadertype of the current program.

location must be less than the value of GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS for the shader currently in use at shader stage shadertype. The value of the subroutine uniform is returned in values. ✨


πŸ’€ ERRORS πŸ’€

  • GL_INVALID_ENUM is generated if shadertype is not one of the accepted values.
  • GL_INVALID_VALUE is generated if location is greater than or equal to the value of GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS for the shader currently in use at shader stage shadertype.
  • GL_INVALID_OPERATION is generated if no program is active. 😭

πŸ‘‘ VERSION SUPPORT πŸ‘‘

OpenGL Version check for glGetUniformSubroutineuiv β€” feature name glGetUniformSubroutineuiv, bestie:

  • 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: βœ”

the check marks are eating, fr fr 🌈⭐


🌈 SEE ALSO 🌈

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

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.


that’s the whole page, bestie β€” the footer/source tag is [FIXME: source], and the date on it is 08/09/2021 πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from