#include <Aircraft/aircraft.hxx>
#include <Debug/logstream.hxx>
-#include <Flight/flight.hxx>
+#include <FDM/flight.hxx>
#include <Include/fg_constants.h>
#include <Main/views.hxx>
#include <Math/fg_random.h>
void fgSkyRender( void ) {
FGState *f;
fgLIGHT *l;
- fgVIEW *v;
float inner_color[4];
float middle_color[4];
float outer_color[4];
f = current_aircraft.fdm_state;
l = &cur_light_params;
- v = ¤t_view;
// printf("Rendering the sky.\n");
xglPushMatrix();
// Translate to view position
- xglTranslatef( v->cur_zero_elev.x(),
- v->cur_zero_elev.y(),
- v->cur_zero_elev.z() );
+ Point3D zero_elev = current_view.get_cur_zero_elev();
+ xglTranslatef( zero_elev.x(), zero_elev.y(), zero_elev.z() );
// printf(" Translated to %.2f %.2f %.2f\n",
- // v->cur_zero_elev.x, v->cur_zero_elev.y, v->cur_zero_elev.z );
+ // zero_elev.x, zero_elev.y, zero_elev.z );
// Rotate to proper orientation
// printf(" lon = %.2f lat = %.2f\n", FG_Longitude * RAD_TO_DEG,
xglBegin( GL_TRIANGLE_FAN );
xglColor4fv(l->sky_color);
xglVertex3f(0.0, 0.0, CENTER_ELEV);
- for ( i = 0; i < 12; i++ ) {
+ for ( i = 11; i >= 0; i++ ) {
xglColor4fv( inner_color );
xglVertex3fv( inner_vertex[i] );
}
xglColor4fv( inner_color );
- xglVertex3fv( inner_vertex[0] );
+ xglVertex3fv( inner_vertex[11] );
xglEnd();
// Draw the middle ring
// $Log$
+// Revision 1.19 1999/02/01 21:33:26 curt
+// Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
+// Jon accepted my offer to do this and thought it was a good idea.
+//
+// Revision 1.18 1999/02/01 21:09:00 curt
+// Bug fix in vertex order of inner disk (fan) of the sky dome.
+//
+// Revision 1.17 1998/12/09 18:50:12 curt
+// Converted "class fgVIEW" to "class FGView" and updated to make data
+// members private and make required accessor functions.
+//
// Revision 1.16 1998/12/05 15:54:03 curt
// Renamed class fgFLIGHT to class FGState as per request by JSB.
//