StelSkyDrawer.cpp   StelSkyDrawer.cpp 
skipping to change at line 36 skipping to change at line 36
#endif #endif
#ifndef GL_VERTEX_PROGRAM_POINT_SIZE #ifndef GL_VERTEX_PROGRAM_POINT_SIZE
#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 #define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
#endif #endif
#include <QGLShaderProgram> #include <QGLShaderProgram>
#include <QtOpenGL> #include <QtOpenGL>
#include "StelSkyDrawer.hpp" #include "StelSkyDrawer.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "StelNavigator.hpp"
#include "StelToneReproducer.hpp" #include "StelToneReproducer.hpp"
#include "StelTextureMgr.hpp" #include "StelTextureMgr.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
#include "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include "StelPainter.hpp" #include "StelPainter.hpp"
#include <QStringList> #include <QStringList>
#include <QSettings> #include <QSettings>
skipping to change at line 109 skipping to change at line 109
} }
setAbsoluteStarScale(conf->value("stars/absolute_scale",1.0).toFloat (&ok)); setAbsoluteStarScale(conf->value("stars/absolute_scale",1.0).toFloat (&ok));
if (!ok) if (!ok)
{ {
conf->setValue("stars/absolute_scale",1.0); conf->setValue("stars/absolute_scale",1.0);
setAbsoluteStarScale(1.0); setAbsoluteStarScale(1.0);
ok = true; ok = true;
} }
//GZ: load 3 values from config for now. TODO: make adjustable with
GUI!
setExtinctionCoefficient(conf->value("landscape/atmospheric_extincti
on_coefficient",0.2).toDouble(&ok));
if (!ok)
{
conf->setValue("landscape/atmospheric_extinction_coefficient
",0.2);
setExtinctionCoefficient(0.2);
ok = true;
}
setAtmosphereTemperature(conf->value("landscape/temperature_C",15.0)
.toDouble(&ok));
if (!ok)
{
conf->setValue("landscape/temperature_C",15);
setAtmosphereTemperature(15.0);
ok = true;
}
setAtmospherePressure(conf->value("landscape/pressure_mbar",1013.0).
toDouble(&ok));
if (!ok)
{
conf->setValue("landscape/pressure_mbar",1013.0);
setAtmospherePressure(1013.0);
ok = true;
}
// Initialize buffers for use by gl vertex array // Initialize buffers for use by gl vertex array
nbPointSources = 0; nbPointSources = 0;
maxPointSources = 1000; maxPointSources = 1000;
verticesGrid = new Vec2f[maxPointSources*6]; verticesGrid = new Vec2f[maxPointSources*6];
colorGrid = new Vec3f[maxPointSources*6]; colorGrid = new Vec3f[maxPointSources*6];
textureGrid = new Vec2f[maxPointSources*6]; textureGrid = new Vec2f[maxPointSources*6];
for (unsigned int i=0;i<maxPointSources; ++i) for (unsigned int i=0;i<maxPointSources; ++i)
{ {
textureGrid[i*6].set(0,0); textureGrid[i*6].set(0,0);
textureGrid[i*6+1].set(1,0); textureGrid[i*6+1].set(1,0);
skipping to change at line 463 skipping to change at line 486
static Vec3f win; static Vec3f win;
// Draw a point source halo. // Draw a point source halo.
bool StelSkyDrawer::drawPointSource(StelPainter* sPainter, const Vec3f& v, const float rcMag[2], const Vec3f& color, bool checkInScreen) bool StelSkyDrawer::drawPointSource(StelPainter* sPainter, const Vec3f& v, const float rcMag[2], const Vec3f& color, bool checkInScreen)
{ {
Q_ASSERT(sPainter); Q_ASSERT(sPainter);
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!
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];
// Random coef for star twinkling // Random coef for star twinkling
const float tw = (flagStarTwinkle && flagHasAtmosphere) ? (1.f-twink leAmount*rand()/RAND_MAX)*rcMag[1] : rcMag[1]; const float tw = (flagStarTwinkle && flagHasAtmosphere) ? (1.f-twink leAmount*rand()/RAND_MAX)*rcMag[1] : rcMag[1];
// If the rmag is big, draw a big halo // If the rmag is big, draw a big halo
if (radius>MAX_LINEAR_RADIUS+5.f) if (radius>MAX_LINEAR_RADIUS+5.f)
{ {
 End of changes. 3 change blocks. 
1 lines changed or deleted 32 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/