OGLplus (0.52.0) a C++ wrapper for OpenGL

oglplus::UniformSubroutines Class Reference

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.
 
UniformSubroutinesAssign (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...
 

Detailed Description

Encapsulates the uniform subroutine setting operations.

Requires OpenGL 4.0 or the GL_ARB_shader_subroutine extension.

Member Function Documentation

void oglplus::UniformSubroutines::Apply ( const Preset preset)

Applies the setting from a preset without changing the current setting.

Note
Only presets from the same instance of UniformSubroutines that saved them can be loaded or applied.
See Also
Preset
Save
Load
void oglplus::UniformSubroutines::Apply ( void  )

Applies all changes made by Assign.

See Also
Assign
UniformSubroutines& oglplus::UniformSubroutines::Assign ( const SubroutineUniform uniform,
const Subroutine subroutine 
)

Assigns the subroutine to the subroutine uniform.

Note
This function does not apply the changes to the actual uniform variables in the stage of the program. Use Apply function to do this after the subroutines are assigned.
See Also
Apply

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.

Note
Only presets from the same instance of UniformSubroutines that saved them can be loaded or applied.
See Also
Preset
Apply
Save
Preset oglplus::UniformSubroutines::Save ( void  )

Saves the current setting of subroutine uniforms into a preset.

See Also
Preset
Apply
Load

The documentation for this class was generated from the following file:

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).