Rune Engine  Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
renderWindow.h
1 
9 #ifndef RENDER_WINDOW_H
10 #define RENDER_WINDOW_H
11 
12 #include "core.h"
13 #include "color.h"
14 #include <vector>
15 #include "Math\vec2.h"
16 #include <Renderer\camera.h>
17 #include <string>
18 
19 struct GLFWwindow;
20 
21 namespace rune{
22 
23 class Drawable;
24 
25 class RUNE_ENGINE RenderWindow
26 {
27 private:
28  bool windowOpen;
29  int m_width, m_height;
30  GLFWwindow* GLwindow;
31 
32  Camera* windowCamera;
33 
35  static void onWindowResize(GLFWwindow* window, int width, int height);
36 
37  void updateWindowSize(int width, int height);
38 
39 public:
41  Camera getCamera(void);
43  void setCamera(Camera&);
45  RenderWindow(int newWidth, int newHeight, std::string const& title);
47  ~RenderWindow(void);
49  void draw(Drawable&);
51  void setWindowTitle(std::string const&);
53  void display(void);
55  void clear(rune::Color);
57  bool isOpen(void);
59  rune::Vec2 getSize(void);
61  void enableVsync(bool enable);
63  void close(void);
65  GLFWwindow* GetGLWindow();
67  static rune::Vec2 getDesktopSize(void);
69  void maximizeWindow(void);
70 
71 };
72 }
73 
74 #endif
rune::Drawable
Interface class for creating something that can be drawn to the screen.
Definition: drawable.h:20
rune::Camera
This class is used to control the viewport of the scene.
Definition: camera.h:22
rune::RenderWindow
A window that the game can be drawn to.
Definition: renderWindow.h:26
rune::Vec2
1 x 2 vector to be used for math.
Definition: vec2.h:20
rune::Color
A color object to be applied to drawable objects.
Definition: color.h:19
rune
The main namespace to be used for interfacing with the engine.
Definition: animator.h:21