SimpleGL  1.1.0
A framework for platform independent rendering
Public Member Functions | List of all members
sgl::ShaderModuleManager Class Reference

This class provides methods for managing shader modules. More...

#include <manager_vk.hpp>

Inheritance diagram for sgl::ShaderModuleManager:
sgl::Manager< ShaderModule >

Public Member Functions

void remove (std::string name) override
 Removes and disposes a shader module from the storage. More...
 
void clear () override
 Removes all shader modules and disposes them. More...
 
ShaderModuleloadShaderModule (std::string path, std::string name, ShaderStageBit stageBit)
 Loads a shader module from a binary file and stores it. More...
 
- Public Member Functions inherited from sgl::Manager< ShaderModule >
 ~Manager (void)
 Deletes a manager and disposes all managed objects. More...
 
void put (std::string name, ShaderModule *value)
 Stores a object with specified name. More...
 
ShaderModuleget (std::string name)
 Gets a managed object from the storage. More...
 

Additional Inherited Members

- Protected Member Functions inherited from sgl::Manager< ShaderModule >
 Manager (void)
 Initializes a new manager. More...
 
- Protected Attributes inherited from sgl::Manager< ShaderModule >
std::map< std::string, ShaderModule * > objects
 Contains the objects to manage. More...
 

Detailed Description

This class provides methods for managing shader modules.

Definition at line 27 of file manager_vk.hpp.

Member Function Documentation

void sgl::ShaderModuleManager::clear ( )
overridevirtual

Removes all shader modules and disposes them.

Reimplemented from sgl::Manager< ShaderModule >.

Definition at line 30 of file manager_vk.cpp.

ShaderModule * sgl::ShaderModuleManager::loadShaderModule ( std::string  path,
std::string  name,
ShaderStageBit  stageBit 
)

Loads a shader module from a binary file and stores it.

Parameters
pathFile path to the shader module binary source.
nameThe name of the shader module.
stageBitThe shader stage flag bit. Either VERTEX_BIT or FRAGMENT_BIT.
Returns
The loaded shader module.

Definition at line 41 of file manager_vk.cpp.

void sgl::ShaderModuleManager::remove ( std::string  name)
overridevirtual

Removes and disposes a shader module from the storage.

Parameters
nameThe name of the shader module.

Reimplemented from sgl::Manager< ShaderModule >.

Definition at line 21 of file manager_vk.cpp.


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