1
0
Fork 0

Migrate FlightGear code to use "#include SG_GL*" defined in

"#include <simgear/compiler.h>".
This commit is contained in:
curt 2004-11-18 19:53:00 +00:00
parent 225af83b32
commit 4214cd6c10
16 changed files with 46 additions and 37 deletions

View file

@ -231,22 +231,6 @@ else
AC_DEFINE([PU_USE_GLUT], 1, [Define to use glut]) AC_DEFINE([PU_USE_GLUT], 1, [Define to use glut])
fi fi
dnl check for glut location
AC_CHECK_HEADER(GL/glut.h)
if test "x$ac_cv_header_GL_glut_h" = "xyes"; then
AC_DEFINE([FG_GLUT_H], <GL/glut.h>, [Define as glut.h include location])
else
AC_CHECK_HEADER(GLUT/glut.h)
if test "x$ac_cv_header_GLUT_glut_h" = "xyes"; then
AC_DEFINE([FG_GLUT_H], <GLUT/glut.h>, [Define as glut.h include location])
else
if test "x$enable_sdl" != "xyes"; then
echo "Neither GL/glut.h nor GLUT/glut.h found. Cannot continue"
exit
fi
fi
fi
dnl check for OpenGL related libraries dnl check for OpenGL related libraries
case "${host}" in case "${host}" in
*-*-cygwin* | *-*-mingw32*) *-*-cygwin* | *-*-mingw32*)

View file

@ -26,7 +26,9 @@
# include <windows.h> # include <windows.h>
#endif #endif
#include <GL/glu.h> #include <simgear/compiler.h>
#include SG_GLU_H
#include <simgear/props/props.hxx> #include <simgear/props/props.hxx>

View file

@ -29,7 +29,9 @@
# include <windows.h> # include <windows.h>
#endif #endif
#include <GL/glu.h> #include <simgear/compiler.h>
#include SG_GLU_H
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>

View file

@ -44,7 +44,7 @@
#include <stdio.h> // char related functions #include <stdio.h> // char related functions
#include <string.h> // strcmp() #include <string.h> // strcmp()
#include <GL/glu.h> #include SG_GLU_H
#include <simgear/constants.h> #include <simgear/constants.h>
#include <simgear/debug/logstream.hxx> #include <simgear/debug/logstream.hxx>

View file

@ -29,7 +29,9 @@
#include <stdio.h> // sprintf #include <stdio.h> // sprintf
#include <string.h> #include <string.h>
#include <GL/glu.h> #include <simgear/compiler.h>
#include SG_GLU_H
#include <plib/ssg.h> #include <plib/ssg.h>
#include <plib/fnt.h> #include <plib/fnt.h>

View file

@ -40,7 +40,7 @@
# include <windows.h> # include <windows.h>
#endif #endif
#include <GL/gl.h> #include SG_GL_H
#if defined(FX) && defined(XMESA) #if defined(FX) && defined(XMESA)
# include <GL/xmesa.h> # include <GL/xmesa.h>

View file

@ -1,6 +1,7 @@
#include <iostream> #include <iostream>
#include <GL/gl.h> #include <simgear/compiler.h>
#include SG_GL_H
#include <plib/pw.h> #include <plib/pw.h>
#include <plib/pu.h> #include <plib/pu.h>
#include <simgear/props/props.hxx> #include <simgear/props/props.hxx>

View file

@ -1,16 +1,16 @@
// The mac puts this in a weird location (GLUT/glut.h), so the
// configure script detects the location and defines it as a macro.
#ifndef _MSC_VER // MSVC really needs a definition for wchar_t #ifndef _MSC_VER // MSVC really needs a definition for wchar_t
#define _WCHAR_T_DEFINED 1 // Glut needs this, or else it tries to #define _WCHAR_T_DEFINED 1 // Glut needs this, or else it tries to
// redefine it // redefine it
#endif #endif
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
# include FG_GLUT_H
#else
# include <GL/glut.h>
#endif #endif
#include <simgear/compiler.h>
#include SG_GLUT_H
#include <plib/pu.h> #include <plib/pu.h>
#include "fg_props.hxx" #include "fg_props.hxx"

View file

@ -36,7 +36,9 @@
#include <string.h> #include <string.h>
#include <GL/glu.h> #include <simgear/compiler.h>
#include SG_GLU_H
#include <simgear/debug/logstream.hxx> #include <simgear/debug/logstream.hxx>
#include <simgear/screen/texture.hxx> #include <simgear/screen/texture.hxx>

View file

@ -48,8 +48,8 @@ public:
float phi; // roll (radians) float phi; // roll (radians)
float theta; // pitch (radians) float theta; // pitch (radians)
float psi; // yaw or true heading (radians) float psi; // yaw or true heading (radians)
float alpha; // angle of attack float alpha; // angle of attack (radians)
float beta; // side slip angle float beta; // side slip angle (radians)
// Velocities // Velocities
float phidot; // roll rate (radians/sec) float phidot; // roll rate (radians/sec)

View file

@ -30,10 +30,10 @@
# include <windows.h> # include <windows.h>
#endif #endif
#include <GL/gl.h>
#include <simgear/compiler.h> #include <simgear/compiler.h>
#include SG_GL_H
#ifdef SG_MATH_EXCEPTION_CLASH #ifdef SG_MATH_EXCEPTION_CLASH
# define exception c_exception # define exception c_exception
#endif #endif

View file

@ -38,7 +38,9 @@
# include <windows.h> # include <windows.h>
#endif #endif
#include <GL/gl.h> #include <simgear/compiler.h>
#include SG_GL_H
#include <plib/sg.h> // plib include #include <plib/sg.h> // plib include

View file

@ -8,7 +8,9 @@
#include <stdio.h> #include <stdio.h>
#include FG_GLUT_H #include <simgear/compiler.h>
#include SG_GLUT_H
int main() { int main() {

View file

@ -18,7 +18,9 @@ Date: Fri, 24 Apr 1998 07:33:51 -0800
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include FG_GLUT_H #include <simgear/compiler.h>
#include SG_GLUT_H
void getPrints ( GLenum token, char *string ) void getPrints ( GLenum token, char *string )

View file

@ -10,7 +10,9 @@
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
#include FG_GLUT_H #include <simgear/compiler.h>
#include SG_GLUT_H
#define TEXRES_X 256 #define TEXRES_X 256
#define TEXRES_Y 256 #define TEXRES_Y 256

View file

@ -1,5 +1,13 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <simgear/compiler.h>
#include <iostream> #include <iostream>
#include <GL/glut.h>
#include SG_GLUT_H
#include <plib/ssg.h> #include <plib/ssg.h>
using std::cerr; using std::cerr;