Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SP::SPShaderManager Class Reference
Inheritance diagram for SP::SPShaderManager:
Inheritance graph


struct  PassInfo
struct  ShaderInfo

Public Member Functions

std::shared_ptr< SPShadergetSPShader (const std::string &name)
void loadSPShaders (const std::string &directory_name)
void addSPShader (const std::string &name, std::shared_ptr< SPShader > shader)
void unloadAll ()
void initAll ()
void removeUnusedShaders ()
void setOfficialShaders ()

Static Public Member Functions

static SPShaderManagerget ()
static void destroy ()
static void addPrefilledTexturesToShader (SPShader *s, const std::vector< std::tuple< std::string, std::string, bool, SamplerType > > &t, RenderPass rp)

Private Types

typedef std::vector< std::pair< std::string, std::function< void(SPUniformAssigner *)> > > UniformAssigners

Private Member Functions

std::string getShaderFullPath (const std::string &name)
void loadPassInfo (const XMLNode *pass, PassInfo &pi)
void loadEachShader (const std::string &file_name)
std::shared_ptr< SPShaderbuildSPShader (const ShaderInfo &si, const std::array< PassInfo, 2 > &pi, const UniformAssigners &ua, bool skinned)

Private Attributes

std::unordered_map< std::string, std::shared_ptr< SPShader > > m_shaders
std::vector< std::shared_ptr< SPShader > > m_official_shaders
std::unordered_map< std::string, SamplerType > m_official_sampler_types
std::unordered_map< std::string, std::function< void(SPUniformAssigner *)> > m_official_uniform_assigner_functions
std::unordered_map< std::string, std::function< void()> > m_official_use_functions
std::unordered_map< std::string, std::function< void()> > m_official_unuse_functions
std::string m_shader_directory

Static Private Attributes

static SPShaderManagerm_spsm = NULL

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