Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for shader subroutines #355

Open
j-o opened this issue Sep 7, 2017 · 2 comments
Open

Add support for shader subroutines #355

j-o opened this issue Sep 7, 2017 · 2 comments

Comments

@j-o
Copy link

j-o commented Sep 7, 2017

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)

@scheibel
Copy link
Member

Sounds reasonable. Do you have a preliminary implementation?

@j-o
Copy link
Author

j-o commented Sep 13, 2017

Nope, haven't started this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants