-
Notifications
You must be signed in to change notification settings - Fork 59
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
Labels
Projects
Comments
Sounds reasonable. Do you have a preliminary implementation? |
Nope, haven't started this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://www.khronos.org/opengl/wiki/Shader_Subroutine
glUniformSubroutinesuiv
must be called after every call toglUseProgram
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 insideProgram
, expose corresponding get/set functions and callglUniformSubroutinesuiv
inProgram::use()
if the list is non-empty. (Plus the same forProgramPipeline
)The text was updated successfully, but these errors were encountered: