Mercator::ShaderFactories Class Reference

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

#include <ShaderFactory.h>

List of all members.

Public Member Functions

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

Static Public Member Functions

static ShaderFactoriesinstance ()
 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 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.

References m_instance.

Shader * Mercator::ShaderFactories::newShader ( const std::string &  type,
const Shader::Parameters params 
) const

Create a shader of the specified type.

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

References m_factories.


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

Generated for Mercator by  doxygen 1.5.6