StelSkyDrawer.cpp   StelSkyDrawer.cpp 
skipping to change at line 489 skipping to change at line 489
glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_COLOR_ARRAY); glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY);
#endif #endif
} }
nbPointSources = 0; nbPointSources = 0;
} }
static Vec3d win; static Vec3d win;
// Draw a point source halo. // Draw a point source halo.
bool StelSkyDrawer::drawPointSource(StelPainter* sPainter, const Vec3d& v, const float rcMag[2], const Vec3f& color, bool checkInScreen) bool StelSkyDrawer::drawPointSource(StelPainter* sPainter, const Vec3d& v, const float rcMag[2], const Vec3f& bcolor, bool checkInScreen)
{ {
Q_ASSERT(sPainter); Q_ASSERT(sPainter);
Vec3f color(bcolor);
if (StelApp::getInstance().getVisionModeNight())
{
color[1] = 0;
color[2] = 0;
}
if (rcMag[0]<=0.f) if (rcMag[0]<=0.f)
return false; return false;
// TODO: compute Vec3f v_refr (position including refraction) --> NO : This is done in ZoneArray! // TODO: compute Vec3f v_refr (position including refraction) --> NO : This is done in ZoneArray!
if (!(checkInScreen ? sPainter->getProjector()->projectCheck(v, win) : sPainter->getProjector()->project(v, win))) if (!(checkInScreen ? sPainter->getProjector()->projectCheck(v, win) : sPainter->getProjector()->project(v, win)))
return false; return false;
const float radius = rcMag[0]; const float radius = rcMag[0];
skipping to change at line 517 skipping to change at line 523
{ {
float cmag = qMin(rcMag[1],(float)(radius-(MAX_LINEAR_RADIUS +5.f))/30.f); float cmag = qMin(rcMag[1],(float)(radius-(MAX_LINEAR_RADIUS +5.f))/30.f);
float rmag = 150.f; float rmag = 150.f;
if (cmag>1.f) if (cmag>1.f)
cmag = 1.f; cmag = 1.f;
texBigHalo->bind(); texBigHalo->bind();
sPainter->enableTexture2d(true); sPainter->enableTexture2d(true);
glBlendFunc(GL_ONE, GL_ONE); glBlendFunc(GL_ONE, GL_ONE);
glEnable(GL_BLEND); glEnable(GL_BLEND);
sPainter->setColor(color[0]*cmag, color[1]*cmag, color[2]*cm if (StelApp::getInstance().getVisionModeNight())
ag); sPainter->setColor(color[0]*cmag, 0.0, 0.0);
else
sPainter->setColor(color[0]*cmag, color[1]*cmag, col
or[2]*cmag);
sPainter->drawSprite2dMode(win[0], win[1], rmag); sPainter->drawSprite2dMode(win[0], win[1], rmag);
} }
#ifndef USE_OPENGL_ES2 #ifndef USE_OPENGL_ES2
if (useShader) if (useShader)
{ {
#endif #endif
// Use point based rendering // Use point based rendering
verticesGrid[nbPointSources].set(win[0], win[1]); verticesGrid[nbPointSources].set(win[0], win[1]);
colorGrid[nbPointSources].set(color[0]*tw, color[1]*tw, colo r[2]*tw); colorGrid[nbPointSources].set(color[0]*tw, color[1]*tw, colo r[2]*tw);
skipping to change at line 596 skipping to change at line 606
// as the sun as seen from earth // as the sun as seen from earth
texSunHalo->bind(); texSunHalo->bind();
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE); glBlendFunc(GL_ONE, GL_ONE);
painter->enableTexture2d(true); painter->enableTexture2d(true);
float rmag = big3dModelHaloRadius*(mag+15.f)/-11.f; float rmag = big3dModelHaloRadius*(mag+15.f)/-11.f;
float cmag = 1.f; float cmag = 1.f;
if (rmag<pixRadius*3.f+100.) if (rmag<pixRadius*3.f+100.)
cmag = qMax(0.f, 1.f-(pixRadius*3.f+100-rmag)/100); cmag = qMax(0.f, 1.f-(pixRadius*3.f+100-rmag)/100);
painter->getProjector()->project(v, win); painter->getProjector()->project(v, win);
painter->setColor(color[0]*cmag, color[1]*cmag, color[2]*cma Vec3f c = color;
g); if (StelApp::getInstance().getVisionModeNight())
c = StelUtils::getNightColor(c);
painter->setColor(c[0]*cmag, c[1]*cmag, c[2]*cmag);
painter->drawSprite2dMode(win[0], win[1], rmag); painter->drawSprite2dMode(win[0], win[1], rmag);
noStarHalo = true; noStarHalo = true;
} }
// Now draw the halo according the object brightness // Now draw the halo according the object brightness
bool save = flagStarTwinkle; bool save = flagStarTwinkle;
flagStarTwinkle = false; flagStarTwinkle = false;
float rcm[2]; float rcm[2];
computeRCMag(mag, rcm); computeRCMag(mag, rcm);
 End of changes. 4 change blocks. 
5 lines changed or deleted 18 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/