Cutout Vis2012
TUWienVisualisierung2(SS2012)-AdaptiveCutaways
 All Classes Namespaces Functions Pages
GLFWGameWindow.h
1 #ifndef _GLFWGAMEWINDOW_H_
2 #define _GLFWGAMEWINDOW_H_
3 
4 #include <string>
5 
10 {
11 public:
21  GLFWGameWindow(int width, int height, const std::string& title, bool fullscreen, int major, int minor);
22  ~GLFWGameWindow();
23 
27  virtual void init() = 0;
31  virtual void update(double frameLength) = 0;
35  virtual void draw() = 0;
39  virtual void destroy() = 0;
40 
44  bool run();
45 
49  void stop();
50 
51  void setGLVersion(int major, int minor);
55  void setPrintFPS(bool print);
56 
57  double getAverageFPS() const;
58 
59  int getWidth() const;
60  int getHeight() const;
61 
62 private:
63  int _width, _height;
64  bool _fullscreen;
65  std::string _title;
66  double _maxFrameLength;
67  double _minFrameLength;
68  double _invFPS;
69  bool _running;
70 
71  int _glMajor, _glMinor;
72  bool _printFPS;
73  double _printFPSInterval;
74 };
75 
76 #endif