- 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.
This commit is contained in:
@@ -131,20 +131,9 @@
|
||||
//
|
||||
|
||||
#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
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#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"
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <plib/sg.h>
|
||||
#include <simgear/screen/extensions.hxx>
|
||||
#include <simgear/screen/RenderTexture.h>
|
||||
#include SG_GLU_H
|
||||
#include <osg/GLU>
|
||||
|
||||
#include "bbcache.hxx"
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <simgear/misc/sg_path.hxx>
|
||||
|
||||
#include <algorithm>
|
||||
#include SG_GLU_H
|
||||
#include <osg/GLU>
|
||||
|
||||
#include "cloudfield.hxx"
|
||||
#include "newcloud.hxx"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
#include <osg/GL>
|
||||
|
||||
class GlBitmap
|
||||
{
|
||||
|
||||
@@ -496,7 +496,7 @@ bool RenderTexture::Initialize(int width, int height,
|
||||
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
|
||||
@@ -553,7 +553,7 @@ bool RenderTexture::Initialize(int width, int height,
|
||||
return false;
|
||||
}
|
||||
|
||||
long screen;
|
||||
GLint screen;
|
||||
if (error = CGLGetVirtualScreen(CGLGetCurrentContext(), &screen))
|
||||
{
|
||||
_cglCheckError(error);
|
||||
|
||||
@@ -50,15 +50,15 @@
|
||||
*/
|
||||
#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>
|
||||
|
||||
@@ -9,8 +9,14 @@
|
||||
|
||||
#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>
|
||||
|
||||
|
||||
@@ -34,11 +34,13 @@
|
||||
|
||||
#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" {
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
#include <osg/GL>
|
||||
|
||||
#include "screen-dump.hxx"
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
#include <osg/GL>
|
||||
|
||||
/**
|
||||
* Dump the screen buffer to a ppm file.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include SG_GLU_H
|
||||
#include <osg/GLU>
|
||||
|
||||
#include <math.h>
|
||||
#include <zlib.h>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#define __SG_TEXTURE_HXX 1
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
#include SG_GL_H
|
||||
#include <osg/GL>
|
||||
#include <zlib.h>
|
||||
|
||||
#include <plib/sg.h>
|
||||
|
||||
@@ -2,6 +2,21 @@
|
||||
|
||||
/*
|
||||
* $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
|
||||
@@ -129,7 +144,7 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include SG_GLU_H
|
||||
#include <osg/GLU>
|
||||
|
||||
#include "tr.h"
|
||||
|
||||
|
||||
@@ -2,6 +2,21 @@
|
||||
|
||||
/*
|
||||
* $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.
|
||||
*
|
||||
@@ -85,7 +100,7 @@
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
#include <osg/GL>
|
||||
|
||||
|
||||
//#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user