See https://www.khronos.org/opengl/wiki/Shader_Subroutine
glUniformSubroutinesuiv must be called after every call to glUseProgram to (re-)activate subroutines. Since subroutines have not much in common with normal uniforms, I suggest a special integration: store a list of selected subroutine indices by shader type inside Program, expose corresponding get/set functions and call glUniformSubroutinesuiv in Program::use() if the list is non-empty. (Plus the same for ProgramPipeline)
See https://www.khronos.org/opengl/wiki/Shader_Subroutine
glUniformSubroutinesuivmust be called after every call toglUseProgramto (re-)activate subroutines. Since subroutines have not much in common with normal uniforms, I suggest a special integration: store a list of selected subroutine indices by shader type insideProgram, expose corresponding get/set functions and callglUniformSubroutinesuivinProgram::use()if the list is non-empty. (Plus the same forProgramPipeline)