#include <ShaderFactory.h>
Public Member Functions | |
| Shader * | newShader (const std::string &type, const Shader::Parameters &) const |
| Create a shader of the specified type. | |
Static Public Member Functions | |
| static ShaderFactories & | instance () |
| Construct a singleton instance if required. | |
| static void | del () |
| Delete the instance. | |
Private Types | |
|
typedef std::map< std::string, iShaderFactory * > | FactoryMap |
| STL map of shader factory pointers. | |
Private Attributes | |
| FactoryMap | m_factories |
| Map of shader factory pointers keyed on type string. | |
Static Private Attributes | |
| static ShaderFactories * | m_instance = 0 |
| Pointer to the singleton instance of ShaderFactories. | |
Requests for new shaders of a given type are passed here, and shader objects are returned.
| ShaderFactories & Mercator::ShaderFactories::instance | ( | ) | [static] |
Construct a singleton instance if required.
References m_instance.
| Shader * Mercator::ShaderFactories::newShader | ( | const std::string & | type, | |
| const Shader::Parameters & | params | |||
| ) | const |
Create a shader of the specified type.
| type | a string giving the type of shader. | |
| params | a map of the parameters for the shader |
References m_factories.
1.5.6