#include
<oglplus/uniform_subroutines.hpp>
template <> class ProgVarLocOps<tag::Subroutine> { public: static GLint GetLocation( ProgramName program, ShaderType stage, StrCRef identifier, bool active_only ); GLint GetLocation( ProgramName program, StrCRef identifier, bool active_only ) const; ShaderType Stage(void) const; };
Finds the location of the subroutine specified by |
|
Returns this subroutine's program stage. |
template <> class ProgVarLocOps<tag::SubroutineUniform> { public: static GLint GetLocation( ProgramName program, ShaderType stage, StrCRef identifier, bool active_only ); GLint GetLocation( ProgramName program, StrCRef identifier, bool active_only ) const; ShaderType Stage(void) const; };
Finds the location of the subroutine uniform specified by |
|
Returns this subroutine uniforms's program stage. |
ProgVar
template <> class ProgVar<tag::ImplicitSel, tag::Subroutine, tag::NoTypecheck, void> : public ProgVarLoc<tag::Subroutine> { public: ProgVar(ProgVarLoc<tag::Subroutine> pvloc); ProgVar(ProgramName program, ShaderType stage, StrCRef identifier); ProgVar( ProgramName program, ShaderType stage, StrCRef identifier, bool active_only ); };
template <> class ProgVar<tag::ImplicitSel, tag::SubroutineUniform, tag::NoTypecheck, void> : public ProgVarLoc<tag::SubroutineUniform> { public: ProgVar(ProgVarLoc<tag::SubroutineUniform> pvloc); ProgVar(ProgramName program, ShaderType stage, StrCRef identifier); ProgVar( ProgramName program, ShaderType stage, StrCRef identifier, bool active_only ); };
typedef ProgVar< tag::ImplicitSel, tag::Subroutine, tag::NoTypecheck, void > Subroutine;
typedef ProgVar< tag::ImplicitSel, tag::SubroutineUniform, tag::NoTypecheck, void > SubroutineUniform;
class UniformSubroutines { public: UniformSubroutines(ProgramName program, ShaderType stage); UniformSubroutines& Assign( const SubroutineUniform& uniform, const Subroutine& subroutine ); void Apply(void); class Preset { public: Preset(Preset&&); }; Preset Save(void); void Load(const Preset& preset); void Apply(const Preset& preset); };
Constructs a uniform subroutine manager for a |
||||
Remembers the assignment of a
|
||||
Applies all changes made by |
||||
|
||||
Saves the current setting of subroutine uniforms into a preset. |
||||
Loads the setting of subroutine uniforms from a
|
||||
Applies the setting from a preset without changing the current setting
of
|