StelSkyLayerMgr.cpp   StelSkyLayerMgr.cpp 
skipping to change at line 27 skipping to change at line 27
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "StelSkyLayerMgr.hpp" #include "StelSkyLayerMgr.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "StelSkyImageTile.hpp" #include "StelSkyImageTile.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelPainter.hpp"
#include "MilkyWay.hpp" #include "MilkyWay.hpp"
#include "StelGuiBase.hpp" #include "StelGuiBase.hpp"
#include "StelSkyDrawer.hpp" #include "StelSkyDrawer.hpp"
#include "renderer/StelRenderer.hpp"
#include <QtOpenGL>
#include <QNetworkAccessManager> #include <QNetworkAccessManager>
#include <stdexcept> #include <stdexcept>
#include <QDebug> #include <QDebug>
#include <QString> #include <QString>
#include <QProgressBar> #include <QProgressBar>
#include <QVariantMap> #include <QVariantMap>
#include <QVariantList> #include <QVariantList>
#include <QSettings> #include <QSettings>
StelSkyLayerMgr::StelSkyLayerMgr(void) : flagShow(true) StelSkyLayerMgr::StelSkyLayerMgr()
: flagShow(true)
{ {
setObjectName("StelSkyLayerMgr"); setObjectName("StelSkyLayerMgr");
} }
StelSkyLayerMgr::~StelSkyLayerMgr() StelSkyLayerMgr::~StelSkyLayerMgr()
{ {
foreach (SkyLayerElem* s, allSkyLayers) foreach (SkyLayerElem* s, allSkyLayers)
delete s; delete s;
} }
skipping to change at line 155 skipping to change at line 155
// Remove a sky image tile from the list of background images // Remove a sky image tile from the list of background images
void StelSkyLayerMgr::removeSkyLayer(StelSkyLayerP l) void StelSkyLayerMgr::removeSkyLayer(StelSkyLayerP l)
{ {
const QString k = keyForLayer(l.data()); const QString k = keyForLayer(l.data());
if (!k.isEmpty()) if (!k.isEmpty())
removeSkyLayer(k); removeSkyLayer(k);
} }
// Draw all the multi-res images collection // Draw all the multi-res images collection
void StelSkyLayerMgr::draw(StelCore* core) void StelSkyLayerMgr::draw(StelCore* core, StelRenderer* renderer)
{ {
if (!flagShow) if (!flagShow)
return; return;
StelPainter sPainter(core->getProjection(StelCore::FrameJ2000)); renderer->setBlendMode(BlendMode_Add);
glBlendFunc(GL_ONE, GL_ONE);
glEnable(GL_BLEND);
foreach (SkyLayerElem* s, allSkyLayers) foreach (SkyLayerElem* s, allSkyLayers)
{ {
if (s->show) if (s->show)
{ {
if (s->layer->getFrameType() == StelCore::FrameAltAz ) if (s->layer->getFrameType() == StelCore::FrameAltAz )
{ {
sPainter.setProjector(core->getProjection(St elCore::FrameAltAz)); s->layer->draw(core, renderer, core->getProj ection(StelCore::FrameAltAz), 1.);
} }
else else
{ {
// TODO : Use the respective reference frame s, once every SkyLayer // TODO : Use the respective reference frame s, once every SkyLayer
// object sets their frame type. Defaulting to Equatorial frame now. // object sets their frame type. Defaulting to Equatorial frame now.
sPainter.setProjector(core->getProjection(St elCore::FrameJ2000)); s->layer->draw(core, renderer, core->getProj ection(StelCore::FrameJ2000), 1.);
} }
s->layer->draw(core, sPainter, 1.);
} }
} }
} }
void noDelete(StelSkyLayer*) {;} void noDelete(StelSkyLayer*) {;}
// Called when loading of data started or stopped for one collection // Called when loading of data started or stopped for one collection
void StelSkyLayerMgr::loadingStateChanged(bool b) void StelSkyLayerMgr::loadingStateChanged(bool b)
{ {
StelSkyLayer* tile = qobject_cast<StelSkyLayer*>(QObject::sender()); StelSkyLayer* tile = qobject_cast<StelSkyLayer*>(QObject::sender());
 End of changes. 9 change blocks. 
10 lines changed or deleted 7 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/