Ocean
|
This class manages all scene graphs. More...
Data Structures | |
class | EngineInformation |
Class holding engine informations. More... | |
Public Types | |
typedef std::vector< std::string > | EngineNames |
Definition of a vector holding engine names. More... | |
Public Member Functions | |
EngineRef | engine (const std::string &engine=std::string(), const Engine::GraphicAPI graphicAPI=Engine::API_DEFAULT) |
Returns a render engine of a specific scene graph. More... | |
EngineNames | engines () |
Returns all names of registered engines. More... | |
Engine::GraphicAPI | supportedGraphicAPI (const std::string &engine) |
Returns the graphic API supported by a specified engine. More... | |
void | release () |
Releases all registered rendering engines. More... | |
Private Types | |
typedef std::multimap< unsigned int, EngineInformation > | EngineMap |
Definition of a map mapping rendering engine priorities to engine information objects. More... | |
Private Member Functions | |
virtual | ~Manager () |
Destructs the manager. More... | |
void | registerEngine (const std::string &engineName, const Engine::CreateCallback &callback, const Engine::GraphicAPI graphicAPI, const unsigned int priority) |
Registers a new render engine. More... | |
bool | unregisterEngine (const std::string &engine) |
Unregisters a render engine. More... | |
void | onRemoveEngine (const Engine *engine) |
Callback function to inform this manager that an engine is not in use anymore. More... | |
Private Attributes | |
EngineMap | engineMap_ |
Registered engines. More... | |
Lock | lock_ |
Manager lock. More... | |
Friends | |
class | Engine |
class | Singleton< Manager > |
Additional Inherited Members | |
Static Public Member Functions inherited from Ocean::Singleton< Manager > | |
static Manager & | get () |
Returns a reference to the unique object. More... | |
Protected Member Functions inherited from Ocean::Singleton< Manager > | |
Singleton ()=default | |
Default constructor. More... | |
This class manages all scene graphs.
Use this manager to receive a specific render engine.
|
private |
Definition of a map mapping rendering engine priorities to engine information objects.
typedef std::vector<std::string> Ocean::Rendering::Manager::EngineNames |
Definition of a vector holding engine names.
|
privatevirtual |
Destructs the manager.
EngineRef Ocean::Rendering::Manager::engine | ( | const std::string & | engine = std::string() , |
const Engine::GraphicAPI | graphicAPI = Engine::API_DEFAULT |
||
) |
Returns a render engine of a specific scene graph.
If no engine name is specified one of the registered engines is returned.
engine | Name of the engine to return |
graphicAPI | Preferred graphic API used for rendering, however there is no guarantee for this API |
EngineNames Ocean::Rendering::Manager::engines | ( | ) |
Returns all names of registered engines.
|
private |
|
private |
Registers a new render engine.
engineName | Name of the render engine |
callback | Callback function which will create the engine object requested |
graphicAPI | Graphic API supported by the engine |
priority | Priority of this engine, if a default engine is requested the engine with higher priority will be retuned |
void Ocean::Rendering::Manager::release | ( | ) |
Releases all registered rendering engines.
Engine::GraphicAPI Ocean::Rendering::Manager::supportedGraphicAPI | ( | const std::string & | engine | ) |
Returns the graphic API supported by a specified engine.
engine | Name of the engine to return the graphic API for |
|
private |
Unregisters a render engine.
engine | Name of the render engine to unregister |
|
friend |
|
private |
Registered engines.