#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>
#ifndef __FG_MAIN_HXX
#define __FG_MAIN_HXX 1
-class SGSky;
+#include <simgear/screen/extensions.hxx>
+class SGSky;
extern SGSky *thesky;
+extern glPointParameterfProc glPointParameterfPtr;
+extern glPointParameterfvProc glPointParameterfvPtr;
+extern bool glPointParameterIsSupported;
+
void fgLoadDCS (void);
void fgUpdateDCS (void);
void fgBuildRenderStates( void );
void fgUpdateTimeDepCalcs();
void fgInitTimeDepCalcs( void );
void fgReshape( int width, int height );
-void fgLoadDCS(void);
-void fgUpdateDCS (void);
bool fgMainInit( int argc, char **argv );
#include <simgear/compiler.h>
+#include <Main/main.hxx>
+
+
#include STL_STRING
#include <simgear/bucket/newbucket.hxx>
// Set up lights rendering call backs
static int fgLightsPredraw( ssgEntity *e ) {
#if 0
-#ifdef GL_EXT_point_parameters
- if (glutExtensionSupported("GL_EXT_point_parameters")) {
+ if (glPointParameterIsSupported) {
static float quadratic[3] = {1.0, 0.01, 0.0001};
glPointParameterfvEXT(GL_DISTANCE_ATTENUATION_EXT, quadratic);
glPointParameterfEXT(GL_POINT_SIZE_MIN_EXT, 1.0);
glPointSize(4.0);
}
-#endif
#endif
return true;
}
static int fgLightsPostdraw( ssgEntity *e ) {
#if 0
-#ifdef GL_EXT_point_parameters
- if (glutExtensionSupported("GL_EXT_point_parameters")) {
+ if (glPointParameterIsSupported) {
static float default_attenuation[3] = {1.0, 0.0, 0.0};
glPointParameterfvEXT(GL_DISTANCE_ATTENUATION_EXT,
default_attenuation);
glPointSize(1.0);
}
-#endif
#endif
return true;
}