static GLfloat sun_vec[4] = {-3.0, 1.0, 2.0, 0.0 };
/* temporary hack */
-extern struct mesh *mesh_ptr;
+/* extern struct mesh *mesh_ptr; */
/* Function prototypes */
-GLint fgSceneryCompile();
-static void fgSceneryDraw();
+/* GLint fgSceneryCompile_OLD(); */
+/* static void fgSceneryDraw_OLD(); */
/* pointer to scenery structure */
-static GLint scenery, runway;
+/* static GLint scenery, runway; */
/* Another hack */
double fogDensity = 2000.0;
/* glLoadIdentity(); */
/* draw scenery */
- fgSceneryDraw();
+ fgSceneryRender();
#ifdef GLUT
glutSwapBuffers();
* Scenery management routines
**************************************************************************/
-static void fgSceneryInit() {
+/* static void fgSceneryInit_OLD() { */
/* make scenery */
- scenery = fgSceneryCompile();
- runway = fgRunwayHack(0.69, 53.07);
-}
+/* scenery = fgSceneryCompile_OLD();
+ runway = fgRunwayHack_OLD(0.69, 53.07);
+} */
/* create the scenery */
-GLint fgSceneryCompile() {
+/* GLint fgSceneryCompile_OLD() {
GLint scenery;
- scenery = mesh2GL(mesh_ptr);
+ scenery = mesh2GL(mesh_ptr_OLD);
return(scenery);
}
-
+*/
/* hack in a runway */
-GLint fgRunwayHack(double width, double length) {
+/* GLint fgRunwayHack_OLD(double width, double length) {
static GLfloat concrete[4] = { 0.5, 0.5, 0.5, 1.0 };
static GLfloat line[4] = { 0.9, 0.9, 0.9, 1.0 };
int i;
runway = glGenLists(1);
glNewList(runway, GL_COMPILE);
-
+ */
/* draw concrete */
- glBegin(GL_POLYGON);
+/* glBegin(GL_POLYGON);
glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, concrete );
glNormal3f(0.0, 0.0, 1.0);
glVertex3d(length, width/2.0, 0.0);
glVertex3d(length, -width/2.0, 0.0);
glEnd();
-
+ */
/* draw center line */
- glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, line );
+/* glMaterialfv( 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;
return(runway);
}
-
+*/
/* draw the scenery */
-static void fgSceneryDraw() {
+/*static void fgSceneryDraw_OLD() {
static float z = 32.35;
glPushMatrix();
glPopMatrix();
}
-
+*/
/* What should we do when we have nothing else to do? How about get
- * ready for the next move?*/
+ * ready for the next move and update the display? */
static void fgMainLoop( void ) {
static int remainder = 0;
int elapsed, multi_loop;
FG_Runway_heading = 102.0 * DEG_TO_RAD;
/* Initial Position */
- FG_Latitude = ( 120070.41 / 3600.0 ) * DEG_TO_RAD;
- FG_Longitude = ( -398391.28 / 3600.0 ) * DEG_TO_RAD;
+ /* FG_Latitude = ( 120070.41 / 3600.0 ) * DEG_TO_RAD;
+ FG_Longitude = ( -398391.28 / 3600.0 ) * DEG_TO_RAD; */
+ FG_Latitude = 0.0;
+ FG_Longitude = 0.0;
FG_Altitude = FG_Runway_altitude + 3.758099;
printf("Initial position is: (%.4f, %.4f, %.2f)\n", FG_Latitude,
/* $Log$
-/* Revision 1.24 1997/06/26 22:14:53 curt
-/* Beginning work on a scenery management system.
+/* Revision 1.25 1997/06/29 21:19:17 curt
+/* Working on scenery management system.
/*
+ * Revision 1.24 1997/06/26 22:14:53 curt
+ * Beginning work on a scenery management system.
+ *
* Revision 1.23 1997/06/26 19:08:33 curt
* Restructuring make, adding automatic "make dep" support.
*
**************************************************************************/
-#ifdef GLUT
- #include <GL/glut.h>
-#elif TIGER
- /* assumes -I/usr/include/mesa in compile command */
- #include "gltk.h"
-#endif
+#include <GL/glut.h>
#include "../Scenery/mesh.h"
#include "../mat3/mat3.h"
int i, j, istep, jstep, iend, jend;
float temp;
+ printf("In mesh2GL(), generating GL call list.\n");
+
istep = jstep = 25; /* Detail level 1 -- 1200 ... */
mesh = glGenLists(1);
/* $Log$
-/* Revision 1.21 1997/06/21 17:12:54 curt
-/* Capitalized subdirectory names.
+/* Revision 1.22 1997/06/29 21:19:17 curt
+/* Working on scenery management system.
/*
+ * Revision 1.21 1997/06/21 17:12:54 curt
+ * Capitalized subdirectory names.
+ *
* Revision 1.20 1997/06/18 04:10:32 curt
* A couple more runway tweaks ...
*