Mercator
Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | Static Private Attributes | List of all members
Mercator::ShaderFactories Class Reference

Class which manages all the shader factories available. More...

#include <ShaderFactory.h>

Public Member Functions

ShadernewShader (const std::string &type, const Shader::Parameters &) const
 Create a shader of the specified type. More...
 

Static Public Member Functions

static ShaderFactoriesinstance ()
 Construct a singleton instance if required. More...
 
static void del ()
 Delete the instance.
 

Private Types

typedef std::map< std::string, ShaderKit * > 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 ShaderFactoriesm_instance = 0
 Pointer to the singleton instance of ShaderFactories.
 

Detailed Description

Class which manages all the shader factories available.

Requests for new shaders of a given type are passed here, and shader objects are returned.

Member Function Documentation

ShaderFactories & Mercator::ShaderFactories::instance ( )
static

Construct a singleton instance if required.

Returns
a reference to the instance.
Shader * Mercator::ShaderFactories::newShader ( const std::string &  type,
const Shader::Parameters params 
) const

Create a shader of the specified type.

Parameters
typea string giving the type of shader.
paramsa map of the parameters for the shader
Returns
a pointer to the new shader object

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