From a0d50000ba0aef47f52bedbd7e335501c291bb9b Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 15 May 2001 22:30:39 +0000 Subject: [PATCH] Modifications to coordinate with recent changes in simgear. --- src/Cockpit/cockpit.cxx | 1 - src/GUI/apt_dlg.cxx | 2 +- src/GUI/gui.cxx | 2 +- src/GUI/mouse.cxx | 2 +- src/GUI/net_dlg.cxx | 2 +- src/Main/keyboard.cxx | 2 +- src/Main/keyboard.hxx | 2 +- src/Main/main.cxx | 2 +- src/Main/splash.cxx | 76 +++++++++++++++++----------------- src/Navaids/fix.hxx | 4 ++ src/Navaids/fixlist.cxx | 4 ++ src/Navaids/ilslist.cxx | 4 ++ src/Navaids/mkrbeacons.hxx | 4 ++ src/Navaids/navlist.cxx | 4 ++ src/Objects/matlib.cxx | 2 +- src/Objects/matlib.hxx | 2 +- src/Scenery/hitlist.cxx | 2 +- src/Scenery/newcache.cxx | 2 +- src/Scenery/scenery.cxx | 2 +- src/Scenery/tileentry.cxx | 4 ++ src/Scenery/tileentry.hxx | 2 +- src/Time/light.cxx | 2 +- src/Time/light.hxx | 2 +- src/Weather/weather.cxx | 2 +- src/Weather/weather.hxx | 2 +- src/WeatherCM/FGWeatherParse.h | 4 ++ 26 files changed, 83 insertions(+), 56 deletions(-) diff --git a/src/Cockpit/cockpit.cxx b/src/Cockpit/cockpit.cxx index b0b6651b1..c17a9b754 100644 --- a/src/Cockpit/cockpit.cxx +++ b/src/Cockpit/cockpit.cxx @@ -30,7 +30,6 @@ #endif #include -// #include #include #include diff --git a/src/GUI/apt_dlg.cxx b/src/GUI/apt_dlg.cxx index 49e3336d2..5b890dc40 100644 --- a/src/GUI/apt_dlg.cxx +++ b/src/GUI/apt_dlg.cxx @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include diff --git a/src/GUI/gui.cxx b/src/GUI/gui.cxx index db0b9f347..a0916ca59 100644 --- a/src/GUI/gui.cxx +++ b/src/GUI/gui.cxx @@ -39,7 +39,7 @@ #endif #include -#include +#include #if defined(FX) && defined(XMESA) # include diff --git a/src/GUI/mouse.cxx b/src/GUI/mouse.cxx index bbaf0164d..4b435b297 100644 --- a/src/GUI/mouse.cxx +++ b/src/GUI/mouse.cxx @@ -39,7 +39,7 @@ #endif #include -#include +#include #if defined(FX) && defined(XMESA) # include diff --git a/src/GUI/net_dlg.cxx b/src/GUI/net_dlg.cxx index bc8a6a4b3..0aea38dcd 100644 --- a/src/GUI/net_dlg.cxx +++ b/src/GUI/net_dlg.cxx @@ -36,7 +36,7 @@ #include #include -#include +#include #include
#include
diff --git a/src/Main/keyboard.cxx b/src/Main/keyboard.cxx index b1dea16f0..51ae40a7c 100644 --- a/src/Main/keyboard.cxx +++ b/src/Main/keyboard.cxx @@ -32,7 +32,7 @@ #include #include -#include +#include #if defined(FX) && defined(XMESA) #include diff --git a/src/Main/keyboard.hxx b/src/Main/keyboard.hxx index 6602888f9..a07745841 100644 --- a/src/Main/keyboard.hxx +++ b/src/Main/keyboard.hxx @@ -39,7 +39,7 @@ #endif #include -#include +#include // Handle keyboard events diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 685f5db0b..07369723f 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -35,7 +35,7 @@ #endif #include -#include +#include #include #include diff --git a/src/Main/splash.cxx b/src/Main/splash.cxx index f2be94945..092a3d371 100644 --- a/src/Main/splash.cxx +++ b/src/Main/splash.cxx @@ -35,7 +35,7 @@ #endif #include -#include +#include #include @@ -60,19 +60,19 @@ void fgSplashInit ( void ) { SG_LOG( SG_GENERAL, SG_INFO, "Initializing splash screen" ); #ifdef GL_VERSION_1_1 - xglGenTextures(1, &splash_texid); - xglBindTexture(GL_TEXTURE_2D, splash_texid); + glGenTextures(1, &splash_texid); + glBindTexture(GL_TEXTURE_2D, splash_texid); #elif GL_EXT_texture_object - xglGenTexturesEXT(1, &splash_texid); - xglBindTextureEXT(GL_TEXTURE_2D, splash_texid); + glGenTexturesEXT(1, &splash_texid); + glBindTextureEXT(GL_TEXTURE_2D, splash_texid); #else # error port me #endif - xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // load in the texture data int num = (int)(sg_random() * 4.0 + 1.0); @@ -99,7 +99,7 @@ void fgSplashInit ( void ) { } } - xglTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, + glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *)(splash_texbuf) ); } @@ -122,48 +122,48 @@ void fgSplashUpdate ( double progress ) { ymax = ymin + ysize; // first clear the screen; - xglClearColor(0.0, 0.0, 0.0, 1.0); - xglClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT ); + glClearColor(0.0, 0.0, 0.0, 1.0); + glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT ); // now draw the logo - xglMatrixMode(GL_PROJECTION); - xglPushMatrix(); - xglLoadIdentity(); + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); gluOrtho2D(0, fgGetInt("/sim/startup/xsize"), 0, fgGetInt("/sim/startup/ysize")); - xglMatrixMode(GL_MODELVIEW); - xglPushMatrix(); - xglLoadIdentity(); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glLoadIdentity(); - xglDisable(GL_DEPTH_TEST); - xglDisable(GL_LIGHTING); - xglEnable(GL_TEXTURE_2D); + glDisable(GL_DEPTH_TEST); + glDisable(GL_LIGHTING); + glEnable(GL_TEXTURE_2D); #ifdef GL_VERSION_1_1 - xglBindTexture(GL_TEXTURE_2D, splash_texid); + glBindTexture(GL_TEXTURE_2D, splash_texid); #elif GL_EXT_texture_object - xglBindTextureEXT(GL_TEXTURE_2D, splash_texid); + glBindTextureEXT(GL_TEXTURE_2D, splash_texid); #else # error port me #endif - xglTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); - xglBegin(GL_POLYGON); - xglTexCoord2f(0.0, 0.0); glVertex2f(xmin, ymin); - xglTexCoord2f(1.0, 0.0); glVertex2f(xmax, ymin); - xglTexCoord2f(1.0, 1.0); glVertex2f(xmax, ymax); - xglTexCoord2f(0.0, 1.0); glVertex2f(xmin, ymax); - xglEnd(); + glBegin(GL_POLYGON); + glTexCoord2f(0.0, 0.0); glVertex2f(xmin, ymin); + glTexCoord2f(1.0, 0.0); glVertex2f(xmax, ymin); + glTexCoord2f(1.0, 1.0); glVertex2f(xmax, ymax); + glTexCoord2f(0.0, 1.0); glVertex2f(xmin, ymax); + glEnd(); - xglutSwapBuffers(); + glutSwapBuffers(); - xglEnable(GL_DEPTH_TEST); - xglEnable(GL_LIGHTING); - xglDisable(GL_TEXTURE_2D); + glEnable(GL_DEPTH_TEST); + glEnable(GL_LIGHTING); + glDisable(GL_TEXTURE_2D); - xglMatrixMode(GL_PROJECTION); - xglPopMatrix(); - xglMatrixMode(GL_MODELVIEW); - xglPopMatrix(); + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); } diff --git a/src/Navaids/fix.hxx b/src/Navaids/fix.hxx index 9a3cf431c..3804fb4b2 100644 --- a/src/Navaids/fix.hxx +++ b/src/Navaids/fix.hxx @@ -25,6 +25,10 @@ #define _FG_FIX_HXX +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include diff --git a/src/Navaids/fixlist.cxx b/src/Navaids/fixlist.cxx index 5d57794a8..55a083166 100644 --- a/src/Navaids/fixlist.cxx +++ b/src/Navaids/fixlist.cxx @@ -21,6 +21,10 @@ // $Id$ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include diff --git a/src/Navaids/ilslist.cxx b/src/Navaids/ilslist.cxx index f91ec0136..cf8c9e55f 100644 --- a/src/Navaids/ilslist.cxx +++ b/src/Navaids/ilslist.cxx @@ -21,6 +21,10 @@ // $Id$ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include diff --git a/src/Navaids/mkrbeacons.hxx b/src/Navaids/mkrbeacons.hxx index 0c0263197..b573f7202 100644 --- a/src/Navaids/mkrbeacons.hxx +++ b/src/Navaids/mkrbeacons.hxx @@ -25,6 +25,10 @@ #define _FG_MKRBEACON_HXX +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include diff --git a/src/Navaids/navlist.cxx b/src/Navaids/navlist.cxx index 35ac0d5c2..0bfd42a69 100644 --- a/src/Navaids/navlist.cxx +++ b/src/Navaids/navlist.cxx @@ -21,6 +21,10 @@ // $Id$ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include diff --git a/src/Objects/matlib.cxx b/src/Objects/matlib.cxx index d199c7479..4fcc1bd5d 100644 --- a/src/Objects/matlib.cxx +++ b/src/Objects/matlib.cxx @@ -34,7 +34,7 @@ #endif #include -#include +#include #include diff --git a/src/Objects/matlib.hxx b/src/Objects/matlib.hxx index 5bc7543e0..c63281b8b 100644 --- a/src/Objects/matlib.hxx +++ b/src/Objects/matlib.hxx @@ -40,7 +40,7 @@ #include #include -#include +#include #include STL_STRING // Standard C++ string library #include // STL associative "array" diff --git a/src/Scenery/hitlist.cxx b/src/Scenery/hitlist.cxx index bb980823b..027b4b15b 100644 --- a/src/Scenery/hitlist.cxx +++ b/src/Scenery/hitlist.cxx @@ -10,11 +10,11 @@ #include #include +#include #include #include #include -#include #include "hitlist.hxx" diff --git a/src/Scenery/newcache.cxx b/src/Scenery/newcache.cxx index 9d4807243..c347bdd55 100644 --- a/src/Scenery/newcache.cxx +++ b/src/Scenery/newcache.cxx @@ -30,7 +30,7 @@ #endif #include -#include +#include #include // plib include diff --git a/src/Scenery/scenery.cxx b/src/Scenery/scenery.cxx index 4eea0869b..b5a4406f0 100644 --- a/src/Scenery/scenery.cxx +++ b/src/Scenery/scenery.cxx @@ -30,7 +30,7 @@ #endif #include -#include +#include #include #include diff --git a/src/Scenery/tileentry.cxx b/src/Scenery/tileentry.cxx index 1aad249ae..187bea011 100644 --- a/src/Scenery/tileentry.cxx +++ b/src/Scenery/tileentry.cxx @@ -21,6 +21,10 @@ // $Id$ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #ifdef SG_MATH_EXCEPTION_CLASH diff --git a/src/Scenery/tileentry.hxx b/src/Scenery/tileentry.hxx index a34426b3a..53a7f3900 100644 --- a/src/Scenery/tileentry.hxx +++ b/src/Scenery/tileentry.hxx @@ -38,7 +38,7 @@ #endif #include -#include +#include #include diff --git a/src/Time/light.cxx b/src/Time/light.cxx index 175939998..7202a3670 100644 --- a/src/Time/light.cxx +++ b/src/Time/light.cxx @@ -31,7 +31,7 @@ #endif #include -#include +#include #include diff --git a/src/Time/light.hxx b/src/Time/light.hxx index fd760a972..b1dd41ab8 100644 --- a/src/Time/light.hxx +++ b/src/Time/light.hxx @@ -39,7 +39,7 @@ #endif #include -#include +#include #include // plib include diff --git a/src/Weather/weather.cxx b/src/Weather/weather.cxx index ac703dd1a..178ab4134 100644 --- a/src/Weather/weather.cxx +++ b/src/Weather/weather.cxx @@ -30,7 +30,7 @@ #endif #include -#include +#include #include diff --git a/src/Weather/weather.hxx b/src/Weather/weather.hxx index 03e5714f2..a1ee77b51 100644 --- a/src/Weather/weather.hxx +++ b/src/Weather/weather.hxx @@ -27,7 +27,7 @@ #include -#include +#include #ifdef SG_HAVE_STD_INCLUDES # include diff --git a/src/WeatherCM/FGWeatherParse.h b/src/WeatherCM/FGWeatherParse.h index cdfdfc8eb..5b51681f6 100644 --- a/src/WeatherCM/FGWeatherParse.h +++ b/src/WeatherCM/FGWeatherParse.h @@ -61,6 +61,10 @@ HISTORY /****************************************************************************/ /* INCLUDES */ /****************************************************************************/ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include -- 2.39.5