Generate terrain normals on the fly.
#include <stdio.h>
#include "aircraft.h"
-#include "../constants.h"
+#include "../Include/constants.h"
/* This is a record containing all the info for the aircraft currently
/* $Log$
-/* Revision 1.12 1997/12/10 22:37:37 curt
-/* Prepended "fg" on the name of all global structures that didn't have it yet.
-/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+/* Revision 1.13 1997/12/15 23:54:30 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.12 1997/12/10 22:37:37 curt
+ * Prepended "fg" on the name of all global structures that didn't have it yet.
+ * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+ *
* Revision 1.11 1997/09/13 02:00:05 curt
* Mostly working on stars and generating sidereal time for accurate star
* placement.
aircraft.o: aircraft.c aircraft.h ../Flight/flight.h \
../Flight/Slew/slew.h ../Flight/LaRCsim/ls_interface.h \
../Flight/LaRCsim/../flight.h ../Controls/controls.h \
- ../Controls/../limits.h ../constants.h
+ ../Controls/../Include/limits.h ../Include/constants.h
#include <stdlib.h>
#include "cockpit.h"
-#include "../constants.h"
+#include "../Include/constants.h"
#include "../Aircraft/aircraft.h"
#include "../Scenery/mesh.h"
/* $Log$
-/* Revision 1.2 1997/12/10 22:37:38 curt
-/* Prepended "fg" on the name of all global structures that didn't have it yet.
-/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+/* Revision 1.3 1997/12/15 23:54:33 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.2 1997/12/10 22:37:38 curt
+ * Prepended "fg" on the name of all global structures that didn't have it yet.
+ * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+ *
* Revision 1.1 1997/08/29 18:03:20 curt
* Initial revision.
*
../Aircraft/../Flight/LaRCsim/ls_interface.h \
../Aircraft/../Flight/LaRCsim/../flight.h \
../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../Flight/flight.h \
- ../Controls/controls.h ../constants.h ../Scenery/mesh.h \
- ../Scenery/scenery.h ../Scenery/../types.h ../Math/mat3.h \
- ../Math/polar.h ../Math/../types.h ../Time/fg_timer.h \
+ ../Aircraft/../Controls/../Include/limits.h ../Flight/flight.h \
+ ../Controls/controls.h ../Include/constants.h ../Scenery/mesh.h \
+ ../Scenery/scenery.h ../Scenery/../Include/types.h ../Math/mat3.h \
+ ../Math/polar.h ../Math/../Include/types.h ../Time/fg_timer.h \
../Math/fg_random.h ../Weather/weather.h
hud.o: hud.c hud.h ../Aircraft/aircraft.h \
../Aircraft/../Flight/flight.h ../Aircraft/../Flight/Slew/slew.h \
../Aircraft/../Flight/LaRCsim/ls_interface.h \
../Aircraft/../Flight/LaRCsim/../flight.h \
../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../Flight/flight.h \
- ../Controls/controls.h ../constants.h ../Scenery/mesh.h \
- ../Scenery/scenery.h ../Scenery/../types.h ../Math/mat3.h \
- ../Math/polar.h ../Math/../types.h ../Time/fg_timer.h \
+ ../Aircraft/../Controls/../Include/limits.h ../Flight/flight.h \
+ ../Controls/controls.h ../Include/constants.h ../Scenery/mesh.h \
+ ../Scenery/scenery.h ../Scenery/../Include/types.h ../Math/mat3.h \
+ ../Math/polar.h ../Math/../Include/types.h ../Time/fg_timer.h \
../Math/fg_random.h ../Weather/weather.h
test.o: test.c test.h ../Aircraft/aircraft.h \
../Aircraft/../Flight/flight.h ../Aircraft/../Flight/Slew/slew.h \
../Aircraft/../Flight/LaRCsim/ls_interface.h \
../Aircraft/../Flight/LaRCsim/../flight.h \
../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../Flight/flight.h \
- ../Controls/controls.h ../constants.h ../Scenery/mesh.h \
- ../Scenery/scenery.h ../Scenery/../types.h ../Math/mat3.h \
- ../Math/polar.h ../Math/../types.h ../Time/fg_timer.h \
+ ../Aircraft/../Controls/../Include/limits.h ../Flight/flight.h \
+ ../Controls/controls.h ../Include/constants.h ../Scenery/mesh.h \
+ ../Scenery/scenery.h ../Scenery/../Include/types.h ../Math/mat3.h \
+ ../Math/polar.h ../Math/../Include/types.h ../Time/fg_timer.h \
../Math/fg_random.h ../Weather/weather.h
#endif /* not WIN32 */
#include "hud.h"
-#include "../constants.h"
+#include "../Include/constants.h"
#include "../Aircraft/aircraft.h"
#include "../Scenery/mesh.h"
/* $Log$
-/* Revision 1.5 1997/12/10 22:37:39 curt
-/* Prepended "fg" on the name of all global structures that didn't have it yet.
-/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+/* Revision 1.6 1997/12/15 23:54:34 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.5 1997/12/10 22:37:39 curt
+ * Prepended "fg" on the name of all global structures that didn't have it yet.
+ * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+ *
* Revision 1.4 1997/09/23 00:29:32 curt
* Tweaks to get things to compile with gcc-win32.
*
#define CONTROLS_H
-#include "../limits.h"
+#include "../Include/limits.h"
/* Define a structure containing the control parameters */
/* $Log$
-/* Revision 1.6 1997/12/10 22:37:41 curt
-/* Prepended "fg" on the name of all global structures that didn't have it yet.
-/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+/* Revision 1.7 1997/12/15 23:54:36 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.6 1997/12/10 22:37:41 curt
+ * Prepended "fg" on the name of all global structures that didn't have it yet.
+ * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+ *
* Revision 1.5 1997/08/27 03:30:02 curt
* Changed naming scheme of basic shared structures.
*
-controls.o: controls.c controls.h ../limits.h ../Aircraft/aircraft.h \
- ../Aircraft/../Flight/flight.h ../Aircraft/../Flight/Slew/slew.h \
+controls.o: controls.c controls.h ../Include/limits.h \
+ ../Aircraft/aircraft.h ../Aircraft/../Flight/flight.h \
+ ../Aircraft/../Flight/Slew/slew.h \
../Aircraft/../Flight/LaRCsim/ls_interface.h \
../Aircraft/../Flight/LaRCsim/../flight.h \
../Aircraft/../Controls/controls.h
../Slew/slew.h ../LaRCsim/ls_interface.h ../../Aircraft/aircraft.h \
../../Aircraft/../Flight/flight.h \
../../Aircraft/../Controls/controls.h \
- ../../Aircraft/../Controls/../limits.h
+ ../../Aircraft/../Controls/../Include/limits.h
ls_model.o: ls_model.c ls_types.h
ls_step.o: ls_step.c ls_types.h ls_constants.h ls_generic.h
ls_sync.o: ls_sync.c ls_types.h ls_sim_control.h
#endif
#include <GL/glut.h>
+#include "../XGL/xgl.h"
#include <stdio.h>
#include "GLUTkey.h"
#include "views.h"
-#include "../constants.h"
+#include "../Include/constants.h"
#include "../Aircraft/aircraft.h"
#include "../Weather/weather.h"
return;
case 90: /* Z key */
w->visibility /= 1.10;
- glFogf(GL_FOG_END, w->visibility);
+ xglFogf(GL_FOG_END, w->visibility);
printf("Fog density = %.4f\n", w->visibility);
return;
}
return;
case 122: /* z key */
w->visibility *= 1.10;
- glFogf(GL_FOG_END, w->visibility);
+ xglFogf(GL_FOG_END, w->visibility);
printf("Fog density = %.4f\n", w->visibility);
return;
case 27: /* ESC */
/* $Log$
-/* Revision 1.22 1997/12/10 22:37:45 curt
-/* Prepended "fg" on the name of all global structures that didn't have it yet.
-/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+/* Revision 1.23 1997/12/15 23:54:44 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.22 1997/12/10 22:37:45 curt
+ * Prepended "fg" on the name of all global structures that didn't have it yet.
+ * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+ *
* Revision 1.21 1997/08/27 21:32:23 curt
* Restructured view calculation code. Added stars.
*
#endif
#include <GL/glut.h>
+#include "../XGL/xgl.h"
#include <stdio.h>
#include "GLUTkey.h"
#include "fg_init.h"
#include "views.h"
-#include "../constants.h"
-#include "../general.h"
+#include "../Include/constants.h"
+#include "../Include/general.h"
#include "../Aircraft/aircraft.h"
#include "../Cockpit/cockpit.h"
t = &cur_time_params;
w = ¤t_weather;
- glEnable( GL_DEPTH_TEST );
- /* glFrontFace(GL_CW); */
- glEnable( GL_CULL_FACE );
+ xglEnable( GL_DEPTH_TEST );
+ /* xglFrontFace(GL_CW); */
+ xglEnable( GL_CULL_FACE );
- /* glDisable( GL_DITHER ); */
+ /* xglDisable( GL_DITHER ); */
/* If enabled, normal vectors specified with glNormal are scaled
to unit length after transformation. See glNormal. */
- glEnable( GL_NORMALIZE );
+ xglEnable( GL_NORMALIZE );
- glEnable( GL_LIGHTING );
- glEnable( GL_LIGHT0 );
- glLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
+ xglEnable( GL_LIGHTING );
+ xglEnable( GL_LIGHT0 );
+ xglLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
- glShadeModel( GL_FLAT ); /* glShadeModel( GL_SMOOTH ); */
+ xglShadeModel( GL_FLAT ); /* xglShadeModel( GL_SMOOTH ); */
- glEnable( GL_FOG );
- glFogi (GL_FOG_MODE, GL_LINEAR);
- /* glFogf (GL_FOG_START, 1.0); */
- glFogf (GL_FOG_END, w->visibility);
- glFogfv (GL_FOG_COLOR, fgFogColor);
- /* glFogf (GL_FOG_DENSITY, w->visibility); */
- /* glHint (GL_FOG_HINT, GL_FASTEST); */
+ xglEnable( GL_FOG );
+ xglFogi (GL_FOG_MODE, GL_LINEAR);
+ /* xglFogf (GL_FOG_START, 1.0); */
+ xglFogf (GL_FOG_END, w->visibility);
+ xglFogfv (GL_FOG_COLOR, fgFogColor);
+ /* xglFogf (GL_FOG_DENSITY, w->visibility); */
+ /* xglHint (GL_FOG_HINT, GL_FASTEST); */
/* initial screen color */
- glClearColor(0.0, 0.0, 0.0, 1.0);
+ xglClearColor(0.0, 0.0, 0.0, 1.0);
}
fgViewUpdate(f, v);
/* Tell GL we are about to modify the projection parameters */
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
+ xglMatrixMode(GL_PROJECTION);
+ xglLoadIdentity();
gluPerspective(55.0, 1.0/win_ratio, 1.0, 200000.0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
+ xglMatrixMode(GL_MODELVIEW);
+ xglLoadIdentity();
/* set up our view volume */
gluLookAt(v->view_pos.x, v->view_pos.y, v->view_pos.z,
- v->view_pos.x + v->view_forward[0],
- v->view_pos.y + v->view_forward[1],
- v->view_pos.z + v->view_forward[2],
- v->view_up[0], v->view_up[1], v->view_up[2]);
+ v->view_pos.x + v->view_forward[0],
+ v->view_pos.y + v->view_forward[1],
+ v->view_pos.z + v->view_forward[2],
+ v->view_up[0], v->view_up[1], v->view_up[2]);
/* set the sun position */
- glLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
+ xglLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
/* calculate lighting parameters based on sun's relative angle to
* local up */
l->scene_diffuse[2] = white[2] * diffuse;
/* set lighting parameters */
- glLightfv(GL_LIGHT0, GL_AMBIENT, l->scene_ambient );
- glLightfv(GL_LIGHT0, GL_DIFFUSE, l->scene_diffuse );
+ xglLightfv(GL_LIGHT0, GL_AMBIENT, l->scene_ambient );
+ xglLightfv(GL_LIGHT0, GL_DIFFUSE, l->scene_diffuse );
/* set fog color */
l->scene_fog[0] = fgFogColor[0] * (ambient + diffuse);
l->scene_fog[1] = fgFogColor[1] * (ambient + diffuse);
l->scene_fog[2] = fgFogColor[2] * (ambient + diffuse);
l->scene_fog[3] = fgFogColor[3];
- glFogfv (GL_FOG_COLOR, l->scene_fog);
+ xglFogfv (GL_FOG_COLOR, l->scene_fog);
/* set sky color */
l->scene_clear[0] = sky_color[0] * sky_brightness;
l->scene_clear[2] = sky_color[2] * sky_brightness;
l->scene_clear[3] = sky_color[3];
- glClearColor(l->scene_clear[0], l->scene_clear[1],
- l->scene_clear[2], l->scene_clear[3]);
+ xglClearColor(l->scene_clear[0], l->scene_clear[1],
+ l->scene_clear[2], l->scene_clear[3]);
}
/* update view volume parameters */
fgUpdateViewParams();
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
+ xglClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
/* Tell GL we are switching to model view parameters */
- glMatrixMode(GL_MODELVIEW);
- /* glLoadIdentity(); */
+ xglMatrixMode(GL_MODELVIEW);
+ /* xglLoadIdentity(); */
/* draw scenery */
fgSceneryRender();
fgCockpitUpdate();
#ifdef GLUT
- glutSwapBuffers();
+ xglutSwapBuffers();
#endif
}
int num_lines = 16;
float line_len, line_width_2, cur_pos;
- runway = glGenLists(1);
- glNewList(runway, GL_COMPILE);
+ runway = xglGenLists(1);
+ xglNewList(runway, GL_COMPILE);
*/
/* draw concrete */
-/* glBegin(GL_POLYGON);
- glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, concrete );
- glNormal3f(0.0, 0.0, 1.0);
-
- glVertex3d( 0.0, -width/2.0, 0.0);
- glVertex3d( 0.0, width/2.0, 0.0);
- glVertex3d(length, width/2.0, 0.0);
- glVertex3d(length, -width/2.0, 0.0);
- glEnd();
+/* xglBegin(GL_POLYGON);
+ xglMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, concrete );
+ xglNormal3f(0.0, 0.0, 1.0);
+
+ xglVertex3d( 0.0, -width/2.0, 0.0);
+ xglVertex3d( 0.0, width/2.0, 0.0);
+ xglVertex3d(length, width/2.0, 0.0);
+ xglVertex3d(length, -width/2.0, 0.0);
+ xglEnd();
*/
/* draw center line */
-/* glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, line );
+/* xglMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, line );
line_len = length / ( 2 * num_lines + 1);
printf("line_len = %.3f\n", line_len);
line_width_2 = 0.02;
cur_pos = line_len;
for ( i = 0; i < num_lines; i++ ) {
- glBegin(GL_POLYGON);
- glVertex3d( cur_pos, -line_width_2, 0.005);
- glVertex3d( cur_pos, line_width_2, 0.005);
+ xglBegin(GL_POLYGON);
+ xglVertex3d( cur_pos, -line_width_2, 0.005);
+ xglVertex3d( cur_pos, line_width_2, 0.005);
cur_pos += line_len;
- glVertex3d( cur_pos, line_width_2, 0.005);
- glVertex3d( cur_pos, -line_width_2, 0.005);
+ xglVertex3d( cur_pos, line_width_2, 0.005);
+ xglVertex3d( cur_pos, -line_width_2, 0.005);
cur_pos += line_len;
- glEnd();
+ xglEnd();
}
- glEndList();
+ xglEndList();
return(runway);
}
/*static void fgSceneryDraw_OLD() {
static float z = 32.35;
- glPushMatrix();
+ xglPushMatrix();
- glCallList(scenery);
+ xglCallList(scenery);
printf("*** Drawing runway at %.2f\n", z);
- glTranslatef( -398391.28, 120070.41, 32.35);
- glRotatef(170.0, 0.0, 0.0, 1.0);
- glCallList(runway);
+ xglTranslatef( -398391.28, 120070.41, 32.35);
+ xglRotatef(170.0, 0.0, 0.0, 1.0);
+ xglCallList(runway);
- glPopMatrix();
+ xglPopMatrix();
}
*/
}
/* Inform gl of our view window size */
- glViewport(0, 0, (GLint)width, (GLint)height);
+ xglViewport(0, 0, (GLint)width, (GLint)height);
fgUpdateViewParams();
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
+ xglClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
}
#ifdef GLUT
/* initialize GLUT */
- glutInit(&argc, argv);
+ xglutInit(&argc, argv);
/* Define Display Parameters */
- glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
+ xglutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
/* Define initial window size */
- glutInitWindowSize(640, 480);
+ xglutInitWindowSize(640, 480);
/* Initialize windows */
- glutCreateWindow("Flight Gear");
+ xglutCreateWindow("Flight Gear");
#endif
/* This is the general house keeping init routine */
#ifdef GLUT
/* call fgReshape() on window resizes */
- glutReshapeFunc( fgReshape );
+ xglutReshapeFunc( fgReshape );
/* call key() on keyboard event */
- glutKeyboardFunc( GLUTkey );
+ xglutKeyboardFunc( GLUTkey );
glutSpecialFunc( GLUTspecialkey );
/* call fgMainLoop() whenever there is nothing else to do */
- glutIdleFunc( fgMainLoop );
+ xglutIdleFunc( fgMainLoop );
/* draw the scene */
- glutDisplayFunc( fgUpdateVisuals );
+ xglutDisplayFunc( fgUpdateVisuals );
/* pass control off to the GLUT event handler */
glutMainLoop();
/* $Log$
-/* Revision 1.32 1997/12/15 20:59:08 curt
-/* Misc. tweaks.
+/* 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.
+ *
* Revision 1.31 1997/12/12 21:41:25 curt
* More light/material property tweaking ... still a ways off.
*
../Controls/libControls.a ../Flight/libFlight.a \
../Joystick/libJoystick.a ../Flight/LaRCsim/libLaRCsim.a \
../Flight/Slew/libSlew.a ../Scenery/libScenery.a \
- ../Time/libTime.a ../Weather/libWeather.a ../Math/libMath.a
+ ../Time/libTime.a ../Weather/libWeather.a ../Math/libMath.a \
include ../make.inc
CFLAGS = $(FG_CFLAGS) $(INTERFACE_FLAGS)
-LIBS = $(INTERFACE_LIBS) $(GRAPHICS_LIBS) -lm -lfl
+LIBS = $(FG_DEBUG_LIBS) $(INTERFACE_LIBS) $(GRAPHICS_LIBS) -lm -lfl
TARGET=fg-$(FG_VERSION)
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.38 1997/12/15 23:54:47 curt
+# Add xgl wrappers for debugging.
+# Generate terrain normals on the fly.
+#
# Revision 1.37 1997/12/12 21:41:26 curt
# More light/material property tweaking ... still a ways off.
#
-GLUTkey.o: GLUTkey.c GLUTkey.h views.h ../types.h ../Flight/flight.h \
- ../Flight/Slew/slew.h ../Flight/LaRCsim/ls_interface.h \
- ../Flight/LaRCsim/../flight.h ../Math/mat3.h ../constants.h \
- ../Aircraft/aircraft.h ../Aircraft/../Flight/flight.h \
- ../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../Weather/weather.h
-GLUTmain.o: GLUTmain.c GLUTkey.h fg_init.h views.h ../types.h \
+GLUTkey.o: GLUTkey.c GLUTkey.h views.h ../Include/types.h \
../Flight/flight.h ../Flight/Slew/slew.h \
../Flight/LaRCsim/ls_interface.h ../Flight/LaRCsim/../flight.h \
- ../Math/mat3.h ../constants.h ../general.h ../Aircraft/aircraft.h \
+ ../Math/mat3.h ../Include/constants.h ../Aircraft/aircraft.h \
../Aircraft/../Flight/flight.h ../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../Cockpit/cockpit.h \
+ ../Aircraft/../Controls/../Include/limits.h ../Weather/weather.h
+GLUTmain.o: GLUTmain.c GLUTkey.h fg_init.h views.h ../Include/types.h \
+ ../Flight/flight.h ../Flight/Slew/slew.h \
+ ../Flight/LaRCsim/ls_interface.h ../Flight/LaRCsim/../flight.h \
+ ../Math/mat3.h ../Include/constants.h ../Include/general.h \
+ ../Aircraft/aircraft.h ../Aircraft/../Flight/flight.h \
+ ../Aircraft/../Controls/controls.h \
+ ../Aircraft/../Controls/../Include/limits.h ../Cockpit/cockpit.h \
../Cockpit/hud.h ../Cockpit/../Aircraft/aircraft.h \
../Cockpit/../Flight/flight.h ../Cockpit/../Controls/controls.h \
../Joystick/joystick.h ../Math/fg_geodesy.h ../Math/polar.h \
- ../Math/../types.h ../Scenery/mesh.h ../Scenery/scenery.h \
- ../Scenery/../types.h ../Time/fg_time.h ../Time/../types.h \
- ../Time/../Flight/flight.h ../Time/fg_timer.h ../Time/sunpos.h \
- ../Weather/weather.h
-fg_init.o: fg_init.c fg_init.h views.h ../types.h ../Flight/flight.h \
- ../Flight/Slew/slew.h ../Flight/LaRCsim/ls_interface.h \
- ../Flight/LaRCsim/../flight.h ../Math/mat3.h ../constants.h \
- ../general.h ../Aircraft/aircraft.h ../Aircraft/../Flight/flight.h \
+ ../Math/../Include/types.h ../Scenery/mesh.h ../Scenery/scenery.h \
+ ../Scenery/../Include/types.h ../Time/fg_time.h \
+ ../Time/../Include/types.h ../Time/../Flight/flight.h \
+ ../Time/fg_timer.h ../Time/sunpos.h ../Weather/weather.h
+fg_init.o: fg_init.c fg_init.h views.h ../Include/types.h \
+ ../Flight/flight.h ../Flight/Slew/slew.h \
+ ../Flight/LaRCsim/ls_interface.h ../Flight/LaRCsim/../flight.h \
+ ../Math/mat3.h ../Include/constants.h ../Include/general.h \
+ ../Aircraft/aircraft.h ../Aircraft/../Flight/flight.h \
../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../Cockpit/cockpit.h \
+ ../Aircraft/../Controls/../Include/limits.h ../Cockpit/cockpit.h \
../Cockpit/hud.h ../Cockpit/../Aircraft/aircraft.h \
../Cockpit/../Flight/flight.h ../Cockpit/../Controls/controls.h \
../Joystick/joystick.h ../Math/fg_random.h ../Scenery/mesh.h \
../Scenery/astro.h ../Scenery/stars.h ../Scenery/scenery.h \
- ../Scenery/../types.h ../Time/fg_time.h ../Time/../types.h \
- ../Time/../Flight/flight.h ../Time/sunpos.h ../Weather/weather.h
-views.o: views.c views.h ../types.h ../Flight/flight.h \
+ ../Scenery/../Include/types.h ../Time/fg_time.h \
+ ../Time/../Include/types.h ../Time/../Flight/flight.h \
+ ../Time/sunpos.h ../Weather/weather.h
+views.o: views.c views.h ../Include/types.h ../Flight/flight.h \
../Flight/Slew/slew.h ../Flight/LaRCsim/ls_interface.h \
- ../Flight/LaRCsim/../flight.h ../Math/mat3.h ../constants.h \
- ../Math/polar.h ../Math/../types.h ../Scenery/scenery.h \
- ../Scenery/../types.h
+ ../Flight/LaRCsim/../flight.h ../Math/mat3.h ../Include/constants.h \
+ ../Math/polar.h ../Math/../Include/types.h ../Scenery/scenery.h \
+ ../Scenery/../Include/types.h
#include "fg_init.h"
#include "views.h"
-#include "../constants.h"
-#include "../general.h"
+#include "../Include/constants.h"
+#include "../Include/general.h"
#include "../Aircraft/aircraft.h"
#include "../Cockpit/cockpit.h"
/* $Log$
-/* Revision 1.17 1997/12/15 20:59:09 curt
-/* Misc. tweaks.
+/* 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.
+ *
* Revision 1.16 1997/12/12 19:52:48 curt
* Working on lightling and material properties.
*
#include "views.h"
-#include "../constants.h"
+#include "../Include/constants.h"
#include "../Flight/flight.h"
#include "../Math/mat3.h"
/* $Log$
-/* 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 {}"
+/* 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 {}"
+ *
* Revision 1.1 1997/08/27 21:31:17 curt
* Initial revision.
*
#define VIEWS_H
-#include "../types.h"
+#include "../Include/types.h"
#include "../Flight/flight.h"
#include "../Math/mat3.h"
/* $Log$
-/* 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 {}"
+/* 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 {}"
+ *
* Revision 1.1 1997/08/27 21:31:18 curt
* Initial revision.
*
#include <time.h>
#include <GL/glut.h>
+#include "../XGL/xgl.h"
#include "astro.h"
#include "moon.h"
#include "stars.h"
#include "sun.h"
-#include "../constants.h"
-#include "../general.h"
+#include "../Include/constants.h"
+#include "../Include/general.h"
#include "../Main/views.h"
#include "../Aircraft/aircraft.h"
}
/* Disable fog effects */
- glDisable( GL_FOG );
+ xglDisable( GL_FOG );
/* set the sun position */
- glLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec_inv );
+ xglLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec_inv );
- glPushMatrix();
+ xglPushMatrix();
/* Translate to view position */
- glTranslatef( v->view_pos.x, v->view_pos.y, v->view_pos.z );
+ xglTranslatef( v->view_pos.x, v->view_pos.y, v->view_pos.z );
/* Rotate based on gst (side real time) */
angle = t->gst * 15.041085; /* should be 15.041085, Curt thought it was 15*/
#ifdef DEBUG
printf("Rotating astro objects by %.2f degrees\n",angle);
#endif
- glRotatef( angle, 0.0, 0.0, -1.0 );
+ xglRotatef( angle, 0.0, 0.0, -1.0 );
/* render the moon */
fgMoonRender();
/* render the sun */
fgSunRender();
- glPopMatrix();
+ xglPopMatrix();
/* reenable fog effects */
- glEnable( GL_FOG );
+ xglEnable( GL_FOG );
}
/* $Log$
-/* Revision 1.7 1997/12/15 20:59:09 curt
-/* Misc. tweaks.
+/* Revision 1.8 1997/12/15 23:54:57 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.7 1997/12/15 20:59:09 curt
+ * Misc. tweaks.
+ *
* Revision 1.6 1997/12/12 21:41:27 curt
* More light/material property tweaking ... still a ways off.
*
astro.o: astro.c astro.h stars.h moon.h orbits.h ../Time/fg_time.h \
- ../Time/../types.h ../Time/../Flight/flight.h \
+ ../Time/../Include/types.h ../Time/../Flight/flight.h \
../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \
- ../Time/../Flight/LaRCsim/../flight.h planets.h sun.h ../constants.h \
- ../general.h ../Main/views.h ../Main/../types.h \
- ../Main/../Flight/flight.h ../Main/../Math/mat3.h \
- ../Aircraft/aircraft.h ../Aircraft/../Flight/flight.h \
- ../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h
+ ../Time/../Flight/LaRCsim/../flight.h planets.h sun.h \
+ ../Include/constants.h ../Include/general.h ../Main/views.h \
+ ../Main/../Include/types.h ../Main/../Flight/flight.h \
+ ../Main/../Math/mat3.h ../Aircraft/aircraft.h \
+ ../Aircraft/../Flight/flight.h ../Aircraft/../Controls/controls.h \
+ ../Aircraft/../Controls/../Include/limits.h
common.o: common.c common.h
geometry.o: geometry.c geometry.h mesh.h
-mesh.o: mesh.c ../constants.h ../types.h ../Math/fg_geodesy.h \
- ../Math/fg_random.h ../Math/mat3.h ../Math/polar.h ../Math/../types.h \
- mesh.h common.h scenery.h
-moon.o: moon.c orbits.h ../Time/fg_time.h ../Time/../types.h \
+mesh.o: mesh.c ../Include/constants.h ../Include/types.h \
+ ../Math/fg_geodesy.h ../Math/fg_random.h ../Math/mat3.h \
+ ../Math/polar.h ../Math/../Include/types.h mesh.h common.h scenery.h
+moon.o: moon.c orbits.h ../Time/fg_time.h ../Time/../Include/types.h \
../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \
- ../Time/../Flight/LaRCsim/../flight.h moon.h ../general.h \
- ../Main/views.h ../Main/../types.h ../Main/../Flight/flight.h \
+ ../Time/../Flight/LaRCsim/../flight.h moon.h ../Include/general.h \
+ ../Main/views.h ../Main/../Include/types.h ../Main/../Flight/flight.h \
../Main/../Math/mat3.h
-obj.o: obj.c obj.h scenery.h ../types.h ../Math/mat3.h
-orbits.o: orbits.c orbits.h ../Time/fg_time.h ../Time/../types.h \
- ../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \
+obj.o: obj.c obj.h scenery.h ../Include/types.h ../Math/mat3.h
+orbits.o: orbits.c orbits.h ../Time/fg_time.h \
+ ../Time/../Include/types.h ../Time/../Flight/flight.h \
+ ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \
- ../Time/../Flight/LaRCsim/../flight.h ../general.h
-planets.o: planets.c ../Time/fg_time.h ../Time/../types.h \
+ ../Time/../Flight/LaRCsim/../flight.h ../Include/general.h
+planets.o: planets.c ../Time/fg_time.h ../Time/../Include/types.h \
../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \
../Time/../Flight/LaRCsim/../flight.h orbits.h planets.h sun.h
-scenery.o: scenery.c ../general.h astro.h stars.h obj.h scenery.h \
- ../types.h
-stars.o: stars.c orbits.h ../Time/fg_time.h ../Time/../types.h \
+scenery.o: scenery.c ../Include/general.h astro.h stars.h obj.h \
+ scenery.h ../Include/types.h
+stars.o: stars.c orbits.h ../Time/fg_time.h ../Time/../Include/types.h \
../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \
../Time/../Flight/LaRCsim/../flight.h planets.h stars.h \
- ../constants.h ../general.h ../Aircraft/aircraft.h \
+ ../Include/constants.h ../Include/general.h ../Aircraft/aircraft.h \
../Aircraft/../Flight/flight.h ../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../Main/views.h \
- ../Main/../types.h ../Main/../Flight/flight.h ../Main/../Math/mat3.h
-sun.o: sun.c ../Time/fg_time.h ../Time/../types.h \
+ ../Aircraft/../Controls/../Include/limits.h ../Main/views.h \
+ ../Main/../Include/types.h ../Main/../Flight/flight.h \
+ ../Main/../Math/mat3.h
+sun.o: sun.c ../Time/fg_time.h ../Time/../Include/types.h \
../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \
../Time/../Flight/LaRCsim/../flight.h ../Main/views.h \
- ../Main/../types.h ../Main/../Flight/flight.h ../Main/../Math/mat3.h \
- orbits.h sun.h
+ ../Main/../Include/types.h ../Main/../Flight/flight.h \
+ ../Main/../Math/mat3.h orbits.h sun.h
#include <GL/glut.h>
-#include "../constants.h"
-#include "../types.h"
+#include "../Include/constants.h"
+#include "../Include/types.h"
#include "../Math/fg_geodesy.h"
#include "../Math/fg_random.h"
#include "../Math/mat3.h"
/* $Log$
-/* Revision 1.23 1997/10/30 12:38:44 curt
-/* Working on new scenery subsystem.
+/* Revision 1.24 1997/12/15 23:54:59 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.23 1997/10/30 12:38:44 curt
+ * Working on new scenery subsystem.
+ *
* Revision 1.22 1997/10/28 21:00:21 curt
* Changing to new terrain format.
*
#include <math.h>
#include <GL/glut.h>
+#include "../XGL/xgl.h"
#include "orbits.h"
#include "moon.h"
-#include "../general.h"
+#include "../Include/general.h"
#include "../Main/views.h"
#include "../Time/fg_time.h"
void drawTriangle(float *v1, float *v2, float *v3)
{
- glBegin(GL_POLYGON);
- //glBegin(GL_POINTS);
- glNormal3fv(v1);
- glVertex3fv(v1);
- glNormal3fv(v2);
- glVertex3fv(v2);
- glNormal3fv(v3);
- glVertex3fv(v3);
- glEnd();
+ xglBegin(GL_POLYGON);
+ //xglBegin(GL_POINTS);
+ xglNormal3fv(v1);
+ xglVertex3fv(v1);
+ xglNormal3fv(v2);
+ xglVertex3fv(v2);
+ xglNormal3fv(v3);
+ xglVertex3fv(v3);
+ xglEnd();
}
void subdivide(float *v1, float *v2, float *v3, long depth)
void display(void)
{
int i;
- glClear(GL_COLOR_BUFFER_BIT);
- glPushMatrix();
- glRotatef(spin, 0.0, 0.0, 0.0);
- glColor3f(1.0, 1.0, 0.0);
-// glBegin(GL_LINE_LOOP);
+ xglClear(GL_COLOR_BUFFER_BIT);
+ xglPushMatrix();
+ xglRotatef(spin, 0.0, 0.0, 0.0);
+ xglColor3f(1.0, 1.0, 0.0);
+// xglBegin(GL_LINE_LOOP);
for (i = 0; i < 20; i++)
{
- //glVertex3fv(&vdata[tindices[i][0]][0]);
- //glVertex3fv(&vdata[tindices[i][1]][0]);
- //glVertex3fv(&vdata[tindices[i][2]][0]);
+ //xglVertex3fv(&vdata[tindices[i][0]][0]);
+ //xglVertex3fv(&vdata[tindices[i][1]][0]);
+ //xglVertex3fv(&vdata[tindices[i][2]][0]);
subdivide(&vdata[tindices[i][0]][0],
&vdata[tindices[i][1]][0],
}
-// glEnd();
- // glFlush();
- glPopMatrix();
+// xglEnd();
+ // xglFlush();
+ xglPopMatrix();
glutSwapBuffers();
} */
l = &cur_light_params;
- moon = glGenLists(1);
- glNewList(moon, GL_COMPILE );
+ moon = xglGenLists(1);
+ xglNewList(moon, GL_COMPILE );
- /* glMaterialfv(GL_FRONT, GL_AMBIENT, l->scene_clear);
- glMaterialfv(GL_FRONT, GL_DIFFUSE, moon_color); */
+ /* xglMaterialfv(GL_FRONT, GL_AMBIENT, l->scene_clear);
+ xglMaterialfv(GL_FRONT, GL_DIFFUSE, moon_color); */
fgSolarSystemUpdate(&(pltOrbElements[1]), cur_time_params);
moonPos = fgCalculateMoon(pltOrbElements[1], pltOrbElements[0],
glutSolidSphere(1.0, 15, 15);
- glEndList();
+ xglEndList();
}
l = &cur_light_params;
/* set lighting parameters */
- glLightfv(GL_LIGHT0, GL_AMBIENT, l->scene_clear );
- glLightfv(GL_LIGHT0, GL_DIFFUSE, moon_color );
+ xglLightfv(GL_LIGHT0, GL_AMBIENT, l->scene_clear );
+ xglLightfv(GL_LIGHT0, GL_DIFFUSE, moon_color );
- glMaterialfv(GL_FRONT, GL_AMBIENT, l->scene_clear );
- glMaterialfv(GL_FRONT, GL_AMBIENT, moon_color );
- glMaterialfv(GL_FRONT, GL_DIFFUSE, moon_color);
+ xglMaterialfv(GL_FRONT, GL_AMBIENT, l->scene_clear );
+ xglMaterialfv(GL_FRONT, GL_AMBIENT, moon_color );
+ xglMaterialfv(GL_FRONT, GL_DIFFUSE, moon_color);
- glPushMatrix();
- glTranslatef(xMoon, yMoon, zMoon);
- glScalef(1400, 1400, 1400);
+ xglPushMatrix();
+ xglTranslatef(xMoon, yMoon, zMoon);
+ xglScalef(1400, 1400, 1400);
- glColor3fv(moon_color);
+ xglColor3fv(moon_color);
/* glutSolidSphere(1.0, 25, 25); */
- glCallList(moon);
+ xglCallList(moon);
- glPopMatrix();
+ xglPopMatrix();
}
#include <stdio.h>
#include <string.h>
#include <GL/glut.h>
+#include "../XGL/xgl.h"
#include "obj.h"
#include "scenery.h"
float normals[MAXNODES][3];
+/* given three points defining a triangle, calculate the normal */
+void calc_normal(float p1[3], float p2[3], float p3[3], double normal[3])
+{
+ double v1[3], v2[3];
+ float temp;
+
+ v1[0] = p2[0] - p1[0]; v1[1] = p2[1] - p1[1]; v1[2] = p2[2] - p1[2];
+ v2[0] = p3[0] - p1[0]; v2[1] = p3[1] - p1[1]; v2[2] = p3[2] - p1[2];
+
+ MAT3cross_product(normal, v1, v2);
+ MAT3_NORMALIZE_VEC(normal,temp);
+
+ printf(" Normal = %.2f %.2f %.2f\n", normal[0], normal[1], normal[2]);
+}
+
+
/* Load a .obj file and generate the GL call list */
GLint fgObjLoad(char *path) {
- char line[256], winding[256];
+ char line[256], winding_str[256];
double v1[3], v2[3], approx_normal[3], dot_prod, temp;
struct fgCartesianPoint ref;
GLint area;
FILE *f;
int first, ncount, vncount, n1, n2, n3, n4;
- int i;
+ int i, winding;
+ int last1, last2, odd;
if ( (f = fopen(path, "r")) == NULL ) {
printf("Cannot open file: %s\n", path);
exit(-1);
}
- area = glGenLists(1);
- glNewList(area, GL_COMPILE);
+ area = xglGenLists(1);
+ xglNewList(area, GL_COMPILE);
first = 1;
ncount = 1;
exit(-1);
}
} else if ( strncmp(line, "winding ", 8) == 0 ) {
- sscanf(line+8, "%s", winding);
- printf("WINDING = %s\n", winding);
+ sscanf(line+8, "%s", winding_str);
+ printf("WINDING = %s\n", winding_str);
- /* can't call glFrontFace() between glBegin() & glEnd() */
- glEnd();
+ /* can't call xglFrontFace() between xglBegin() & xglEnd() */
+ xglEnd();
first = 1;
- if ( strcmp(winding, "cw") == 0 ) {
- glFrontFace( GL_CW );
+ if ( strcmp(winding_str, "cw") == 0 ) {
+ xglFrontFace( GL_CW );
+ winding = 0;
} else {
- glFrontFace ( GL_CCW );
+ xglFrontFace ( GL_CCW );
+ winding = 1;
}
} else if ( line[0] == 't' ) {
/* start a new triangle strip */
if ( !first ) {
/* close out the previous structure and start the next */
- glEnd();
+ xglEnd();
} else {
first = 0;
}
- /* printf("new tri strip = %s", line); */
+ printf("new tri strip = %s", line);
sscanf(line, "t %d %d %d %d\n", &n1, &n2, &n3, &n4);
/* printf("(t) = "); */
/* try to get the proper rotation by calculating an
* approximate normal and seeing if it is close to the
* precalculated normal */
- /*v1[0] = nodes[n2][0] - nodes[n1][0];
+ /* v1[0] = nodes[n2][0] - nodes[n1][0];
v1[1] = nodes[n2][1] - nodes[n1][1];
v1[2] = nodes[n2][2] - nodes[n1][2];
v2[0] = nodes[n3][0] - nodes[n1][0];
/* printf("Normal ANGLE = %.3f rads.\n", angle); */
/* if ( dot_prod < -0.5 ) {
- glFrontFace( GL_CW );
+ xglFrontFace( GL_CW );
} else {
- glFrontFace( GL_CCW );
+ xglFrontFace( GL_CCW );
} */
- glBegin(GL_TRIANGLE_STRIP);
+ xglBegin(GL_TRIANGLE_STRIP);
+
+ if ( winding ) {
+ odd = 1;
+ } else {
+ odd = 0;
+ }
+
+ if ( odd ) {
+ calc_normal(nodes[n1], nodes[n2], nodes[n3], approx_normal);
+ } else {
+ calc_normal(nodes[n2], nodes[n1], nodes[n3], approx_normal);
+ }
+ xglNormal3dv(approx_normal);
- glNormal3d(normals[n1][0], normals[n1][1], normals[n1][2]);
- glVertex3d(nodes[n1][0] - ref.x, nodes[n1][1] - ref.y,
- nodes[n1][2] - ref.z);
+ /* xglNormal3d(normals[n1][0], normals[n1][1], normals[n1][2]); */
+ xglVertex3d(nodes[n1][0] - ref.x, nodes[n1][1] - ref.y,
+ nodes[n1][2] - ref.z);
- glNormal3d(normals[n2][0], normals[n2][1], normals[n2][2]);
- glVertex3d(nodes[n2][0] - ref.x, nodes[n2][1] - ref.y,
- nodes[n2][2] - ref.z);
+ /* xglNormal3d(normals[n2][0], normals[n2][1], normals[n2][2]); */
+ xglVertex3d(nodes[n2][0] - ref.x, nodes[n2][1] - ref.y,
+ nodes[n2][2] - ref.z);
- glNormal3d(normals[n3][0], normals[n3][1], normals[n3][2]);
- glVertex3d(nodes[n3][0] - ref.x, nodes[n3][1] - ref.y,
- nodes[n3][2] - ref.z);
+ /* xglNormal3d(normals[n3][0], normals[n3][1], normals[n3][2]); */
+ xglVertex3d(nodes[n3][0] - ref.x, nodes[n3][1] - ref.y,
+ nodes[n3][2] - ref.z);
+
+ odd = 1 - odd;
+ last1 = n2;
+ last2 = n3;
if ( n4 > 0 ) {
- glNormal3d(normals[n4][0], normals[n4][1], normals[n4][2]);
- glVertex3d(nodes[n4][0] - ref.x, nodes[n4][1] - ref.y,
- nodes[n4][2] - ref.z);
+ if ( odd ) {
+ calc_normal(nodes[last1], nodes[last2], nodes[n4],
+ approx_normal);
+ } else {
+ calc_normal(nodes[last2], nodes[last1], nodes[n4],
+ approx_normal);
+ }
+ calc_normal(nodes[n3], nodes[n2], nodes[n4], approx_normal);
+ xglNormal3dv(approx_normal);
+
+ /*xglNormal3d(normals[n4][0], normals[n4][1], normals[n4][2]);*/
+ xglVertex3d(nodes[n4][0] - ref.x, nodes[n4][1] - ref.y,
+ nodes[n4][2] - ref.z);
+
+ odd = 1 - odd;
+ last1 = n3;
+ last2 = n4;
}
} else if ( line[0] == 'f' ) {
/* unoptimized face */
if ( !first ) {
/* close out the previous structure and start the next */
- glEnd();
+ xglEnd();
} else {
first = 0;
}
- glBegin(GL_TRIANGLES);
+ xglBegin(GL_TRIANGLES);
/* printf("new triangle = %s", line);*/
sscanf(line, "f %d %d %d\n", &n1, &n2, &n3);
- glNormal3d(normals[n1][0], normals[n1][1], normals[n1][2]);
- glVertex3d(nodes[n1][0] - ref.x, nodes[n1][1] - ref.y,
- nodes[n1][2] - ref.z);
+ xglNormal3d(normals[n1][0], normals[n1][1], normals[n1][2]);
+ xglVertex3d(nodes[n1][0] - ref.x, nodes[n1][1] - ref.y,
+ nodes[n1][2] - ref.z);
- glNormal3d(normals[n2][0], normals[n2][1], normals[n2][2]);
- glVertex3d(nodes[n2][0] - ref.x, nodes[n2][1] - ref.y,
- nodes[n2][2] - ref.z);
+ xglNormal3d(normals[n2][0], normals[n2][1], normals[n2][2]);
+ xglVertex3d(nodes[n2][0] - ref.x, nodes[n2][1] - ref.y,
+ nodes[n2][2] - ref.z);
- glNormal3d(normals[n3][0], normals[n3][1], normals[n3][2]);
- glVertex3d(nodes[n3][0] - ref.x, nodes[n3][1] - ref.y,
- nodes[n3][2] - ref.z);
+ xglNormal3d(normals[n3][0], normals[n3][1], normals[n3][2]);
+ xglVertex3d(nodes[n3][0] - ref.x, nodes[n3][1] - ref.y,
+ nodes[n3][2] - ref.z);
} else if ( line[0] == 'q' ) {
/* continue a triangle strip */
n1 = n2 = 0;
sscanf(line, "q %d %d\n", &n1, &n2);
/* printf("read %d %d\n", n1, n2); */
- glNormal3d(normals[n1][0], normals[n1][1], normals[n1][2]);
- glVertex3d(nodes[n1][0] - ref.x, nodes[n1][1] - ref.y,
- nodes[n1][2] - ref.z);
+ if ( odd ) {
+ calc_normal(nodes[last1], nodes[last2], nodes[n1],
+ approx_normal);
+ } else {
+ calc_normal(nodes[last2], nodes[last1], nodes[n1],
+ approx_normal);
+ }
+ xglNormal3dv(approx_normal);
+
+ /* xglNormal3d(normals[n1][0], normals[n1][1], normals[n1][2]); */
+ xglVertex3d(nodes[n1][0] - ref.x, nodes[n1][1] - ref.y,
+ nodes[n1][2] - ref.z);
+
+ odd = 1 - odd;
+ last1 = last2;
+ last2 = n1;
if ( n2 > 0 ) {
/* printf(" (cont)\n"); */
- glNormal3d(normals[n2][0], normals[n2][1], normals[n2][2]);
- glVertex3d(nodes[n2][0] - ref.x, nodes[n2][1] - ref.y,
- nodes[n2][2] - ref.z);
+ if ( odd ) {
+ calc_normal(nodes[last1], nodes[last2], nodes[n2],
+ approx_normal);
+ } else {
+ calc_normal(nodes[last2], nodes[last1], nodes[n2],
+ approx_normal);
+ }
+ xglNormal3dv(approx_normal);
+
+ /*xglNormal3d(normals[n2][0], normals[n2][1], normals[n2][2]);*/
+ xglVertex3d(nodes[n2][0] - ref.x, nodes[n2][1] - ref.y,
+ nodes[n2][2] - ref.z);
+
+ odd = 1 -odd;
+ last1 = last2;
+ last2 = n2;
}
} else {
printf("Unknown line in %s = %s\n", path, line);
}
}
- glEnd();
+ xglEnd();
/* Draw normal vectors (for visually verifying normals)*/
/*
- glBegin(GL_LINES);
- glColor3f(0.0, 0.0, 0.0);
+ xglBegin(GL_LINES);
+ xglColor3f(0.0, 0.0, 0.0);
for ( i = 0; i < ncount; i++ ) {
- glVertex3d(nodes[i][0] - ref.x,
- nodes[i][1] - ref.y,
- nodes[i][2] - ref.z);
- glVertex3d(nodes[i][0] - ref.x + 500*normals[i][0],
- nodes[i][1] - ref.y + 500*normals[i][1],
- nodes[i][2] - ref.z + 500*normals[i][2]);
+ xglVertex3d(nodes[i][0] - ref.x,
+ nodes[i][1] - ref.y,
+ nodes[i][2] - ref.z);
+ xglVertex3d(nodes[i][0] - ref.x + 500*normals[i][0],
+ nodes[i][1] - ref.y + 500*normals[i][1],
+ nodes[i][2] - ref.z + 500*normals[i][2]);
}
- glEnd();
+ xglEnd();
*/
- glEndList();
+ xglEndList();
fclose(f);
/* $Log$
-/* Revision 1.10 1997/12/12 21:41:28 curt
-/* More light/material property tweaking ... still a ways off.
+/* Revision 1.11 1997/12/15 23:55:01 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.10 1997/12/12 21:41:28 curt
+ * More light/material property tweaking ... still a ways off.
+ *
* Revision 1.9 1997/12/12 19:52:57 curt
* Working on lightling and material properties.
*
#include "orbits.h"
-#include "../general.h"
+#include "../Include/general.h"
#include "../Time/fg_time.h"
/* $Log$
-/* Revision 1.4 1997/12/10 22:37:51 curt
-/* Prepended "fg" on the name of all global structures that didn't have it yet.
-/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+/* Revision 1.5 1997/12/15 23:55:02 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.4 1997/12/10 22:37:51 curt
+ * Prepended "fg" on the name of all global structures that didn't have it yet.
+ * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+ *
* Revision 1.3 1997/11/25 23:20:44 curt
* Changed planets.dat Planets.dat
*
#endif
#include <GL/glut.h>
+#include "../XGL/xgl.h"
+
#include <stdio.h>
#include <string.h>
-#include "../general.h"
+#include "../Include/general.h"
#include "astro.h"
#include "obj.h"
/* Render out the current scene */
void fgSceneryRender() {
- static GLfloat terrain_color[4] = { 0.4, 0.8, 0.3, 1.0 };
+ static GLfloat terrain_color[4] = { 0.6, 0.8, 0.4, 1.0 };
static GLfloat terrain_ambient[4];
static GLfloat terrain_diffuse[4];
int i;
for ( i = 0; i < 4; i++ ) {
- terrain_ambient[i] = terrain_color[i];
+ terrain_ambient[i] = terrain_color[i] * 0.5;
terrain_diffuse[i] = terrain_color[i];
}
- glMaterialfv(GL_FRONT, GL_AMBIENT, terrain_ambient);
- glMaterialfv(GL_FRONT, GL_DIFFUSE, terrain_diffuse);
+ xglMaterialfv(GL_FRONT, GL_AMBIENT, terrain_ambient);
+ xglMaterialfv(GL_FRONT, GL_DIFFUSE, terrain_diffuse);
- glCallList(area_terrain);
+ xglCallList(area_terrain);
}
/* $Log$
-/* Revision 1.27 1997/12/12 21:41:30 curt
-/* More light/material property tweaking ... still a ways off.
+/* Revision 1.28 1997/12/15 23:55:02 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.27 1997/12/12 21:41:30 curt
+ * More light/material property tweaking ... still a ways off.
+ *
* Revision 1.26 1997/12/12 19:52:58 curt
* Working on lightling and material properties.
*
#define SCENERY_H
-#include "../types.h"
+#include "../Include/types.h"
/* Define a structure containing global scenery parameters */
/* $Log$
-/* Revision 1.11 1997/12/10 22:37:52 curt
-/* Prepended "fg" on the name of all global structures that didn't have it yet.
-/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+/* Revision 1.12 1997/12/15 23:55:03 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.11 1997/12/10 22:37:52 curt
+ * Prepended "fg" on the name of all global structures that didn't have it yet.
+ * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+ *
* Revision 1.10 1997/09/04 02:17:37 curt
* Shufflin' stuff.
*
#include <time.h>
#include <GL/glut.h>
+#include "../XGL/xgl.h"
#include "orbits.h"
#include "planets.h"
#include "stars.h"
-#include "../constants.h"
-#include "../general.h"
+#include "../Include/constants.h"
+#include "../Include/general.h"
#include "../Aircraft/aircraft.h"
#include "../Main/views.h"
#include "../Time/fg_time.h"
return;
}
- stars[i] = glGenLists(1);
- glNewList( stars[i], GL_COMPILE );
- glBegin( GL_POINTS );
+ stars[i] = xglGenLists(1);
+ xglNewList( stars[i], GL_COMPILE );
+ xglBegin( GL_POINTS );
/* read in each line of the file */
count = 0;
/* printf("Found star: %d %s, %.3f %.3f %.3f\n", count,
name, right_ascension, declination, magnitude); */
- glColor3f( magnitude, magnitude, magnitude );
- /*glColor3f(0,0,0);*/
- glVertex3f( 190000.0 * cos(right_ascension) * cos(declination),
- 190000.0 * sin(right_ascension) * cos(declination),
- 190000.0 * sin(declination) );
+ xglColor3f( magnitude, magnitude, magnitude );
+ /*xglColor3f(0,0,0);*/
+ xglVertex3f( 190000.0 * cos(right_ascension) * cos(declination),
+ 190000.0 * sin(right_ascension) * cos(declination),
+ 190000.0 * sin(declination) );
count++;
} /* if valid line */
printf("Planet found at %f (ra), %f (dec)\n",
pltPos.RightAscension, pltPos.Declination);
/* give the planets a temporary color, for testing purposes */
- glColor3f( 1.0, 0.0, 0.0);
- glVertex3f( 190000.0 * cos(pltPos.RightAscension) *
- cos(pltPos.Declination),
- 190000.0 * sin(pltPos.RightAscension) *
- cos(pltPos.Declination),
- 190000.0 * sin(pltPos.Declination) );
+ xglColor3f( 1.0, 0.0, 0.0);
+ xglVertex3f( 190000.0 * cos(pltPos.RightAscension) *
+ cos(pltPos.Declination),
+ 190000.0 * sin(pltPos.RightAscension) *
+ cos(pltPos.Declination),
+ 190000.0 * sin(pltPos.Declination) );
}
- glEnd();
+ xglEnd();
/*
- glBegin(GL_LINE_LOOP);
- glColor3f(1.0, 0.0, 0.0);
- glVertex3f( 190000.0 * cos(ra_save-0.2) * cos(decl_save-0.2),
+ xglBegin(GL_LINE_LOOP);
+ xglColor3f(1.0, 0.0, 0.0);
+ xglVertex3f( 190000.0 * cos(ra_save-0.2) * cos(decl_save-0.2),
190000.0 * sin(ra_save-0.2) * cos(decl_save-0.2),
190000.0 * sin(decl_save-0.2) );
- glVertex3f( 190000.0 * cos(ra_save+0.2) * cos(decl_save-0.2),
+ xglVertex3f( 190000.0 * cos(ra_save+0.2) * cos(decl_save-0.2),
190000.0 * sin(ra_save+0.2) * cos(decl_save-0.2),
190000.0 * sin(decl_save-0.2) );
- glVertex3f( 190000.0 * cos(ra_save+0.2) * cos(decl_save+0.2),
+ xglVertex3f( 190000.0 * cos(ra_save+0.2) * cos(decl_save+0.2),
190000.0 * sin(ra_save+0.2) * cos(decl_save+0.2),
190000.0 * sin(decl_save+0.2) );
- glVertex3f( 190000.0 * cos(ra_save-0.2) * cos(decl_save+0.2),
+ xglVertex3f( 190000.0 * cos(ra_save-0.2) * cos(decl_save+0.2),
190000.0 * sin(ra_save-0.2) * cos(decl_save+0.2),
190000.0 * sin(decl_save+0.2) );
- glEnd();
+ xglEnd();
*/
/*
- glBegin(GL_LINE_LOOP);
- glColor3f(0.0, 1.0, 0.0);
- glVertex3f( 190000.0 * cos(ra_save1-0.2) * cos(decl_save1-0.2),
+ xglBegin(GL_LINE_LOOP);
+ xglColor3f(0.0, 1.0, 0.0);
+ xglVertex3f( 190000.0 * cos(ra_save1-0.2) * cos(decl_save1-0.2),
190000.0 * sin(ra_save1-0.2) * cos(decl_save1-0.2),
190000.0 * sin(decl_save1-0.2) );
- glVertex3f( 190000.0 * cos(ra_save1+0.2) * cos(decl_save1-0.2),
+ xglVertex3f( 190000.0 * cos(ra_save1+0.2) * cos(decl_save1-0.2),
190000.0 * sin(ra_save1+0.2) * cos(decl_save1-0.2),
190000.0 * sin(decl_save1-0.2) );
- glVertex3f( 190000.0 * cos(ra_save1+0.2) * cos(decl_save1+0.2),
+ xglVertex3f( 190000.0 * cos(ra_save1+0.2) * cos(decl_save1+0.2),
190000.0 * sin(ra_save1+0.2) * cos(decl_save1+0.2),
190000.0 * sin(decl_save1+0.2) );
- glVertex3f( 190000.0 * cos(ra_save1-0.2) * cos(decl_save1+0.2),
+ xglVertex3f( 190000.0 * cos(ra_save1-0.2) * cos(decl_save1+0.2),
190000.0 * sin(ra_save1-0.2) * cos(decl_save1+0.2),
190000.0 * sin(decl_save1+0.2) );
- glEnd();
+ xglEnd();
*/
- glEndList();
+ xglEndList();
max_stars /= 2;
}
printf("RENDERING STARS = %d (night)\n", i);
- glDisable( GL_LIGHTING );
- glCallList(stars[i]);
- glEnable( GL_LIGHTING );
+ xglDisable( GL_LIGHTING );
+ xglCallList(stars[i]);
+ xglEnable( GL_LIGHTING );
} else {
printf("not RENDERING STARS (day)\n");
}
/* $Log$
-/* Revision 1.19 1997/12/12 19:53:00 curt
-/* Working on lightling and material properties.
+/* Revision 1.20 1997/12/15 23:55:03 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.19 1997/12/12 19:53:00 curt
+ * Working on lightling and material properties.
+ *
* Revision 1.18 1997/12/10 22:37:52 curt
* Prepended "fg" on the name of all global structures that didn't have it yet.
* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
**************************************************************************/
#include <GL/glut.h>
+#include "../XGL/xgl.h"
+
#include "../Time/fg_time.h"
#include "../Main/views.h"
#include "orbits.h"
{
// int i;
- sun_obj = glGenLists(1);
- glNewList(sun_obj, GL_COMPILE );
+ sun_obj = xglGenLists(1);
+ xglNewList(sun_obj, GL_COMPILE );
-// glBegin( GL_POINTS );
+// xglBegin( GL_POINTS );
fgSolarSystemUpdate(&(pltOrbElements[0]), cur_time_params);
sunPos = fgCalculateSun(pltOrbElements[0], cur_time_params);
#endif
/* give the moon a temporary color, for testing purposes */
-// glColor3f( 0.0, 1.0, 0.0);
-// glVertex3f( 190000.0 * cos(moonPos.RightAscension) * cos(moonPos.Declination),
+// xglColor3f( 0.0, 1.0, 0.0);
+// xglVertex3f( 190000.0 * cos(moonPos.RightAscension) * cos(moonPos.Declination),
// 190000.0 * sin(moonPos.RightAscension) * cos(moonPos.Declination),
// 190000.0 * sin(moonPos.Declination) );
- //glVertex3f(0.0, 0.0, 0.0);
-// glEnd();
-// glColor3f(1.0, 1.0, 1.0);
+ //xglVertex3f(0.0, 0.0, 0.0);
+// xglEnd();
+// xglColor3f(1.0, 1.0, 1.0);
//xMoon = 190000.0 * cos(moonPos.RightAscension) * cos(moonPos.Declination);
//yMoon = 190000.0 * sin(moonPos.RightAscension) * cos(moonPos.Declination);
//zMoon = 190000.0 * sin(moonPos.Declination);
ySun = 60000.0 * sin(sunPos.RightAscension) * cos(sunPos.Declination);
zSun = 60000.0 * sin(sunPos.Declination);
-// glPushMatrix();
-// glTranslatef(x, y, z);
-// glScalef(16622.8, 16622.8, 16622.8);
-// glBegin(GL_TRIANGLES);
+// xglPushMatrix();
+// xglTranslatef(x, y, z);
+// xglScalef(16622.8, 16622.8, 16622.8);
+// xglBegin(GL_TRIANGLES);
// for (i = 0; i < 20; i++)
// subdivide(&vdata[tindices[i][0]][0],
// &vdata[tindices[i][1]][0],
// &vdata[tindices[i][2]][0], 3);
// glutSolidSphere(1.0, 25, 25);
-// glEnd();
- //glPopMatrix();
+// xglEnd();
+ //xglPopMatrix();
glutSolidSphere(1.0, 10, 10);
- glEndList();
+ xglEndList();
}
diff[3] = 0.0; */
/* set lighting parameters */
- /* glLightfv(GL_LIGHT0, GL_AMBIENT, color );
- glLightfv(GL_LIGHT0, GL_DIFFUSE, color );
- glMaterialfv(GL_FRONT, GL_AMBIENT, amb);
- glMaterialfv(GL_FRONT, GL_DIFFUSE, diff); */
+ /* xglLightfv(GL_LIGHT0, GL_AMBIENT, color );
+ xglLightfv(GL_LIGHT0, GL_DIFFUSE, color );
+ xglMaterialfv(GL_FRONT, GL_AMBIENT, amb);
+ xglMaterialfv(GL_FRONT, GL_DIFFUSE, diff); */
- glDisable( GL_LIGHTING );
+ xglDisable( GL_LIGHTING );
- glPushMatrix();
- glTranslatef(xSun, ySun, zSun);
- glScalef(1400, 1400, 1400);
+ xglPushMatrix();
+ xglTranslatef(xSun, ySun, zSun);
+ xglScalef(1400, 1400, 1400);
- glColor3f(0.85, 0.65, 0.05);
+ xglColor3f(0.85, 0.65, 0.05);
- /* glColor3fv( color ); */
- /* glutSolidSphere(1.0, 25, 25); */
- glCallList(sun_obj);
+ /* xglColor3fv( color ); */
+ /* xglutSolidSphere(1.0, 25, 25); */
+ xglCallList(sun_obj);
- glPopMatrix();
+ xglPopMatrix();
- glEnable( GL_LIGHTING );
+ xglEnable( GL_LIGHTING );
}
/* $Log$
-/* Revision 1.5 1997/12/12 21:41:31 curt
-/* More light/material property tweaking ... still a ways off.
+/* Revision 1.6 1997/12/15 23:55:04 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.5 1997/12/12 21:41:31 curt
+ * More light/material property tweaking ... still a ways off.
+ *
* Revision 1.4 1997/12/10 22:37:53 curt
* Prepended "fg" on the name of all global structures that didn't have it yet.
* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
SUBSUBDIRS = Flight/LaRCsim Flight/Slew
-SUBDIRS = Aircraft Cockpit Controls Flight Joystick Math Scenery Time Weather
+SUBDIRS = Aircraft Cockpit Controls Flight Joystick Math Scenery Time Weather \
+ XGL
MAIN = Main
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.32 1997/12/15 23:54:25 curt
+# Add xgl wrappers for debugging.
+# Generate terrain normals on the fly.
+#
# Revision 1.31 1997/12/15 20:59:08 curt
# Misc. tweaks.
#
#---------------------------------------------------------------------------
FG_VERSION_MAJOR = 0
-FG_VERSION_MINOR = 17
+FG_VERSION_MINOR = 18
FG_VERSION = $(FG_VERSION_MAJOR).$(FG_VERSION_MINOR)
#
# -O3 -fomit-frame-pointer -funroll-all-loops -ffast-math
# - Other potential compiler optimization flags
+#
+# -
#---------------------------------------------------------------------------
GLOBAL_CFLAGS = -g -Wall -DVERSION=\"$(FG_VERSION)\"
#---------------------------------------------------------------------------
+#---------------------------------------------------------------------------
+# Debugging options.
+#
+# Uncomment the following two lines to enable OpenGL function call tracing.
+# This mechanism is provided courtesy of Steve Baker <sbaker@link.com>
+#---------------------------------------------------------------------------
+
+# FG_DEBUG_FLAGS = -DXGL_TRACE
+# FG_DEBUG_LIBS = ../XGL/libXGL.a
+
+
#---------------------------------------------------------------------------
# Uncomment one of the following sections depending on your system
#
MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
-FG_CFLAGS = $(GLOBAL_CFLAGS)
+FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS)
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# INTERFACE_LIBS = -lglut
# INTERFACE_FILES = GLUTmain.c GLUTkey.c
# GRAPHICS_LIBS = -lGLU -lGL -lXmu -lX11
-# FG_CFLAGS = $(GLOBAL_CFLAGS)
+# FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS)
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# INTERFACE_LIBS = -lglut
# INTERFACE_FILES = GLUTmain.c GLUTkey.c
# GRAPHICS_LIBS = -lGLU -lGL -lXext -lXmu -lXi -lX11
-# FG_CFLAGS = $(GLOBAL_CFLAGS)
+# FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS)
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# INTERFACE_LIBS = ../Win32/libglut.a
# INTERFACE_FILES = GLUTmain.c GLUTkey.c
# GRAPHICS_LIBS = -lglu32 -lopengl32 -luser32 -lgdi32
-# FG_CFLAGS = $(GLOBAL_CFLAGS) -DWIN32 -DUSE_RAND
+# FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS) -DWIN32 -DUSE_RAND
# LN = copy
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.25 1997/12/15 23:54:26 curt
+# Add xgl wrappers for debugging.
+# Generate terrain normals on the fly.
+#
# Revision 1.24 1997/12/12 21:41:24 curt
# More light/material property tweaking ... still a ways off.
#
../LaRCsim/ls_interface.h ../LaRCsim/../flight.h \
../../Aircraft/aircraft.h ../../Aircraft/../Flight/flight.h \
../../Aircraft/../Controls/controls.h \
- ../../Aircraft/../Controls/../limits.h ../../Controls/controls.h \
- ../../constants.h
+ ../../Aircraft/../Controls/../Include/limits.h \
+ ../../Controls/controls.h ../../Include/constants.h
#include "../flight.h"
#include "../../Aircraft/aircraft.h"
#include "../../Controls/controls.h"
-#include "../../constants.h"
+#include "../../Include/constants.h"
#ifndef M_PI
/* $Log$
-/* Revision 1.6 1997/08/27 03:30:11 curt
-/* Changed naming scheme of basic shared structures.
+/* Revision 1.7 1997/12/15 23:54:42 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.6 1997/08/27 03:30:11 curt
+ * Changed naming scheme of basic shared structures.
+ *
* Revision 1.5 1997/07/19 22:35:06 curt
* Moved fiddled with PI to avoid compiler warnings.
*
-fg_time.o: fg_time.c fg_time.h ../types.h ../Flight/flight.h \
+fg_time.o: fg_time.c fg_time.h ../Include/types.h ../Flight/flight.h \
../Flight/Slew/slew.h ../Flight/LaRCsim/ls_interface.h \
- ../Flight/LaRCsim/../flight.h ../constants.h ../Time/fg_time.h
+ ../Flight/LaRCsim/../flight.h ../Include/constants.h \
+ ../Time/fg_time.h
fg_timer.o: fg_timer.c fg_timer.h
-sidereal.o: sidereal.c ../constants.h
-sunpos.o: sunpos.c sunpos.h ../types.h fg_time.h ../Flight/flight.h \
- ../Flight/Slew/slew.h ../Flight/LaRCsim/ls_interface.h \
- ../Flight/LaRCsim/../flight.h ../constants.h ../Main/views.h \
- ../Main/../types.h ../Main/../Flight/flight.h ../Main/../Math/mat3.h \
+sidereal.o: sidereal.c ../Include/constants.h
+sunpos.o: sunpos.c sunpos.h ../Include/types.h fg_time.h \
+ ../Flight/flight.h ../Flight/Slew/slew.h \
+ ../Flight/LaRCsim/ls_interface.h ../Flight/LaRCsim/../flight.h \
+ ../Include/constants.h ../Main/views.h ../Main/../Include/types.h \
+ ../Main/../Flight/flight.h ../Main/../Math/mat3.h \
../Math/fg_geodesy.h ../Math/mat3.h ../Math/polar.h \
- ../Math/../types.h
+ ../Math/../Include/types.h
ttest.o: ttest.c
#endif
#include "fg_time.h"
-#include "../constants.h"
+#include "../Include/constants.h"
#include "../Flight/flight.h"
#include "../Time/fg_time.h"
/* $Log$
-/* Revision 1.19 1997/12/15 20:59:10 curt
-/* Misc. tweaks.
+/* Revision 1.20 1997/12/15 23:55:06 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.19 1997/12/15 20:59:10 curt
+ * Misc. tweaks.
+ *
* Revision 1.18 1997/12/12 21:41:31 curt
* More light/material property tweaking ... still a ways off.
*
#include <GL/glut.h>
#include <time.h>
-#include "../types.h"
+#include "../Include/types.h"
#include "../Flight/flight.h"
/* $Log$
-/* Revision 1.9 1997/12/10 22:37:55 curt
-/* Prepended "fg" on the name of all global structures that didn't have it yet.
-/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+/* Revision 1.10 1997/12/15 23:55:07 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.9 1997/12/10 22:37:55 curt
+ * Prepended "fg" on the name of all global structures that didn't have it yet.
+ * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+ *
* Revision 1.8 1997/12/09 04:25:38 curt
* Working on adding a global lighting params structure.
*
#include "sunpos.h"
#include "fg_time.h"
-#include "../constants.h"
+#include "../Include/constants.h"
#include "../Main/views.h"
#include "../Math/fg_geodesy.h"
#include "../Math/mat3.h"
/* $Log$
-/* Revision 1.16 1997/12/11 04:43:57 curt
-/* Fixed sun vector and lighting problems. I thing the moon is now lit
-/* correctly.
+/* Revision 1.17 1997/12/15 23:55:08 curt
+/* Add xgl wrappers for debugging.
+/* Generate terrain normals on the fly.
/*
+ * Revision 1.16 1997/12/11 04:43:57 curt
+ * Fixed sun vector and lighting problems. I thing the moon is now lit
+ * correctly.
+ *
* Revision 1.15 1997/12/10 22:37:55 curt
* Prepended "fg" on the name of all global structures that didn't have it yet.
* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
#include <time.h>
-#include "../types.h"
+#include "../Include/types.h"
/* update the cur_time_params structure with the current sun position */
void fgUpdateSunPos(struct fgCartesianPoint scenery_center);
../Aircraft/../Flight/LaRCsim/ls_interface.h \
../Aircraft/../Flight/LaRCsim/../flight.h \
../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../Math/fg_random.h
+ ../Aircraft/../Controls/../Include/limits.h ../Math/fg_random.h