Planet.cpp   Planet.cpp 
skipping to change at line 1546 skipping to change at line 1546
} }
else else
{ {
// Normal planet // Normal planet
drawSphere(sPainter, screenSz); drawSphere(sPainter, screenSz);
} }
delete sPainter; delete sPainter;
sPainter=NULL; sPainter=NULL;
} }
bool allowDrawHalo = true;
if (this!=ssm->getSun())
{
// Let's hide halo when inner planet between Sun and observe
r (or moon between planet and observer)
Vec3d obj = getJ2000EquatorialPos(core);
Vec3d par = getParent()->getJ2000EquatorialPos(core);
double angle = obj.angle(par)*180.f/M_PI;
double asize = getParent()->getSpheroidAngularSize(core);
if (angle<=asize)
allowDrawHalo = false;
}
// Draw the halo if it enabled in the ssystem.ini file (+ special ca se for backward compatible for the Sun) // Draw the halo if it enabled in the ssystem.ini file (+ special ca se for backward compatible for the Sun)
if (hasHalo() || this==ssm->getSun()) if ((hasHalo() || this==ssm->getSun()) && allowDrawHalo)
{ {
// Prepare openGL lighting parameters according to luminance // Prepare openGL lighting parameters according to luminance
float surfArcMin2 = getSpheroidAngularSize(core)*60; float surfArcMin2 = getSpheroidAngularSize(core)*60;
surfArcMin2 = surfArcMin2*surfArcMin2*M_PI; // the total ill uminated area in arcmin^2 surfArcMin2 = surfArcMin2*surfArcMin2*M_PI; // the total ill uminated area in arcmin^2
StelPainter sPainter(core->getProjection(StelCore::FrameJ200 0)); StelPainter sPainter(core->getProjection(StelCore::FrameJ200 0));
Vec3d tmp = getJ2000EquatorialPos(core); Vec3d tmp = getJ2000EquatorialPos(core);
// Find new extincted color for halo. The method is again ra ther ad-hoc, but does not look too bad. // Find new extincted color for halo. The method is again ra ther ad-hoc, but does not look too bad.
// For the sun, we have again to use the stronger extinction to avoid color mismatch. // For the sun, we have again to use the stronger extinction to avoid color mismatch.
skipping to change at line 1855 skipping to change at line 1867
// Normal transparency mode // Normal transparency mode
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND); glEnable(GL_BLEND);
Ring3DModel ringModel; Ring3DModel ringModel;
sRing(&ringModel, rings->radiusMin, rings->radiusMax, 128, 3 2); sRing(&ringModel, rings->radiusMin, rings->radiusMax, 128, 3 2);
GL(ringPlanetShaderProgram->setUniformValue(ringPlanetShader Vars.isRing, true)); GL(ringPlanetShaderProgram->setUniformValue(ringPlanetShader Vars.isRing, true));
GL(ringPlanetShaderProgram->setUniformValue(ringPlanetShader Vars.texture, 2)); GL(ringPlanetShaderProgram->setUniformValue(ringPlanetShader Vars.texture, 2));
GL(ringPlanetShaderProgram->setUniformValue(ringPlanetShader Vars.ringS, 1));
computeModelMatrix(modelMatrix); computeModelMatrix(modelMatrix);
const Vec4d position = mTarget * modelMatrix.getColumn(3); const Vec4d position = mTarget * modelMatrix.getColumn(3);
shadowCandidatesData(0, 0) = position[0]; shadowCandidatesData(0, 0) = position[0];
shadowCandidatesData(1, 0) = position[1]; shadowCandidatesData(1, 0) = position[1];
shadowCandidatesData(2, 0) = position[2]; shadowCandidatesData(2, 0) = position[2];
shadowCandidatesData(3, 0) = getRadius(); shadowCandidatesData(3, 0) = getRadius();
GL(ringPlanetShaderProgram->setUniformValue(ringPlanetShader Vars.shadowCount, 1)); GL(ringPlanetShaderProgram->setUniformValue(ringPlanetShader Vars.shadowCount, 1));
GL(ringPlanetShaderProgram->setUniformValue(ringPlanetShader Vars.shadowData, shadowCandidatesData)); GL(ringPlanetShaderProgram->setUniformValue(ringPlanetShader Vars.shadowData, shadowCandidatesData));
 End of changes. 3 change blocks. 
1 lines changed or deleted 15 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/