Skip to content

Commit

Permalink
GRAPHICS: Make RenderManager a singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
mirv-sillyfish authored and DrMcCoy committed Nov 17, 2018
1 parent cbe12d7 commit 6fe192e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/graphics/render/renderman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#include "src/graphics/render/renderman.h"

DECLARE_SINGLETON(Graphics::Render::RenderManager)

namespace Graphics {

namespace Render {
Expand Down
7 changes: 6 additions & 1 deletion src/graphics/render/renderman.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@

#include "src/graphics/render/renderqueue.h"

#include "src/common/singleton.h"

namespace Graphics {

namespace Render {

class RenderManager {
class RenderManager : public Common::Singleton<RenderManager> {
public:
RenderManager();
~RenderManager();
Expand All @@ -59,4 +61,7 @@ class RenderManager {

} // namespace Graphics

/** Shortcut for accessing the render manager. */
#define RenderMan Graphics::Render::RenderManager::instance()

#endif // GRAPHICS_RENDER_RENDERMANAGER_H

0 comments on commit 6fe192e

Please sign in to comment.