TelescopeControl.cpp   TelescopeControl.cpp 
skipping to change at line 264 skipping to change at line 264
circleFader.update((int)(deltaTime*1000)); circleFader.update((int)(deltaTime*1000));
// communicate with the telescopes: // communicate with the telescopes:
communicate(); communicate();
} }
void TelescopeControl::draw(StelCore* core) void TelescopeControl::draw(StelCore* core)
{ {
const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ; const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ;
StelPainter sPainter(prj); StelPainter sPainter(prj);
sPainter.setFont(labelFont); sPainter.setFont(labelFont);
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
reticleTexture->bind(); reticleTexture->bind();
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transpa rency mode
foreach (const TelescopeClientP& telescope, telescopeClients) foreach (const TelescopeClientP& telescope, telescopeClients)
{ {
if (telescope->isConnected() && telescope->hasKnownPosition( )) if (telescope->isConnected() && telescope->hasKnownPosition( ))
{ {
Vec3d XY; Vec3d XY;
if (prj->projectCheck(telescope->getJ2000EquatorialP os(core), XY)) if (prj->projectCheck(telescope->getJ2000EquatorialP os(core), XY))
{ {
//Telescope circles appear synchronously wit h markers //Telescope circles appear synchronously wit h markers
if (circleFader.getInterstate() >= 0) if (circleFader.getInterstate() >= 0)
{ {
sPainter.setColor(circleColor[0], ci rcleColor[1], circleColor[2], circleFader.getInterstate()); sPainter.setColor(circleColor[0], ci rcleColor[1], circleColor[2], circleFader.getInterstate());
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
foreach (double circle, telescope->g etOculars()) foreach (double circle, telescope->g etOculars())
{ {
sPainter.drawCircle(XY[0], X Y[1], 0.5 * prj->getPixelPerRadAtCenter() * (M_PI/180) * (circle)); sPainter.drawCircle(XY[0], X Y[1], 0.5 * prj->getPixelPerRadAtCenter() * (M_PI/180) * (circle));
} }
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
} }
if (reticleFader.getInterstate() >= 0) if (reticleFader.getInterstate() >= 0)
{ {
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
sPainter.setColor(reticleColor[0], r eticleColor[1], reticleColor[2], reticleFader.getInterstate()); sPainter.setColor(reticleColor[0], r eticleColor[1], reticleColor[2], reticleFader.getInterstate());
sPainter.drawSprite2dMode(XY[0],XY[1 ],15.f); sPainter.drawSprite2dMode(XY[0],XY[1 ],15.f);
glDisable(GL_TEXTURE_2D);
} }
if (labelFader.getInterstate() >= 0) if (labelFader.getInterstate() >= 0)
{ {
sPainter.setColor(labelColor[0], lab elColor[1], labelColor[2], labelFader.getInterstate()); sPainter.setColor(labelColor[0], lab elColor[1], labelColor[2], labelFader.getInterstate());
//TODO: Different position of the la bel if circles are shown? //TODO: Different position of the la bel if circles are shown?
//TODO: Remove magic number (text sp acing) //TODO: Remove magic number (text sp acing)
sPainter.drawText(XY[0], XY[1], tele scope->getNameI18n(), 0, 6 + 10, -4, false); sPainter.drawText(XY[0], XY[1], tele scope->getNameI18n(), 0, 6 + 10, -4, false);
//Same position as the other objects : doesn't work, telescope label overlaps object label //Same position as the other objects : doesn't work, telescope label overlaps object label
//sPainter.drawText(XY[0], XY[1], sc ope->getNameI18n(), 0, 10, 10, false); //sPainter.drawText(XY[0], XY[1], sc ope->getNameI18n(), 0, 10, 10, false);
reticleTexture->bind(); reticleTexture->bind();
 End of changes. 4 change blocks. 
3 lines changed or deleted 4 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/