Began working on rendering a sky.
This commit is contained in:
parent
ddac22a965
commit
edc601667a
5 changed files with 41 additions and 12 deletions
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
13
Main/views.c
13
Main/views.c
|
@ -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 {}"
|
||||
|
|
10
Main/views.h
10
Main/views.h
|
@ -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 {}"
|
||||
|
|
Loading…
Reference in a new issue