Comment 36 for bug 676260

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

Progress report for my efforts for the last few days: Not much.

I can confirm what was reported above - there's also a problem with selecting objects. Apparently mouse clicks are not properly mapped to the distorted coordinates, and attempts to select an object with the mouse almost always don't have the desired result. A possible direction for debugging is to find out why this happens and why selection seems to work for some coordinates. The bug may not be related to the bad distortion.

As Alexander Wolf mentioned above, the problems apparently have been introduced by trunk revisions 4191-4192, which changed the way distortion is handled within Stellarium. Apparently Fabien didn't test the change very thoroughly. :(
http://bazaar.launchpad.net/~stellarium/stellarium/trunk/revision/4192?compare_revid=4190

What I've tried so far is to inspect the changes introduced by those revisions, hoping that it's something trivial. I have a checkout of revision 4190 (immediately before the SMD changes) and a checkout of revision 5572 (immediately before the merge of the new rendering engine introduced last summer). (I suggest the same to any other developer trying to debug this - use a revision <= 5572, because the new engine greatly complicates comparison.)

The main change in revisions 4191/2 is that instead of applying the distortion to the whole screen, Stellarium distorts only the sky, leaving the GUI on top of it undistorted. The distortion code has been moved from the StelViewportDistorter class to the StelViewportEffect class. It seems to be mostly unchanged, the only changes appear to be differences in how double buffering is handled.

I'm still inspecting the code and testing various hypotheses. As the painting surface has been changed, I have the feeling that it may be some kind of coordinate system problem. I'm not very confident in my success, though, as I have limited free time and I don't know any OpenGL - I'm hoping to catch some sort of a technical error.