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...
21 # include <SDL_opengl.h>
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
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
50 # define WIN32_LEAN_AND_MEAN
54 # ifndef _WCHAR_T_DEFINED
55 typedef unsigned short wchar_t;
56 # define _WCHAR_T_DEFINED
57 # endif // _WCHAR_T_DEFINED
64 # include <OpenGL/gl.h>
65 # include <OpenGL/glu.h>
69 #if !defined(WIN32) && (!defined(__APPLE__) || defined(GUI_GTK))
70 #ifndef GL_GLEXT_PROTOTYPES
71 # define GL_GLEXT_PROTOTYPES 1
74 # include <OpenGL/glext.h>
83 #endif // no WIN32 or OSX
85 #endif // TU_OPENGL_INCLUDES_H
89 // indent-tabs-mode: t