From 8d73160a75aa03509d448f83aa929079a5e31929 Mon Sep 17 00:00:00 2001 From: curt Date: Thu, 18 Nov 2004 19:10:34 +0000 Subject: [PATCH] Abstract out location of gl.h, glut.h, and glu.h includes so that we can make the Mac platform happy since they put these in a different place compared to the rest of the world. --- simgear/compiler.h | 17 +++++++++++++++++ simgear/scene/material/matlib.cxx | 4 ++-- simgear/scene/sky/clouds3d/SkyCloud.cpp | 5 ++++- .../sky/clouds3d/SkyDynamicTextureManager.hpp | 4 +++- simgear/scene/sky/clouds3d/SkyLight.cpp | 4 +++- simgear/scene/sky/clouds3d/SkyMaterial.hpp | 4 +++- simgear/scene/sky/clouds3d/SkyMinMaxBox.cpp | 4 +++- .../sky/clouds3d/SkyRenderableInstanceCloud.cpp | 4 +++- .../sky/clouds3d/SkyRenderableInstanceGroup.cpp | 4 +++- simgear/scene/sky/clouds3d/SkyTexture.hpp | 4 +++- .../scene/sky/clouds3d/SkyTextureManager.cpp | 4 +++- simgear/scene/sky/clouds3d/glut_shapes.c | 9 ++++++--- simgear/scene/sky/clouds3d/glut_shapes.h | 4 +++- simgear/scene/sky/dome.cxx | 4 +++- simgear/screen/GLBitmaps.cxx | 4 +++- simgear/screen/extensions.hxx | 4 +++- simgear/screen/screen-dump.cxx | 4 +++- simgear/screen/screen-dump.hxx | 3 ++- simgear/screen/texture.cxx | 5 ++++- simgear/screen/texture.hxx | 3 ++- simgear/screen/tr.cxx | 14 ++++++++++---- simgear/screen/tr.h | 12 +++++++++--- simgear/xgl/xgl.h | 6 ++++-- 23 files changed, 99 insertions(+), 31 deletions(-) diff --git a/simgear/compiler.h b/simgear/compiler.h index 9123ab19..b6ae6c7d 100644 --- a/simgear/compiler.h +++ b/simgear/compiler.h @@ -364,6 +364,23 @@ #endif // __ICC +// +// Platform dependent gl.h and glut.h definitions +// + +#ifdef __APPLE__ +# define SG_GL_H +# define SG_GLU_H +# define SG_GLUT_H +# define SG_GLEXT_H +#else +# define SG_GL_H +# define SG_GLU_H +# define SG_GLUT_H +# define SG_GLEXT_H +#endif + + // // No user modifiable definitions beyond here. // diff --git a/simgear/scene/material/matlib.cxx b/simgear/scene/material/matlib.cxx index 22309400..f73687d3 100644 --- a/simgear/scene/material/matlib.cxx +++ b/simgear/scene/material/matlib.cxx @@ -33,12 +33,12 @@ # include #endif -#include - #include #include #include +#include SG_GL_H + #include #include STL_STRING diff --git a/simgear/scene/sky/clouds3d/SkyCloud.cpp b/simgear/scene/sky/clouds3d/SkyCloud.cpp index 0155de42..59243c38 100644 --- a/simgear/scene/sky/clouds3d/SkyCloud.cpp +++ b/simgear/scene/sky/clouds3d/SkyCloud.cpp @@ -33,9 +33,12 @@ # include #endif -#include #include +#include + +#include SG_GLU_H + #include "SkyCloud.hpp" #include "SkyRenderableInstance.hpp" #include "SkyContext.hpp" diff --git a/simgear/scene/sky/clouds3d/SkyDynamicTextureManager.hpp b/simgear/scene/sky/clouds3d/SkyDynamicTextureManager.hpp index d76dd559..a23ab69d 100644 --- a/simgear/scene/sky/clouds3d/SkyDynamicTextureManager.hpp +++ b/simgear/scene/sky/clouds3d/SkyDynamicTextureManager.hpp @@ -36,7 +36,9 @@ #include -#include +#include + +#include SG_GL_H #include "SkyUtil.hpp" #include "SkySingleton.hpp" diff --git a/simgear/scene/sky/clouds3d/SkyLight.cpp b/simgear/scene/sky/clouds3d/SkyLight.cpp index 59553cfb..0efbe4f5 100644 --- a/simgear/scene/sky/clouds3d/SkyLight.cpp +++ b/simgear/scene/sky/clouds3d/SkyLight.cpp @@ -28,7 +28,9 @@ # include #endif -#include +#include + +#include SG_GLU_H #include "glut_shapes.h" diff --git a/simgear/scene/sky/clouds3d/SkyMaterial.hpp b/simgear/scene/sky/clouds3d/SkyMaterial.hpp index 84573558..ef6c07bb 100644 --- a/simgear/scene/sky/clouds3d/SkyMaterial.hpp +++ b/simgear/scene/sky/clouds3d/SkyMaterial.hpp @@ -33,7 +33,9 @@ # include #endif -#include +#include + +#include SG_GL_H #include "vec4f.hpp" #include "SkyUtil.hpp" diff --git a/simgear/scene/sky/clouds3d/SkyMinMaxBox.cpp b/simgear/scene/sky/clouds3d/SkyMinMaxBox.cpp index 41b2cf3b..8d008822 100644 --- a/simgear/scene/sky/clouds3d/SkyMinMaxBox.cpp +++ b/simgear/scene/sky/clouds3d/SkyMinMaxBox.cpp @@ -29,7 +29,9 @@ # include #endif -#include +#include + +#include SG_GL_H #include "SkyMinMaxBox.hpp" #include "camutils.hpp" diff --git a/simgear/scene/sky/clouds3d/SkyRenderableInstanceCloud.cpp b/simgear/scene/sky/clouds3d/SkyRenderableInstanceCloud.cpp index a436a7da..268aa038 100644 --- a/simgear/scene/sky/clouds3d/SkyRenderableInstanceCloud.cpp +++ b/simgear/scene/sky/clouds3d/SkyRenderableInstanceCloud.cpp @@ -28,7 +28,9 @@ # include #endif -#include +#include + +#include SG_GLU_H #include "SkyUtil.hpp" #include "SkyCloud.hpp" diff --git a/simgear/scene/sky/clouds3d/SkyRenderableInstanceGroup.cpp b/simgear/scene/sky/clouds3d/SkyRenderableInstanceGroup.cpp index 87b7f559..6206de7d 100644 --- a/simgear/scene/sky/clouds3d/SkyRenderableInstanceGroup.cpp +++ b/simgear/scene/sky/clouds3d/SkyRenderableInstanceGroup.cpp @@ -30,7 +30,9 @@ # include #endif -#include +#include + +#include SG_GL_H #include "SkyRenderableInstanceGroup.hpp" #include "SkySceneManager.hpp" diff --git a/simgear/scene/sky/clouds3d/SkyTexture.hpp b/simgear/scene/sky/clouds3d/SkyTexture.hpp index e5dd96d8..bc18739d 100644 --- a/simgear/scene/sky/clouds3d/SkyTexture.hpp +++ b/simgear/scene/sky/clouds3d/SkyTexture.hpp @@ -33,7 +33,9 @@ # include #endif -#include +#include + +#include SG_GL_H #define __glext_h_ #define __GLEXT_H_ diff --git a/simgear/scene/sky/clouds3d/SkyTextureManager.cpp b/simgear/scene/sky/clouds3d/SkyTextureManager.cpp index 9d123b5c..9532f8ef 100644 --- a/simgear/scene/sky/clouds3d/SkyTextureManager.cpp +++ b/simgear/scene/sky/clouds3d/SkyTextureManager.cpp @@ -30,7 +30,9 @@ # include #endif -#include +#include + +#include SG_GLU_H #include "SkyTextureManager.hpp" #include "SkyContext.hpp" diff --git a/simgear/scene/sky/clouds3d/glut_shapes.c b/simgear/scene/sky/clouds3d/glut_shapes.c index e8796cf4..a917cc67 100644 --- a/simgear/scene/sky/clouds3d/glut_shapes.c +++ b/simgear/scene/sky/clouds3d/glut_shapes.c @@ -48,10 +48,13 @@ OpenGL(TM) is a trademark of Silicon Graphics, Inc. # include #endif -#include "glut_shapes.h" - #include -#include + +#include + +#include SG_GLU_H + +#include "glut_shapes.h" /* Some files do not define M_PI... */ diff --git a/simgear/scene/sky/clouds3d/glut_shapes.h b/simgear/scene/sky/clouds3d/glut_shapes.h index 5c5ff39b..e364c6c4 100644 --- a/simgear/scene/sky/clouds3d/glut_shapes.h +++ b/simgear/scene/sky/clouds3d/glut_shapes.h @@ -14,7 +14,9 @@ # include #endif -#include +#include + +#include SG_GL_H #ifdef __cplusplus extern "C" { diff --git a/simgear/scene/sky/dome.cxx b/simgear/scene/sky/dome.cxx index 4084c09b..24396544 100644 --- a/simgear/scene/sky/dome.cxx +++ b/simgear/scene/sky/dome.cxx @@ -33,7 +33,9 @@ #include -#include +#include + +#include SG_GL_H #include diff --git a/simgear/screen/GLBitmaps.cxx b/simgear/screen/GLBitmaps.cxx index 7caba76d..a490a4d0 100755 --- a/simgear/screen/GLBitmaps.cxx +++ b/simgear/screen/GLBitmaps.cxx @@ -15,7 +15,9 @@ #include #include // memcpy() -#include +#include + +#include SG_GL_H #include "GLBitmaps.h" diff --git a/simgear/screen/extensions.hxx b/simgear/screen/extensions.hxx index 30f63e21..4b9046a0 100644 --- a/simgear/screen/extensions.hxx +++ b/simgear/screen/extensions.hxx @@ -36,7 +36,9 @@ # include #endif -#include +#include + +#include SG_GL_H #if defined(__cplusplus) diff --git a/simgear/screen/screen-dump.cxx b/simgear/screen/screen-dump.cxx index d6a62ba0..ce4b5c45 100644 --- a/simgear/screen/screen-dump.cxx +++ b/simgear/screen/screen-dump.cxx @@ -36,7 +36,9 @@ #include #include -#include +#include + +#include SG_GL_H #include "screen-dump.hxx" diff --git a/simgear/screen/screen-dump.hxx b/simgear/screen/screen-dump.hxx index 876d236a..7c2e922d 100644 --- a/simgear/screen/screen-dump.hxx +++ b/simgear/screen/screen-dump.hxx @@ -22,8 +22,9 @@ // // $Id$ +#include -#include +#include SG_GL_H /** * Dump the screen buffer to a ppm file. diff --git a/simgear/screen/texture.cxx b/simgear/screen/texture.cxx index e3331a74..4404786a 100644 --- a/simgear/screen/texture.cxx +++ b/simgear/screen/texture.cxx @@ -12,10 +12,13 @@ */ #include + #ifdef WIN32 # include #endif -#include + +#include SG_GLU_H + #include #include "texture.hxx" diff --git a/simgear/screen/texture.hxx b/simgear/screen/texture.hxx index 22f1f01c..5b7c777b 100644 --- a/simgear/screen/texture.hxx +++ b/simgear/screen/texture.hxx @@ -13,7 +13,8 @@ #ifndef __SG_TEXTURE_HXX #define __SG_TEXTURE_HXX 1 -#include +#include +#include SG_GL_H #include #include diff --git a/simgear/screen/tr.cxx b/simgear/screen/tr.cxx index 393213b4..16841094 100644 --- a/simgear/screen/tr.cxx +++ b/simgear/screen/tr.cxx @@ -2,8 +2,13 @@ /* * $Log$ - * Revision 1.1 2002/09/07 02:58:19 curt - * Initial revision + * Revision 1.2 2004/11/18 19:10:34 curt + * Abstract out location of gl.h, glut.h, and glu.h includes so that we can + * make the Mac platform happy since they put these in a different place compared + * to the rest of the world. + * + * Revision 1.1.1.1 2002/09/07 02:58:19 curt + * Initial revsion of Simgear-0.3.0 * * Revision 1.3 2001/07/30 20:34:21 curt * Various MSVC fixes. @@ -62,8 +67,9 @@ #ifdef WIN32 #include #endif -#include -#include + +#include SG_GLU_H + #include #include "tr.h" diff --git a/simgear/screen/tr.h b/simgear/screen/tr.h index 5224786b..e276b5db 100644 --- a/simgear/screen/tr.h +++ b/simgear/screen/tr.h @@ -2,8 +2,13 @@ /* * $Log$ - * Revision 1.1 2002/09/07 02:58:19 curt - * Initial revision + * Revision 1.2 2004/11/18 19:10:34 curt + * Abstract out location of gl.h, glut.h, and glu.h includes so that we can + * make the Mac platform happy since they put these in a different place compared + * to the rest of the world. + * + * Revision 1.1.1.1 2002/09/07 02:58:19 curt + * Initial revsion of Simgear-0.3.0 * * Revision 1.1 2001/06/26 15:19:39 curt * Added tr.cxx / tr.h, Brian Paul's LGPL'd tiled rendering support libs for @@ -75,8 +80,9 @@ #ifndef TR_H #define TR_H +#include -#include +#include SG_GL_H //#ifdef __cplusplus diff --git a/simgear/xgl/xgl.h b/simgear/xgl/xgl.h index 40a14fbf..bb371247 100644 --- a/simgear/xgl/xgl.h +++ b/simgear/xgl/xgl.h @@ -14,8 +14,10 @@ # include #endif -#include -#include +#include +#include SG_GLU_H +#include SG_GL_H + #include -- 2.39.5