#include <plib/ssg.h>
+#include <simgear/misc/fgpath.hxx>
class FGSkySun {
ssgSelector *sun_selector;
ssgTransform *sun_transform;
- ssgSimpleState *sun_state;
+ ssgSimpleState *orb_state;
ssgSimpleState *halo_state;
+ ssgColourArray *cl;
+
+ ssgVertexArray *halo_vl;
+ ssgTexCoordArray *halo_tl;
+
+ GLuint sun_texid;
+ GLubyte *sun_texbuf;
+
public:
// Constructor
~FGSkySun( void );
// initialize the sun object and connect it into our scene graph
- // root
- bool initialize();
+ // root. Pass in the path to your texture directory so
+ // initialize() can find the halo.rgba texture
+ bool initialize( const FGPath& path );
// repaint the sun colors based on current value of sun_anglein
// degrees relative to verticle
// 0 degrees = high noon
// 90 degrees = sun rise/set
// 180 degrees = darkest midnight
- bool repaint( sgVec3 sky_color, sgVec3 fog_color, double sun_angle );
+ bool repaint( double sun_angle );
// reposition the sun at the specified right ascension and
- // declination
- bool reposition( double rightAscension, double declination );
+ // declination, offset by our current position (p) so that it
+ // appears fixed at a great distance from the viewer. Also add in
+ // an optional rotation (i.e. for the current time of day.)
+ bool reposition( sgVec3 p, double angle,
+ double rightAscension, double declination );
// Draw the sun
bool draw();