#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"
xglMatrixMode(GL_MODELVIEW);
/* xglLoadIdentity(); */
+ /* draw sky */
+ fgSkyRender();
+
/* draw scenery */
fgSceneryRender();
/* $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.
*
$(TARGET): $(OFILES) $(AFILES)
$(CC) -o $(TARGET) $(OFILES) $(AFILES) $(LIBS)
+ $(RM) -f fg$(FG_VERSION_MAJOR)
$(LN) $(TARGET) fg$(FG_VERSION_MAJOR)
all: $(TARGET)
#---------------------------------------------------------------------------
# $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.
#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"
/* Initialize Astronomical Objects */
fgAstroInit();
+ /* Initialize the "sky" */
+ fgSkyInit();
+
/* Initialize the Scenery Management subsystem */
fgSceneryInit();
/* $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.
*
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);
/* $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 {}"
/* 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;
};
/* $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 {}"