Atmosphere.hpp   Atmosphere.hpp 
skipping to change at line 28 skipping to change at line 28
*/ */
#ifndef _ATMOSTPHERE_HPP_ #ifndef _ATMOSTPHERE_HPP_
#define _ATMOSTPHERE_HPP_ #define _ATMOSTPHERE_HPP_
#include "Skylight.hpp" #include "Skylight.hpp"
#include "VecMath.hpp" #include "VecMath.hpp"
#include "StelNavigator.hpp" #include "StelNavigator.hpp"
#include "Skybright.hpp" #include "Skybright.hpp"
#include "StelFader.hpp" #include "StelFader.hpp"
#include "GLee.h"
#include "fixx11h.h" #ifdef USE_OPENGL_ES2
#include "GLES2/gl2.h"
#else
#include <QtOpenGL>
#endif
class StelProjector; class StelProjector;
class StelToneReproducer; class StelToneReproducer;
class StelCore; class StelCore;
//! Compute and display the daylight sky color using openGL. //! Compute and display the daylight sky color using openGL.
//! The sky brightness is computed with the SkyBright class, the color with the SkyLight. //! The sky brightness is computed with the SkyBright class, the color with the SkyLight.
//! Don't use this class directly but use it through the LandscapeMgr. //! Don't use this class directly but use it through the LandscapeMgr.
class Atmosphere class Atmosphere
{ {
public: public:
Atmosphere(void); Atmosphere(void);
virtual ~Atmosphere(void); virtual ~Atmosphere(void);
void computeColor(double JD, Vec3d _sunPos, Vec3d moonPos, float moo nPhase, StelCore* core, void computeColor(double JD, Vec3d _sunPos, Vec3d moonPos, float moo nPhase, StelCore* core,
float latitude = 45.f, float altitude = 200.f, float latitude = 45.f, float altitude = 200.f,
float temperature = 15.f, float relativeHumidity = 40.f); float temperature = 15.f, float relativeHumidity = 40.f);
void draw(StelCore* core); void draw(StelCore* core);
void update(double deltaTime) {fader.update((int)(deltaTime*1000));} void update(double deltaTime) {fader.update((int)(deltaTime*1000));}
//! Set fade in/out duration in seconds //! Set fade in/out duration in seconds
void setFadeDuration(float duration) {fader.setDuration((int)(durati on*1000.f));} void setFadeDuration(float duration) {fader.setDuration((int)(durati on*1000.f));}
//! Get fade in/out duration in seconds //! Get fade in/out duration in seconds
float getFadeDuration() {return fader.getDuration()/1000.f;} float getFadeDuration() {return fader.getDuration()/1000.f;}
skipping to change at line 84 skipping to change at line 88
//! Get the light pollution luminance in cd/m^2 //! Get the light pollution luminance in cd/m^2
float getLightPollutionLuminance() const { return lightPollutionLumi nance; } float getLightPollutionLuminance() const { return lightPollutionLumi nance; }
private: private:
Vec4i viewport; Vec4i viewport;
Skylight sky; Skylight sky;
Skybright skyb; Skybright skyb;
int skyResolutionY,skyResolutionX; int skyResolutionY,skyResolutionX;
Vec2f* posGrid; Vec2f* posGrid;
Vec3f* colorGrid; Vec4f* colorGrid;
GLushort* indices; unsigned int* indices;
//! The average luminance of the atmosphere in cd/m2 //! The average luminance of the atmosphere in cd/m2
float averageLuminance; float averageLuminance;
double eclipseFactor; float eclipseFactor;
ParabolicFader fader; ParabolicFader fader;
float lightPollutionLuminance; float lightPollutionLuminance;
unsigned int vertexBufferId; //! Whether vertex shader should be used
unsigned int indicesBufferId; bool useShader;
//! Vertex shader used for xyYToRGB computation
class QGLShaderProgram* atmoShaderProgram;
struct {
int alphaWaOverAlphaDa;
int oneOverGamma;
int term2TimesOneOverMaxdLpOneOverGamma;
int brightnessScale;
int sunPos;
int term_x, Ax, Bx, Cx, Dx, Ex;
int term_y, Ay, By, Cy, Dy, Ey;
int projectionMatrix;
int skyVertex;
int skyColor;
} shaderAttribLocations;
}; };
#endif // _ATMOSTPHERE_HPP_ #endif // _ATMOSTPHERE_HPP_
 End of changes. 5 change blocks. 
9 lines changed or deleted 28 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/