This commit is contained in:
2016-02-01 12:01:24 +01:00
parent 5bfcffc142
commit a22bc00d46
8 changed files with 25 additions and 30 deletions
+7 -11
View File
@@ -25,27 +25,23 @@ class IRenderer
{
public:
GLFWwindow* Window() const { return m_Window; }
//Returns screensize including window border and header
//Returns screen size including window border and header
Rectangle Resolution() const { return m_Resolution; }
void SetResolution(const Rectangle& resolution) { m_Resolution = resolution; }
virtual void SetResolution(const Rectangle& resolution) { m_Resolution = resolution; }
bool Fullscreen() { return m_Fullscreen; }
void SetFullscreen(bool fullscreen) { m_Fullscreen = fullscreen; }
virtual void SetFullscreen(bool fullscreen) { m_Fullscreen = fullscreen; }
bool VSYNC() const { return m_VSYNC; }
void SetVSYNC(bool vsync) { m_VSYNC = vsync; }
//Returns screensize excluding window border and header
Rectangle GetViewPortSize() const { return m_ViewPortWidth; }
void SetViewPortSize(const Rectangle& viewportWidth) { m_ViewPortWidth = viewportWidth; }
virtual void SetVSYNC(bool vsync) { m_VSYNC = vsync; }
//Returns screen size excluding window border and header
Rectangle GetViewportSize() const { return m_ViewportSize; }
virtual void Initialize() = 0;
virtual void Update(double dt) = 0;
virtual void Draw(RenderFrame& rq) = 0;
virtual PickData Pick(glm::vec2 screenCord) = 0;
World* m_World; //Temp world, untill viktor merge.
protected:
Rectangle m_Resolution = Rectangle::Rectangle(1280, 720);
Rectangle m_ViewPortWidth = Rectangle::Rectangle(1280, 720);
Rectangle m_ViewportSize = Rectangle::Rectangle(1280, 720);
bool m_Fullscreen = false;
bool m_VSYNC = false;
int m_GLVersion[2];