Fixes the black screen issue on macOS, fixed HiDPI rendering, add keyboard interaction#19
Fixes the black screen issue on macOS, fixed HiDPI rendering, add keyboard interaction#19NaivelyWritten wants to merge 2 commits intotrlsmax:masterfrom
Conversation
|
This looks great! Unfortunately haven't had a chance to test this PR since I switched jobs a few years ago. fa38496#diff-86bc0a1a2a83bc219e04944ce2a5cd6f9fccecb6b1f993ac58e00453427d30f7R54-R55 |
|
Hi @rajkundu it's because the mouse position is in the ImGui coordinate system and the x and y poses are in the VTK coordinate system, they are defined on different corners |
|
Ah, okay. The different corners makes sense for the inversion, but why is |
|
@rajkundu because they both share the x axis, viewport size is used to convert the y: |
|
Got it! Makes perfect sense, and thanks for drawing it out. I will test this when I can, likely in the next few months, but in the meantime, I'm glad that this PR is here for others to see and check out. Thanks for your contribution! |
|
I still haven't had a chance to test this :( @NaivelyWritten have you been able to test on anything outside of macOS/HiDPI? |
This PR fixes #15, added keyboard interactions, and also fixed the wrong mouse interaction under HiDPI environments such as on macOS retina screen.