Browse Source

Fix scaling on high-DPI monitors

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
26247a0c97
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      src/window.cpp

+ 2
- 4
src/window.cpp View File

@@ -368,14 +368,12 @@ void Window::run() {
// Step scene
APP->event->rootWidget->step();

// Render
// Render scene
bool visible = glfwGetWindowAttrib(win, GLFW_VISIBLE) && !glfwGetWindowAttrib(win, GLFW_ICONIFIED);
if (visible) {
// Update and render
nvgBeginFrame(vg, winWidth, winHeight, pixelRatio);

// nvgReset(vg);
// nvgScale(vg, pixelRatio, pixelRatio);
nvgScale(vg, pixelRatio, pixelRatio);

widget::DrawContext ctx;
ctx.vg = vg;


Loading…
Cancel
Save