//
#ifdef __APPLE__
-# define SG_GL_H <OpenGL/gl.h>
-# define SG_GLX_H <AGL/agl.h>
-# define SG_GLU_H <OpenGL/glu.h>
-# define SG_GLEXT_H <OpenGL/glext.h>
-# define SG_GLUT_H <GLUT/glut.h>
-
-
inline int (isnan)(double r) { return !(r <= 0 || r >= 0); }
#else
-# define SG_GL_H <GL/gl.h>
-# define SG_GLX_H <GL/glx.h>
-# define SG_GLU_H <GL/glu.h>
-# define SG_GLEXT_H <GL/glext.h>
-# define SG_GLUT_H <GL/glut.h>
+
#endif
#include <simgear/scene/model/animation.hxx>
#include <simgear/scene/model/model.hxx>
#include <simgear/environment/visual_enviro.hxx>
-#include SG_GLU_H
+#include <osg/GLU>
#include "shadowvolume.hxx"
#include <plib/sg.h>
#include <simgear/screen/extensions.hxx>
#include <simgear/screen/RenderTexture.h>
-#include SG_GLU_H
+#include <osg/GLU>
#include "bbcache.hxx"
#include <simgear/misc/sg_path.hxx>
#include <algorithm>
-#include SG_GLU_H
+#include <osg/GLU>
#include "cloudfield.hxx"
#include "newcloud.hxx"
#include <simgear/compiler.h>
-#include SG_GL_H
+#include <osg/GL>
class GlBitmap
{
fprintf(stderr, "Couldn't get current context!");
CGLPixelFormatObj pixFormat = NULL;
- long int iNumFormats;
+ GLint iNumFormats;
CGLError error;
// Copy the _pixelFormatAttribs into another array to fix
return false;
}
- long screen;
+ GLint screen;
if (error = CGLGetVirtualScreen(CGLGetCurrentContext(), &screen))
{
_cglCheckError(error);
*/
#include <simgear/compiler.h>
-#if !defined( _WIN32 ) && !defined( __MACH__ )
-# include <X11/Xlib.h>
-#endif
-#include SG_GL_H
-#if defined( __MACH__)
+#include <osg/GL>
+
+#if defined( __APPLE__)
# include <OpenGL/OpenGL.h>
#endif
-#ifndef _WIN32
-# include SG_GLX_H
+
+#if !defined( _WIN32 ) && !defined( __APPLE__ )
+# include <X11/Xlib.h>
+# include <GL/glx.h>
#endif
#include <string>
#include <simgear/compiler.h>
-#include SG_GL_H
-#include SG_GLUT_H
+#include <osg/GL>
+
+#ifdef __APPLE__
+# include <GLUT/glut.h>
+#else
+# include <GL/glut.h>
+#endif
+
#include <simgear/screen/extensions.hxx>
#include <simgear/screen/RenderTexture.h>
#include <simgear/compiler.h>
-#if !defined(WIN32)
-# include SG_GLX_H
-#endif
-#include SG_GL_H
+#include <osg/GL>
+#if defined (WIN32)
+# include <GL/wgl.h>
+#elif !defined(__APPLE__)
+# include <GL/glx.h>
+#endif
#if defined(__cplusplus)
extern "C" {
#include <simgear/compiler.h>
-#include SG_GL_H
+#include <osg/GL>
#include "screen-dump.hxx"
#include <simgear/compiler.h>
-#include SG_GL_H
+#include <osg/GL>
/**
* Dump the screen buffer to a ppm file.
# include <windows.h>
#endif
-#include SG_GLU_H
+#include <osg/GLU>
#include <math.h>
#include <zlib.h>
#define __SG_TEXTURE_HXX 1
#include <simgear/compiler.h>
-#include SG_GL_H
+#include <osg/GL>
#include <zlib.h>
#include <plib/sg.h>
/*
* $Log$
+ * Revision 1.5 2008/07/27 16:10:37 ehofman
+ *
+ *
+ * - remove the SG_GLxxxx_H #defines, since OSG provides its own versions
+ * - this exposed a bizarre issue on Mac where dragging in <AGL/agl.h> in
+ * extensions.hxx was pulling in all of Carbon to the global namespace
+ * - very scary. As a result, I now need to explicitly include CoreFoundation
+ * in fg_init.cxx.
+ * - change SG_USING_STD(x) to using std::x
+ *
+ * Issues:
+ *
+ * - the logic for X11 and Win32 in RenderTexture and extensions is tortured,
+ * please see if you agree I got all the ifdefs correct.
+ *
* Revision 1.4 2006/10/29 19:27:11 frohlich
* Modified Files:
* configure.ac simgear/environment/visual_enviro.cxx
#include <windows.h>
#endif
-#include SG_GLU_H
+#include <osg/GLU>
#include "tr.h"
/*
* $Log$
+ * Revision 1.4 2008/07/27 16:10:37 ehofman
+ *
+ *
+ * - remove the SG_GLxxxx_H #defines, since OSG provides its own versions
+ * - this exposed a bizarre issue on Mac where dragging in <AGL/agl.h> in
+ * extensions.hxx was pulling in all of Carbon to the global namespace
+ * - very scary. As a result, I now need to explicitly include CoreFoundation
+ * in fg_init.cxx.
+ * - change SG_USING_STD(x) to using std::x
+ *
+ * Issues:
+ *
+ * - the logic for X11 and Win32 in RenderTexture and extensions is tortured,
+ * please see if you agree I got all the ifdefs correct.
+ *
* Revision 1.3 2006/02/21 10:47:21 ehofman
* Back out the previous patch.
*
#include <simgear/compiler.h>
-#include SG_GL_H
+#include <osg/GL>
//#ifdef __cplusplus