globjects
globjects copied to clipboard
Add support for shader subroutines
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
)
Sounds reasonable. Do you have a preliminary implementation?
Nope, haven't started this.