]> git.mxchange.org Git - flightgear.git/commitdiff
Began working on rendering a sky.
authorcurt <curt>
Wed, 17 Dec 1997 23:13:34 +0000 (23:13 +0000)
committercurt <curt>
Wed, 17 Dec 1997 23:13:34 +0000 (23:13 +0000)
Main/GLUTmain.c
Main/Makefile
Main/fg_init.c
Main/views.c
Main/views.h

index da730f6d4f9862606cc57516ec86eacf53b03b53..6a7a3119b3786dc8b63ade8ae6c83569191cbb43 100644 (file)
@@ -47,6 +47,7 @@
 #include "../Math/polar.h"
 #include "../Scenery/mesh.h"
 #include "../Scenery/scenery.h"
+#include "../Scenery/sky.h"
 #include "../Time/fg_time.h"
 #include "../Time/fg_timer.h"
 #include "../Time/sunpos.h"
@@ -226,6 +227,9 @@ static void fgUpdateVisuals( void ) {
     xglMatrixMode(GL_MODELVIEW);
     /* xglLoadIdentity(); */
 
+    /* draw sky */
+    fgSkyRender();
+
     /* draw scenery */
     fgSceneryRender();
 
@@ -565,10 +569,13 @@ int main( int argc, char *argv[] ) {
 
 
 /* $Log$
-/* Revision 1.33  1997/12/15 23:54:45  curt
-/* Add xgl wrappers for debugging.
-/* Generate terrain normals on the fly.
+/* Revision 1.34  1997/12/17 23:13:34  curt
+/* Began working on rendering a sky.
 /*
+ * Revision 1.33  1997/12/15 23:54:45  curt
+ * Add xgl wrappers for debugging.
+ * Generate terrain normals on the fly.
+ *
  * Revision 1.32  1997/12/15 20:59:08  curt
  * Misc. tweaks.
  *
index d1a06e1589c8da852d5d1a125e395fa37fe53dc0..6755ea934d2b3f5f275988bd1a2995e221484bf5 100644 (file)
@@ -49,6 +49,7 @@ TARGET=fg-$(FG_VERSION)
 
 $(TARGET): $(OFILES) $(AFILES)
        $(CC) -o $(TARGET) $(OFILES) $(AFILES) $(LIBS)
+       $(RM) -f fg$(FG_VERSION_MAJOR)
        $(LN) $(TARGET) fg$(FG_VERSION_MAJOR)
 
 all: $(TARGET)
@@ -83,6 +84,9 @@ views.o:
 
 #---------------------------------------------------------------------------
 # $Log$
+# Revision 1.39  1997/12/17 23:13:35  curt
+# Began working on rendering a sky.
+#
 # Revision 1.38  1997/12/15 23:54:47  curt
 # Add xgl wrappers for debugging.
 # Generate terrain normals on the fly.
index 7edcb27cee2dd4c5c189324f9cb1c9ebd92d132c..cc58abc7b4cca872b41b675173dc3e20d4c50593 100644 (file)
@@ -40,6 +40,7 @@
 #include "../Scenery/mesh.h"
 #include "../Scenery/astro.h"
 #include "../Scenery/scenery.h"
+#include "../Scenery/sky.h"
 #include "../Time/fg_time.h"
 #include "../Time/sunpos.h"
 #include "../Weather/weather.h"
@@ -179,6 +180,9 @@ void fgInitSubsystems( void ) {
     /* Initialize Astronomical Objects */
     fgAstroInit();
 
+    /* Initialize the "sky" */
+    fgSkyInit();
+
     /* Initialize the Scenery Management subsystem */
     fgSceneryInit();
 
@@ -218,10 +222,13 @@ void fgInitSubsystems( void ) {
 
 
 /* $Log$
-/* Revision 1.18  1997/12/15 23:54:49  curt
-/* Add xgl wrappers for debugging.
-/* Generate terrain normals on the fly.
+/* Revision 1.19  1997/12/17 23:13:36  curt
+/* Began working on rendering a sky.
 /*
+ * Revision 1.18  1997/12/15 23:54:49  curt
+ * Add xgl wrappers for debugging.
+ * Generate terrain normals on the fly.
+ *
  * Revision 1.17  1997/12/15 20:59:09  curt
  * Misc. tweaks.
  *
index 96cdc71bff28b99b6149cfb7671ac398fdbf636a..c55ce750a647ef2c33afdd8ec2177d01128e1df0 100644 (file)
@@ -50,6 +50,10 @@ void fgViewUpdate(struct fgFLIGHT *f, struct fgVIEW *v) {
     MAT3vec vec, forward;
     MAT3mat R, TMP, UP, LOCAL, VIEW;
 
+    /* calculate the cartesion coords of the current lat/lon/0 elev */
+    v->cur_zero_elev = fgPolarToCart(FG_Longitude, FG_Lat_geocentric, 
+                                    FG_Sea_level_radius);
+
     /* calculate view position in current FG view coordinate system */
     v->view_pos = fgPolarToCart(FG_Longitude, FG_Lat_geocentric, 
                             FG_Radius_to_vehicle * FEET_TO_METER + 1.0);
@@ -133,10 +137,13 @@ void fgViewUpdate(struct fgFLIGHT *f, struct fgVIEW *v) {
 
 
 /* $Log$
-/* Revision 1.3  1997/12/15 23:54:50  curt
-/* Add xgl wrappers for debugging.
-/* Generate terrain normals on the fly.
+/* Revision 1.4  1997/12/17 23:13:36  curt
+/* Began working on rendering a sky.
 /*
+ * Revision 1.3  1997/12/15 23:54:50  curt
+ * Add xgl wrappers for debugging.
+ * Generate terrain normals on the fly.
+ *
  * Revision 1.2  1997/12/10 22:37:48  curt
  * Prepended "fg" on the name of all global structures that didn't have it yet.
  * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
index 9dc0bfff4e3f3dcc542dbf6dc49ecfee07dbfc40..9e5d6a053cf32e0d3bfb5eeac950f4c740bc469c 100644 (file)
@@ -36,6 +36,7 @@
 /* Define a structure containing view information */
 struct fgVIEW {
     struct fgCartesianPoint view_pos;
+    struct fgCartesianPoint cur_zero_elev;
     MAT3vec local_up, view_up, view_forward;
     double view_offset, goal_view_offset;
 };
@@ -55,10 +56,13 @@ void fgViewUpdate(struct fgFLIGHT *f, struct fgVIEW *v);
 
 
 /* $Log$
-/* Revision 1.3  1997/12/15 23:54:51  curt
-/* Add xgl wrappers for debugging.
-/* Generate terrain normals on the fly.
+/* Revision 1.4  1997/12/17 23:13:36  curt
+/* Began working on rendering a sky.
 /*
+ * Revision 1.3  1997/12/15 23:54:51  curt
+ * Add xgl wrappers for debugging.
+ * Generate terrain normals on the fly.
+ *
  * Revision 1.2  1997/12/10 22:37:48  curt
  * Prepended "fg" on the name of all global structures that didn't have it yet.
  * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"