OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
rendersystem.h
1 /*
2  Copyright (C) 2014 - 2016 Mutzii
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 #ifndef RENDERSYSTEM_H
19 #define RENDERSYSTEM_H
20 
21 #include "index.h"
22 #include "rendercomponent.h"
23 #include "display.h"
24 #include "camera.h"
25 #include "technique.h"
26 #include "renderprocessmanager.h"
27 
28 namespace Engine
29 {
33  using RenderEntitys = std::list< RenderEntity * >;
34 
35  /* List of Render Techniques */
36  using Techniques = std::list< Technique * >;
37 
42  {
43  public:
44  explicit RenderSystem( const std::string & system_name );
45  virtual ~RenderSystem() = default;
46 
47  virtual void initialize( OpenPolygonDisplay * display );
48 
49  virtual void RenderFrame(void)=0;
50 
51  virtual void Resize( void )=0;
52 
53  bool isInitialized(void);
54 
55  void addTechnique( Technique * technique );
56  void setRenderProcessManager( RenderProcessManager * manager );
57 
58  RenderProcessManager * getRenderProcessManager(void);
59  OpenPolygonDisplay * getDisplay(void);
60 
61  protected:
62 
63  std::string m_system_name;
64  glm::mat4 m_projection;
65  glm::mat4 m_ortho;
66 
67  bool m_init;
68 
69  OpenPolygonDisplay * m_display;
70  Camera * m_camera;
71  RenderProcessManager * m_render_process_manager;
72 
73  Techniques m_techniques;
74  };
75 
76 }
77 
78 #endif // RENDERSYSTEM_H
std::list< RenderEntity * > RenderEntitys
Definition: rendersystem.h:33
Definition: element.h:23
The Camera class.
Definition: camera.h:31
The Technique - abstract / interface class.
Definition: technique.h:34
Definition: renderprocessmanager.h:11
The RenderSystem - abstract / interface class.
Definition: rendersystem.h:41
The OpenPolygonDisplay - display abstract class.
Definition: display.h:55