#include <plib/ssg.h>
#include <plib/pu.h>
+#include <plib/netSocket.h>
#include <simgear/screen/extensions.hxx>
#include <simgear/scene/material/matlib.hxx>
#include "splash.hxx"
#include "fg_commands.hxx"
#include "fg_io.hxx"
-
-
-glPointParameterfProc glPointParameterfPtr = 0;
-glPointParameterfvProc glPointParameterfvPtr = 0;
-bool glPointParameterIsSupported = false;
+#include "main.hxx"
float default_attenuation[3] = {1.0, 0.0, 0.0};
-//Required for using GL_extensions
-void fgLoadDCS (void);
-void fgUpdateDCS (void);
ssgSelector *ship_sel=NULL;
// upto 32 instances of a same object can be loaded.
ssgTransform *ship_pos[32];
static double delta_time_sec = 0.0;
+glPointParameterfProc glPointParameterfPtr = 0;
+glPointParameterfvProc glPointParameterfvPtr = 0;
+bool glPointParameterIsSupported = false;
+
#ifdef FG_WEATHERCM
# include <WeatherCM/FGLocalWeatherDatabase.h>
glLightModelfv( GL_LIGHT_MODEL_AMBIENT, black );
glLightModeli( GL_LIGHT_MODEL_LOCAL_VIEWER, GL_FALSE );
+ if (fgGetBool("/sim/rendering/specular-highlight")) {
+ glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
+ } else {
+ glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SINGLE_COLOR);
+ }
+
ssgGetLight( 0 ) -> setColour( GL_AMBIENT, l->scene_ambient );
// texture parameters
// we need a white diffuse light for the phase of the moon
ssgGetLight( 0 ) -> setColour( GL_DIFFUSE, white );
- thesky->preDraw();
+ thesky->preDraw( cur_fdm_state->get_Altitude() * SG_FEET_TO_METER );
// draw the ssg scene
// return to the desired diffuse color
// a completely dark scene. So, we set GL_LIGHT_MODEL_AMBIENT
// explicitely to black.
glLightModelfv( GL_LIGHT_MODEL_AMBIENT, black );
+ if (fgGetBool("/sim/rendering/specular-highlight")) {
+ glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,
+ GL_SEPARATE_SPECULAR_COLOR);
+ } else {
+ glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,
+ GL_SINGLE_COLOR);
+ }
ssgGetLight( 0 ) -> setColour( GL_AMBIENT, l->scene_ambient );
ssgGetLight( 0 ) -> setColour( GL_DIFFUSE, l->scene_diffuse );
// we need a white diffuse light for the phase of the moon
ssgGetLight( 0 ) -> setColour( GL_DIFFUSE, white );
- thesky->preDraw();
+ thesky->preDraw( cur_fdm_state->get_Altitude() * SG_FEET_TO_METER );
// return to the desired diffuse color
ssgGetLight( 0 ) -> setColour( GL_DIFFUSE, l->scene_diffuse );