Clean up of include/osg/GL and include/osg/GLExtensions for better support of

Windows build.
This commit is contained in:
Robert Osfield
2002-08-24 19:35:00 +00:00
parent 9979e80bed
commit 0c383901a7
2 changed files with 52 additions and 55 deletions

View File

@@ -12,8 +12,8 @@
#ifdef __DARWIN_OSX__
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif
#include <GL/gl.h>
#endif
#endif
// required for compatibility with glext.h sytle function definitions of
@@ -22,64 +22,60 @@
#define APIENTRY
#endif
#else
#else // WIN32
#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
#if defined(__CYGWIN__) || defined(__MINGW32__)
#else // ! __CYGWIN__
#ifndef APIENTRY
#define GLUT_APIENTRY_DEFINED
#define APIENTRY __stdcall
#endif
// XXX This is from Win32's <winnt.h>
#ifndef CALLBACK
#define CALLBACK __stdcall
#endif
// 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 defined(__MWERKS__)
# 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
#else // ! __CYGWIN__
#endif // __CYGWIN__
// Under windows avoid including <windows.h>
// to avoid name space pollution, but Win32's <GL/gl.h>
// needs APIENTRY and WINGDIAPI defined properly.
// 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 <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
// 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
#endif // __CYGWIN__
// 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
#ifndef __gl_h_
#include <GL/gl.h>
#endif
#endif
#endif // WIN32
#endif // __osgGL_h

View File

@@ -8,12 +8,13 @@
#include <osg/Export>
#if defined(WIN32)
#include <windows.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#elif defined(__DARWIN_OSX__)
#include <string>
#include <mach-o/dyld.h>
#include <string>
#include <mach-o/dyld.h>
#else
#include <dlfcn.h>
#include <dlfcn.h>
#endif
namespace osg {