Encapsulates the uniform subroutine setting operations. More...
#include </home/chochlik/devel/oglplus/include/oglplus/uniform_subroutines.hpp>
Classes | |
class | Preset |
This type stores a setting of the whole set of subroutine uniforms. More... | |
Public Member Functions | |
UniformSubroutines (ProgramName program, ShaderType stage) | |
Constructs a uniform subroutine setter for a stage of a program . | |
UniformSubroutines & | Assign (const SubroutineUniform &uniform, const Subroutine &subroutine) |
Assigns the subroutine to the subroutine uniform . More... | |
Preset | Save (void) |
Saves the current setting of subroutine uniforms into a preset. More... | |
void | Load (const Preset &preset) |
Loads the setting of subroutine uniforms from a preset . More... | |
void | Apply (const Preset &preset) |
Applies the setting from a preset without changing the current setting. More... | |
void | Apply (void) |
Applies all changes made by Assign. More... | |
Encapsulates the uniform subroutine setting operations.
Requires OpenGL 4.0 or the GL_ARB_shader_subroutine extension.
void oglplus::UniformSubroutines::Apply | ( | const Preset & | preset | ) |
Applies the setting from a preset without changing the current setting.
void oglplus::UniformSubroutines::Apply | ( | void | ) |
Applies all changes made by Assign.
UniformSubroutines& oglplus::UniformSubroutines::Assign | ( | const SubroutineUniform & | uniform, |
const Subroutine & | subroutine | ||
) |
Assigns the subroutine
to the subroutine uniform
.
References oglplus::ProgVarLoc< VarTag >::IsActive(), oglplus::ProgVarLoc< VarTag >::Location(), and oglplus::ProgVarLoc< VarTag >::Program().
void oglplus::UniformSubroutines::Load | ( | const Preset & | preset | ) |
Loads the setting of subroutine uniforms from a preset
.
Preset oglplus::UniformSubroutines::Save | ( | void | ) |