piksel icon indicating copy to clipboard operation
piksel copied to clipboard

`mouseMoved` bugfix

Open MarcinKonowalczyk opened this issue 3 years ago • 1 comments

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.

MarcinKonowalczyk avatar Jul 09 '21 01:07 MarcinKonowalczyk

as to the main point of the PR, i'll experiment with glfwSetWindowContentScaleCallback. just, work in progress so far.

MarcinKonowalczyk avatar Dec 03 '21 01:12 MarcinKonowalczyk