When I tried to run 3D display programs on my MacBook, such as tutorials/geom/geomD0.C, I could not pick a camera center with my mouse (there always seems to be a position shift). Do you know where things go wrong?
In the following, I attach the basic information about the software I use.
macos Monterey 12.5.1 (21G83)
ROOT version: 6.24/06.
XQuartz 2.8.4 (xorg-server 21.1.6)
And I also attach a screenshot showing this problem, where the blue dot is the camera center picked by my mouse (right bottom).
Mouse-picking in a 3D scene was never a strong feature of the GL viewer, and it isn’t easy to implement because even if the view vector corresponding to the mouse position is calculated correctly (to avoid a shift) the view center depth along this vector is arbitrary so not necessarily what you expect. I suggest changing directly the values for X/Y/Z of the camera center (pressing the Return key in each box after setting the value)
Many thanks for your explanation. It works when I set the camera center manually.
But I’m still curious why mouse picking works well in Linux but not in macOS. Is it because of the OpenGL (or ROOT) version on macOS?