#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"
/* Initialize the orbital elements of sun, moon and mayor planets */
fgSolarSystemInit(*t);
- /* Intialize the moon's position */
- fgMoonInit();
+ /* Initialize the Stars subsystem */
+ fgStarsInit();
/* Initialize the sun's position */
fgSunInit();
- /* Initialize the Stars subsystem */
- fgStarsInit();
+ /* Intialize the moon's position */
+ fgMoonInit();
}
}
/* Disable fog effects */
- glDisable( GL_FOG );
+ xglDisable( GL_FOG );
- /* reverse light direction so the moon is displayed properly */
- glLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec_inv );
+ /* set the sun position */
+ 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 );
-
- /* render the stars */
- fgStarsRender();
+ xglRotatef( angle, 0.0, 0.0, -1.0 );
/* render the moon */
fgMoonRender();
+ /* render the stars */
+ fgStarsRender();
+
/* render the sun */
fgSunRender();
- glPopMatrix();
+ xglPopMatrix();
/* reenable fog effects */
- glEnable( GL_FOG );
+ xglEnable( GL_FOG );
}
/* $Log$
-/* Revision 1.3 1997/12/10 22:37:49 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/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.
+ *
+ * Revision 1.5 1997/12/12 19:52:54 curt
+ * Working on lightling and material properties.
+ *
+ * Revision 1.4 1997/12/11 04:43:56 curt
+ * Fixed sun vector and lighting problems. I thing the moon is now lit
+ * correctly.
+ *
+ * Revision 1.3 1997/12/10 22:37:49 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.2 1997/12/09 04:25:33 curt
* Working on adding a global lighting params structure.
*