CG_Labs  2021.2
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ShaderProgramManager Class Reference

#include <ShaderProgramManager.hpp>

Classes

struct  SelectedProgram
 

Public Types

using ProgramData = std::map< ShaderType, std::string >
 

Public Member Functions

 ~ShaderProgramManager ()
 
void CreateAndRegisterProgram (char const *const program_name, ProgramData const &program_data, GLuint &program)
 
void CreateAndRegisterComputeProgram (char const *const program_name, std::string const &filename, GLuint &program)
 
bool ReloadAllPrograms ()
 
SelectedProgram SelectProgram (std::string const &label, std::int32_t &program_index)
 

Private Types

using ProgramEntry = std::pair< GLuint &, ProgramData >
 

Private Member Functions

void ProcessProgram (std::size_t program_index)
 

Private Attributes

std::vector< ProgramEntryprogram_entries
 
std::vector< char const * > program_names
 

Member Typedef Documentation

◆ ProgramData

using ShaderProgramManager::ProgramData = std::map<ShaderType, std::string>

◆ ProgramEntry

using ShaderProgramManager::ProgramEntry = std::pair<GLuint&, ProgramData>
private

Constructor & Destructor Documentation

◆ ~ShaderProgramManager()

ShaderProgramManager::~ShaderProgramManager ( )

Member Function Documentation

◆ CreateAndRegisterComputeProgram()

void ShaderProgramManager::CreateAndRegisterComputeProgram ( char const *const  program_name,
std::string const &  filename,
GLuint &  program 
)

◆ CreateAndRegisterProgram()

void ShaderProgramManager::CreateAndRegisterProgram ( char const *const  program_name,
ProgramData const &  program_data,
GLuint &  program 
)

◆ ProcessProgram()

void ShaderProgramManager::ProcessProgram ( std::size_t  program_index)
private

◆ ReloadAllPrograms()

bool ShaderProgramManager::ReloadAllPrograms ( )

◆ SelectProgram()

ShaderProgramManager::SelectedProgram ShaderProgramManager::SelectProgram ( std::string const &  label,
std::int32_t &  program_index 
)

Member Data Documentation

◆ program_entries

std::vector<ProgramEntry> ShaderProgramManager::program_entries
private

◆ program_names

std::vector<char const*> ShaderProgramManager::program_names
private

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