glGetSubroutineIndex

retrieve the index of a subroutine uniform of a given shader stage within a program

Signature

glGetSubroutineIndex( GLuint ( program ) , GLenum ( shadertype ) , const GLchar *( name ) )-> GLuint
glGetSubroutineIndex( program , shadertype , name ) -> <class 'ctypes.c_uint'>

Parameters

VariablesDescription
program
Specifies the name of the program containing shader stage.
shadertype
Specifies the shader stage from which to query for subroutine uniform index. shadertype must be one of GL_VERTEX_SHADER , GL_TESS_CONTROL_SHADER , GL_TESS_EVALUATION_SHADER , GL_GEOMETRY_SHADER or GL_FRAGMENT_SHADER .
name
Specifies the name of the subroutine uniform whose index to query.