OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
openpolygon.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 OPENPOLYGON_H
19 #define OPENPOLYGON_H
20 
21 #include "index.h"
22 #include "displaymanager.h"
23 #include "rendermanager.h"
24 #include "threadmanager.h"
25 #include "cameramanager.h"
26 #include "entitymanager.h"
27 #include "elementmanager.h"
28 #include "positionmanager.h"
29 #include "shadermanager.h"
30 #include "attributemanager.h"
31 #include "animationmanager.h"
32 
33 #include "Config/displayconfig.h"
34 #include "Config/configframelistener.h"
35 
36 namespace Engine
37 {
38 
43  {
44  public:
45 
46  OpenPolygon();
47  ~OpenPolygon() =default;
48 
49  DEPRECATED void writeConfig( const std::string & config_file );
50  DEPRECATED DisplayConfig readConfig ( const std::string & config_file );
51 
58  GLFWDisplay * initialize( DisplayConfig * config );
59 
65  void RenderLoop( GLFWDisplay * display );
66 
71  void finish(void);
72 
73  private:
74 
79  void InputProcess(void);
80 
85  void RenderLogic(void);
86 
91  void openGLInit(void);
92 
97  void calculatefps(void);
98  void calculateUpdate(void);
99 
100  private:
101 
102  RenderManager * m_render;
103  TickManager * m_tick;
104  GLFWDisplay * m_display;
105 
106  ThreadTimer m_input_timer;
107  ThreadTimer m_render_timer;
108  ThreadTimer m_logic_timer;
109  ThreadActivity m_thread_activity;
110  ThreadTicks m_update_ticks;
111  ThreadTicks m_frame_ticks;
112  };
113 }
114 
115 #endif // OPENPOLYGON_H
void finish(void)
finish
Definition: OpenPolygon.cpp:123
Definition: element.h:23
Definition: eutils.h:40
The OpenPolygon - Main class.
Definition: openpolygon.h:42
Definition: eutils.h:33
GLFWDisplay * initialize(DisplayConfig *config)
initialize
Definition: OpenPolygon.cpp:86
void RenderLoop(GLFWDisplay *display)
RenderLoop.
Definition: OpenPolygon.cpp:222
The RenderManager class.
Definition: rendermanager.h:42
Definition: tickmanager.h:37
Definition: eutils.h:47
The GLFWDisplay - display class.
Definition: display.h:104
The DisplayConfig - config class.
Definition: displayconfig.h:29