Misc. tweaks.
This commit is contained in:
parent
f92f2a5c29
commit
d06b80036f
6 changed files with 47 additions and 37 deletions
|
@ -58,18 +58,10 @@ struct fgGENERAL general;
|
||||||
/* view parameters */
|
/* view parameters */
|
||||||
static GLfloat win_ratio = 1.0;
|
static GLfloat win_ratio = 1.0;
|
||||||
|
|
||||||
/* sun direction */
|
|
||||||
/* static GLfloat sun_vec[4] = {1.0, 0.0, 0.0, 0.0 }; */
|
|
||||||
|
|
||||||
/* fog color */
|
/* fog color */
|
||||||
static GLfloat fgFogColor[4] = {0.65, 0.65, 0.85, 1.0};
|
static GLfloat fgFogColor[4] = {0.65, 0.65, 0.85, 1.0};
|
||||||
|
|
||||||
/* temporary hack */
|
/* temporary hack */
|
||||||
/* extern struct mesh *mesh_ptr; */
|
|
||||||
/* Function prototypes */
|
|
||||||
/* GLint fgSceneryCompile_OLD(); */
|
|
||||||
/* static void fgSceneryDraw_OLD(); */
|
|
||||||
|
|
||||||
/* pointer to scenery structure */
|
/* pointer to scenery structure */
|
||||||
/* static GLint scenery, runway; */
|
/* static GLint scenery, runway; */
|
||||||
|
|
||||||
|
@ -99,6 +91,8 @@ static void fgInitVisuals() {
|
||||||
/* glFrontFace(GL_CW); */
|
/* glFrontFace(GL_CW); */
|
||||||
glEnable( GL_CULL_FACE );
|
glEnable( GL_CULL_FACE );
|
||||||
|
|
||||||
|
/* glDisable( GL_DITHER ); */
|
||||||
|
|
||||||
/* If enabled, normal vectors specified with glNormal are scaled
|
/* If enabled, normal vectors specified with glNormal are scaled
|
||||||
to unit length after transformation. See glNormal. */
|
to unit length after transformation. See glNormal. */
|
||||||
glEnable( GL_NORMALIZE );
|
glEnable( GL_NORMALIZE );
|
||||||
|
@ -570,9 +564,12 @@ int main( int argc, char *argv[] ) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.31 1997/12/12 21:41:25 curt
|
/* Revision 1.32 1997/12/15 20:59:08 curt
|
||||||
/* More light/material property tweaking ... still a ways off.
|
/* Misc. tweaks.
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.31 1997/12/12 21:41:25 curt
|
||||||
|
* More light/material property tweaking ... still a ways off.
|
||||||
|
*
|
||||||
* Revision 1.30 1997/12/12 19:52:47 curt
|
* Revision 1.30 1997/12/12 19:52:47 curt
|
||||||
* Working on lightling and material properties.
|
* Working on lightling and material properties.
|
||||||
*
|
*
|
||||||
|
|
|
@ -115,7 +115,7 @@ void fgInitSubsystems( void ) {
|
||||||
/* A random test position */
|
/* A random test position */
|
||||||
/* FG_Longitude = ( 88128.00 / 3600.0 ) * DEG_TO_RAD; */
|
/* FG_Longitude = ( 88128.00 / 3600.0 ) * DEG_TO_RAD; */
|
||||||
/* FG_Latitude = ( 93312.00 / 3600.0 ) * DEG_TO_RAD; */
|
/* FG_Latitude = ( 93312.00 / 3600.0 ) * DEG_TO_RAD; */
|
||||||
FG_Runway_altitude = 8500.0;
|
FG_Runway_altitude = 4000.0;
|
||||||
FG_Altitude = FG_Runway_altitude + 3.758099;
|
FG_Altitude = FG_Runway_altitude + 3.758099;
|
||||||
|
|
||||||
printf("Initial position is: (%.4f, %.4f, %.2f)\n",
|
printf("Initial position is: (%.4f, %.4f, %.2f)\n",
|
||||||
|
@ -218,9 +218,12 @@ void fgInitSubsystems( void ) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.16 1997/12/12 19:52:48 curt
|
/* Revision 1.17 1997/12/15 20:59:09 curt
|
||||||
/* Working on lightling and material properties.
|
/* Misc. tweaks.
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.16 1997/12/12 19:52:48 curt
|
||||||
|
* Working on lightling and material properties.
|
||||||
|
*
|
||||||
* Revision 1.15 1997/12/11 04:43:55 curt
|
* Revision 1.15 1997/12/11 04:43:55 curt
|
||||||
* Fixed sun vector and lighting problems. I thing the moon is now lit
|
* Fixed sun vector and lighting problems. I thing the moon is now lit
|
||||||
* correctly.
|
* correctly.
|
||||||
|
|
|
@ -90,7 +90,7 @@ void fgAstroRender() {
|
||||||
glDisable( GL_FOG );
|
glDisable( GL_FOG );
|
||||||
|
|
||||||
/* set the sun position */
|
/* set the sun position */
|
||||||
/* glLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec_inv );*/
|
glLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec_inv );
|
||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
|
||||||
|
@ -104,15 +104,15 @@ void fgAstroRender() {
|
||||||
#endif
|
#endif
|
||||||
glRotatef( angle, 0.0, 0.0, -1.0 );
|
glRotatef( angle, 0.0, 0.0, -1.0 );
|
||||||
|
|
||||||
|
/* render the moon */
|
||||||
|
fgMoonRender();
|
||||||
|
|
||||||
/* render the stars */
|
/* render the stars */
|
||||||
fgStarsRender();
|
fgStarsRender();
|
||||||
|
|
||||||
/* render the sun */
|
/* render the sun */
|
||||||
fgSunRender();
|
fgSunRender();
|
||||||
|
|
||||||
/* render the moon */
|
|
||||||
fgMoonRender();
|
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
/* reenable fog effects */
|
/* reenable fog effects */
|
||||||
|
@ -121,9 +121,12 @@ void fgAstroRender() {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.6 1997/12/12 21:41:27 curt
|
/* Revision 1.7 1997/12/15 20:59:09 curt
|
||||||
/* More light/material property tweaking ... still a ways off.
|
/* Misc. tweaks.
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.6 1997/12/12 21:41:27 curt
|
||||||
|
* More light/material property tweaking ... still a ways off.
|
||||||
|
*
|
||||||
* Revision 1.5 1997/12/12 19:52:54 curt
|
* Revision 1.5 1997/12/12 19:52:54 curt
|
||||||
* Working on lightling and material properties.
|
* Working on lightling and material properties.
|
||||||
*
|
*
|
||||||
|
|
|
@ -252,7 +252,7 @@ void fgMoonInit() {
|
||||||
yMoon = 60000.0 * sin(moonPos.RightAscension) * cos(moonPos.Declination);
|
yMoon = 60000.0 * sin(moonPos.RightAscension) * cos(moonPos.Declination);
|
||||||
zMoon = 60000.0 * sin(moonPos.Declination);
|
zMoon = 60000.0 * sin(moonPos.Declination);
|
||||||
|
|
||||||
glutSolidSphere(1.0, 10, 10);
|
glutSolidSphere(1.0, 15, 15);
|
||||||
|
|
||||||
glEndList();
|
glEndList();
|
||||||
}
|
}
|
||||||
|
@ -270,7 +270,8 @@ void fgMoonRender() {
|
||||||
glLightfv(GL_LIGHT0, GL_AMBIENT, l->scene_clear );
|
glLightfv(GL_LIGHT0, GL_AMBIENT, l->scene_clear );
|
||||||
glLightfv(GL_LIGHT0, GL_DIFFUSE, moon_color );
|
glLightfv(GL_LIGHT0, GL_DIFFUSE, moon_color );
|
||||||
|
|
||||||
glMaterialfv(GL_FRONT, GL_AMBIENT, black);
|
glMaterialfv(GL_FRONT, GL_AMBIENT, l->scene_clear );
|
||||||
|
glMaterialfv(GL_FRONT, GL_AMBIENT, moon_color );
|
||||||
glMaterialfv(GL_FRONT, GL_DIFFUSE, moon_color);
|
glMaterialfv(GL_FRONT, GL_DIFFUSE, moon_color);
|
||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
|
|
@ -60,41 +60,44 @@ clean:
|
||||||
|
|
||||||
source-tar: clean
|
source-tar: clean
|
||||||
(cd ../..; \
|
(cd ../..; \
|
||||||
tar cvzf source-$(VERSION).tar.gz FlightGear/fgtop FlightGear/COPYING \
|
tar cvzf source-$(FG_VERSION).tar.gz FlightGear/fgtop \
|
||||||
FlightGear/Docs FlightGear/Src FlightGear/Thanks)
|
FlightGear/COPYING FlightGear/Docs FlightGear/Src FlightGear/Thanks)
|
||||||
|
|
||||||
source-zip: clean
|
source-zip: clean
|
||||||
(cd ../..; \
|
(cd ../..; \
|
||||||
zip -r source-$(VERSION).zip FlightGear/fgtop FlightGear/COPYING \
|
zip -r source-$(FG_VERSION).zip FlightGear/fgtop
|
||||||
FlightGear/Docs FlightGear/Src FlightGear/Thanks)
|
FlightGear/COPYING FlightGear/Docs FlightGear/Src FlightGear/Thanks)
|
||||||
|
|
||||||
scenery-tar:
|
scenery-tar:
|
||||||
(cd ../..; \
|
(cd ../..; \
|
||||||
tar cvzf scenery-$(VERSION).tar.gz FlightGear/Scenery)
|
tar cvzf scenery-$(FG_VERSION).tar.gz FlightGear/Scenery)
|
||||||
|
|
||||||
scenery-zip:
|
scenery-zip:
|
||||||
(cd ../..; \
|
(cd ../..; \
|
||||||
zip -r scenery-$(VERSION).zip FlightGear/Scenery)
|
zip -r scenery-$(FG_VERSION).zip FlightGear/Scenery)
|
||||||
|
|
||||||
bin-tar: all
|
bin-tar: all
|
||||||
cp Main/fg-$(VERSION) runfg ..
|
cp Main/fg-$(FG_VERSION) runfg ..
|
||||||
$(LN) ../fg-$(VERSION) ../fg$(VERSION_MAJOR)
|
$(LN) ../fg-$(FG_VERSION) ../fg$(FG_VERSION_MAJOR)
|
||||||
(cd ../..; \
|
(cd ../..; \
|
||||||
tar cvzf bin-$(VERSION).tar.gz FlightGear/fgtop \
|
tar cvzf bin-$(FG_VERSION).tar.gz FlightGear/fgtop \
|
||||||
FlightGear/fg-$(VERSION) FlightGear/fg$(VERSION_MAJOR) \
|
FlightGear/fg-$(FG_VERSION) FlightGear/fg$(FG_VERSION_MAJOR) \
|
||||||
FlightGear/runfg FlightGear/COPYING FlightGear/Docs FlightGear/Thanks)
|
FlightGear/runfg FlightGear/COPYING FlightGear/Docs FlightGear/Thanks)
|
||||||
|
|
||||||
bin-zip:
|
bin-zip:
|
||||||
cp Main/fg$(VERSION_MAJOR).exe Main/cygwin.dll runfg.bat ..
|
cp Main/fg$(FG_VERSION_MAJOR).exe Main/cygwin.dll runfg.bat ..
|
||||||
(cd ../..; \
|
(cd ../..; \
|
||||||
zip -r bin-$(VERSION).zip FlightGear/fgtop \
|
zip -r bin-$(FG_VERSION).zip FlightGear/fgtop \
|
||||||
FlightGear/fg$(VERSION_MAJOR).exe FlightGear/runfg.bat \
|
FlightGear/fg$(FG_VERSION_MAJOR).exe FlightGear/runfg.bat \
|
||||||
FlightGear/cygwin.dll FlightGear/COPYING FlightGear/Docs \
|
FlightGear/cygwin.dll FlightGear/COPYING FlightGear/Docs \
|
||||||
FlightGear/Thanks)
|
FlightGear/Thanks)
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# $Log$
|
# $Log$
|
||||||
|
# Revision 1.31 1997/12/15 20:59:08 curt
|
||||||
|
# Misc. tweaks.
|
||||||
|
#
|
||||||
# Revision 1.30 1997/12/10 01:19:42 curt
|
# Revision 1.30 1997/12/10 01:19:42 curt
|
||||||
# Tweaks for verion 0.15 release.
|
# Tweaks for verion 0.15 release.
|
||||||
#
|
#
|
||||||
|
|
|
@ -233,7 +233,7 @@ void fgTimeUpdate(struct fgFLIGHT *f, struct fgTIME *t) {
|
||||||
/* get current Unix calendar time (in seconds) */
|
/* get current Unix calendar time (in seconds) */
|
||||||
/* warp = 60; */
|
/* warp = 60; */
|
||||||
warp += 0;
|
warp += 0;
|
||||||
t->cur_time = time(NULL) + (3) * 60 * 60;
|
t->cur_time = time(NULL) + (0) * 60 * 60;
|
||||||
t->cur_time += warp;
|
t->cur_time += warp;
|
||||||
printf("Current Unix calendar time = %ld warp = %ld\n", t->cur_time, warp);
|
printf("Current Unix calendar time = %ld warp = %ld\n", t->cur_time, warp);
|
||||||
|
|
||||||
|
@ -285,9 +285,12 @@ void fgTimeUpdate(struct fgFLIGHT *f, struct fgTIME *t) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.18 1997/12/12 21:41:31 curt
|
/* Revision 1.19 1997/12/15 20:59:10 curt
|
||||||
/* More light/material property tweaking ... still a ways off.
|
/* Misc. tweaks.
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.18 1997/12/12 21:41:31 curt
|
||||||
|
* More light/material property tweaking ... still a ways off.
|
||||||
|
*
|
||||||
* Revision 1.17 1997/12/12 19:53:04 curt
|
* Revision 1.17 1997/12/12 19:53:04 curt
|
||||||
* Working on lightling and material properties.
|
* Working on lightling and material properties.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue