2001-10-24 03:51:39 +08:00
|
|
|
#ifndef __FTGL__
|
|
|
|
#define __FTGL__
|
|
|
|
|
2001-10-24 17:41:42 +08:00
|
|
|
|
2002-05-28 19:40:37 +08:00
|
|
|
#ifdef _MSC_VER
|
2001-10-24 17:41:42 +08:00
|
|
|
// stl stuff
|
2001-12-15 02:06:34 +08:00
|
|
|
#pragma warning( disable : 4244 )
|
2001-10-24 17:41:42 +08:00
|
|
|
#pragma warning( disable : 4251 )
|
|
|
|
#pragma warning( disable : 4275 )
|
|
|
|
#pragma warning( disable : 4786 )
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef WIN32
|
|
|
|
|
|
|
|
// non windows, doesn't require nonesense as seen below :-)
|
|
|
|
#ifndef __gl_h_
|
2002-01-16 18:36:20 +08:00
|
|
|
#ifdef __DARWIN_OSX__
|
2001-10-31 18:20:50 +08:00
|
|
|
#include <OpenGL/gl.h>
|
|
|
|
#include <OpenGL/glu.h>
|
|
|
|
#else
|
2001-10-31 20:27:48 +08:00
|
|
|
#include <GL/gl.h>
|
|
|
|
#include <GL/glu.h>
|
|
|
|
#endif
|
|
|
|
|
2001-10-24 17:41:42 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// required for compatibility with glext.h style function definitions of
|
|
|
|
// OpenGL extensions, such as in src/osg/Point.cpp.
|
|
|
|
#ifndef APIENTRY
|
|
|
|
#define APIENTRY
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2002-03-29 20:23:20 +08:00
|
|
|
#if defined(__CYGWIN__) || defined(__MINGW32__)
|
|
|
|
# ifndef APIENTRY
|
|
|
|
# define GLUT_APIENTRY_DEFINED
|
|
|
|
# define APIENTRY __stdcall
|
|
|
|
# endif
|
|
|
|
// XXX This is from Win32's <winnt.h>
|
|
|
|
# ifndef CALLBACK
|
|
|
|
# define CALLBACK __stdcall
|
|
|
|
# endif
|
|
|
|
|
|
|
|
#else // ! __CYGWIN__
|
|
|
|
|
2001-10-24 17:41:42 +08:00
|
|
|
// Under windows avoid including <windows.h>
|
|
|
|
// to avoid name space pollution, but Win32's <GL/gl.h>
|
|
|
|
// needs APIENTRY and WINGDIAPI defined properly.
|
|
|
|
// F
|
|
|
|
# if 0
|
|
|
|
# define WIN32_LEAN_AND_MEAN
|
|
|
|
# include <windows.h>
|
|
|
|
# else
|
|
|
|
// XXX This is from Win32's <windef.h>
|
|
|
|
# ifndef APIENTRY
|
|
|
|
# define GLUT_APIENTRY_DEFINED
|
|
|
|
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
|
|
|
|
# define APIENTRY __stdcall
|
|
|
|
# else
|
|
|
|
# define APIENTRY
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
// XXX This is from Win32's <winnt.h>
|
|
|
|
# ifndef CALLBACK
|
|
|
|
# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
|
|
|
|
# define CALLBACK __stdcall
|
|
|
|
# else
|
|
|
|
# define CALLBACK
|
|
|
|
# endif
|
|
|
|
# endif
|
2002-03-29 20:23:20 +08:00
|
|
|
|
|
|
|
#endif // __CYGWIN__
|
|
|
|
|
2001-10-24 17:41:42 +08:00
|
|
|
// XXX This is from Win32's <wingdi.h> and <winnt.h>
|
|
|
|
# ifndef WINGDIAPI
|
|
|
|
# define GLUT_WINGDIAPI_DEFINED
|
|
|
|
# define WINGDIAPI __declspec(dllimport)
|
|
|
|
# endif
|
|
|
|
// XXX This is from Win32's <ctype.h>
|
|
|
|
# ifndef _WCHAR_T_DEFINED
|
|
|
|
typedef unsigned short wchar_t;
|
|
|
|
# define _WCHAR_T_DEFINED
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
|
|
|
|
#ifndef __gl_h_
|
|
|
|
#include <GL/gl.h>
|
2001-10-31 18:20:50 +08:00
|
|
|
#include <GL/glu.h>
|
2001-10-24 17:41:42 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2001-10-31 20:27:48 +08:00
|
|
|
// lifted from glext.h, to remove dependancy on glext.h
|
2002-06-06 21:25:36 +08:00
|
|
|
#ifndef GL_TEXTURE_2D_BINDING_EXT
|
2001-10-31 20:27:48 +08:00
|
|
|
#define GL_TEXTURE_2D_BINDING_EXT 0x8069
|
|
|
|
#endif
|
|
|
|
|
2001-10-31 18:20:50 +08:00
|
|
|
#if defined(_MSC_VER)
|
2002-01-19 06:25:51 +08:00
|
|
|
# ifdef FTGL_LIBRARY_STATIC // staticLib
|
|
|
|
# define FTGL_EXPORT
|
|
|
|
# elif FTGL_LIBRARY // dynamicLib
|
|
|
|
# define FTGL_EXPORT __declspec(dllexport)
|
|
|
|
# else
|
|
|
|
# define FTGL_EXPORT __declspec(dllimport)
|
|
|
|
# endif /* FTGL_LIBRARY */
|
2001-10-31 18:20:50 +08:00
|
|
|
#else
|
2002-01-19 06:25:51 +08:00
|
|
|
# define FTGL_EXPORT
|
2001-10-31 18:20:50 +08:00
|
|
|
#endif
|
2001-10-24 03:51:39 +08:00
|
|
|
|
2002-03-27 07:52:52 +08:00
|
|
|
#include <osg/MemoryManager>
|
|
|
|
|
2001-10-24 03:51:39 +08:00
|
|
|
|
2002-01-19 06:25:51 +08:00
|
|
|
#endif // __FTGL__
|