]> git.mxchange.org Git - flightgear.git/blobdiff - src/Weather/weather.hxx
Latest YASim changes.
[flightgear.git] / src / Weather / weather.hxx
index 355a1a20d3fe537afbe5ecc53d40b5eb07b1c7d5..c8728e85494af9a296ca80128fc015799b925884 100644 (file)
 #define _WEATHER_HXX
 
 
+#include <simgear/compiler.h>
+
+#include <GL/gl.h>
+
+#ifdef SG_HAVE_STD_INCLUDES
+#  include <cmath>
+#else
+#  include <math.h>
+#endif
+
 // holds the current weather values
 class FGWeather {
 
@@ -45,7 +55,7 @@ public:
     inline double get_visibility() const { return visibility; }
 
     inline void set_visibility( double v ) {
-       xglMatrixMode(GL_MODELVIEW);
+       glMatrixMode(GL_MODELVIEW);
        // in meters
        visibility = v;
 
@@ -56,12 +66,12 @@ public:
        fog_exp2_density = sqrt( -log(0.01) ) / visibility;
 
        // Set correct opengl fog density
-       xglFogf (GL_FOG_DENSITY, fog_exp2_density);
-       xglFogi( GL_FOG_MODE, GL_EXP2 );
+       glFogf (GL_FOG_DENSITY, fog_exp2_density);
+       glFogi( GL_FOG_MODE, GL_EXP2 );
 
-       // FG_LOG( FG_INPUT, FG_DEBUG, "Fog density = " << fog_density );
-       FG_LOG( FG_INPUT, FG_INFO, 
-               "Fog exp2 density = " << fog_exp2_density );
+       // SG_LOG( SG_INPUT, SG_DEBUG, "Fog density = " << fog_density );
+       // SG_LOG( SG_INPUT, SG_INFO, 
+       //         "Fog exp2 density = " << fog_exp2_density );
     }
 };