Ocular Engine
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
RendererRegistrar.hpp
1
17
#pragma once
18
#ifndef __H__OCULAR_CORE_RENDERER_REGISTRAR__H__
19
#define __H__OCULAR_CORE_RENDERER_REGISTRAR__H__
20
21
#include "OcularEngine.hpp"
22
23
//------------------------------------------------------------------------------------------
24
29
namespace
Ocular
30
{
35
namespace
Core
36
{
37
template
<
class
T>
38
class
RendererRegistrar
39
{
40
public
:
41
42
RendererRegistrar
(std::string
const
& name)
43
{
44
if
(!OcularScene->getRendererFactory().registerComponent<T>(name))
45
{
46
OcularLogger->error(
"Failed to register Renderer with name '"
, name,
"' as the name is already in use"
, OCULAR_INTERNAL_LOG(
"RendererRegistrar"
,
"RendererRegistrar"
));
47
}
48
}
49
50
~
RendererRegistrar
()
51
{
52
53
}
54
55
protected
:
56
57
private
:
58
};
59
}
63
}
68
#define OCULAR_REGISTER_RENDERER(x,y) Ocular::Core::RendererRegistrar<x> OCULAR_INTERNAL_RendererRegistrar(y);
69
70
//------------------------------------------------------------------------------------------
71
72
#endif
Ocular::Core::RendererRegistrar
Definition:
RendererRegistrar.hpp:38
Ocular
Note: Once this library is made dynamic, this will no longer be needed.
Definition:
Common.hpp:70
OcularCore
include
Renderer
RendererRegistrar.hpp
Generated on Tue Oct 18 2016 01:28:56 for Ocular Engine by
1.8.10