Checking in Getafix's Linux shaders fix. Linux users with systems supporting shaders, please check that shaders work. Linux users with systems not supporting shaders, please check that the program continues to run without problems.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1547 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Nikos Barkas 2008-04-09 06:24:16 +00:00
parent a16d13609c
commit b97ab4db52

View File

@ -45,12 +45,26 @@ MA 02110-1301, USA.
// prevent the including of SDL_opengl.h loading a previous version of glext.h
#define NO_SDL_GLEXT
// GL_GLEXT_PROTOTYPES must be defined for the Linux build to use shaders.
// The preprocessor if statement below is required as is, because the LINUX
// symbol is defined for both Windows and Linux builds.
#if (OOLITE_LINUX && !OOLITE_WINDOWS)
#ifndef GL_GLEXT_PROTOTYPES
#define GL_GLEXT_PROTOTYPES
#define __DEFINED_GL_GLEXT_PROTOTYPES
#endif // GL_GLEXT_PROTOTYPES
#endif // OOLITE_LINUX && !OOLITE_WINDOWS
// the standard SDL_opengl.h
#include <SDL_opengl.h>
// include an up-to-date version of glext.h
#include <GL/glext.h>
#ifdef __DEFINED_GL_GLEXT_PROTOTYPES
#undef GL_GLEXT_PROTOTYPES
#undef __DEFINED_GL_GLEXT_PROTOTYPES
#endif
#else // Not OS X or SDL