]> git.mxchange.org Git - flightgear.git/blobdiff - Astro/sky.cxx
Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
[flightgear.git] / Astro / sky.cxx
index 433ec7ed0269cc2634363514efed874925cb9f6c..0e9c32e408c1dbfdb6c3a9fb14ddff0ec5491636 100644 (file)
@@ -37,7 +37,7 @@
 
 #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>
@@ -257,7 +257,6 @@ void fgSkyInit( void ) {
 void fgSkyRender( void ) {
     FGState *f;
     fgLIGHT *l;
-    fgVIEW *v;
     float inner_color[4];
     float middle_color[4];
     float outer_color[4];
@@ -266,7 +265,6 @@ void fgSkyRender( void ) {
 
     f = current_aircraft.fdm_state;
     l = &cur_light_params;
-    v = &current_view;
 
     // printf("Rendering the sky.\n");
 
@@ -286,11 +284,10 @@ void fgSkyRender( void ) {
     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,
@@ -303,12 +300,12 @@ void fgSkyRender( void ) {
     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
@@ -365,6 +362,17 @@ void fgSkyRender( void ) {
 
 
 // $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.
 //