piksel
piksel copied to clipboard
`mouseMoved` bugfix
Main changes in updateFramebufferSize
to calculate displayPixelRatio
and re-use it when not compiling with Emscripten to report a correct mouse position (when compiling for the web the updateFramebufferSize
isn't called because the canvas does not get resized). There is a bit of a hack ( in the #if defined(__APPLE__) && !defined(__EMSCRIPTEN__)
block) which attempts to detect when the window is dragged between a normal and a retina display (or back), since that was a problem for me.
I believe this somewhat fixes #9.
I've also pulled out the shader code into separate files to make it easier edit and actually use code highlighting on. Absolutely no changes in the shader code.
as to the main point of the PR, i'll experiment with glfwSetWindowContentScaleCallback
. just, work in progress so far.