windowjs / windowjs

Window.js is an open-source Javascript runtime for desktop graphics programming.

Home Page:https://windowjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Window.js doesn't work with Retina displays

joaodasilva opened this issue · comments

The window sizes reported by glfwGetWindowSize are not the same as the framebuffer sizes on macOS with retina displays.

The devicePixelRatio is 2, but the window has also been already scaled.

Fix this by looking for the actual framebuffer size and using the pixel dimensions, instead of the screen dimensions, for OpenGL calls.

ezoic increase your site revenue