mctools / simplebuild-dgcode

dgcode: the Geant4-based simulation framework of the ESS Detector Group. Provided as simple-build-system bundles.
https://mctools.github.io/simplebuild-dgcode/
Other
2 stars 1 forks source link

dgcode viewer issue on macOS with HiDPI display #38

Open willend opened 5 months ago

willend commented 5 months ago
Screenshot 2024-03-11 at 09 22 36
tkittel commented 5 months ago

Looks like OpenSceneGraph or OpenGL having some sort of monitor size detection issues, or perhaps some x2 scaling I forgot that I enabled. I was wondering @willend did you by any chance have a multi-monitor setup active at the time, if that could have played a role?

willend commented 5 months ago

Nope, single screen on that Mac at the time

willend commented 5 months ago

On this machine (my newest Mac, M2 machine from ESS) the gui even works right: Screenshot 2024-03-12 at 10 40 44

tkittel commented 5 months ago

Ok that's great, so it is not a general issue. However, I still suspect that there is an underlying issue related to stuff like opengl and monitors, etc. But I guess we can close this issue for now, unless we see it again elsewhere.

tkittel commented 5 months ago

Reopening since @willend reproduced it.

willend commented 5 months ago

It seems that there are ties to this old osg issue: https://github.com/openscenegraph/OpenSceneGraph/issues/926

and this one https://github.com/omnetpp/omnetpp/issues/833

willend commented 5 months ago

WORKAROUND:

It seems that the issue only occurs on internal mac screens - or al least "HiDPI" screens left at the "Default" resolution:

Screenshot 2024-03-15 at 12 31 56

A workaround is to switch to maximum resolution on the said monitor, via:

Screenshot 2024-03-15 at 12 30 49

NB: osg will crashe if open while resolution is changed - or if dragged between two different monitors with different settings.

tkittel commented 5 months ago

Thanks a lot for the workaround @willend, I will add a link to it in the documentation!

willend commented 5 months ago

Very likely the problem is not only on M1/M2/M3, but also Intel Macs with this type of HiDPI display

tkittel commented 5 months ago

That makes sense @willend, it seems this is indeed explained by https://github.com/openscenegraph/OpenSceneGraph/issues/926

Unfortunately I asked the OSG maintainer, and he does not have time to make a new release (1) so we will most likely have to live with the workaround for the time being.