Gnash  0.8.10
tu_opengl_includes.h
Go to the documentation of this file.
00001 // ogl.h        -- by Thatcher Ulrich <tu@tulrich.com>
00002 //              -- Willem Kokke <willem@mindparity.com>
00003 
00004 // This source code has been donated to the Public Domain.  Do
00005 // whatever you want with it.
00006 
00007 // platform independent opengl includes
00008 
00009 #ifndef TU_OPENGL_INCLUDES_H
00010 #define TU_OPENGL_INCLUDES_H
00011 
00012 #include "gnashconfig.h"
00013 
00014 // WIN32 includes.  We don't want to have to include windows.h because
00015 // it's such a pig, so #define a couple things that are required to
00016 // make the gl.h stuff work.
00017 #if defined(_WIN32) || defined(WIN32)
00018 
00019 // GL extension constants...
00020 #       ifdef HAVE_SDL_H
00021 #               include <SDL_opengl.h>
00022 #       else
00023 #               define GL_VERTEX_ARRAY_RANGE_NV          0x851D   
00024 #               define GL_VERTEX_ARRAY_RANGE_LENGTH_NV   0x851E   
00025 #               define GL_VERTEX_ARRAY_RANGE_VALID_NV    0x851F   
00026 #               define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520   
00027 #               define GL_VERTEX_ARRAY_RANGE_POINTER_NV  0x8521   
00028 #               define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533   
00029 #               define GL_TEXTURE0_ARB                   0x84C0   
00030 #               define GL_TEXTURE1_ARB                   0x84C1   
00031 #               define GL_MAX_TEXTURE_UNITS_ARB          0x84E2   
00032 #               define GL_CLAMP_TO_EDGE                  0x812F   
00033 #               define GL_ALL_COMPLETED_NV               0x84F2   
00034 #       endif
00035 
00036 # ifndef _INC_WINDOWS
00037 
00038 #  define WINAPI        __stdcall
00039 #  define APIENTRY WINAPI
00040 #  define CALLBACK __stdcall
00041 #  define DECLSPEC_IMPORT __declspec(dllimport)
00042 
00043 #  if !defined(_GDI32_)
00044 #   define WINGDIAPI DECLSPEC_IMPORT
00045 #  else
00046 #   define WINGDIAPI
00047 #  endif
00048 
00049 # else
00050 #  define WIN32_LEAN_AND_MEAN
00051 #  include <windows.h>
00052 # endif
00053 
00054 # ifndef _WCHAR_T_DEFINED
00055    typedef unsigned short wchar_t;
00056 #  define _WCHAR_T_DEFINED
00057 # endif // _WCHAR_T_DEFINED
00058 
00059 # include <GL/gl.h>
00060 # include <GL/glu.h>
00061 #endif // WIN32
00062 
00063 #ifdef __APPLE__
00064 # include <OpenGL/gl.h>
00065 # include <OpenGL/glu.h>
00066 # define APIENTRY
00067 #endif // __APPLE__
00068 
00069 #if !defined(WIN32) && (!defined(__APPLE__) || defined(GUI_GTK))
00070 #ifndef GL_GLEXT_PROTOTYPES
00071 # define GL_GLEXT_PROTOTYPES 1
00072 #endif
00073 #ifdef __APPLE__
00074 # include <OpenGL/glext.h>
00075 #else
00076 # include <GL/gl.h>
00077 # include <GL/glx.h>
00078 # include <GL/glu.h>
00079 #endif
00080 #ifndef APIENTRY
00081 # define APIENTRY
00082 #endif
00083 #endif // no WIN32 or OSX
00084 
00085 #endif // TU_OPENGL_INCLUDES_H
00086 
00087 // Local Variables:
00088 // mode: C++
00089 // indent-tabs-mode: t
00090 // End: