update copyright date
[gnash.git] / librender / opengl / tu_opengl_includes.h
blob230238eaaddd412b39b7a87f1d1b9e3d6afe05d2
1 // ogl.h -- by Thatcher Ulrich <tu@tulrich.com>
2 // -- Willem Kokke <willem@mindparity.com>
4 // This source code has been donated to the Public Domain. Do
5 // whatever you want with it.
7 // platform independent opengl includes
9 #ifndef TU_OPENGL_INCLUDES_H
10 #define TU_OPENGL_INCLUDES_H
12 #include "gnashconfig.h"
14 // WIN32 includes. We don't want to have to include windows.h because
15 // it's such a pig, so #define a couple things that are required to
16 // make the gl.h stuff work.
17 #if defined(_WIN32) || defined(WIN32)
19 // GL extension constants...
20 # ifdef HAVE_SDL_H
21 # include <SDL_opengl.h>
22 # else
23 # define GL_VERTEX_ARRAY_RANGE_NV 0x851D
24 # define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
25 # define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
26 # define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
27 # define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
28 # define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
29 # define GL_TEXTURE0_ARB 0x84C0
30 # define GL_TEXTURE1_ARB 0x84C1
31 # define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
32 # define GL_CLAMP_TO_EDGE 0x812F
33 # define GL_ALL_COMPLETED_NV 0x84F2
34 # endif
36 # ifndef _INC_WINDOWS
38 # define WINAPI __stdcall
39 # define APIENTRY WINAPI
40 # define CALLBACK __stdcall
41 # define DECLSPEC_IMPORT __declspec(dllimport)
43 # if !defined(_GDI32_)
44 # define WINGDIAPI DECLSPEC_IMPORT
45 # else
46 # define WINGDIAPI
47 # endif
49 # else
50 # define WIN32_LEAN_AND_MEAN
51 # include <windows.h>
52 # endif
54 # ifndef _WCHAR_T_DEFINED
55 typedef unsigned short wchar_t;
56 # define _WCHAR_T_DEFINED
57 # endif // _WCHAR_T_DEFINED
59 # include <GL/gl.h>
60 # include <GL/glu.h>
61 #endif // WIN32
63 #ifdef __APPLE__
64 # include <OpenGL/gl.h>
65 # include <OpenGL/glu.h>
66 # define APIENTRY
67 #endif // __APPLE__
69 #if !defined(WIN32) && (!defined(__APPLE__) || defined(GUI_GTK))
70 #ifndef GL_GLEXT_PROTOTYPES
71 # define GL_GLEXT_PROTOTYPES 1
72 #endif
73 #ifdef __APPLE__
74 # include <OpenGL/glext.h>
75 #else
76 # include <GL/gl.h>
77 # include <GL/glx.h>
78 # include <GL/glu.h>
79 #endif
80 #ifndef APIENTRY
81 # define APIENTRY
82 #endif
83 #endif // no WIN32 or OSX
85 #endif // TU_OPENGL_INCLUDES_H
87 // Local Variables:
88 // mode: C++
89 // indent-tabs-mode: t
90 // End: