Dear ROOT expert,
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).
Thanks in advance.
Please read tips for efficient and successful posting and posting code
ROOT Version: 6.24/06
Platform: macos Monterey 12.5.1 (21G83)
Compiler: MacBook Pro 2019
May be @agheata can help you.
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?
Indeed, this looks like a coordinate mapping problem in the cocoa-based viewer. Reported here
I am not sure it is a Cocoa issue as it is the GL window. Maybe @tpochep or @matevz have an idea about it?
Note that this is fixed now in ROOT master.
Thank you very much, and look forward to the new sub-version.