7d0ceb50924f926380031ae7285e41522b6b267f
[mesa.git] / src / mesa / glapi / glapi.c
1 /* $Id: glapi.c,v 1.39 2000/03/27 21:13:58 rjfrank Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.3
6 *
7 * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 */
26
27
28 /*
29 * This file manages the OpenGL API dispatch layer.
30 * The dispatch table (struct _glapi_table) is basically just a list
31 * of function pointers.
32 * There are functions to set/get the current dispatch table for the
33 * current thread and to manage registration/dispatch of dynamically
34 * added extension functions.
35 *
36 * It's intended that this file and the other glapi*.[ch] files are
37 * flexible enough to be reused in several places: XFree86, DRI-
38 * based libGL.so, and perhaps the SGI SI.
39 *
40 * There are no dependencies on Mesa in this code.
41 */
42
43
44
45 #include "glheader.h"
46 #include "glapi.h"
47 #include "glapinoop.h"
48 #include "glapioffsets.h"
49 #include "glapitable.h"
50 #include "glthread.h"
51
52
53 /* This is used when thread safety is disabled */
54 struct _glapi_table *_glapi_Dispatch = (struct _glapi_table *) __glapi_noop_table;
55
56 /* Used when thread safety disabled */
57 void *_glapi_Context = NULL;
58
59
60 #if defined(THREADS)
61
62 /* Flag to indicate whether thread-safe dispatch is enabled */
63 static GLboolean ThreadSafe = GL_FALSE;
64
65 static _glthread_TSD DispatchTSD;
66
67 static _glthread_TSD ContextTSD;
68
69 #endif
70
71
72
73 static GLuint MaxDispatchOffset = sizeof(struct _glapi_table) / sizeof(void *) - 1;
74 static GLboolean GetSizeCalled = GL_FALSE;
75
76 /* strdup is actually not a standard ANSI C or POSIX routine
77 Irix will not define it if ANSI mode is in effect. */
78 static char *mesaStrdup(const char *str)
79 {
80 char *copy;
81 copy = (char*) malloc(strlen(str) + 1);
82 if (!copy) return(NULL);
83 strcpy(copy,str);
84 return(copy);
85 }
86
87
88
89 /*
90 * We should call this periodically from a function such as glXMakeCurrent
91 * in order to test if multiple threads are being used. When we detect
92 * that situation we should then call _glapi_enable_thread_safety()
93 */
94 void
95 _glapi_check_multithread(void)
96 {
97 #if defined(THREADS)
98 if (!ThreadSafe) {
99 static unsigned long knownID;
100 static GLboolean firstCall = GL_TRUE;
101 if (firstCall) {
102 knownID = _glthread_GetID();
103 firstCall = GL_FALSE;
104 }
105 else if (knownID != _glthread_GetID()) {
106 ThreadSafe = GL_TRUE;
107 }
108 }
109 if (ThreadSafe) {
110 /* make sure that this thread's dispatch pointer isn't null */
111 if (!_glapi_get_dispatch()) {
112 _glapi_set_dispatch(NULL);
113 }
114 }
115 #endif
116 }
117
118
119
120 /*
121 * Set the current context pointer for this thread.
122 * The context pointer is an opaque type which should be cast to
123 * void from the real context pointer type.
124 */
125 void
126 _glapi_set_context(void *context)
127 {
128 #if defined(THREADS)
129 _glthread_SetTSD(&ContextTSD, context);
130 if (ThreadSafe)
131 _glapi_Context = NULL;
132 else
133 _glapi_Context = context;
134 #else
135 _glapi_Context = context;
136 #endif
137 }
138
139
140
141 /*
142 * Get the current context pointer for this thread.
143 * The context pointer is an opaque type which should be cast from
144 * void to the real context pointer type.
145 */
146 void *
147 _glapi_get_context(void)
148 {
149 #if defined(THREADS)
150 if (ThreadSafe) {
151 return _glthread_GetTSD(&ContextTSD);
152 }
153 else {
154 return _glapi_Context;
155 }
156 #else
157 return _glapi_Context;
158 #endif
159 }
160
161
162
163 /*
164 * Set the global or per-thread dispatch table pointer.
165 */
166 void
167 _glapi_set_dispatch(struct _glapi_table *dispatch)
168 {
169 if (!dispatch) {
170 /* use the no-op functions */
171 dispatch = (struct _glapi_table *) __glapi_noop_table;
172 }
173 #ifdef DEBUG
174 else {
175 _glapi_check_table(dispatch);
176 }
177 #endif
178
179 #if defined(THREADS)
180 _glthread_SetTSD(&DispatchTSD, (void*) dispatch);
181 if (ThreadSafe)
182 _glapi_Dispatch = NULL;
183 else
184 _glapi_Dispatch = dispatch;
185 #else
186 _glapi_Dispatch = dispatch;
187 #endif
188 }
189
190
191
192 /*
193 * Return pointer to current dispatch table for calling thread.
194 */
195 struct _glapi_table *
196 _glapi_get_dispatch(void)
197 {
198 #if defined(THREADS)
199 if (ThreadSafe) {
200 return (struct _glapi_table *) _glthread_GetTSD(&DispatchTSD);
201 }
202 else {
203 assert(_glapi_Dispatch);
204 return _glapi_Dispatch;
205 }
206 #else
207 return _glapi_Dispatch;
208 #endif
209 }
210
211
212
213 /*
214 * Return size of dispatch table struct as number of functions (or
215 * slots).
216 */
217 GLuint
218 _glapi_get_dispatch_table_size(void)
219 {
220 /* return sizeof(struct _glapi_table) / sizeof(void *);*/
221 GetSizeCalled = GL_TRUE;
222 return MaxDispatchOffset + 1;
223 }
224
225
226
227 /*
228 * Get API dispatcher version string.
229 */
230 const char *
231 _glapi_get_version(void)
232 {
233 return "20000223"; /* YYYYMMDD */
234 }
235
236
237 /*
238 * For each entry in static_functions[] which use this function
239 * we should implement a dispatch function in glapitemp.h and
240 * in glapinoop.c
241 */
242 static int NotImplemented(void)
243 {
244 return 0;
245 }
246
247
248 struct name_address_offset {
249 const char *Name;
250 GLvoid *Address;
251 GLuint Offset;
252 };
253
254
255 static struct name_address_offset static_functions[] = {
256 /* GL 1.1 */
257 { "glNewList", (GLvoid *) glNewList, _gloffset_NewList },
258 { "glEndList", (GLvoid *) glEndList, _gloffset_EndList },
259 { "glCallList", (GLvoid *) glCallList, _gloffset_CallList },
260 { "glCallLists", (GLvoid *) glCallLists, _gloffset_CallLists },
261 { "glDeleteLists", (GLvoid *) glDeleteLists, _gloffset_DeleteLists },
262 { "glGenLists", (GLvoid *) glGenLists, _gloffset_GenLists },
263 { "glListBase", (GLvoid *) glListBase, _gloffset_ListBase },
264 { "glBegin", (GLvoid *) glBegin, _gloffset_Begin },
265 { "glBitmap", (GLvoid *) glBitmap, _gloffset_Bitmap },
266 { "glColor3b", (GLvoid *) glColor3b, _gloffset_Color3b },
267 { "glColor3bv", (GLvoid *) glColor3bv, _gloffset_Color3bv },
268 { "glColor3d", (GLvoid *) glColor3d, _gloffset_Color3d },
269 { "glColor3dv", (GLvoid *) glColor3dv, _gloffset_Color3dv },
270 { "glColor3f", (GLvoid *) glColor3f, _gloffset_Color3f },
271 { "glColor3fv", (GLvoid *) glColor3fv, _gloffset_Color3fv },
272 { "glColor3i", (GLvoid *) glColor3i, _gloffset_Color3i },
273 { "glColor3iv", (GLvoid *) glColor3iv, _gloffset_Color3iv },
274 { "glColor3s", (GLvoid *) glColor3s, _gloffset_Color3s },
275 { "glColor3sv", (GLvoid *) glColor3sv, _gloffset_Color3sv },
276 { "glColor3ub", (GLvoid *) glColor3ub, _gloffset_Color3ub },
277 { "glColor3ubv", (GLvoid *) glColor3ubv, _gloffset_Color3ubv },
278 { "glColor3ui", (GLvoid *) glColor3ui, _gloffset_Color3ui },
279 { "glColor3uiv", (GLvoid *) glColor3uiv, _gloffset_Color3uiv },
280 { "glColor3us", (GLvoid *) glColor3us, _gloffset_Color3us },
281 { "glColor3usv", (GLvoid *) glColor3usv, _gloffset_Color3usv },
282 { "glColor4b", (GLvoid *) glColor4b, _gloffset_Color4b },
283 { "glColor4bv", (GLvoid *) glColor4bv, _gloffset_Color4bv },
284 { "glColor4d", (GLvoid *) glColor4d, _gloffset_Color4d },
285 { "glColor4dv", (GLvoid *) glColor4dv, _gloffset_Color4dv },
286 { "glColor4f", (GLvoid *) glColor4f, _gloffset_Color4f },
287 { "glColor4fv", (GLvoid *) glColor4fv, _gloffset_Color4fv },
288 { "glColor4i", (GLvoid *) glColor4i, _gloffset_Color4i },
289 { "glColor4iv", (GLvoid *) glColor4iv, _gloffset_Color4iv },
290 { "glColor4s", (GLvoid *) glColor4s, _gloffset_Color4s },
291 { "glColor4sv", (GLvoid *) glColor4sv, _gloffset_Color4sv },
292 { "glColor4ub", (GLvoid *) glColor4ub, _gloffset_Color4ub },
293 { "glColor4ubv", (GLvoid *) glColor4ubv, _gloffset_Color4ubv },
294 { "glColor4ui", (GLvoid *) glColor4ui, _gloffset_Color4ui },
295 { "glColor4uiv", (GLvoid *) glColor4uiv, _gloffset_Color4uiv },
296 { "glColor4us", (GLvoid *) glColor4us, _gloffset_Color4us },
297 { "glColor4usv", (GLvoid *) glColor4usv, _gloffset_Color4usv },
298 { "glEdgeFlag", (GLvoid *) glEdgeFlag, _gloffset_EdgeFlag },
299 { "glEdgeFlagv", (GLvoid *) glEdgeFlagv, _gloffset_EdgeFlagv },
300 { "glEnd", (GLvoid *) glEnd, _gloffset_End },
301 { "glIndexd", (GLvoid *) glIndexd, _gloffset_Indexd },
302 { "glIndexdv", (GLvoid *) glIndexdv, _gloffset_Indexdv },
303 { "glIndexf", (GLvoid *) glIndexf, _gloffset_Indexf },
304 { "glIndexfv", (GLvoid *) glIndexfv, _gloffset_Indexfv },
305 { "glIndexi", (GLvoid *) glIndexi, _gloffset_Indexi },
306 { "glIndexiv", (GLvoid *) glIndexiv, _gloffset_Indexiv },
307 { "glIndexs", (GLvoid *) glIndexs, _gloffset_Indexs },
308 { "glIndexsv", (GLvoid *) glIndexsv, _gloffset_Indexsv },
309 { "glNormal3b", (GLvoid *) glNormal3b, _gloffset_Normal3b },
310 { "glNormal3bv", (GLvoid *) glNormal3bv, _gloffset_Normal3bv },
311 { "glNormal3d", (GLvoid *) glNormal3d, _gloffset_Normal3d },
312 { "glNormal3dv", (GLvoid *) glNormal3dv, _gloffset_Normal3dv },
313 { "glNormal3f", (GLvoid *) glNormal3f, _gloffset_Normal3f },
314 { "glNormal3fv", (GLvoid *) glNormal3fv, _gloffset_Normal3fv },
315 { "glNormal3i", (GLvoid *) glNormal3i, _gloffset_Normal3i },
316 { "glNormal3iv", (GLvoid *) glNormal3iv, _gloffset_Normal3iv },
317 { "glNormal3s", (GLvoid *) glNormal3s, _gloffset_Normal3s },
318 { "glNormal3sv", (GLvoid *) glNormal3sv, _gloffset_Normal3sv },
319 { "glRasterPos2d", (GLvoid *) glRasterPos2d, _gloffset_RasterPos2d },
320 { "glRasterPos2dv", (GLvoid *) glRasterPos2dv, _gloffset_RasterPos2dv },
321 { "glRasterPos2f", (GLvoid *) glRasterPos2f, _gloffset_RasterPos2f },
322 { "glRasterPos2fv", (GLvoid *) glRasterPos2fv, _gloffset_RasterPos2fv },
323 { "glRasterPos2i", (GLvoid *) glRasterPos2i, _gloffset_RasterPos2i },
324 { "glRasterPos2iv", (GLvoid *) glRasterPos2iv, _gloffset_RasterPos2iv },
325 { "glRasterPos2s", (GLvoid *) glRasterPos2s, _gloffset_RasterPos2s },
326 { "glRasterPos2sv", (GLvoid *) glRasterPos2sv, _gloffset_RasterPos2sv },
327 { "glRasterPos3d", (GLvoid *) glRasterPos3d, _gloffset_RasterPos3d },
328 { "glRasterPos3dv", (GLvoid *) glRasterPos3dv, _gloffset_RasterPos3dv },
329 { "glRasterPos3f", (GLvoid *) glRasterPos3f, _gloffset_RasterPos3f },
330 { "glRasterPos3fv", (GLvoid *) glRasterPos3fv, _gloffset_RasterPos3fv },
331 { "glRasterPos3i", (GLvoid *) glRasterPos3i, _gloffset_RasterPos3i },
332 { "glRasterPos3iv", (GLvoid *) glRasterPos3iv, _gloffset_RasterPos3iv },
333 { "glRasterPos3s", (GLvoid *) glRasterPos3s, _gloffset_RasterPos3s },
334 { "glRasterPos3sv", (GLvoid *) glRasterPos3sv, _gloffset_RasterPos3sv },
335 { "glRasterPos4d", (GLvoid *) glRasterPos4d, _gloffset_RasterPos4d },
336 { "glRasterPos4dv", (GLvoid *) glRasterPos4dv, _gloffset_RasterPos4dv },
337 { "glRasterPos4f", (GLvoid *) glRasterPos4f, _gloffset_RasterPos4f },
338 { "glRasterPos4fv", (GLvoid *) glRasterPos4fv, _gloffset_RasterPos4fv },
339 { "glRasterPos4i", (GLvoid *) glRasterPos4i, _gloffset_RasterPos4i },
340 { "glRasterPos4iv", (GLvoid *) glRasterPos4iv, _gloffset_RasterPos4iv },
341 { "glRasterPos4s", (GLvoid *) glRasterPos4s, _gloffset_RasterPos4s },
342 { "glRasterPos4sv", (GLvoid *) glRasterPos4sv, _gloffset_RasterPos4sv },
343 { "glRectd", (GLvoid *) glRectd, _gloffset_Rectd },
344 { "glRectdv", (GLvoid *) glRectdv, _gloffset_Rectdv },
345 { "glRectf", (GLvoid *) glRectf, _gloffset_Rectf },
346 { "glRectfv", (GLvoid *) glRectfv, _gloffset_Rectfv },
347 { "glRecti", (GLvoid *) glRecti, _gloffset_Recti },
348 { "glRectiv", (GLvoid *) glRectiv, _gloffset_Rectiv },
349 { "glRects", (GLvoid *) glRects, _gloffset_Rects },
350 { "glRectsv", (GLvoid *) glRectsv, _gloffset_Rectsv },
351 { "glTexCoord1d", (GLvoid *) glTexCoord1d, _gloffset_TexCoord1d },
352 { "glTexCoord1dv", (GLvoid *) glTexCoord1dv, _gloffset_TexCoord1dv },
353 { "glTexCoord1f", (GLvoid *) glTexCoord1f, _gloffset_TexCoord1f },
354 { "glTexCoord1fv", (GLvoid *) glTexCoord1fv, _gloffset_TexCoord1fv },
355 { "glTexCoord1i", (GLvoid *) glTexCoord1i, _gloffset_TexCoord1i },
356 { "glTexCoord1iv", (GLvoid *) glTexCoord1iv, _gloffset_TexCoord1iv },
357 { "glTexCoord1s", (GLvoid *) glTexCoord1s, _gloffset_TexCoord1s },
358 { "glTexCoord1sv", (GLvoid *) glTexCoord1sv, _gloffset_TexCoord1sv },
359 { "glTexCoord2d", (GLvoid *) glTexCoord2d, _gloffset_TexCoord2d },
360 { "glTexCoord2dv", (GLvoid *) glTexCoord2dv, _gloffset_TexCoord2dv },
361 { "glTexCoord2f", (GLvoid *) glTexCoord2f, _gloffset_TexCoord2f },
362 { "glTexCoord2fv", (GLvoid *) glTexCoord2fv, _gloffset_TexCoord2fv },
363 { "glTexCoord2i", (GLvoid *) glTexCoord2i, _gloffset_TexCoord2i },
364 { "glTexCoord2iv", (GLvoid *) glTexCoord2iv, _gloffset_TexCoord2iv },
365 { "glTexCoord2s", (GLvoid *) glTexCoord2s, _gloffset_TexCoord2s },
366 { "glTexCoord2sv", (GLvoid *) glTexCoord2sv, _gloffset_TexCoord2sv },
367 { "glTexCoord3d", (GLvoid *) glTexCoord3d, _gloffset_TexCoord3d },
368 { "glTexCoord3dv", (GLvoid *) glTexCoord3dv, _gloffset_TexCoord3dv },
369 { "glTexCoord3f", (GLvoid *) glTexCoord3f, _gloffset_TexCoord3f },
370 { "glTexCoord3fv", (GLvoid *) glTexCoord3fv, _gloffset_TexCoord3fv },
371 { "glTexCoord3i", (GLvoid *) glTexCoord3i, _gloffset_TexCoord3i },
372 { "glTexCoord3iv", (GLvoid *) glTexCoord3iv, _gloffset_TexCoord3iv },
373 { "glTexCoord3s", (GLvoid *) glTexCoord3s, _gloffset_TexCoord3s },
374 { "glTexCoord3sv", (GLvoid *) glTexCoord3sv, _gloffset_TexCoord3sv },
375 { "glTexCoord4d", (GLvoid *) glTexCoord4d, _gloffset_TexCoord4d },
376 { "glTexCoord4dv", (GLvoid *) glTexCoord4dv, _gloffset_TexCoord4dv },
377 { "glTexCoord4f", (GLvoid *) glTexCoord4f, _gloffset_TexCoord4f },
378 { "glTexCoord4fv", (GLvoid *) glTexCoord4fv, _gloffset_TexCoord4fv },
379 { "glTexCoord4i", (GLvoid *) glTexCoord4i, _gloffset_TexCoord4i },
380 { "glTexCoord4iv", (GLvoid *) glTexCoord4iv, _gloffset_TexCoord4iv },
381 { "glTexCoord4s", (GLvoid *) glTexCoord4s, _gloffset_TexCoord4s },
382 { "glTexCoord4sv", (GLvoid *) glTexCoord4sv, _gloffset_TexCoord4sv },
383 { "glVertex2d", (GLvoid *) glVertex2d, _gloffset_Vertex2d },
384 { "glVertex2dv", (GLvoid *) glVertex2dv, _gloffset_Vertex2dv },
385 { "glVertex2f", (GLvoid *) glVertex2f, _gloffset_Vertex2f },
386 { "glVertex2fv", (GLvoid *) glVertex2fv, _gloffset_Vertex2fv },
387 { "glVertex2i", (GLvoid *) glVertex2i, _gloffset_Vertex2i },
388 { "glVertex2iv", (GLvoid *) glVertex2iv, _gloffset_Vertex2iv },
389 { "glVertex2s", (GLvoid *) glVertex2s, _gloffset_Vertex2s },
390 { "glVertex2sv", (GLvoid *) glVertex2sv, _gloffset_Vertex2sv },
391 { "glVertex3d", (GLvoid *) glVertex3d, _gloffset_Vertex3d },
392 { "glVertex3dv", (GLvoid *) glVertex3dv, _gloffset_Vertex3dv },
393 { "glVertex3f", (GLvoid *) glVertex3f, _gloffset_Vertex3f },
394 { "glVertex3fv", (GLvoid *) glVertex3fv, _gloffset_Vertex3fv },
395 { "glVertex3i", (GLvoid *) glVertex3i, _gloffset_Vertex3i },
396 { "glVertex3iv", (GLvoid *) glVertex3iv, _gloffset_Vertex3iv },
397 { "glVertex3s", (GLvoid *) glVertex3s, _gloffset_Vertex3s },
398 { "glVertex3sv", (GLvoid *) glVertex3sv, _gloffset_Vertex3sv },
399 { "glVertex4d", (GLvoid *) glVertex4d, _gloffset_Vertex4d },
400 { "glVertex4dv", (GLvoid *) glVertex4dv, _gloffset_Vertex4dv },
401 { "glVertex4f", (GLvoid *) glVertex4f, _gloffset_Vertex4f },
402 { "glVertex4fv", (GLvoid *) glVertex4fv, _gloffset_Vertex4fv },
403 { "glVertex4i", (GLvoid *) glVertex4i, _gloffset_Vertex4i },
404 { "glVertex4iv", (GLvoid *) glVertex4iv, _gloffset_Vertex4iv },
405 { "glVertex4s", (GLvoid *) glVertex4s, _gloffset_Vertex4s },
406 { "glVertex4sv", (GLvoid *) glVertex4sv, _gloffset_Vertex4sv },
407 { "glClipPlane", (GLvoid *) glClipPlane, _gloffset_ClipPlane },
408 { "glColorMaterial", (GLvoid *) glColorMaterial, _gloffset_ColorMaterial },
409 { "glCullFace", (GLvoid *) glCullFace, _gloffset_CullFace },
410 { "glFogf", (GLvoid *) glFogf, _gloffset_Fogf },
411 { "glFogfv", (GLvoid *) glFogfv, _gloffset_Fogfv },
412 { "glFogi", (GLvoid *) glFogi, _gloffset_Fogi },
413 { "glFogiv", (GLvoid *) glFogiv, _gloffset_Fogiv },
414 { "glFrontFace", (GLvoid *) glFrontFace, _gloffset_FrontFace },
415 { "glHint", (GLvoid *) glHint, _gloffset_Hint },
416 { "glLightf", (GLvoid *) glLightf, _gloffset_Lightf },
417 { "glLightfv", (GLvoid *) glLightfv, _gloffset_Lightfv },
418 { "glLighti", (GLvoid *) glLighti, _gloffset_Lighti },
419 { "glLightiv", (GLvoid *) glLightiv, _gloffset_Lightiv },
420 { "glLightModelf", (GLvoid *) glLightModelf, _gloffset_LightModelf },
421 { "glLightModelfv", (GLvoid *) glLightModelfv, _gloffset_LightModelfv },
422 { "glLightModeli", (GLvoid *) glLightModeli, _gloffset_LightModeli },
423 { "glLightModeliv", (GLvoid *) glLightModeliv, _gloffset_LightModeliv },
424 { "glLineStipple", (GLvoid *) glLineStipple, _gloffset_LineStipple },
425 { "glLineWidth", (GLvoid *) glLineWidth, _gloffset_LineWidth },
426 { "glMaterialf", (GLvoid *) glMaterialf, _gloffset_Materialf },
427 { "glMaterialfv", (GLvoid *) glMaterialfv, _gloffset_Materialfv },
428 { "glMateriali", (GLvoid *) glMateriali, _gloffset_Materiali },
429 { "glMaterialiv", (GLvoid *) glMaterialiv, _gloffset_Materialiv },
430 { "glPointSize", (GLvoid *) glPointSize, _gloffset_PointSize },
431 { "glPolygonMode", (GLvoid *) glPolygonMode, _gloffset_PolygonMode },
432 { "glPolygonStipple", (GLvoid *) glPolygonStipple, _gloffset_PolygonStipple },
433 { "glScissor", (GLvoid *) glScissor, _gloffset_Scissor },
434 { "glShadeModel", (GLvoid *) glShadeModel, _gloffset_ShadeModel },
435 { "glTexParameterf", (GLvoid *) glTexParameterf, _gloffset_TexParameterf },
436 { "glTexParameterfv", (GLvoid *) glTexParameterfv, _gloffset_TexParameterfv },
437 { "glTexParameteri", (GLvoid *) glTexParameteri, _gloffset_TexParameteri },
438 { "glTexParameteriv", (GLvoid *) glTexParameteriv, _gloffset_TexParameteriv },
439 { "glTexImage1D", (GLvoid *) glTexImage1D, _gloffset_TexImage1D },
440 { "glTexImage2D", (GLvoid *) glTexImage2D, _gloffset_TexImage2D },
441 { "glTexEnvf", (GLvoid *) glTexEnvf, _gloffset_TexEnvf },
442 { "glTexEnvfv", (GLvoid *) glTexEnvfv, _gloffset_TexEnvfv },
443 { "glTexEnvi", (GLvoid *) glTexEnvi, _gloffset_TexEnvi },
444 { "glTexEnviv", (GLvoid *) glTexEnviv, _gloffset_TexEnviv },
445 { "glTexGend", (GLvoid *) glTexGend, _gloffset_TexGend },
446 { "glTexGendv", (GLvoid *) glTexGendv, _gloffset_TexGendv },
447 { "glTexGenf", (GLvoid *) glTexGenf, _gloffset_TexGenf },
448 { "glTexGenfv", (GLvoid *) glTexGenfv, _gloffset_TexGenfv },
449 { "glTexGeni", (GLvoid *) glTexGeni, _gloffset_TexGeni },
450 { "glTexGeniv", (GLvoid *) glTexGeniv, _gloffset_TexGeniv },
451 { "glFeedbackBuffer", (GLvoid *) glFeedbackBuffer, _gloffset_FeedbackBuffer },
452 { "glSelectBuffer", (GLvoid *) glSelectBuffer, _gloffset_SelectBuffer },
453 { "glRenderMode", (GLvoid *) glRenderMode, _gloffset_RenderMode },
454 { "glInitNames", (GLvoid *) glInitNames, _gloffset_InitNames },
455 { "glLoadName", (GLvoid *) glLoadName, _gloffset_LoadName },
456 { "glPassThrough", (GLvoid *) glPassThrough, _gloffset_PassThrough },
457 { "glPopName", (GLvoid *) glPopName, _gloffset_PopName },
458 { "glPushName", (GLvoid *) glPushName, _gloffset_PushName },
459 { "glDrawBuffer", (GLvoid *) glDrawBuffer, _gloffset_DrawBuffer },
460 { "glClear", (GLvoid *) glClear, _gloffset_Clear },
461 { "glClearAccum", (GLvoid *) glClearAccum, _gloffset_ClearAccum },
462 { "glClearIndex", (GLvoid *) glClearIndex, _gloffset_ClearIndex },
463 { "glClearColor", (GLvoid *) glClearColor, _gloffset_ClearColor },
464 { "glClearStencil", (GLvoid *) glClearStencil, _gloffset_ClearStencil },
465 { "glClearDepth", (GLvoid *) glClearDepth, _gloffset_ClearDepth },
466 { "glStencilMask", (GLvoid *) glStencilMask, _gloffset_StencilMask },
467 { "glColorMask", (GLvoid *) glColorMask, _gloffset_ColorMask },
468 { "glDepthMask", (GLvoid *) glDepthMask, _gloffset_DepthMask },
469 { "glIndexMask", (GLvoid *) glIndexMask, _gloffset_IndexMask },
470 { "glAccum", (GLvoid *) glAccum, _gloffset_Accum },
471 { "glDisable", (GLvoid *) glDisable, _gloffset_Disable },
472 { "glEnable", (GLvoid *) glEnable, _gloffset_Enable },
473 { "glFinish", (GLvoid *) glFinish, _gloffset_Finish },
474 { "glFlush", (GLvoid *) glFlush, _gloffset_Flush },
475 { "glPopAttrib", (GLvoid *) glPopAttrib, _gloffset_PopAttrib },
476 { "glPushAttrib", (GLvoid *) glPushAttrib, _gloffset_PushAttrib },
477 { "glMap1d", (GLvoid *) glMap1d, _gloffset_Map1d },
478 { "glMap1f", (GLvoid *) glMap1f, _gloffset_Map1f },
479 { "glMap2d", (GLvoid *) glMap2d, _gloffset_Map2d },
480 { "glMap2f", (GLvoid *) glMap2f, _gloffset_Map2f },
481 { "glMapGrid1d", (GLvoid *) glMapGrid1d, _gloffset_MapGrid1d },
482 { "glMapGrid1f", (GLvoid *) glMapGrid1f, _gloffset_MapGrid1f },
483 { "glMapGrid2d", (GLvoid *) glMapGrid2d, _gloffset_MapGrid2d },
484 { "glMapGrid2f", (GLvoid *) glMapGrid2f, _gloffset_MapGrid2f },
485 { "glEvalCoord1d", (GLvoid *) glEvalCoord1d, _gloffset_EvalCoord1d },
486 { "glEvalCoord1dv", (GLvoid *) glEvalCoord1dv, _gloffset_EvalCoord1dv },
487 { "glEvalCoord1f", (GLvoid *) glEvalCoord1f, _gloffset_EvalCoord1f },
488 { "glEvalCoord1fv", (GLvoid *) glEvalCoord1fv, _gloffset_EvalCoord1fv },
489 { "glEvalCoord2d", (GLvoid *) glEvalCoord2d, _gloffset_EvalCoord2d },
490 { "glEvalCoord2dv", (GLvoid *) glEvalCoord2dv, _gloffset_EvalCoord2dv },
491 { "glEvalCoord2f", (GLvoid *) glEvalCoord2f, _gloffset_EvalCoord2f },
492 { "glEvalCoord2fv", (GLvoid *) glEvalCoord2fv, _gloffset_EvalCoord2fv },
493 { "glEvalMesh1", (GLvoid *) glEvalMesh1, _gloffset_EvalMesh1 },
494 { "glEvalPoint1", (GLvoid *) glEvalPoint1, _gloffset_EvalPoint1 },
495 { "glEvalMesh2", (GLvoid *) glEvalMesh2, _gloffset_EvalMesh2 },
496 { "glEvalPoint2", (GLvoid *) glEvalPoint2, _gloffset_EvalPoint2 },
497 { "glAlphaFunc", (GLvoid *) glAlphaFunc, _gloffset_AlphaFunc },
498 { "glBlendFunc", (GLvoid *) glBlendFunc, _gloffset_BlendFunc },
499 { "glLogicOp", (GLvoid *) glLogicOp, _gloffset_LogicOp },
500 { "glStencilFunc", (GLvoid *) glStencilFunc, _gloffset_StencilFunc },
501 { "glStencilOp", (GLvoid *) glStencilOp, _gloffset_StencilOp },
502 { "glDepthFunc", (GLvoid *) glDepthFunc, _gloffset_DepthFunc },
503 { "glPixelZoom", (GLvoid *) glPixelZoom, _gloffset_PixelZoom },
504 { "glPixelTransferf", (GLvoid *) glPixelTransferf, _gloffset_PixelTransferf },
505 { "glPixelTransferi", (GLvoid *) glPixelTransferi, _gloffset_PixelTransferi },
506 { "glPixelStoref", (GLvoid *) glPixelStoref, _gloffset_PixelStoref },
507 { "glPixelStorei", (GLvoid *) glPixelStorei, _gloffset_PixelStorei },
508 { "glPixelMapfv", (GLvoid *) glPixelMapfv, _gloffset_PixelMapfv },
509 { "glPixelMapuiv", (GLvoid *) glPixelMapuiv, _gloffset_PixelMapuiv },
510 { "glPixelMapusv", (GLvoid *) glPixelMapusv, _gloffset_PixelMapusv },
511 { "glReadBuffer", (GLvoid *) glReadBuffer, _gloffset_ReadBuffer },
512 { "glCopyPixels", (GLvoid *) glCopyPixels, _gloffset_CopyPixels },
513 { "glReadPixels", (GLvoid *) glReadPixels, _gloffset_ReadPixels },
514 { "glDrawPixels", (GLvoid *) glDrawPixels, _gloffset_DrawPixels },
515 { "glGetBooleanv", (GLvoid *) glGetBooleanv, _gloffset_GetBooleanv },
516 { "glGetClipPlane", (GLvoid *) glGetClipPlane, _gloffset_GetClipPlane },
517 { "glGetDoublev", (GLvoid *) glGetDoublev, _gloffset_GetDoublev },
518 { "glGetError", (GLvoid *) glGetError, _gloffset_GetError },
519 { "glGetFloatv", (GLvoid *) glGetFloatv, _gloffset_GetFloatv },
520 { "glGetIntegerv", (GLvoid *) glGetIntegerv, _gloffset_GetIntegerv },
521 { "glGetLightfv", (GLvoid *) glGetLightfv, _gloffset_GetLightfv },
522 { "glGetLightiv", (GLvoid *) glGetLightiv, _gloffset_GetLightiv },
523 { "glGetMapdv", (GLvoid *) glGetMapdv, _gloffset_GetMapdv },
524 { "glGetMapfv", (GLvoid *) glGetMapfv, _gloffset_GetMapfv },
525 { "glGetMapiv", (GLvoid *) glGetMapiv, _gloffset_GetMapiv },
526 { "glGetMaterialfv", (GLvoid *) glGetMaterialfv, _gloffset_GetMaterialfv },
527 { "glGetMaterialiv", (GLvoid *) glGetMaterialiv, _gloffset_GetMaterialiv },
528 { "glGetPixelMapfv", (GLvoid *) glGetPixelMapfv, _gloffset_GetPixelMapfv },
529 { "glGetPixelMapuiv", (GLvoid *) glGetPixelMapuiv, _gloffset_GetPixelMapuiv },
530 { "glGetPixelMapusv", (GLvoid *) glGetPixelMapusv, _gloffset_GetPixelMapusv },
531 { "glGetPolygonStipple", (GLvoid *) glGetPolygonStipple, _gloffset_GetPolygonStipple },
532 { "glGetString", (GLvoid *) glGetString, _gloffset_GetString },
533 { "glGetTexEnvfv", (GLvoid *) glGetTexEnvfv, _gloffset_GetTexEnvfv },
534 { "glGetTexEnviv", (GLvoid *) glGetTexEnviv, _gloffset_GetTexEnviv },
535 { "glGetTexGendv", (GLvoid *) glGetTexGendv, _gloffset_GetTexGendv },
536 { "glGetTexGenfv", (GLvoid *) glGetTexGenfv, _gloffset_GetTexGenfv },
537 { "glGetTexGeniv", (GLvoid *) glGetTexGeniv, _gloffset_GetTexGeniv },
538 { "glGetTexImage", (GLvoid *) glGetTexImage, _gloffset_GetTexImage },
539 { "glGetTexParameterfv", (GLvoid *) glGetTexParameterfv, _gloffset_GetTexParameterfv },
540 { "glGetTexParameteriv", (GLvoid *) glGetTexParameteriv, _gloffset_GetTexParameteriv },
541 { "glGetTexLevelParameterfv", (GLvoid *) glGetTexLevelParameterfv, _gloffset_GetTexLevelParameterfv },
542 { "glGetTexLevelParameteriv", (GLvoid *) glGetTexLevelParameteriv, _gloffset_GetTexLevelParameteriv },
543 { "glIsEnabled", (GLvoid *) glIsEnabled, _gloffset_IsEnabled },
544 { "glIsList", (GLvoid *) glIsList, _gloffset_IsList },
545 { "glDepthRange", (GLvoid *) glDepthRange, _gloffset_DepthRange },
546 { "glFrustum", (GLvoid *) glFrustum, _gloffset_Frustum },
547 { "glLoadIdentity", (GLvoid *) glLoadIdentity, _gloffset_LoadIdentity },
548 { "glLoadMatrixf", (GLvoid *) glLoadMatrixf, _gloffset_LoadMatrixf },
549 { "glLoadMatrixd", (GLvoid *) glLoadMatrixd, _gloffset_LoadMatrixd },
550 { "glMatrixMode", (GLvoid *) glMatrixMode, _gloffset_MatrixMode },
551 { "glMultMatrixf", (GLvoid *) glMultMatrixf, _gloffset_MultMatrixf },
552 { "glMultMatrixd", (GLvoid *) glMultMatrixd, _gloffset_MultMatrixd },
553 { "glOrtho", (GLvoid *) glOrtho, _gloffset_Ortho },
554 { "glPopMatrix", (GLvoid *) glPopMatrix, _gloffset_PopMatrix },
555 { "glPushMatrix", (GLvoid *) glPushMatrix, _gloffset_PushMatrix },
556 { "glRotated", (GLvoid *) glRotated, _gloffset_Rotated },
557 { "glRotatef", (GLvoid *) glRotatef, _gloffset_Rotatef },
558 { "glScaled", (GLvoid *) glScaled, _gloffset_Scaled },
559 { "glScalef", (GLvoid *) glScalef, _gloffset_Scalef },
560 { "glTranslated", (GLvoid *) glTranslated, _gloffset_Translated },
561 { "glTranslatef", (GLvoid *) glTranslatef, _gloffset_Translatef },
562 { "glViewport", (GLvoid *) glViewport, _gloffset_Viewport },
563 /* 1.1 */
564 { "glArrayElement", (GLvoid *) glArrayElement, _gloffset_ArrayElement },
565 { "glColorPointer", (GLvoid *) glColorPointer, _gloffset_ColorPointer },
566 { "glDisableClientState", (GLvoid *) glDisableClientState, _gloffset_DisableClientState },
567 { "glDrawArrays", (GLvoid *) glDrawArrays, _gloffset_DrawArrays },
568 { "glDrawElements", (GLvoid *) glDrawElements, _gloffset_DrawElements },
569 { "glEdgeFlagPointer", (GLvoid *) glEdgeFlagPointer, _gloffset_EdgeFlagPointer },
570 { "glEnableClientState", (GLvoid *) glEnableClientState, _gloffset_EnableClientState },
571 { "glGetPointerv", (GLvoid *) glGetPointerv, _gloffset_GetPointerv },
572 { "glIndexPointer", (GLvoid *) glIndexPointer, _gloffset_IndexPointer },
573 { "glInterleavedArrays", (GLvoid *) glInterleavedArrays, _gloffset_InterleavedArrays },
574 { "glNormalPointer", (GLvoid *) glNormalPointer, _gloffset_NormalPointer },
575 { "glTexCoordPointer", (GLvoid *) glTexCoordPointer, _gloffset_TexCoordPointer },
576 { "glVertexPointer", (GLvoid *) glVertexPointer, _gloffset_VertexPointer },
577 { "glPolygonOffset", (GLvoid *) glPolygonOffset, _gloffset_PolygonOffset },
578 { "glCopyTexImage1D", (GLvoid *) glCopyTexImage1D, _gloffset_CopyTexImage1D },
579 { "glCopyTexImage2D", (GLvoid *) glCopyTexImage2D, _gloffset_CopyTexImage2D },
580 { "glCopyTexSubImage1D", (GLvoid *) glCopyTexSubImage1D, _gloffset_CopyTexSubImage1D },
581 { "glCopyTexSubImage2D", (GLvoid *) glCopyTexSubImage2D, _gloffset_CopyTexSubImage2D },
582 { "glTexSubImage1D", (GLvoid *) glTexSubImage1D, _gloffset_TexSubImage1D },
583 { "glTexSubImage2D", (GLvoid *) glTexSubImage2D, _gloffset_TexSubImage2D },
584 { "glAreTexturesResident", (GLvoid *) glAreTexturesResident, _gloffset_AreTexturesResident },
585 { "glBindTexture", (GLvoid *) glBindTexture, _gloffset_BindTexture },
586 { "glDeleteTextures", (GLvoid *) glDeleteTextures, _gloffset_DeleteTextures },
587 { "glGenTextures", (GLvoid *) glGenTextures, _gloffset_GenTextures },
588 { "glIsTexture", (GLvoid *) glIsTexture, _gloffset_IsTexture },
589 { "glPrioritizeTextures", (GLvoid *) glPrioritizeTextures, _gloffset_PrioritizeTextures },
590 { "glIndexub", (GLvoid *) glIndexub, _gloffset_Indexub },
591 { "glIndexubv", (GLvoid *) glIndexubv, _gloffset_Indexubv },
592 { "glPopClientAttrib", (GLvoid *) glPopClientAttrib, _gloffset_PopClientAttrib },
593 { "glPushClientAttrib", (GLvoid *) glPushClientAttrib, _gloffset_PushClientAttrib },
594 /* 1.2 */
595 #ifdef GL_VERSION_1_2
596 #define NAME(X) X
597 #else
598 #define NAME(X) NotImplemented
599 #endif
600 { "glBlendColor", (GLvoid *) NAME(glBlendColor), _gloffset_BlendColor },
601 { "glBlendEquation", (GLvoid *) NAME(glBlendEquation), _gloffset_BlendEquation },
602 { "glDrawRangeElements", (GLvoid *) NAME(glDrawRangeElements), _gloffset_DrawRangeElements },
603 { "glColorTable", (GLvoid *) NAME(glColorTable), _gloffset_ColorTable },
604 { "glColorTableParameterfv", (GLvoid *) NAME(glColorTableParameterfv), _gloffset_ColorTableParameterfv },
605 { "glColorTableParameteriv", (GLvoid *) NAME(glColorTableParameteriv), _gloffset_ColorTableParameteriv },
606 { "glCopyColorTable", (GLvoid *) NAME(glCopyColorTable), _gloffset_CopyColorTable },
607 { "glGetColorTable", (GLvoid *) NAME(glGetColorTable), _gloffset_GetColorTable },
608 { "glGetColorTableParameterfv", (GLvoid *) NAME(glGetColorTableParameterfv), _gloffset_GetColorTableParameterfv },
609 { "glGetColorTableParameteriv", (GLvoid *) NAME(glGetColorTableParameteriv), _gloffset_GetColorTableParameteriv },
610 { "glColorSubTable", (GLvoid *) NAME(glColorSubTable), _gloffset_ColorSubTable },
611 { "glCopyColorSubTable", (GLvoid *) NAME(glCopyColorSubTable), _gloffset_CopyColorSubTable },
612 { "glConvolutionFilter1D", (GLvoid *) NAME(glConvolutionFilter1D), _gloffset_ConvolutionFilter1D },
613 { "glConvolutionFilter2D", (GLvoid *) NAME(glConvolutionFilter2D), _gloffset_ConvolutionFilter2D },
614 { "glConvolutionParameterf", (GLvoid *) NAME(glConvolutionParameterf), _gloffset_ConvolutionParameterf },
615 { "glConvolutionParameterfv", (GLvoid *) NAME(glConvolutionParameterfv), _gloffset_ConvolutionParameterfv },
616 { "glConvolutionParameteri", (GLvoid *) NAME(glConvolutionParameteri), _gloffset_ConvolutionParameteri },
617 { "glConvolutionParameteriv", (GLvoid *) NAME(glConvolutionParameteriv), _gloffset_ConvolutionParameteriv },
618 { "glCopyConvolutionFilter1D", (GLvoid *) NAME(glCopyConvolutionFilter1D), _gloffset_CopyConvolutionFilter1D },
619 { "glCopyConvolutionFilter2D", (GLvoid *) NAME(glCopyConvolutionFilter2D), _gloffset_CopyConvolutionFilter2D },
620 { "glGetConvolutionFilter", (GLvoid *) NAME(glGetConvolutionFilter), _gloffset_GetConvolutionFilter },
621 { "glGetConvolutionParameterfv", (GLvoid *) NAME(glGetConvolutionParameterfv), _gloffset_GetConvolutionParameterfv },
622 { "glGetConvolutionParameteriv", (GLvoid *) NAME(glGetConvolutionParameteriv), _gloffset_GetConvolutionParameteriv },
623 { "glGetSeparableFilter", (GLvoid *) NAME(glGetSeparableFilter), _gloffset_GetSeparableFilter },
624 { "glSeparableFilter2D", (GLvoid *) NAME(glSeparableFilter2D), _gloffset_SeparableFilter2D },
625 { "glGetHistogram", (GLvoid *) NAME(glGetHistogram), _gloffset_GetHistogram },
626 { "glGetHistogramParameterfv", (GLvoid *) NAME(glGetHistogramParameterfv), _gloffset_GetHistogramParameterfv },
627 { "glGetHistogramParameteriv", (GLvoid *) NAME(glGetHistogramParameteriv), _gloffset_GetHistogramParameteriv },
628 { "glGetMinmax", (GLvoid *) NAME(glGetMinmax), _gloffset_GetMinmax },
629 { "glGetMinmaxParameterfv", (GLvoid *) NAME(glGetMinmaxParameterfv), _gloffset_GetMinmaxParameterfv },
630 { "glGetMinmaxParameteriv", (GLvoid *) NAME(glGetMinmaxParameteriv), _gloffset_GetMinmaxParameteriv },
631 { "glHistogram", (GLvoid *) NAME(glHistogram), _gloffset_Histogram },
632 { "glMinmax", (GLvoid *) NAME(glMinmax), _gloffset_Minmax },
633 { "glResetHistogram", (GLvoid *) NAME(glResetHistogram), _gloffset_ResetHistogram },
634 { "glResetMinmax", (GLvoid *) NAME(glResetMinmax), _gloffset_ResetMinmax },
635 { "glTexImage3D", (GLvoid *) NAME(glTexImage3D), _gloffset_TexImage3D },
636 { "glTexSubImage3D", (GLvoid *) NAME(glTexSubImage3D), _gloffset_TexSubImage3D },
637 { "glCopyTexSubImage3D", (GLvoid *) NAME(glCopyTexSubImage3D), _gloffset_CopyTexSubImage3D },
638 #undef NAME
639
640 /* GL_ARB_multitexture */
641 #ifdef GL_ARB_multitexture
642 #define NAME(X) X
643 #else
644 #define NAME(X) NotImplemented
645 #endif
646 { "glActiveTextureARB", (GLvoid *) NAME(glActiveTextureARB), _gloffset_ActiveTextureARB },
647 { "glClientActiveTextureARB", (GLvoid *) NAME(glClientActiveTextureARB), _gloffset_ClientActiveTextureARB },
648 { "glMultiTexCoord1dARB", (GLvoid *) NAME(glMultiTexCoord1dARB), _gloffset_MultiTexCoord1dARB },
649 { "glMultiTexCoord1dvARB", (GLvoid *) NAME(glMultiTexCoord1dvARB), _gloffset_MultiTexCoord1dvARB },
650 { "glMultiTexCoord1fARB", (GLvoid *) NAME(glMultiTexCoord1fARB), _gloffset_MultiTexCoord1fARB },
651 { "glMultiTexCoord1fvARB", (GLvoid *) NAME(glMultiTexCoord1fvARB), _gloffset_MultiTexCoord1fvARB },
652 { "glMultiTexCoord1iARB", (GLvoid *) NAME(glMultiTexCoord1iARB), _gloffset_MultiTexCoord1iARB },
653 { "glMultiTexCoord1ivARB", (GLvoid *) NAME(glMultiTexCoord1ivARB), _gloffset_MultiTexCoord1ivARB },
654 { "glMultiTexCoord1sARB", (GLvoid *) NAME(glMultiTexCoord1sARB), _gloffset_MultiTexCoord1sARB },
655 { "glMultiTexCoord1svARB", (GLvoid *) NAME(glMultiTexCoord1svARB), _gloffset_MultiTexCoord1svARB },
656 { "glMultiTexCoord2dARB", (GLvoid *) NAME(glMultiTexCoord2dARB), _gloffset_MultiTexCoord2dARB },
657 { "glMultiTexCoord2dvARB", (GLvoid *) NAME(glMultiTexCoord2dvARB), _gloffset_MultiTexCoord2dvARB },
658 { "glMultiTexCoord2fARB", (GLvoid *) NAME(glMultiTexCoord2fARB), _gloffset_MultiTexCoord2fARB },
659 { "glMultiTexCoord2fvARB", (GLvoid *) NAME(glMultiTexCoord2fvARB), _gloffset_MultiTexCoord2fvARB },
660 { "glMultiTexCoord2iARB", (GLvoid *) NAME(glMultiTexCoord2iARB), _gloffset_MultiTexCoord2iARB },
661 { "glMultiTexCoord2ivARB", (GLvoid *) NAME(glMultiTexCoord2ivARB), _gloffset_MultiTexCoord2ivARB },
662 { "glMultiTexCoord2sARB", (GLvoid *) NAME(glMultiTexCoord2sARB), _gloffset_MultiTexCoord2sARB },
663 { "glMultiTexCoord2svARB", (GLvoid *) NAME(glMultiTexCoord2svARB), _gloffset_MultiTexCoord2svARB },
664 { "glMultiTexCoord3dARB", (GLvoid *) NAME(glMultiTexCoord3dARB), _gloffset_MultiTexCoord3dARB },
665 { "glMultiTexCoord3dvARB", (GLvoid *) NAME(glMultiTexCoord3dvARB), _gloffset_MultiTexCoord3dvARB },
666 { "glMultiTexCoord3fARB", (GLvoid *) NAME(glMultiTexCoord3fARB), _gloffset_MultiTexCoord3fARB },
667 { "glMultiTexCoord3fvARB", (GLvoid *) NAME(glMultiTexCoord3fvARB), _gloffset_MultiTexCoord3fvARB },
668 { "glMultiTexCoord3iARB", (GLvoid *) NAME(glMultiTexCoord3iARB), _gloffset_MultiTexCoord3iARB },
669 { "glMultiTexCoord3ivARB", (GLvoid *) NAME(glMultiTexCoord3ivARB), _gloffset_MultiTexCoord3ivARB },
670 { "glMultiTexCoord3sARB", (GLvoid *) NAME(glMultiTexCoord3sARB), _gloffset_MultiTexCoord3sARB },
671 { "glMultiTexCoord3svARB", (GLvoid *) NAME(glMultiTexCoord3svARB), _gloffset_MultiTexCoord3svARB },
672 { "glMultiTexCoord4dARB", (GLvoid *) NAME(glMultiTexCoord4dARB), _gloffset_MultiTexCoord4dARB },
673 { "glMultiTexCoord4dvARB", (GLvoid *) NAME(glMultiTexCoord4dvARB), _gloffset_MultiTexCoord4dvARB },
674 { "glMultiTexCoord4fARB", (GLvoid *) NAME(glMultiTexCoord4fARB), _gloffset_MultiTexCoord4fARB },
675 { "glMultiTexCoord4fvARB", (GLvoid *) NAME(glMultiTexCoord4fvARB), _gloffset_MultiTexCoord4fvARB },
676 { "glMultiTexCoord4iARB", (GLvoid *) NAME(glMultiTexCoord4iARB), _gloffset_MultiTexCoord4iARB },
677 { "glMultiTexCoord4ivARB", (GLvoid *) NAME(glMultiTexCoord4ivARB), _gloffset_MultiTexCoord4ivARB },
678 { "glMultiTexCoord4sARB", (GLvoid *) NAME(glMultiTexCoord4sARB), _gloffset_MultiTexCoord4sARB },
679 { "glMultiTexCoord4svARB", (GLvoid *) NAME(glMultiTexCoord4svARB), _gloffset_MultiTexCoord4svARB },
680 #undef NAME
681
682 /* GL_ARB_transpose_matrix */
683 #ifdef GL_ARB_transpose_matrix
684 #define NAME(X) X
685 #else
686 #define NAME(X) NotImplemented
687 #endif
688 { "glLoadTransposeMatrixdARB", (GLvoid *) NAME(glLoadTransposeMatrixdARB), _gloffset_LoadTransposeMatrixdARB },
689 { "glLoadTransposeMatrixfARB", (GLvoid *) NAME(glLoadTransposeMatrixfARB), _gloffset_LoadTransposeMatrixfARB },
690 { "glMultTransposeMatrixdARB", (GLvoid *) NAME(glMultTransposeMatrixdARB), _gloffset_MultTransposeMatrixdARB },
691 { "glMultTransposeMatrixfARB", (GLvoid *) NAME(glMultTransposeMatrixfARB), _gloffset_MultTransposeMatrixfARB },
692 #undef NAME
693
694 /* GL_ARB_multisample */
695 #ifdef GL_ARB_multisample
696 #define NAME(X) X
697 #else
698 #define NAME(X) NotImplemented
699 #endif
700 { "glSampleCoverageARB", (GLvoid *) NAME(glSampleCoverageARB), _gloffset_SampleCoverageARB },
701 { "glSamplePassARB", (GLvoid *) NAME(glSamplePassARB), _gloffset_SamplePassARB },
702 #undef NAME
703
704 /* 2. GL_EXT_blend_color */
705 #ifdef GL_EXT_blend_color
706 #define NAME(X) X
707 #else
708 #define NAME(X) NotImplemented
709 #endif
710 { "glBlendColorEXT", (GLvoid *) NAME(glBlendColorEXT), _gloffset_BlendColor },
711 #undef NAME
712
713 /* 3. GL_EXT_polygon_offset */
714 #ifdef GL_EXT_polygon_offset
715 #define NAME(X) X
716 #else
717 #define NAME(X) NotImplemented
718 #endif
719 { "glPolygonOffsetEXT", (GLvoid *) NAME(glPolygonOffsetEXT), _gloffset_PolygonOffsetEXT },
720 #undef NAME
721
722 /* 6. GL_EXT_texture3D */
723 #ifdef GL_EXT_texture3D
724 #define NAME(X) X
725 #else
726 #define NAME(X) NotImplemented
727 #endif
728 { "glCopyTexSubImage3DEXT", (GLvoid *) NAME(glCopyTexSubImage3DEXT), _gloffset_CopyTexSubImage3D },
729 { "glTexImage3DEXT", (GLvoid *) NAME(glTexImage3DEXT), _gloffset_TexImage3D },
730 { "glTexSubImage3DEXT", (GLvoid *) NAME(glTexSubImage3DEXT), _gloffset_TexSubImage3D },
731 #undef NAME
732
733 /* 7. GL_SGI_texture_filter4 */
734 #ifdef GL_SGI_texture_filter4
735 #define NAME(X) X
736 #else
737 #define NAME(X) NotImplemented
738 #endif
739 { "glGetTexFilterFuncSGIS", (GLvoid *) NAME(glGetTexFilterFuncSGIS), _gloffset_GetTexFilterFuncSGIS },
740 { "glTexFilterFuncSGIS", (GLvoid *) NAME(glTexFilterFuncSGIS), _gloffset_TexFilterFuncSGIS },
741 #undef NAME
742
743 /* 9. GL_EXT_subtexture */
744 #ifdef GL_EXT_subtexture
745 #define NAME(X) X
746 #else
747 #define NAME(X) NotImplemented
748 #endif
749 { "glTexSubImage1DEXT", (GLvoid *) NAME(glTexSubImage1DEXT), _gloffset_TexSubImage1D },
750 { "glTexSubImage2DEXT", (GLvoid *) NAME(glTexSubImage2DEXT), _gloffset_TexSubImage2D },
751 #undef NAME
752
753 /* 10. GL_EXT_copy_texture */
754 #ifdef GL_EXT_copy_texture
755 #define NAME(X) X
756 #else
757 #define NAME(X) NotImplemented
758 #endif
759 { "glCopyTexImage1DEXT", (GLvoid *) NAME(glCopyTexImage1DEXT), _gloffset_CopyTexImage1D },
760 { "glCopyTexImage2DEXT", (GLvoid *) NAME(glCopyTexImage2DEXT), _gloffset_CopyTexImage2D },
761 { "glCopyTexSubImage1DEXT", (GLvoid *) NAME(glCopyTexSubImage1DEXT), _gloffset_CopyTexSubImage1D },
762 { "glCopyTexSubImage2DEXT", (GLvoid *) NAME(glCopyTexSubImage2DEXT), _gloffset_CopyTexSubImage2D },
763 #undef NAME
764
765 /* 11. GL_EXT_histogram */
766 #ifdef GL_EXT_histogram
767 #define NAME(X) X
768 #else
769 #define NAME(X) NotImplemented
770 #endif
771 { "glGetHistogramEXT", (GLvoid *) NAME(glGetHistogramEXT), _gloffset_GetHistogramEXT },
772 { "glGetHistogramParameterfvEXT", (GLvoid *) NAME(glGetHistogramParameterfvEXT), _gloffset_GetHistogramParameterfvEXT },
773 { "glGetHistogramParameterivEXT", (GLvoid *) NAME(glGetHistogramParameterivEXT), _gloffset_GetHistogramParameterivEXT },
774 { "glGetMinmaxEXT", (GLvoid *) NAME(glGetMinmaxEXT), _gloffset_GetMinmaxEXT },
775 { "glGetMinmaxParameterfvEXT", (GLvoid *) NAME(glGetMinmaxParameterfvEXT), _gloffset_GetMinmaxParameterfvEXT },
776 { "glGetMinmaxParameterivEXT", (GLvoid *) NAME(glGetMinmaxParameterivEXT), _gloffset_GetMinmaxParameterivEXT },
777 { "glHistogramEXT", (GLvoid *) NAME(glHistogramEXT), _gloffset_Histogram },
778 { "glMinmaxEXT", (GLvoid *) NAME(glMinmaxEXT), _gloffset_Minmax },
779 { "glResetHistogramEXT", (GLvoid *) NAME(glResetHistogramEXT), _gloffset_ResetHistogram },
780 { "glResetMinmaxEXT", (GLvoid *) NAME(glResetMinmaxEXT), _gloffset_ResetMinmax },
781 #undef NAME
782
783 /* 12. GL_EXT_convolution */
784 #ifdef GL_EXT_convolution
785 #define NAME(X) X
786 #else
787 #define NAME(X) NotImplemented
788 #endif
789 { "glConvolutionFilter1DEXT", (GLvoid *) NAME(glConvolutionFilter1DEXT), _gloffset_ConvolutionFilter1D },
790 { "glConvolutionFilter2DEXT", (GLvoid *) NAME(glConvolutionFilter2DEXT), _gloffset_ConvolutionFilter2D },
791 { "glConvolutionParameterfEXT", (GLvoid *) NAME(glConvolutionParameterfEXT), _gloffset_ConvolutionParameterf },
792 { "glConvolutionParameterfvEXT", (GLvoid *) NAME(glConvolutionParameterfvEXT), _gloffset_ConvolutionParameterfv },
793 { "glConvolutionParameteriEXT", (GLvoid *) NAME(glConvolutionParameteriEXT), _gloffset_ConvolutionParameteri },
794 { "glConvolutionParameterivEXT", (GLvoid *) NAME(glConvolutionParameterivEXT), _gloffset_ConvolutionParameteriv },
795 { "glCopyConvolutionFilter1DEXT", (GLvoid *) NAME(glCopyConvolutionFilter1DEXT), _gloffset_CopyConvolutionFilter1D },
796 { "glCopyConvolutionFilter2DEXT", (GLvoid *) NAME(glCopyConvolutionFilter2DEXT), _gloffset_CopyConvolutionFilter2D },
797 { "glGetConvolutionFilterEXT", (GLvoid *) NAME(glGetConvolutionFilterEXT), _gloffset_GetConvolutionFilterEXT },
798 { "glGetConvolutionParameterivEXT", (GLvoid *) NAME(glGetConvolutionParameterivEXT), _gloffset_GetConvolutionParameterivEXT },
799 { "glGetConvolutionParameterfvEXT", (GLvoid *) NAME(glGetConvolutionParameterfvEXT), _gloffset_GetConvolutionParameterfvEXT },
800 { "glGetSeparableFilterEXT", (GLvoid *) NAME(glGetSeparableFilterEXT), _gloffset_GetSeparableFilterEXT },
801 { "glSeparableFilter2DEXT", (GLvoid *) NAME(glSeparableFilter2DEXT), _gloffset_SeparableFilter2D },
802 #undef NAME
803
804 /* 14. GL_SGI_color_table */
805 #ifdef GL_SGI_color_table
806 #define NAME(X) X
807 #else
808 #define NAME(X) NotImplemented
809 #endif
810 { "glColorTableSGI", (GLvoid *) NAME(glColorTableSGI), _gloffset_ColorTable },
811 { "glColorTableParameterfvSGI", (GLvoid *) NAME(glColorTableParameterfvSGI), _gloffset_ColorTableParameterfv },
812 { "glColorTableParameterivSGI", (GLvoid *) NAME(glColorTableParameterivSGI), _gloffset_ColorTableParameteriv },
813 { "glCopyColorTableSGI", (GLvoid *) NAME(glCopyColorTableSGI), _gloffset_CopyColorTable },
814 { "glGetColorTableSGI", (GLvoid *) NAME(glGetColorTableSGI), _gloffset_GetColorTableSGI },
815 { "glGetColorTableParameterfvSGI", (GLvoid *) NAME(glGetColorTableParameterfvSGI), _gloffset_GetColorTableParameterfvSGI },
816 { "glGetColorTableParameterivSGI", (GLvoid *) NAME(glGetColorTableParameterivSGI), _gloffset_GetColorTableParameterivSGI },
817 #undef NAME
818
819 /* 15. GL_SGIS_pixel_texture */
820 #ifdef GL_SGIS_pixel_texture
821 #define NAME(X) X
822 #else
823 #define NAME(X) NotImplemented
824 #endif
825 { "glPixelTexGenParameterfSGIS", (GLvoid *) NAME(glPixelTexGenParameterfSGIS), _gloffset_PixelTexGenParameterfSGIS },
826 { "glPixelTexGenParameteriSGIS", (GLvoid *) NAME(glPixelTexGenParameteriSGIS), _gloffset_PixelTexGenParameteriSGIS },
827 { "glGetPixelTexGenParameterfvSGIS", (GLvoid *) NAME(glGetPixelTexGenParameterfvSGIS), _gloffset_GetPixelTexGenParameterfvSGIS },
828 { "glGetPixelTexGenParameterivSGIS", (GLvoid *) NAME(glGetPixelTexGenParameterivSGIS), _gloffset_GetPixelTexGenParameterivSGIS },
829 #undef NAME
830
831 /* 16. GL_SGIS_texture4D */
832 #ifdef GL_SGIS_texture4D
833 #define NAME(X) X
834 #else
835 #define NAME(X) NotImplemented
836 #endif
837 { "glTexImage4DSGIS", (GLvoid *) NAME(glTexImage4DSGIS), _gloffset_TexImage4DSGIS },
838 { "glTexSubImage4DSGIS", (GLvoid *) NAME(glTexSubImage4DSGIS), _gloffset_TexSubImage4DSGIS },
839 #undef NAME
840
841 /* 20. GL_EXT_texture_object */
842 #ifdef GL_EXT_texture_object
843 #define NAME(X) X
844 #else
845 #define NAME(X) NotImplemented
846 #endif
847 { "glAreTexturesResidentEXT", (GLvoid *) NAME(glAreTexturesResidentEXT), _gloffset_AreTexturesResidentEXT },
848 { "glBindTextureEXT", (GLvoid *) NAME(glBindTextureEXT), _gloffset_BindTexture },
849 { "glDeleteTexturesEXT", (GLvoid *) NAME(glDeleteTexturesEXT), _gloffset_DeleteTextures },
850 { "glGenTexturesEXT", (GLvoid *) NAME(glGenTexturesEXT), _gloffset_GenTexturesEXT },
851 { "glIsTextureEXT", (GLvoid *) NAME(glIsTextureEXT), _gloffset_IsTextureEXT },
852 { "glPrioritizeTexturesEXT", (GLvoid *) NAME(glPrioritizeTexturesEXT), _gloffset_PrioritizeTextures },
853 #undef NAME
854
855 /* 21. GL_SGIS_detail_texture */
856 #ifdef GL_SGIS_detail_texture
857 #define NAME(X) X
858 #else
859 #define NAME(X) NotImplemented
860 #endif
861 { "glDetailTexFuncSGIS", (GLvoid *) NAME(glDetailTexFuncSGIS), _gloffset_DetailTexFuncSGIS },
862 { "glGetDetailTexFuncSGIS", (GLvoid *) NAME(glGetDetailTexFuncSGIS), _gloffset_GetDetailTexFuncSGIS },
863 #undef NAME
864
865 /* 22. GL_SGIS_sharpen_texture */
866 #ifdef GL_SGIS_sharpen_texture
867 #define NAME(X) X
868 #else
869 #define NAME(X) NotImplemented
870 #endif
871 { "glGetSharpenTexFuncSGIS", (GLvoid *) NAME(glGetSharpenTexFuncSGIS), _gloffset_GetSharpenTexFuncSGIS },
872 { "glSharpenTexFuncSGIS", (GLvoid *) NAME(glSharpenTexFuncSGIS), _gloffset_SharpenTexFuncSGIS },
873 #undef NAME
874
875 /* 25. GL_SGIS_multisample */
876 #ifdef GL_SGIS_multisample
877 #define NAME(X) X
878 #else
879 #define NAME(X) NotImplemented
880 #endif
881 { "glSampleMaskSGIS", (GLvoid *) NAME(glSampleMaskSGIS), _gloffset_SampleMaskSGIS },
882 { "glSamplePatternSGIS", (GLvoid *) NAME(glSamplePatternSGIS), _gloffset_SamplePatternSGIS },
883 #undef NAME
884
885 /* 30. GL_EXT_vertex_array */
886 #ifdef GL_EXT_vertex_array
887 #define NAME(X) X
888 #else
889 #define NAME(X) NotImplemented
890 #endif
891 { "glArrayElementEXT", (GLvoid *) NAME(glArrayElementEXT), _gloffset_ArrayElement },
892 { "glColorPointerEXT", (GLvoid *) NAME(glColorPointerEXT), _gloffset_ColorPointerEXT },
893 { "glDrawArraysEXT", (GLvoid *) NAME(glDrawArraysEXT), _gloffset_DrawArrays },
894 { "glEdgeFlagPointerEXT", (GLvoid *) NAME(glEdgeFlagPointerEXT), _gloffset_EdgeFlagPointerEXT },
895 { "glGetPointervEXT", (GLvoid *) NAME(glGetPointervEXT), _gloffset_GetPointerv },
896 { "glIndexPointerEXT", (GLvoid *) NAME(glIndexPointerEXT), _gloffset_IndexPointerEXT },
897 { "glNormalPointerEXT", (GLvoid *) NAME(glNormalPointerEXT), _gloffset_NormalPointerEXT },
898 { "glTexCoordPointerEXT", (GLvoid *) NAME(glTexCoordPointerEXT), _gloffset_TexCoordPointerEXT },
899 { "glVertexPointerEXT", (GLvoid *) NAME(glVertexPointerEXT), _gloffset_VertexPointerEXT },
900 #undef NAME
901
902 /* 37. GL_EXT_blend_minmax */
903 #ifdef GL_EXT_blend_minmax
904 #define NAME(X) X
905 #else
906 #define NAME(X) NotImplemented
907 #endif
908 { "glBlendEquationEXT", (GLvoid *) NAME(glBlendEquationEXT), _gloffset_BlendEquation },
909 #undef NAME
910
911 /* 52. GL_SGIX_sprite */
912 #ifdef GL_SGIX_sprite
913 #define NAME(X) X
914 #else
915 #define NAME(X) NotImplemented
916 #endif
917 { "glSpriteParameterfSGIX", (GLvoid *) NAME(glSpriteParameterfSGIX), _gloffset_SpriteParameterfSGIX },
918 { "glSpriteParameterfvSGIX", (GLvoid *) NAME(glSpriteParameterfvSGIX), _gloffset_SpriteParameterfvSGIX },
919 { "glSpriteParameteriSGIX", (GLvoid *) NAME(glSpriteParameteriSGIX), _gloffset_SpriteParameteriSGIX },
920 { "glSpriteParameterivSGIX", (GLvoid *) NAME(glSpriteParameterivSGIX), _gloffset_SpriteParameterivSGIX },
921 #undef NAME
922
923 /* 54. GL_EXT_point_parameters */
924 #ifdef GL_EXT_point_parameters
925 #define NAME(X) X
926 #else
927 #define NAME(X) NotImplemented
928 #endif
929 { "glPointParameterfEXT", (GLvoid *) NAME(glPointParameterfEXT), _gloffset_PointParameterfEXT },
930 { "glPointParameterfvEXT", (GLvoid *) NAME(glPointParameterfvEXT), _gloffset_PointParameterfvEXT },
931 #undef NAME
932
933 /* 55. GL_SGIX_instruments */
934 #ifdef GL_SGIX_instruments
935 #define NAME(X) X
936 #else
937 #define NAME(X) NotImplemented
938 #endif
939 { "glInstrumentsBufferSGIX", (GLvoid *) NAME(glInstrumentsBufferSGIX), _gloffset_InstrumentsBufferSGIX },
940 { "glStartInstrumentsSGIX", (GLvoid *) NAME(glStartInstrumentsSGIX), _gloffset_StartInstrumentsSGIX },
941 { "glStopInstrumentsSGIX", (GLvoid *) NAME(glStopInstrumentsSGIX), _gloffset_StopInstrumentsSGIX },
942 { "glReadInstrumentsSGIX", (GLvoid *) NAME(glReadInstrumentsSGIX), _gloffset_ReadInstrumentsSGIX },
943 { "glPollInstrumentsSGIX", (GLvoid *) NAME(glPollInstrumentsSGIX), _gloffset_PollInstrumentsSGIX },
944 { "glGetInstrumentsSGIX", (GLvoid *) NAME(glGetInstrumentsSGIX), _gloffset_GetInstrumentsSGIX },
945 #undef NAME
946
947 /* 57. GL_SGIX_framezoom */
948 #ifdef GL_SGIX_framezoom
949 #define NAME(X) X
950 #else
951 #define NAME(X) NotImplemented
952 #endif
953 { "glFrameZoomSGIX", (GLvoid *) NAME(glFrameZoomSGIX), _gloffset_FrameZoomSGIX },
954 #undef NAME
955
956 /* 58. GL_SGIX_tag_sample_buffer */
957 #ifdef GL_SGIX_tag_sample_buffer
958 #define NAME(X) X
959 #else
960 #define NAME(X) NotImplemented
961 #endif
962 { "glTagSampleBufferSGIX", (GLvoid *) NAME(glTagSampleBufferSGIX), _gloffset_TagSampleBufferSGIX },
963 #undef NAME
964
965 /* 60. GL_SGIX_reference_plane */
966 #ifdef GL_SGIX_reference_plane
967 #define NAME(X) X
968 #else
969 #define NAME(X) NotImplemented
970 #endif
971 { "glReferencePlaneSGIX", (GLvoid *) NAME(glReferencePlaneSGIX), _gloffset_ReferencePlaneSGIX },
972 #undef NAME
973
974 /* 61. GL_SGIX_flush_raster */
975 #ifdef GL_SGIX_flush_raster
976 #define NAME(X) X
977 #else
978 #define NAME(X) NotImplemented
979 #endif
980 { "glFlushRasterSGIX", (GLvoid *) NAME(glFlushRasterSGIX), _gloffset_FlushRasterSGIX },
981 #undef NAME
982
983 /* 66. GL_HP_image_transform */
984 #if 0
985 #ifdef GL_HP_image_transform
986 #define NAME(X) X
987 #else
988 #define NAME(X) NotImplemented
989 #endif
990 { "glGetImageTransformParameterfvHP", (GLvoid *) NAME(glGetImageTransformParameterfvHP), _gloffset_GetImageTransformParameterfvHP },
991 { "glGetImageTransformParameterivHP", (GLvoid *) NAME(glGetImageTransformParameterivHP), _gloffset_GetImageTransformParameterivHP },
992 { "glImageTransformParameterfHP", (GLvoid *) NAME(glImageTransformParameterfHP), _gloffset_ImageTransformParameterfHP },
993 { "glImageTransformParameterfvHP", (GLvoid *) NAME(glImageTransformParameterfvHP), _gloffset_ImageTransformParameterfvHP },
994 { "glImageTransformParameteriHP", (GLvoid *) NAME(glImageTransformParameteriHP), _gloffset_ImageTransformParameteriHP },
995 { "glImageTransformParameterivHP", (GLvoid *) NAME(glImageTransformParameterivHP), _gloffset_ImageTransformParameterivHP },
996 #undef NAME
997 #endif
998
999 /* 74. GL_EXT_color_subtable */
1000 #ifdef GL_EXT_color_subtable
1001 #define NAME(X) X
1002 #else
1003 #define NAME(X) NotImplemented
1004 #endif
1005 { "glColorSubTableEXT", (GLvoid *) NAME(glColorSubTableEXT), _gloffset_ColorSubTable },
1006 { "glCopyColorSubTableEXT", (GLvoid *) NAME(glCopyColorSubTableEXT), _gloffset_CopyColorSubTable },
1007 #undef NAME
1008
1009 /* 77. GL_PGI_misc_hints */
1010 #ifdef GL_PGI_misc_hints
1011 #define NAME(X) X
1012 #else
1013 #define NAME(X) NotImplemented
1014 #endif
1015 { "glHintPGI", (GLvoid *) NAME(glHintPGI), _gloffset_HintPGI },
1016 #undef NAME
1017
1018 /* 78. GL_EXT_paletted_texture */
1019 #ifdef GL_EXT_paletted_texture
1020 #define NAME(X) X
1021 #else
1022 #define NAME(X) NotImplemented
1023 #endif
1024 { "glColorTableEXT", (GLvoid *) NAME(glColorTableEXT), _gloffset_ColorTable },
1025 { "glGetColorTableEXT", (GLvoid *) NAME(glGetColorTableEXT), _gloffset_GetColorTable },
1026 { "glGetColorTableParameterfvEXT", (GLvoid *) NAME(glGetColorTableParameterfvEXT), _gloffset_GetColorTableParameterfv },
1027 { "glGetColorTableParameterivEXT", (GLvoid *) NAME(glGetColorTableParameterivEXT), _gloffset_GetColorTableParameteriv },
1028 #undef NAME
1029
1030 /* 80. GL_SGIX_list_priority */
1031 #ifdef GL_SGIX_list_priority
1032 #define NAME(X) X
1033 #else
1034 #define NAME(X) NotImplemented
1035 #endif
1036 { "glGetListParameterfvSGIX", (GLvoid *) NAME(glGetListParameterfvSGIX), _gloffset_GetListParameterfvSGIX },
1037 { "glGetListParameterivSGIX", (GLvoid *) NAME(glGetListParameterivSGIX), _gloffset_GetListParameterivSGIX },
1038 { "glListParameterfSGIX", (GLvoid *) NAME(glListParameterfSGIX), _gloffset_ListParameterfSGIX },
1039 { "glListParameterfvSGIX", (GLvoid *) NAME(glListParameterfvSGIX), _gloffset_ListParameterfvSGIX },
1040 { "glListParameteriSGIX", (GLvoid *) NAME(glListParameteriSGIX), _gloffset_ListParameteriSGIX },
1041 { "glListParameterivSGIX", (GLvoid *) NAME(glListParameterivSGIX), _gloffset_ListParameterivSGIX },
1042 #undef NAME
1043
1044 /* 94. GL_EXT_index_material */
1045 #ifdef GL_EXT_index_material
1046 #define NAME(X) X
1047 #else
1048 #define NAME(X) NotImplemented
1049 #endif
1050 { "glIndexMaterialEXT", (GLvoid *) NAME(glIndexMaterialEXT), _gloffset_IndexMaterialEXT },
1051 #undef NAME
1052
1053 /* 95. GL_EXT_index_func */
1054 #ifdef GL_EXT_index_func
1055 #define NAME(X) X
1056 #else
1057 #define NAME(X) NotImplemented
1058 #endif
1059 { "glIndexFuncEXT", (GLvoid *) NAME(glIndexFuncEXT), _gloffset_IndexFuncEXT },
1060 #undef NAME
1061
1062 /* 97. GL_EXT_compiled_vertex_array */
1063 #ifdef GL_EXT_compiled_vertex_array
1064 #define NAME(X) X
1065 #else
1066 #define NAME(X) NotImplemented
1067 #endif
1068 { "glLockArraysEXT", (GLvoid *) NAME(glLockArraysEXT), _gloffset_LockArraysEXT },
1069 { "glUnlockArraysEXT", (GLvoid *) NAME(glUnlockArraysEXT), _gloffset_UnlockArraysEXT },
1070 #undef NAME
1071
1072 /* 98. GL_EXT_cull_vertex */
1073 #ifdef GL_EXT_cull_vertex
1074 #define NAME(X) X
1075 #else
1076 #define NAME(X) NotImplemented
1077 #endif
1078 { "glCullParameterfvEXT", (GLvoid *) NAME(glCullParameterfvEXT), _gloffset_CullParameterfvEXT },
1079 { "glCullParameterdvEXT", (GLvoid *) NAME(glCullParameterdvEXT), _gloffset_CullParameterdvEXT },
1080 #undef NAME
1081
1082 /* 102. GL_SGIX_fragment_lighting */
1083 #ifdef GL_SGIX_fragment_lighting
1084 #define NAME(X) X
1085 #else
1086 #define NAME(X) NotImplemented
1087 #endif
1088 { "glFragmentColorMaterialSGIX", (GLvoid *) NAME(glFragmentColorMaterialSGIX), _gloffset_FragmentColorMaterialSGIX },
1089 { "glFragmentLightfSGIX", (GLvoid *) NAME(glFragmentLightfSGIX), _gloffset_FragmentLightfSGIX },
1090 { "glFragmentLightfvSGIX", (GLvoid *) NAME(glFragmentLightfvSGIX), _gloffset_FragmentLightfvSGIX },
1091 { "glFragmentLightiSGIX", (GLvoid *) NAME(glFragmentLightiSGIX), _gloffset_FragmentLightiSGIX },
1092 { "glFragmentLightivSGIX", (GLvoid *) NAME(glFragmentLightivSGIX), _gloffset_FragmentLightivSGIX },
1093 { "glFragmentLightModelfSGIX", (GLvoid *) NAME(glFragmentLightModelfSGIX), _gloffset_FragmentLightModelfSGIX },
1094 { "glFragmentLightModelfvSGIX", (GLvoid *) NAME(glFragmentLightModelfvSGIX), _gloffset_FragmentLightModelfvSGIX },
1095 { "glFragmentLightModeliSGIX", (GLvoid *) NAME(glFragmentLightModeliSGIX), _gloffset_FragmentLightModeliSGIX },
1096 { "glFragmentLightModelivSGIX", (GLvoid *) NAME(glFragmentLightModelivSGIX), _gloffset_FragmentLightModelivSGIX },
1097 { "glFragmentMaterialfSGIX", (GLvoid *) NAME(glFragmentMaterialfSGIX), _gloffset_FragmentMaterialfSGIX },
1098 { "glFragmentMaterialfvSGIX", (GLvoid *) NAME(glFragmentMaterialfvSGIX), _gloffset_FragmentMaterialfvSGIX },
1099 { "glFragmentMaterialiSGIX", (GLvoid *) NAME(glFragmentMaterialiSGIX), _gloffset_FragmentMaterialiSGIX },
1100 { "glFragmentMaterialivSGIX", (GLvoid *) NAME(glFragmentMaterialivSGIX), _gloffset_FragmentMaterialivSGIX },
1101 { "glGetFragmentLightfvSGIX", (GLvoid *) NAME(glGetFragmentLightfvSGIX), _gloffset_GetFragmentLightfvSGIX },
1102 { "glGetFragmentLightivSGIX", (GLvoid *) NAME(glGetFragmentLightivSGIX), _gloffset_GetFragmentLightivSGIX },
1103 { "glGetFragmentMaterialfvSGIX", (GLvoid *) NAME(glGetFragmentMaterialfvSGIX), _gloffset_GetFragmentMaterialfvSGIX },
1104 { "glGetFragmentMaterialivSGIX", (GLvoid *) NAME(glGetFragmentMaterialivSGIX), _gloffset_GetFragmentMaterialivSGIX },
1105 { "glLightEnviSGIX", (GLvoid *) NAME(glLightEnviSGIX), _gloffset_LightEnviSGIX },
1106 #undef NAME
1107
1108 /* 149. GL_EXT_fog_coord */
1109 #ifdef GL_EXT_fog_coord
1110 #define NAME(X) X
1111 #else
1112 #define NAME(X) NotImplemented
1113 #endif
1114 { "glFogCoordfEXT", (GLvoid *) NAME(glFogCoordfEXT), _gloffset_FogCoordfEXT },
1115 { "glFogCoordfvEXT", (GLvoid *) NAME(glFogCoordfvEXT), _gloffset_FogCoordfvEXT },
1116 { "glFogCoorddEXT", (GLvoid *) NAME(glFogCoorddEXT), _gloffset_FogCoorddEXT },
1117 { "glFogCoorddEXT", (GLvoid *) NAME(glFogCoorddEXT), _gloffset_FogCoorddEXT },
1118 { "glFogCoordPointerEXT", (GLvoid *) NAME(glFogCoordPointerEXT), _gloffset_FogCoordPointerEXT },
1119 #undef NAME
1120
1121 /* 173. GL_EXT/INGR_blend_func_separate */
1122 #ifdef GL_EXT_blend_func_separate
1123 #define NAME(X) X
1124 #else
1125 #define NAME(X) NotImplemented
1126 #endif
1127 { "glBlendFuncSeparateEXT", (GLvoid *) NAME(glBlendFuncSeparateEXT), _gloffset_BlendFuncSeparateEXT },
1128 { "glBlendFuncSeparateINGR", (GLvoid *) NAME(glBlendFuncSeparateEXT), _gloffset_BlendFuncSeparateEXT },
1129 #undef NAME
1130
1131 /* 188. GL_EXT_vertex_weighting */
1132 #ifdef GL_EXT_vertex_weighting
1133 #define NAME(X) X
1134 #else
1135 #define NAME(X) NotImplemented
1136 #endif
1137 { "glVertexWeightfEXT", (GLvoid *) NAME(glVertexWeightfEXT), _gloffset_VertexWeightfEXT },
1138 { "glVertexWeightfvEXT", (GLvoid *) NAME(glVertexWeightfvEXT), _gloffset_VertexWeightfvEXT },
1139 { "glVertexWeightPointerEXT", (GLvoid *) NAME(glVertexWeightPointerEXT), _gloffset_VertexWeightPointerEXT },
1140 #undef NAME
1141
1142 /* 190. GL_NV_vertex_array_range */
1143 #ifdef GL_NV_vertex_array_range
1144 #define NAME(X) X
1145 #else
1146 #define NAME(X) NotImplemented
1147 #endif
1148 { "glFlushVertexArrayRangeNV", (GLvoid *) NAME(glFlushVertexArrayRangeNV), _gloffset_FlushVertexArrayRangeNV },
1149 { "glVertexArrayRangeNV", (GLvoid *) NAME(glVertexArrayRangeNV), _gloffset_VertexArrayRangeNV },
1150 #undef NAME
1151
1152 /* 191. GL_NV_register_combiners */
1153 #ifdef GL_NV_register_combiners
1154 #define NAME(X) X
1155 #else
1156 #define NAME(X) NotImplemented
1157 #endif
1158 { "glCombinerParameterfvNV", (GLvoid *) NAME(glCombinerParameterfvNV), _gloffset_CombinerParameterfvNV },
1159 { "glCombinerParameterfNV", (GLvoid *) NAME(glCombinerParameterfNV), _gloffset_CombinerParameterfNV },
1160 { "glCombinerParameterivNV", (GLvoid *) NAME(glCombinerParameterivNV), _gloffset_CombinerParameterivNV },
1161 { "glCombinerParameteriNV", (GLvoid *) NAME(glCombinerParameteriNV), _gloffset_CombinerParameteriNV },
1162 { "glCombinerInputNV", (GLvoid *) NAME(glCombinerInputNV), _gloffset_CombinerInputNV },
1163 { "glCombinerOutputNV", (GLvoid *) NAME(glCombinerOutputNV), _gloffset_CombinerOutputNV },
1164 { "glFinalCombinerInputNV", (GLvoid *) NAME(glFinalCombinerInputNV), _gloffset_FinalCombinerInputNV },
1165 { "glGetCombinerInputParameterfvNV", (GLvoid *) NAME(glGetCombinerInputParameterfvNV), _gloffset_GetCombinerInputParameterfvNV },
1166 { "glGetCombinerInputParameterivNV", (GLvoid *) NAME(glGetCombinerInputParameterivNV), _gloffset_GetCombinerInputParameterivNV },
1167 { "glGetCombinerOutputParameterfvNV", (GLvoid *) NAME(glGetCombinerOutputParameterfvNV), _gloffset_GetCombinerOutputParameterfvNV },
1168 { "glGetCombinerOutputParameterivNV", (GLvoid *) NAME(glGetCombinerOutputParameterivNV), _gloffset_GetCombinerOutputParameterivNV },
1169 { "glGetFinalCombinerInputParameterfvNV", (GLvoid *) NAME(glGetFinalCombinerInputParameterfvNV), _gloffset_GetFinalCombinerInputParameterfvNV },
1170 { "glGetFinalCombinerInputParameterivNV", (GLvoid *) NAME(glGetFinalCombinerInputParameterivNV), _gloffset_GetFinalCombinerInputParameterivNV },
1171 #undef NAME
1172
1173 /* 196. GL_MESA_resize_buffers */
1174 #ifdef MESA_resize_buffers
1175 #define NAME(X) X
1176 #else
1177 #define NAME(X) NotImplemented
1178 #endif
1179 { "glResizeBuffersMESA", (GLvoid *) NAME(glResizeBuffersMESA), _gloffset_ResizeBuffersMESA },
1180 #undef NAME
1181
1182 /* 197. GL_MESA_window_pos */
1183 #ifdef MESA_window_pos
1184 #define NAME(X) X
1185 #else
1186 #define NAME(X) NotImplemented
1187 #endif
1188 { "glWindowPos4fMESA", (GLvoid *) NAME(glWindowPos4fMESA), _gloffset_WindowPos4fMESA },
1189 #undef NAME
1190
1191
1192 { NULL, NULL } /* end of list marker */
1193 };
1194
1195
1196
1197 /*
1198 * Return dispatch table offset of the named static (built-in) function.
1199 * Return -1 if function not found.
1200 */
1201 static GLint
1202 get_static_proc_offset(const char *funcName)
1203 {
1204 GLuint i;
1205 for (i = 0; static_functions[i].Name; i++) {
1206 if (strcmp(static_functions[i].Name, funcName) == 0) {
1207 return static_functions[i].Offset;
1208 }
1209 }
1210 return -1;
1211 }
1212
1213
1214 /*
1215 * Return dispatch function address the named static (built-in) function.
1216 * Return NULL if function not found.
1217 */
1218 static GLvoid *
1219 get_static_proc_address(const char *funcName)
1220 {
1221 GLint i = get_static_proc_offset(funcName);
1222 if (i >= 0)
1223 return static_functions[i].Address;
1224 else
1225 return NULL;
1226 }
1227
1228
1229
1230 /**********************************************************************
1231 * Extension function management.
1232 */
1233
1234
1235 #define MAX_EXTENSION_FUNCS 1000
1236
1237 static struct name_address_offset ExtEntryTable[MAX_EXTENSION_FUNCS];
1238 static GLuint NumExtEntryPoints = 0;
1239
1240
1241
1242 /*
1243 * Generate a dispatch function (entrypoint) which jumps through
1244 * the given slot number (offset) in the current dispatch table.
1245 * We need assembly language in order to accomplish this.
1246 */
1247 static void *
1248 generate_entrypoint(GLuint functionOffset)
1249 {
1250 #if defined(USE_X86_ASM)
1251 /*
1252 * This x86 code contributed by Josh Vanderhoof.
1253 *
1254 * 0: a1 10 32 54 76 movl __glapi_Dispatch,%eax
1255 * 00 01 02 03 04
1256 * 5: 85 c0 testl %eax,%eax
1257 * 05 06
1258 * 7: 74 06 je f <entrypoint+0xf>
1259 * 07 08
1260 * 9: ff a0 10 32 54 76 jmp *0x76543210(%eax)
1261 * 09 0a 0b 0c 0d 0e
1262 * f: e8 fc ff ff ff call __glapi_get_dispatch
1263 * 0f 10 11 12 13
1264 * 14: ff a0 10 32 54 76 jmp *0x76543210(%eax)
1265 * 14 15 16 17 18 19
1266 */
1267 static const unsigned char temp[] = {
1268 0xa1, 0x00, 0x00, 0x00, 0x00,
1269 0x85, 0xc0,
1270 0x74, 0x06,
1271 0xff, 0xa0, 0x00, 0x00, 0x00, 0x00,
1272 0xe8, 0x00, 0x00, 0x00, 0x00,
1273 0xff, 0xa0, 0x00, 0x00, 0x00, 0x00
1274 };
1275 unsigned char *code = malloc(sizeof(temp));
1276 unsigned int next_insn;
1277 if (code) {
1278 memcpy(code, temp, sizeof(temp));
1279
1280 *(unsigned int *)(code + 0x01) = (unsigned int)&_glapi_Dispatch;
1281 *(unsigned int *)(code + 0x0b) = (unsigned int)functionOffset * 4;
1282 next_insn = (unsigned int)(code + 0x14);
1283 *(unsigned int *)(code + 0x10) = (unsigned int)_glapi_get_dispatch - next_insn;
1284 *(unsigned int *)(code + 0x16) = (unsigned int)functionOffset * 4;
1285 }
1286 return code;
1287 #else
1288 return NULL;
1289 #endif
1290 }
1291
1292
1293
1294 /*
1295 * Add a new extension function entrypoint.
1296 * Return: GL_TRUE = success or GL_FALSE = failure
1297 */
1298 GLboolean
1299 _glapi_add_entrypoint(const char *funcName, GLuint offset)
1300 {
1301 /* Make sure we don't try to add a new entrypoint after someone
1302 * has already called _glapi_get_dispatch_table_size()! If that's
1303 * happened the caller's information will now be out of date.
1304 */
1305 assert(!GetSizeCalled);
1306
1307 /* first check if the named function is already statically present */
1308 {
1309 GLint index = get_static_proc_offset(funcName);
1310 if (index >= 0) {
1311 return (GLboolean) (index == offset); /* bad offset! */
1312 }
1313 }
1314
1315 {
1316 /* make sure this offset/name pair is legal */
1317 const char *name = _glapi_get_proc_name(offset);
1318 if (name && strcmp(name, funcName) != 0)
1319 return GL_FALSE; /* bad name! */
1320 }
1321
1322 {
1323 /* be sure index and name match known data */
1324 GLuint i;
1325 for (i = 0; i < NumExtEntryPoints; i++) {
1326 if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
1327 /* function already registered with api */
1328 if (ExtEntryTable[i].Offset == offset) {
1329 return GL_TRUE; /* offsets match */
1330 }
1331 else {
1332 return GL_FALSE; /* bad offset! */
1333 }
1334 }
1335 }
1336
1337 /* make sure we have space */
1338 if (NumExtEntryPoints >= MAX_EXTENSION_FUNCS) {
1339 return GL_FALSE;
1340 }
1341 else {
1342 void *entrypoint = generate_entrypoint(offset);
1343 if (!entrypoint)
1344 return GL_FALSE;
1345
1346 ExtEntryTable[NumExtEntryPoints].Name = mesaStrdup(funcName);
1347 ExtEntryTable[NumExtEntryPoints].Offset = offset;
1348 ExtEntryTable[NumExtEntryPoints].Address = entrypoint;
1349 NumExtEntryPoints++;
1350
1351 if (offset > MaxDispatchOffset)
1352 MaxDispatchOffset = offset;
1353
1354 return GL_TRUE; /* success */
1355 }
1356 }
1357
1358 /* should never get here, but play it safe */
1359 return GL_FALSE;
1360 }
1361
1362
1363
1364 #if 0000 /* prototype code for dynamic extension slot allocation */
1365
1366 static int NextFreeOffset = 409; /*XXX*/
1367 #define MAX_DISPATCH_TABLE_SIZE 1000
1368
1369 /*
1370 * Dynamically allocate a dispatch slot for an extension entrypoint
1371 * and generate the assembly language dispatch stub.
1372 * Return the dispatch offset for the function or -1 if no room or error.
1373 */
1374 GLint
1375 _glapi_add_entrypoint2(const char *funcName)
1376 {
1377 int offset;
1378
1379 /* first see if extension func is already known */
1380 offset = _glapi_get_proc_offset(funcName);
1381 if (offset >= 0)
1382 return offset;
1383
1384 if (NumExtEntryPoints < MAX_EXTENSION_FUNCS
1385 && NextFreeOffset < MAX_DISPATCH_TABLE_SIZE) {
1386 void *entryPoint;
1387 offset = NextFreeOffset;
1388 entryPoint = generate_entrypoint(offset);
1389 if (entryPoint) {
1390 NextFreeOffset++;
1391 ExtEntryTable[NumExtEntryPoints].Name = mesaStrdup(funcName);
1392 ExtEntryTable[NumExtEntryPoints].Offset = offset;
1393 ExtEntryTable[NumExtEntryPoints].Address = entryPoint;
1394 NumExtEntryPoints++;
1395 return offset;
1396 }
1397 }
1398 return -1;
1399 }
1400
1401 #endif
1402
1403
1404
1405 /*
1406 * Return offset of entrypoint for named function within dispatch table.
1407 */
1408 GLint
1409 _glapi_get_proc_offset(const char *funcName)
1410 {
1411 /* search extension functions first */
1412 GLint i;
1413 for (i = 0; i < NumExtEntryPoints; i++) {
1414 if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
1415 return ExtEntryTable[i].Offset;
1416 }
1417 }
1418
1419 /* search static functions */
1420 return get_static_proc_offset(funcName);
1421 }
1422
1423
1424
1425 /*
1426 * Return entrypoint for named function.
1427 */
1428 const GLvoid *
1429 _glapi_get_proc_address(const char *funcName)
1430 {
1431 /* search extension functions first */
1432 GLint i;
1433 for (i = 0; i < NumExtEntryPoints; i++) {
1434 if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
1435 return ExtEntryTable[i].Address;
1436 }
1437 }
1438
1439 /* search static functions */
1440 return get_static_proc_address(funcName);
1441 }
1442
1443
1444
1445
1446 /*
1447 * Return the name of the function at the given dispatch offset.
1448 * This is only intended for debugging.
1449 */
1450 const char *
1451 _glapi_get_proc_name(GLuint offset)
1452 {
1453 const GLuint n = sizeof(static_functions) / sizeof(struct name_address_offset);
1454 GLuint i;
1455 for (i = 0; i < n; i++) {
1456 if (static_functions[i].Offset == offset)
1457 return static_functions[i].Name;
1458 }
1459
1460 /* search added extension functions */
1461 for (i = 0; i < NumExtEntryPoints; i++) {
1462 if (ExtEntryTable[i].Offset == offset) {
1463 return ExtEntryTable[i].Name;
1464 }
1465 }
1466 return NULL;
1467 }
1468
1469
1470
1471 /*
1472 * Make sure there are no NULL pointers in the given dispatch table.
1473 * Intented for debugging purposes.
1474 */
1475 void
1476 _glapi_check_table(const struct _glapi_table *table)
1477 {
1478 const GLuint entries = _glapi_get_dispatch_table_size();
1479 const void **tab = (const void **) table;
1480 GLuint i;
1481 for (i = 1; i < entries; i++) {
1482 assert(tab[i]);
1483 }
1484
1485 #ifdef DEBUG
1486 /* Do some spot checks to be sure that the dispatch table
1487 * slots are assigned correctly.
1488 */
1489 {
1490 GLuint BeginOffset = _glapi_get_proc_offset("glBegin");
1491 char *BeginFunc = (char*) &table->Begin;
1492 GLuint offset = (BeginFunc - (char *) table) / sizeof(void *);
1493 assert(BeginOffset == _gloffset_Begin);
1494 assert(BeginOffset == offset);
1495 }
1496 {
1497 GLuint viewportOffset = _glapi_get_proc_offset("glViewport");
1498 char *viewportFunc = (char*) &table->Viewport;
1499 GLuint offset = (viewportFunc - (char *) table) / sizeof(void *);
1500 assert(viewportOffset == _gloffset_Viewport);
1501 assert(viewportOffset == offset);
1502 }
1503 {
1504 GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer");
1505 char *VertexPointerFunc = (char*) &table->VertexPointer;
1506 GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *);
1507 assert(VertexPointerOffset == _gloffset_VertexPointer);
1508 assert(VertexPointerOffset == offset);
1509 }
1510 {
1511 GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax");
1512 char *ResetMinMaxFunc = (char*) &table->ResetMinmax;
1513 GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *);
1514 assert(ResetMinMaxOffset == _gloffset_ResetMinmax);
1515 assert(ResetMinMaxOffset == offset);
1516 }
1517 {
1518 GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColor");
1519 char *blendColorFunc = (char*) &table->BlendColor;
1520 GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *);
1521 assert(blendColorOffset == _gloffset_BlendColor);
1522 assert(blendColorOffset == offset);
1523 }
1524 {
1525 GLuint istextureOffset = _glapi_get_proc_offset("glIsTextureEXT");
1526 char *istextureFunc = (char*) &table->IsTextureEXT;
1527 GLuint offset = (istextureFunc - (char *) table) / sizeof(void *);
1528 assert(istextureOffset == _gloffset_IsTextureEXT);
1529 assert(istextureOffset == offset);
1530 }
1531 #endif
1532 }
1533
1534
1535
1536