mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 23:40:02 +01:00
Fixed calculation of font size from monitor resolution.
This commit is contained in:
@@ -358,6 +358,28 @@ glm::vec3 Rendering::unProject(glm::vec2 screen_coordinate, glm::mat4 modelview)
|
||||
float Rendering::Width() { return main_window_attributes_.viewport.x; }
|
||||
float Rendering::Height() { return main_window_attributes_.viewport.y; }
|
||||
|
||||
float Rendering::MonitorWidth()
|
||||
{
|
||||
GLFWmonitor *monitor = glfwGetWindowMonitor (main_window_);
|
||||
if (!monitor)
|
||||
monitor = glfwGetPrimaryMonitor ();
|
||||
int xpos, ypos, width, height;
|
||||
glfwGetMonitorWorkarea(monitor, &xpos, &ypos, &width, &height);
|
||||
|
||||
return width;
|
||||
}
|
||||
|
||||
float Rendering::MonitorHeight()
|
||||
{
|
||||
GLFWmonitor *monitor = glfwGetWindowMonitor (main_window_);
|
||||
if (!monitor)
|
||||
monitor = glfwGetPrimaryMonitor ();
|
||||
int xpos, ypos, width, height;
|
||||
glfwGetMonitorWorkarea(monitor, &xpos, &ypos, &width, &height);
|
||||
|
||||
return height;
|
||||
}
|
||||
|
||||
void Rendering::ToggleFullscreen()
|
||||
{
|
||||
// if in fullscreen mode
|
||||
|
||||
Reference in New Issue
Block a user