Mercurial > sdl-ios-xcode
comparison include/SDL_opengl.h @ 214:0e5d6dd77bda
Added platform independent OpenGL header - SDL_opengl.h
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 25 Oct 2001 05:37:32 +0000 |
parents | |
children | 4bcb29d3769c |
comparison
equal
deleted
inserted
replaced
213:c79890792bfb | 214:0e5d6dd77bda |
---|---|
1 /* | |
2 SDL - Simple DirectMedia Layer | |
3 Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga | |
4 | |
5 This library is free software; you can redistribute it and/or | |
6 modify it under the terms of the GNU Library General Public | |
7 License as published by the Free Software Foundation; either | |
8 version 2 of the License, or (at your option) any later version. | |
9 | |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 Library General Public License for more details. | |
14 | |
15 You should have received a copy of the GNU Library General Public | |
16 License along with this library; if not, write to the Free | |
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | |
19 Sam Lantinga | |
20 slouken@devolution.com | |
21 */ | |
22 | |
23 #ifdef SAVE_RCSID | |
24 static char rcsid = | |
25 "@(#) $Id$"; | |
26 #endif | |
27 | |
28 /* This is a simple file to encapsulate the OpenGL API headers */ | |
29 | |
30 #ifdef WIN32 | |
31 #define WIN32_LEAN_AND_MEAN | |
32 #include <windows.h> | |
33 #endif | |
34 #if defined(__APPLE__) && defined(__MACH__) | |
35 #include <OpenGL/gl.h> /* Header File For The OpenGL Library */ | |
36 #include <OpenGL/glu.h> /* Header File For The GLU Library */ | |
37 #else | |
38 #ifndef NO_SDL_GLEXT | |
39 #define __glext_h_ /* Don't let gl.h include glext.h */ | |
40 #endif | |
41 #include <GL/gl.h> /* Header File For The OpenGL Library */ | |
42 #include <GL/glu.h> /* Header File For The GLU Library */ | |
43 #ifndef NO_SDL_GLEXT | |
44 #undef __glext_h_ | |
45 #endif | |
46 #endif | |
47 | |
48 /* This file taken from "GLext.h" from the Jeff Molofee OpenGL tutorials. | |
49 It is included here because glext.h is not available on some systems. | |
50 If you don't want this version included, simply define "NO_SDL_GLEXT" | |
51 */ | |
52 #ifndef NO_SDL_GLEXT | |
53 #ifndef __glext_h_ | |
54 #define __glext_h_ | |
55 | |
56 #ifdef __cplusplus | |
57 extern "C" { | |
58 #endif | |
59 | |
60 #ifndef APIENTRY | |
61 #define APIENTRY | |
62 #endif | |
63 | |
64 /* | |
65 ** Copyright 1992-1999 Silicon Graphics, Inc. | |
66 ** All Rights Reserved. | |
67 ** | |
68 ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.; | |
69 ** the contents of this file may not be disclosed to third parties, copied or | |
70 ** duplicated in any form, in whole or in part, without the prior written | |
71 ** permission of Silicon Graphics, Inc. | |
72 ** | |
73 ** RESTRICTED RIGHTS LEGEND: | |
74 ** Use, duplication or disclosure by the Government is subject to restrictions | |
75 ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data | |
76 ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or | |
77 ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - | |
78 ** rights reserved under the Copyright Laws of the United States. | |
79 */ | |
80 | |
81 #define GL_ARB_multitexture 1 | |
82 #define GL_EXT_abgr 1 | |
83 #define GL_EXT_bgra 1 | |
84 #define GL_EXT_clip_volume_hint 1 | |
85 #define GL_EXT_compiled_vertex_array 1 | |
86 #define GL_EXT_cull_vertex 1 | |
87 #define GL_EXT_packed_pixels 1 | |
88 #define GL_EXT_point_parameters 1 | |
89 #define GL_EXT_stencil_wrap 1 | |
90 #define GL_EXT_texture_env_add 1 | |
91 #define GL_EXT_texture_env_combine 1 | |
92 #define GL_EXT_vertex_array 1 | |
93 #define GL_NV_texgen_reflection 1 | |
94 #define GL_NV_texture_env_combine4 1 | |
95 #define GL_WIN_swap_hint 1 | |
96 | |
97 /* EXT_abgr */ | |
98 #define GL_ABGR_EXT 0x8000 | |
99 | |
100 /* EXT_packed_pixels */ | |
101 #define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 | |
102 #define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 | |
103 #define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 | |
104 #define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 | |
105 #define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 | |
106 | |
107 /* EXT_vertex_array */ | |
108 #define GL_VERTEX_ARRAY_EXT 0x8074 | |
109 #define GL_NORMAL_ARRAY_EXT 0x8075 | |
110 #define GL_COLOR_ARRAY_EXT 0x8076 | |
111 #define GL_INDEX_ARRAY_EXT 0x8077 | |
112 #define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 | |
113 #define GL_EDGE_FLAG_ARRAY_EXT 0x8079 | |
114 #define GL_VERTEX_ARRAY_SIZE_EXT 0x807A | |
115 #define GL_VERTEX_ARRAY_TYPE_EXT 0x807B | |
116 #define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C | |
117 #define GL_VERTEX_ARRAY_COUNT_EXT 0x807D | |
118 #define GL_NORMAL_ARRAY_TYPE_EXT 0x807E | |
119 #define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F | |
120 #define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 | |
121 #define GL_COLOR_ARRAY_SIZE_EXT 0x8081 | |
122 #define GL_COLOR_ARRAY_TYPE_EXT 0x8082 | |
123 #define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 | |
124 #define GL_COLOR_ARRAY_COUNT_EXT 0x8084 | |
125 #define GL_INDEX_ARRAY_TYPE_EXT 0x8085 | |
126 #define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 | |
127 #define GL_INDEX_ARRAY_COUNT_EXT 0x8087 | |
128 #define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 | |
129 #define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 | |
130 #define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A | |
131 #define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B | |
132 #define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C | |
133 #define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D | |
134 #define GL_VERTEX_ARRAY_POINTER_EXT 0x808E | |
135 #define GL_NORMAL_ARRAY_POINTER_EXT 0x808F | |
136 #define GL_COLOR_ARRAY_POINTER_EXT 0x8090 | |
137 #define GL_INDEX_ARRAY_POINTER_EXT 0x8091 | |
138 #define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 | |
139 #define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 | |
140 | |
141 /* EXT_bgra */ | |
142 #define GL_BGR_EXT 0x80E0 | |
143 #define GL_BGRA_EXT 0x80E1 | |
144 | |
145 /* EXT_clip_volume_hint */ | |
146 #define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 | |
147 | |
148 /* EXT_point_parameters */ | |
149 #define GL_POINT_SIZE_MIN_EXT 0x8126 | |
150 #define GL_POINT_SIZE_MAX_EXT 0x8127 | |
151 #define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 | |
152 #define GL_DISTANCE_ATTENUATION_EXT 0x8129 | |
153 | |
154 /* EXT_compiled_vertex_array */ | |
155 #define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 | |
156 #define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 | |
157 | |
158 /* EXT_cull_vertex */ | |
159 #define GL_CULL_VERTEX_EXT 0x81AA | |
160 #define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB | |
161 #define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC | |
162 | |
163 /* ARB_multitexture */ | |
164 #define GL_ACTIVE_TEXTURE_ARB 0x84E0 | |
165 #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 | |
166 #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 | |
167 #define GL_TEXTURE0_ARB 0x84C0 | |
168 #define GL_TEXTURE1_ARB 0x84C1 | |
169 #define GL_TEXTURE2_ARB 0x84C2 | |
170 #define GL_TEXTURE3_ARB 0x84C3 | |
171 #define GL_TEXTURE4_ARB 0x84C4 | |
172 #define GL_TEXTURE5_ARB 0x84C5 | |
173 #define GL_TEXTURE6_ARB 0x84C6 | |
174 #define GL_TEXTURE7_ARB 0x84C7 | |
175 #define GL_TEXTURE8_ARB 0x84C8 | |
176 #define GL_TEXTURE9_ARB 0x84C9 | |
177 #define GL_TEXTURE10_ARB 0x84CA | |
178 #define GL_TEXTURE11_ARB 0x84CB | |
179 #define GL_TEXTURE12_ARB 0x84CC | |
180 #define GL_TEXTURE13_ARB 0x84CD | |
181 #define GL_TEXTURE14_ARB 0x84CE | |
182 #define GL_TEXTURE15_ARB 0x84CF | |
183 #define GL_TEXTURE16_ARB 0x84D0 | |
184 #define GL_TEXTURE17_ARB 0x84D1 | |
185 #define GL_TEXTURE18_ARB 0x84D2 | |
186 #define GL_TEXTURE19_ARB 0x84D3 | |
187 #define GL_TEXTURE20_ARB 0x84D4 | |
188 #define GL_TEXTURE21_ARB 0x84D5 | |
189 #define GL_TEXTURE22_ARB 0x84D6 | |
190 #define GL_TEXTURE23_ARB 0x84D7 | |
191 #define GL_TEXTURE24_ARB 0x84D8 | |
192 #define GL_TEXTURE25_ARB 0x84D9 | |
193 #define GL_TEXTURE26_ARB 0x84DA | |
194 #define GL_TEXTURE27_ARB 0x84DB | |
195 #define GL_TEXTURE28_ARB 0x84DC | |
196 #define GL_TEXTURE29_ARB 0x84DD | |
197 #define GL_TEXTURE30_ARB 0x84DE | |
198 #define GL_TEXTURE31_ARB 0x84DF | |
199 | |
200 /* EXT_stencil_wrap */ | |
201 #define GL_INCR_WRAP_EXT 0x8507 | |
202 #define GL_DECR_WRAP_EXT 0x8508 | |
203 | |
204 /* NV_texgen_reflection */ | |
205 #define GL_NORMAL_MAP_NV 0x8511 | |
206 #define GL_REFLECTION_MAP_NV 0x8512 | |
207 | |
208 /* EXT_texture_env_combine */ | |
209 #define GL_COMBINE_EXT 0x8570 | |
210 #define GL_COMBINE_RGB_EXT 0x8571 | |
211 #define GL_COMBINE_ALPHA_EXT 0x8572 | |
212 #define GL_RGB_SCALE_EXT 0x8573 | |
213 #define GL_ADD_SIGNED_EXT 0x8574 | |
214 #define GL_INTERPOLATE_EXT 0x8575 | |
215 #define GL_CONSTANT_EXT 0x8576 | |
216 #define GL_PRIMARY_COLOR_EXT 0x8577 | |
217 #define GL_PREVIOUS_EXT 0x8578 | |
218 #define GL_SOURCE0_RGB_EXT 0x8580 | |
219 #define GL_SOURCE1_RGB_EXT 0x8581 | |
220 #define GL_SOURCE2_RGB_EXT 0x8582 | |
221 #define GL_SOURCE0_ALPHA_EXT 0x8588 | |
222 #define GL_SOURCE1_ALPHA_EXT 0x8589 | |
223 #define GL_SOURCE2_ALPHA_EXT 0x858A | |
224 #define GL_OPERAND0_RGB_EXT 0x8590 | |
225 #define GL_OPERAND1_RGB_EXT 0x8591 | |
226 #define GL_OPERAND2_RGB_EXT 0x8592 | |
227 #define GL_OPERAND0_ALPHA_EXT 0x8598 | |
228 #define GL_OPERAND1_ALPHA_EXT 0x8599 | |
229 #define GL_OPERAND2_ALPHA_EXT 0x859A | |
230 | |
231 /* NV_texture_env_combine4 */ | |
232 #define GL_COMBINE4_NV 0x8503 | |
233 #define GL_SOURCE3_RGB_NV 0x8583 | |
234 #define GL_SOURCE3_ALPHA_NV 0x858B | |
235 #define GL_OPERAND3_RGB_NV 0x8593 | |
236 #define GL_OPERAND3_ALPHA_NV 0x859B | |
237 | |
238 /*************************************************************/ | |
239 | |
240 /* EXT_vertex_array */ | |
241 typedef void (APIENTRY * PFNGLARRAYELEMENTEXTPROC) (GLint i); | |
242 typedef void (APIENTRY * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); | |
243 typedef void (APIENTRY * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); | |
244 typedef void (APIENTRY * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); | |
245 typedef void (APIENTRY * PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); | |
246 typedef void (APIENTRY * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); | |
247 typedef void (APIENTRY * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); | |
248 typedef void (APIENTRY * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); | |
249 typedef void (APIENTRY * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); | |
250 | |
251 /* ARB_multitexture */ | |
252 typedef void (APIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); | |
253 typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); | |
254 typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); | |
255 typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); | |
256 typedef void (APIENTRY * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); | |
257 typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); | |
258 typedef void (APIENTRY * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); | |
259 typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); | |
260 typedef void (APIENTRY * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); | |
261 typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); | |
262 typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); | |
263 typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); | |
264 typedef void (APIENTRY * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); | |
265 typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); | |
266 typedef void (APIENTRY * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); | |
267 typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); | |
268 typedef void (APIENTRY * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); | |
269 typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); | |
270 typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); | |
271 typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); | |
272 typedef void (APIENTRY * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); | |
273 typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); | |
274 typedef void (APIENTRY * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); | |
275 typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); | |
276 typedef void (APIENTRY * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); | |
277 typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); | |
278 typedef void (APIENTRY * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); | |
279 typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); | |
280 typedef void (APIENTRY * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); | |
281 typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); | |
282 typedef void (APIENTRY * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); | |
283 typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); | |
284 typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum target); | |
285 typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum target); | |
286 | |
287 /* EXT_compiled_vertex_array */ | |
288 typedef void (APIENTRY * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); | |
289 typedef void (APIENTRY * PFNGLUNLOCKARRAYSEXTPROC) (void); | |
290 | |
291 /* EXT_cull_vertex */ | |
292 typedef void (APIENTRY * PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble* params); | |
293 typedef void (APIENTRY * PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat* params); | |
294 | |
295 /* WIN_swap_hint */ | |
296 typedef void (APIENTRY * PFNGLADDSWAPHINTRECTWINPROC) (GLint x, GLint y, GLsizei width, GLsizei height); | |
297 | |
298 /* EXT_point_parameter */ | |
299 typedef void (APIENTRY * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); | |
300 typedef void (APIENTRY * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); | |
301 | |
302 #ifdef __cplusplus | |
303 } | |
304 #endif | |
305 | |
306 #endif /* __glext_h_ */ | |
307 #endif /* NO_SDL_GLEXT */ |