Added new method to get the right viewport size in stereo (side-by-side) and fix font rendering.

This commit is contained in:
Jonathas Costa
2018-04-20 11:22:23 -04:00
parent 1e0d41fb30
commit 5079beba78
6 changed files with 44 additions and 18 deletions

View File

@@ -56,6 +56,7 @@ public:
glm::ivec2 currentSubwindowSize() const override;
glm::ivec2 currentWindowResolution() const override;
glm::ivec2 currentDrawBufferResolution() const override;
glm::ivec2 getCurrentViewportSize() const override;
glm::vec2 dpiScaling() const override;
int currentNumberOfAaSamples() const override;

View File

@@ -160,6 +160,13 @@ public:
*/
virtual glm::ivec2 currentDrawBufferResolution() const;
/**
* Returns the resolution of the currently viewport resolution in pixel
* coordinates.
* \return The resolution of the currently viewport in pixel coordinates
*/
virtual glm::ivec2 getCurrentViewportSize() const;
/**
* Returns the DPI scaling factor for the current window. This is normally 1 on all
* regular monitors and 2 on Retina screens.