#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl/xgl.h>
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#ifdef FG_MATH_EXCEPTION_CLASH
# define exception c_exception
#include <string>
FG_USING_STD(string);
+#include <simgear/constants.h>
+#include <simgear/debug/logstream.hxx>
+#include <simgear/math/fg_geodesy.hxx>
+#include <simgear/math/interpolater.hxx>
+#include <simgear/math/polar3d.hxx>
+#include <simgear/misc/fgpath.hxx>
+
#include <Aircraft/aircraft.hxx>
-#include <Debug/logstream.hxx>
-#include <Include/fg_constants.h>
#include <Main/options.hxx>
#include <Main/views.hxx>
-#include <Math/fg_geodesy.hxx>
-#include <Math/interpolater.hxx>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
-#include <Misc/fgpath.hxx>
#include "fg_time.hxx"
#include "light.hxx"
// calculate lighting parameters based on sun's relative angle to
// local up
- deg = sun_angle * 180.0 / FG_PI;
+ deg = sun_angle * RAD_TO_DEG;
FG_LOG( FG_EVENT, FG_INFO, " Sun angle = " << deg );
ambient = ambient_tbl->interpolate( deg );
scene_ambient[0] = white[0] * ambient;
scene_ambient[1] = white[1] * ambient;
scene_ambient[2] = white[2] * ambient;
+ scene_ambient[3] = 1.0;
scene_diffuse[0] = white[0] * diffuse;
scene_diffuse[1] = white[1] * diffuse;
scene_diffuse[2] = white[2] * diffuse;
+ scene_diffuse[3] = 1.0;
// set sky color
sky_color[0] = base_sky_color[0] * sky_brightness;