Comment 21 for bug 1411958

Revision history for this message
Nick Fedoseev (nick-ut2uz) wrote :

Finally found the source of problem.

void Planet::drawSphere(StelPainter* painter, float screenSz, bool drawOnlyRing)
{
...
line 1620:
 StelApp::getInstance().getCore()->getHeliocentricEclipticModelViewTransform()->forward(eyePos);
 projector->getModelViewTransform()->backward(eyePos);

eyePos is occasionally equal to (nan, nan, nan).
Since I'm still a newcomer, I've used a simple patch, which just hides the problem instead of actual bug fix:

 static Vec3d eyePos0;
 if (eyePos[0] != eyePos[0]) // detect for nan
  eyePos = eyePos0; // restore last non-nan value in place of nan
        else
  eyePos0 = eyePos; // Save non-nan value

... and flickering has gone.

Enjoy.