]> git.mxchange.org Git - flightgear.git/commitdiff
Eliminated glScale call so that glutSolidSphere normals are preserved
authorcurt <curt>
Thu, 30 Jul 1998 23:43:30 +0000 (23:43 +0000)
committercurt <curt>
Thu, 30 Jul 1998 23:43:30 +0000 (23:43 +0000)
correctly.  Also made the sun & moon a bit smaller.

Astro/moon.cxx
Astro/sun.cxx

index c774b3ee6d512ce7d4e4a022765bfc534cbc9f8e..167c39459bc5ac30d96c8fe1bd8b8c28dd9ed7f8 100644 (file)
@@ -175,9 +175,6 @@ struct CelestialCoord fgCalculateMoon(struct OrbElements params,
 
 
 void fgMoonInit( void ) {
-    GLfloat moonColor[4] = {0.85, 0.75, 0.35, 1.0};
-    GLfloat black[4] = { 0.0, 0.0, 0.0, 1.0 };
-
     fgPrintf( FG_ASTRO, FG_INFO, "Initializing the Moon\n");
     fgSolarSystemUpdate(&(pltOrbElements[1]), cur_time_params);
     moonPos = fgCalculateMoon(pltOrbElements[1], pltOrbElements[0], 
@@ -197,13 +194,12 @@ void fgMoonInit( void ) {
     moon = xglGenLists (1);
     xglNewList (moon, GL_COMPILE);
   
-    xglMaterialfv (GL_FRONT, GL_AMBIENT, black);
-    xglMaterialfv (GL_FRONT, GL_DIFFUSE, moonColor);
     xglPushMatrix ();
     xglTranslatef (xMoon, yMoon, zMoon);
-    xglScalef (1400, 1400, 1400);
+    // xglScalef (1400, 1400, 1400);
   
-    glutSolidSphere (1.0, 10, 10);
+    // glutSolidSphere (1.0, 10, 10);
+    glutSolidSphere (1200.0, 10, 10);
     xglPopMatrix ();
     xglEndList ();
 }
@@ -211,14 +207,24 @@ void fgMoonInit( void ) {
 
 /* Draw the moon */
 void fgMoonRender( void ) {
+    GLfloat moonColor[4] = {0.85, 0.75, 0.35, 1.0};
+    GLfloat black[4] = { 0.0, 0.0, 0.0, 1.0 };
+
+    xglMaterialfv (GL_FRONT, GL_AMBIENT, black);
+    xglMaterialfv (GL_FRONT, GL_DIFFUSE, moonColor);
+
     xglCallList(moon);
 }
 
 
 /* $Log$
-/* Revision 1.4  1998/04/28 01:18:59  curt
-/* Type-ified fgTIME and fgVIEW
+/* Revision 1.5  1998/07/30 23:43:30  curt
+/* Eliminated glScale call so that glutSolidSphere normals are preserved
+/* correctly.  Also made the sun & moon a bit smaller.
 /*
+ * Revision 1.4  1998/04/28 01:18:59  curt
+ * Type-ified fgTIME and fgVIEW
+ *
  * Revision 1.3  1998/04/25 22:06:24  curt
  * Edited cvs log messages in source files ... bad bad bad!
  *
index f802b768b338cd88c29572c7208ce68d2e9cb82a..3f3a58d6b659cdffb8164441a7ed7e6a9c67f3c2 100644 (file)
@@ -177,9 +177,8 @@ void fgSunInit( void ) {
 
     xglPushMatrix();
     xglTranslatef(xSun, ySun, zSun);
-    xglScalef(1400, 1400, 1400);
     xglColor3f(amb[0], amb[1], amb[2]); 
-    glutSolidSphere(1.0, 10, 10);
+    glutSolidSphere(1200.0, 10, 10);
     xglPopMatrix();
     xglEndList();
 }
@@ -192,9 +191,13 @@ void fgSunRender( void ) {
 
 
 /* $Log$
-/* Revision 1.5  1998/04/28 01:19:04  curt
-/* Type-ified fgTIME and fgVIEW
+/* Revision 1.6  1998/07/30 23:43:31  curt
+/* Eliminated glScale call so that glutSolidSphere normals are preserved
+/* correctly.  Also made the sun & moon a bit smaller.
 /*
+ * Revision 1.5  1998/04/28 01:19:04  curt
+ * Type-ified fgTIME and fgVIEW
+ *
  * Revision 1.4  1998/04/26 05:10:02  curt
  * "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
  *