cginternals / cginternals/globjects

Add support for shader subroutines

Open
#355 2 comments 0 reactions 0 assignees View on GitHub
decision required feature request
Dominant language
C++
Stars
563
Forks
59
PR merge metrics
No merged PRs in 30d

Description

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`)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.