GLUNIFORMSUBROUTINES(3G)
okay so welcome to GLUNIFORMSUBROUTINES(3G), bestie β this is the page about loading active subroutine uniforms, and yes itβs giving very βgraphics pipeline main characterβ energy π
β¨
πΈ NAME πΈ
glUniformSubroutines β load active subroutine uniforms. Thatβs the whole quest, no cap π
β¨ C SPECIFICATION β¨
void glUniformSubroutinesuiv(GLenum shadertype, GLsizei count,
const GLuint *indices);
π¦ PARAMETERS π¦
shadertypeβ tells you which shader stage to query for the subroutine uniform index. It must be one ofGL_VERTEX_SHADER,GL_TESS_CONTROL_SHADER,GL_TESS_EVALUATION_SHADER,GL_GEOMETRY_SHADERorGL_FRAGMENT_SHADER. Like, those are the only accepted vibes here πcountβ the number of uniform indices stored inindices. Literally how many weβre working with π’indicesβ the address of an array holding the indices to load into the shader subroutine variables. This is the little array carrying the lore π
π DESCRIPTION π
glUniformSubroutines loads all active subroutine uniforms for shader stage shadertype of the current program with subroutine indices from indices, storing indices[i] into the uniform at location i.
count must be equal to the value of GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS for the program currently in use at shader stage shadertype. Thatβs a hard requirement, not a casual suggestion, bestie π
Furthermore, all values in indices must be less than the value of GL_ACTIVE_SUBROUTINES for the shader stage. So yeah β vibe check those values before you send them π
π ERRORS π
GL_INVALID_OPERATIONis generated if no program object is current. Not me showing up with no current program πGL_INVALID_VALUEis generated ifcountis not equal to the value ofGL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONSfor the shader stageshadertypeof the current program.GL_INVALID_VALUEis generated if any value inindicesisgeaterthan or equal to the value ofGL_ACTIVE_SUBROUTINESfor the shader stageshadertypeof the current program. (Yes,geaterβ preserving the original spelling exactly, because rules are rules π«Ά)GL_INVALID_ENUMis generated ifshadertypeis not one of the accepted values.
π₯ ASSOCIATED GETS π₯
glGetProgramStage()with argumentGL_ACTIVE_SUBROUTINESglGetProgramStage()with argumentGL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS
π VERSION SUPPORT π
The support grid is literally this, bestie:
- Function / Feature Name:
glUniformSubroutinesuiv - OpenGL Version columns:
2.0,2.1,3.0,3.1,3.2,3.3,4.0,4.1,4.2,4.3,4.4,4.5 glUniformSubroutinesuiventry:-for2.0,2.1,3.0,3.1,3.2,3.3; β for4.0,4.1,4.2,4.3,4.4,4.5
So the little checkmark era starts at 4.0 and keeps slaying through 4.5 β¨
π§ SEE ALSO π§
glGetProgram()glGetActiveSubroutineUniform()glGetActiveSubroutineUniformName()glGetProgramStage()
π COPYRIGHT π
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 π
Copyright Β© 2010-2014 Khronos Group.
cute sign-off time: source is [FIXME: source], date is 08/09/2021, and the manual name is GLUNIFORMSUBROUTINES(3G) β periodt ππ¦
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms