globjects icon indicating copy to clipboard operation
globjects copied to clipboard

Add support for shader subroutines

Open j-o opened this issue 6 years ago • 2 comments

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)

j-o avatar Sep 07 '17 09:09 j-o

Sounds reasonable. Do you have a preliminary implementation?

scheibel avatar Sep 11 '17 08:09 scheibel

Nope, haven't started this.

j-o avatar Sep 13 '17 08:09 j-o