88bc18a476a5042e980adad8a62c0978081a8f1d
[mesa.git] / src / mesa / glapi / glapi.c
1 /* $Id: glapi.c,v 1.57 2001/09/14 02:48:53 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.5
6 *
7 * Copyright (C) 1999-2001 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 * Versions (API changes):
43 * 2000/02/23 - original version for Mesa 3.3 and XFree86 4.0
44 * 2001/01/16 - added dispatch override feature for Mesa 3.5
45 */
46
47
48
49 #include "glheader.h"
50 #include "glapi.h"
51 #include "glapioffsets.h"
52 #include "glapitable.h"
53 #include "glthread.h"
54
55 /***** BEGIN NO-OP DISPATCH *****/
56
57 static GLboolean WarnFlag = GL_FALSE;
58
59 void
60 _glapi_noop_enable_warnings(GLboolean enable)
61 {
62 WarnFlag = enable;
63 }
64
65 static GLboolean
66 warn(void)
67 {
68 if (WarnFlag || getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG"))
69 return GL_TRUE;
70 else
71 return GL_FALSE;
72 }
73
74
75 #define KEYWORD1 static
76 #define KEYWORD2
77 #define NAME(func) NoOp##func
78
79 #define F stderr
80
81 #define DISPATCH(func, args, msg) \
82 if (warn()) { \
83 fprintf(stderr, "GL User Error: calling "); \
84 fprintf msg; \
85 fprintf(stderr, " without a current context\n"); \
86 }
87
88 #define RETURN_DISPATCH(func, args, msg) \
89 if (warn()) { \
90 fprintf(stderr, "GL User Error: calling "); \
91 fprintf msg; \
92 fprintf(stderr, " without a current context\n"); \
93 } \
94 return 0
95
96 #define DISPATCH_TABLE_NAME __glapi_noop_table
97 #define UNUSED_TABLE_NAME __usused_noop_functions
98
99 #define TABLE_ENTRY(name) (void *) NoOp##name
100
101 static int NoOpUnused(void)
102 {
103 if (warn()) {
104 fprintf(stderr, "GL User Error: calling extension function without a current context\n");
105 }
106 return 0;
107 }
108
109 #include "glapitemp.h"
110
111 /***** END NO-OP DISPATCH *****/
112
113
114
115 /***** BEGIN THREAD-SAFE DISPATCH *****/
116 /* if we support thread-safety, build a special dispatch table for use
117 * in thread-safety mode (ThreadSafe == GL_TRUE). Each entry in the
118 * dispatch table will call _glthread_GetTSD() to get the actual dispatch
119 * table bound to the current thread, then jump through that table.
120 */
121
122 #if defined(THREADS)
123
124 static GLboolean ThreadSafe = GL_FALSE; /* In thread-safe mode? */
125 static _glthread_TSD DispatchTSD; /* Per-thread dispatch pointer */
126 static _glthread_TSD RealDispatchTSD; /* only when using override */
127 static _glthread_TSD ContextTSD; /* Per-thread context pointer */
128
129
130 #define KEYWORD1 static
131 #define KEYWORD2 GLAPIENTRY
132 #define NAME(func) _ts_##func
133
134 #define DISPATCH(FUNC, ARGS, MESSAGE) \
135 struct _glapi_table *dispatch; \
136 dispatch = (struct _glapi_table *) _glthread_GetTSD(&DispatchTSD); \
137 if (!dispatch) \
138 dispatch = (struct _glapi_table *) __glapi_noop_table; \
139 (dispatch->FUNC) ARGS
140
141 #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
142 struct _glapi_table *dispatch; \
143 dispatch = (struct _glapi_table *) _glthread_GetTSD(&DispatchTSD); \
144 if (!dispatch) \
145 dispatch = (struct _glapi_table *) __glapi_noop_table; \
146 return (dispatch->FUNC) ARGS
147
148 #define DISPATCH_TABLE_NAME __glapi_threadsafe_table
149 #define UNUSED_TABLE_NAME __usused_threadsafe_functions
150
151 #define TABLE_ENTRY(name) (void *) _ts_##name
152
153 static int _ts_Unused(void)
154 {
155 return 0;
156 }
157
158 #include "glapitemp.h"
159
160 #endif
161
162 /***** END THREAD-SAFE DISPATCH *****/
163
164
165
166 struct _glapi_table *_glapi_Dispatch = (struct _glapi_table *) __glapi_noop_table;
167 struct _glapi_table *_glapi_RealDispatch = (struct _glapi_table *) __glapi_noop_table;
168
169 /* Used when thread safety disabled */
170 void *_glapi_Context = NULL;
171
172
173 static GLuint MaxDispatchOffset = sizeof(struct _glapi_table) / sizeof(void *) - 1;
174 static GLboolean GetSizeCalled = GL_FALSE;
175
176 static GLboolean DispatchOverride = GL_FALSE;
177
178
179 /* strdup() is actually not a standard ANSI C or POSIX routine.
180 * Irix will not define it if ANSI mode is in effect.
181 */
182 static char *
183 str_dup(const char *str)
184 {
185 char *copy;
186 copy = (char*) malloc(strlen(str) + 1);
187 if (!copy)
188 return NULL;
189 strcpy(copy, str);
190 return copy;
191 }
192
193
194
195 /*
196 * We should call this periodically from a function such as glXMakeCurrent
197 * in order to test if multiple threads are being used. When we detect
198 * that situation we should then call _glapi_enable_thread_safety()
199 */
200 void
201 _glapi_check_multithread(void)
202 {
203 #if defined(THREADS)
204 if (!ThreadSafe) {
205 static unsigned long knownID;
206 static GLboolean firstCall = GL_TRUE;
207 if (firstCall) {
208 knownID = _glthread_GetID();
209 firstCall = GL_FALSE;
210 }
211 else if (knownID != _glthread_GetID()) {
212 ThreadSafe = GL_TRUE;
213 }
214 }
215 if (ThreadSafe) {
216 /* make sure that this thread's dispatch pointer isn't null */
217 if (!_glapi_get_dispatch()) {
218 _glapi_set_dispatch(NULL);
219 }
220 }
221 #endif
222 }
223
224
225
226 /*
227 * Set the current context pointer for this thread.
228 * The context pointer is an opaque type which should be cast to
229 * void from the real context pointer type.
230 */
231 void
232 _glapi_set_context(void *context)
233 {
234 #if defined(THREADS)
235 _glthread_SetTSD(&ContextTSD, context);
236 if (ThreadSafe)
237 _glapi_Context = NULL;
238 else
239 _glapi_Context = context;
240 #else
241 _glapi_Context = context;
242 #endif
243 }
244
245
246
247 /*
248 * Get the current context pointer for this thread.
249 * The context pointer is an opaque type which should be cast from
250 * void to the real context pointer type.
251 */
252 void *
253 _glapi_get_context(void)
254 {
255 #if defined(THREADS)
256 if (ThreadSafe) {
257 return _glthread_GetTSD(&ContextTSD);
258 }
259 else {
260 return _glapi_Context;
261 }
262 #else
263 return _glapi_Context;
264 #endif
265 }
266
267
268
269 /*
270 * Set the global or per-thread dispatch table pointer.
271 */
272 void
273 _glapi_set_dispatch(struct _glapi_table *dispatch)
274 {
275 if (!dispatch) {
276 /* use the no-op functions */
277 dispatch = (struct _glapi_table *) __glapi_noop_table;
278 }
279 #ifdef DEBUG
280 else {
281 _glapi_check_table(dispatch);
282 }
283 #endif
284
285 #if defined(THREADS)
286 if (DispatchOverride) {
287 _glthread_SetTSD(&RealDispatchTSD, (void *) dispatch);
288 if (ThreadSafe)
289 _glapi_RealDispatch = (struct _glapi_table*) __glapi_threadsafe_table;
290 else
291 _glapi_RealDispatch = dispatch;
292 }
293 else {
294 /* normal operation */
295 _glthread_SetTSD(&DispatchTSD, (void *) dispatch);
296 if (ThreadSafe)
297 _glapi_Dispatch = (struct _glapi_table *) __glapi_threadsafe_table;
298 else
299 _glapi_Dispatch = dispatch;
300 }
301 #else /*THREADS*/
302 if (DispatchOverride) {
303 _glapi_RealDispatch = dispatch;
304 }
305 else {
306 _glapi_Dispatch = dispatch;
307 }
308 #endif /*THREADS*/
309 }
310
311
312
313 /*
314 * Return pointer to current dispatch table for calling thread.
315 */
316 struct _glapi_table *
317 _glapi_get_dispatch(void)
318 {
319 #if defined(THREADS)
320 if (ThreadSafe) {
321 if (DispatchOverride) {
322 return (struct _glapi_table *) _glthread_GetTSD(&RealDispatchTSD);
323 }
324 else {
325 return (struct _glapi_table *) _glthread_GetTSD(&DispatchTSD);
326 }
327 }
328 else {
329 if (DispatchOverride) {
330 assert(_glapi_RealDispatch);
331 return _glapi_RealDispatch;
332 }
333 else {
334 assert(_glapi_Dispatch);
335 return _glapi_Dispatch;
336 }
337 }
338 #else
339 return _glapi_Dispatch;
340 #endif
341 }
342
343
344 /*
345 * Notes on dispatch overrride:
346 *
347 * Dispatch override allows an external agent to hook into the GL dispatch
348 * mechanism before execution goes into the core rendering library. For
349 * example, a trace mechanism would insert itself as an overrider, print
350 * logging info for each GL function, then dispatch to the real GL function.
351 *
352 * libGLS (GL Stream library) is another agent that might use override.
353 *
354 * We don't allow more than one layer of overriding at this time.
355 * In the future we may allow nested/layered override. In that case
356 * _glapi_begin_dispatch_override() will return an override layer,
357 * _glapi_end_dispatch_override(layer) will remove an override layer
358 * and _glapi_get_override_dispatch(layer) will return the dispatch
359 * table for a given override layer. layer = 0 will be the "real"
360 * dispatch table.
361 */
362
363 /*
364 * Return: dispatch override layer number.
365 */
366 int
367 _glapi_begin_dispatch_override(struct _glapi_table *override)
368 {
369 struct _glapi_table *real = _glapi_get_dispatch();
370
371 assert(!DispatchOverride); /* can't nest at this time */
372 DispatchOverride = GL_TRUE;
373
374 _glapi_set_dispatch(real);
375
376 #if defined(THREADS)
377 _glthread_SetTSD(&DispatchTSD, (void *) override);
378 if (ThreadSafe)
379 _glapi_Dispatch = (struct _glapi_table *) __glapi_threadsafe_table;
380 else
381 _glapi_Dispatch = override;
382 #else
383 _glapi_Dispatch = override;
384 #endif
385 return 1;
386 }
387
388
389 void
390 _glapi_end_dispatch_override(int layer)
391 {
392 struct _glapi_table *real = _glapi_get_dispatch();
393 (void) layer;
394 DispatchOverride = GL_FALSE;
395 _glapi_set_dispatch(real);
396 /* the rest of this isn't needed, just play it safe */
397 #if defined(THREADS)
398 _glthread_SetTSD(&RealDispatchTSD, NULL);
399 #endif
400 _glapi_RealDispatch = NULL;
401 }
402
403
404 struct _glapi_table *
405 _glapi_get_override_dispatch(int layer)
406 {
407 if (layer == 0) {
408 return _glapi_get_dispatch();
409 }
410 else {
411 if (DispatchOverride) {
412 #if defined(THREADS)
413 return (struct _glapi_table *) _glthread_GetTSD(&DispatchTSD);
414 #else
415 return _glapi_Dispatch;
416 #endif
417 }
418 else {
419 return NULL;
420 }
421 }
422 }
423
424
425
426 /*
427 * Return size of dispatch table struct as number of functions (or
428 * slots).
429 */
430 GLuint
431 _glapi_get_dispatch_table_size(void)
432 {
433 /* return sizeof(struct _glapi_table) / sizeof(void *);*/
434 GetSizeCalled = GL_TRUE;
435 return MaxDispatchOffset + 1;
436 }
437
438
439
440 /*
441 * Get API dispatcher version string.
442 */
443 const char *
444 _glapi_get_version(void)
445 {
446 return "20010116"; /* YYYYMMDD */
447 }
448
449
450 /*
451 * For each entry in static_functions[] which use this function
452 * we should implement a dispatch function in glapitemp.h and
453 * in glapinoop.c
454 */
455 static int NotImplemented(void)
456 {
457 return 0;
458 }
459
460
461 struct name_address_offset {
462 const char *Name;
463 GLvoid *Address;
464 GLuint Offset;
465 };
466
467
468 static struct name_address_offset static_functions[] = {
469 /* GL 1.1 */
470 { "glNewList", (GLvoid *) glNewList, _gloffset_NewList },
471 { "glEndList", (GLvoid *) glEndList, _gloffset_EndList },
472 { "glCallList", (GLvoid *) glCallList, _gloffset_CallList },
473 { "glCallLists", (GLvoid *) glCallLists, _gloffset_CallLists },
474 { "glDeleteLists", (GLvoid *) glDeleteLists, _gloffset_DeleteLists },
475 { "glGenLists", (GLvoid *) glGenLists, _gloffset_GenLists },
476 { "glListBase", (GLvoid *) glListBase, _gloffset_ListBase },
477 { "glBegin", (GLvoid *) glBegin, _gloffset_Begin },
478 { "glBitmap", (GLvoid *) glBitmap, _gloffset_Bitmap },
479 { "glColor3b", (GLvoid *) glColor3b, _gloffset_Color3b },
480 { "glColor3bv", (GLvoid *) glColor3bv, _gloffset_Color3bv },
481 { "glColor3d", (GLvoid *) glColor3d, _gloffset_Color3d },
482 { "glColor3dv", (GLvoid *) glColor3dv, _gloffset_Color3dv },
483 { "glColor3f", (GLvoid *) glColor3f, _gloffset_Color3f },
484 { "glColor3fv", (GLvoid *) glColor3fv, _gloffset_Color3fv },
485 { "glColor3i", (GLvoid *) glColor3i, _gloffset_Color3i },
486 { "glColor3iv", (GLvoid *) glColor3iv, _gloffset_Color3iv },
487 { "glColor3s", (GLvoid *) glColor3s, _gloffset_Color3s },
488 { "glColor3sv", (GLvoid *) glColor3sv, _gloffset_Color3sv },
489 { "glColor3ub", (GLvoid *) glColor3ub, _gloffset_Color3ub },
490 { "glColor3ubv", (GLvoid *) glColor3ubv, _gloffset_Color3ubv },
491 { "glColor3ui", (GLvoid *) glColor3ui, _gloffset_Color3ui },
492 { "glColor3uiv", (GLvoid *) glColor3uiv, _gloffset_Color3uiv },
493 { "glColor3us", (GLvoid *) glColor3us, _gloffset_Color3us },
494 { "glColor3usv", (GLvoid *) glColor3usv, _gloffset_Color3usv },
495 { "glColor4b", (GLvoid *) glColor4b, _gloffset_Color4b },
496 { "glColor4bv", (GLvoid *) glColor4bv, _gloffset_Color4bv },
497 { "glColor4d", (GLvoid *) glColor4d, _gloffset_Color4d },
498 { "glColor4dv", (GLvoid *) glColor4dv, _gloffset_Color4dv },
499 { "glColor4f", (GLvoid *) glColor4f, _gloffset_Color4f },
500 { "glColor4fv", (GLvoid *) glColor4fv, _gloffset_Color4fv },
501 { "glColor4i", (GLvoid *) glColor4i, _gloffset_Color4i },
502 { "glColor4iv", (GLvoid *) glColor4iv, _gloffset_Color4iv },
503 { "glColor4s", (GLvoid *) glColor4s, _gloffset_Color4s },
504 { "glColor4sv", (GLvoid *) glColor4sv, _gloffset_Color4sv },
505 { "glColor4ub", (GLvoid *) glColor4ub, _gloffset_Color4ub },
506 { "glColor4ubv", (GLvoid *) glColor4ubv, _gloffset_Color4ubv },
507 { "glColor4ui", (GLvoid *) glColor4ui, _gloffset_Color4ui },
508 { "glColor4uiv", (GLvoid *) glColor4uiv, _gloffset_Color4uiv },
509 { "glColor4us", (GLvoid *) glColor4us, _gloffset_Color4us },
510 { "glColor4usv", (GLvoid *) glColor4usv, _gloffset_Color4usv },
511 { "glEdgeFlag", (GLvoid *) glEdgeFlag, _gloffset_EdgeFlag },
512 { "glEdgeFlagv", (GLvoid *) glEdgeFlagv, _gloffset_EdgeFlagv },
513 { "glEnd", (GLvoid *) glEnd, _gloffset_End },
514 { "glIndexd", (GLvoid *) glIndexd, _gloffset_Indexd },
515 { "glIndexdv", (GLvoid *) glIndexdv, _gloffset_Indexdv },
516 { "glIndexf", (GLvoid *) glIndexf, _gloffset_Indexf },
517 { "glIndexfv", (GLvoid *) glIndexfv, _gloffset_Indexfv },
518 { "glIndexi", (GLvoid *) glIndexi, _gloffset_Indexi },
519 { "glIndexiv", (GLvoid *) glIndexiv, _gloffset_Indexiv },
520 { "glIndexs", (GLvoid *) glIndexs, _gloffset_Indexs },
521 { "glIndexsv", (GLvoid *) glIndexsv, _gloffset_Indexsv },
522 { "glNormal3b", (GLvoid *) glNormal3b, _gloffset_Normal3b },
523 { "glNormal3bv", (GLvoid *) glNormal3bv, _gloffset_Normal3bv },
524 { "glNormal3d", (GLvoid *) glNormal3d, _gloffset_Normal3d },
525 { "glNormal3dv", (GLvoid *) glNormal3dv, _gloffset_Normal3dv },
526 { "glNormal3f", (GLvoid *) glNormal3f, _gloffset_Normal3f },
527 { "glNormal3fv", (GLvoid *) glNormal3fv, _gloffset_Normal3fv },
528 { "glNormal3i", (GLvoid *) glNormal3i, _gloffset_Normal3i },
529 { "glNormal3iv", (GLvoid *) glNormal3iv, _gloffset_Normal3iv },
530 { "glNormal3s", (GLvoid *) glNormal3s, _gloffset_Normal3s },
531 { "glNormal3sv", (GLvoid *) glNormal3sv, _gloffset_Normal3sv },
532 { "glRasterPos2d", (GLvoid *) glRasterPos2d, _gloffset_RasterPos2d },
533 { "glRasterPos2dv", (GLvoid *) glRasterPos2dv, _gloffset_RasterPos2dv },
534 { "glRasterPos2f", (GLvoid *) glRasterPos2f, _gloffset_RasterPos2f },
535 { "glRasterPos2fv", (GLvoid *) glRasterPos2fv, _gloffset_RasterPos2fv },
536 { "glRasterPos2i", (GLvoid *) glRasterPos2i, _gloffset_RasterPos2i },
537 { "glRasterPos2iv", (GLvoid *) glRasterPos2iv, _gloffset_RasterPos2iv },
538 { "glRasterPos2s", (GLvoid *) glRasterPos2s, _gloffset_RasterPos2s },
539 { "glRasterPos2sv", (GLvoid *) glRasterPos2sv, _gloffset_RasterPos2sv },
540 { "glRasterPos3d", (GLvoid *) glRasterPos3d, _gloffset_RasterPos3d },
541 { "glRasterPos3dv", (GLvoid *) glRasterPos3dv, _gloffset_RasterPos3dv },
542 { "glRasterPos3f", (GLvoid *) glRasterPos3f, _gloffset_RasterPos3f },
543 { "glRasterPos3fv", (GLvoid *) glRasterPos3fv, _gloffset_RasterPos3fv },
544 { "glRasterPos3i", (GLvoid *) glRasterPos3i, _gloffset_RasterPos3i },
545 { "glRasterPos3iv", (GLvoid *) glRasterPos3iv, _gloffset_RasterPos3iv },
546 { "glRasterPos3s", (GLvoid *) glRasterPos3s, _gloffset_RasterPos3s },
547 { "glRasterPos3sv", (GLvoid *) glRasterPos3sv, _gloffset_RasterPos3sv },
548 { "glRasterPos4d", (GLvoid *) glRasterPos4d, _gloffset_RasterPos4d },
549 { "glRasterPos4dv", (GLvoid *) glRasterPos4dv, _gloffset_RasterPos4dv },
550 { "glRasterPos4f", (GLvoid *) glRasterPos4f, _gloffset_RasterPos4f },
551 { "glRasterPos4fv", (GLvoid *) glRasterPos4fv, _gloffset_RasterPos4fv },
552 { "glRasterPos4i", (GLvoid *) glRasterPos4i, _gloffset_RasterPos4i },
553 { "glRasterPos4iv", (GLvoid *) glRasterPos4iv, _gloffset_RasterPos4iv },
554 { "glRasterPos4s", (GLvoid *) glRasterPos4s, _gloffset_RasterPos4s },
555 { "glRasterPos4sv", (GLvoid *) glRasterPos4sv, _gloffset_RasterPos4sv },
556 { "glRectd", (GLvoid *) glRectd, _gloffset_Rectd },
557 { "glRectdv", (GLvoid *) glRectdv, _gloffset_Rectdv },
558 { "glRectf", (GLvoid *) glRectf, _gloffset_Rectf },
559 { "glRectfv", (GLvoid *) glRectfv, _gloffset_Rectfv },
560 { "glRecti", (GLvoid *) glRecti, _gloffset_Recti },
561 { "glRectiv", (GLvoid *) glRectiv, _gloffset_Rectiv },
562 { "glRects", (GLvoid *) glRects, _gloffset_Rects },
563 { "glRectsv", (GLvoid *) glRectsv, _gloffset_Rectsv },
564 { "glTexCoord1d", (GLvoid *) glTexCoord1d, _gloffset_TexCoord1d },
565 { "glTexCoord1dv", (GLvoid *) glTexCoord1dv, _gloffset_TexCoord1dv },
566 { "glTexCoord1f", (GLvoid *) glTexCoord1f, _gloffset_TexCoord1f },
567 { "glTexCoord1fv", (GLvoid *) glTexCoord1fv, _gloffset_TexCoord1fv },
568 { "glTexCoord1i", (GLvoid *) glTexCoord1i, _gloffset_TexCoord1i },
569 { "glTexCoord1iv", (GLvoid *) glTexCoord1iv, _gloffset_TexCoord1iv },
570 { "glTexCoord1s", (GLvoid *) glTexCoord1s, _gloffset_TexCoord1s },
571 { "glTexCoord1sv", (GLvoid *) glTexCoord1sv, _gloffset_TexCoord1sv },
572 { "glTexCoord2d", (GLvoid *) glTexCoord2d, _gloffset_TexCoord2d },
573 { "glTexCoord2dv", (GLvoid *) glTexCoord2dv, _gloffset_TexCoord2dv },
574 { "glTexCoord2f", (GLvoid *) glTexCoord2f, _gloffset_TexCoord2f },
575 { "glTexCoord2fv", (GLvoid *) glTexCoord2fv, _gloffset_TexCoord2fv },
576 { "glTexCoord2i", (GLvoid *) glTexCoord2i, _gloffset_TexCoord2i },
577 { "glTexCoord2iv", (GLvoid *) glTexCoord2iv, _gloffset_TexCoord2iv },
578 { "glTexCoord2s", (GLvoid *) glTexCoord2s, _gloffset_TexCoord2s },
579 { "glTexCoord2sv", (GLvoid *) glTexCoord2sv, _gloffset_TexCoord2sv },
580 { "glTexCoord3d", (GLvoid *) glTexCoord3d, _gloffset_TexCoord3d },
581 { "glTexCoord3dv", (GLvoid *) glTexCoord3dv, _gloffset_TexCoord3dv },
582 { "glTexCoord3f", (GLvoid *) glTexCoord3f, _gloffset_TexCoord3f },
583 { "glTexCoord3fv", (GLvoid *) glTexCoord3fv, _gloffset_TexCoord3fv },
584 { "glTexCoord3i", (GLvoid *) glTexCoord3i, _gloffset_TexCoord3i },
585 { "glTexCoord3iv", (GLvoid *) glTexCoord3iv, _gloffset_TexCoord3iv },
586 { "glTexCoord3s", (GLvoid *) glTexCoord3s, _gloffset_TexCoord3s },
587 { "glTexCoord3sv", (GLvoid *) glTexCoord3sv, _gloffset_TexCoord3sv },
588 { "glTexCoord4d", (GLvoid *) glTexCoord4d, _gloffset_TexCoord4d },
589 { "glTexCoord4dv", (GLvoid *) glTexCoord4dv, _gloffset_TexCoord4dv },
590 { "glTexCoord4f", (GLvoid *) glTexCoord4f, _gloffset_TexCoord4f },
591 { "glTexCoord4fv", (GLvoid *) glTexCoord4fv, _gloffset_TexCoord4fv },
592 { "glTexCoord4i", (GLvoid *) glTexCoord4i, _gloffset_TexCoord4i },
593 { "glTexCoord4iv", (GLvoid *) glTexCoord4iv, _gloffset_TexCoord4iv },
594 { "glTexCoord4s", (GLvoid *) glTexCoord4s, _gloffset_TexCoord4s },
595 { "glTexCoord4sv", (GLvoid *) glTexCoord4sv, _gloffset_TexCoord4sv },
596 { "glVertex2d", (GLvoid *) glVertex2d, _gloffset_Vertex2d },
597 { "glVertex2dv", (GLvoid *) glVertex2dv, _gloffset_Vertex2dv },
598 { "glVertex2f", (GLvoid *) glVertex2f, _gloffset_Vertex2f },
599 { "glVertex2fv", (GLvoid *) glVertex2fv, _gloffset_Vertex2fv },
600 { "glVertex2i", (GLvoid *) glVertex2i, _gloffset_Vertex2i },
601 { "glVertex2iv", (GLvoid *) glVertex2iv, _gloffset_Vertex2iv },
602 { "glVertex2s", (GLvoid *) glVertex2s, _gloffset_Vertex2s },
603 { "glVertex2sv", (GLvoid *) glVertex2sv, _gloffset_Vertex2sv },
604 { "glVertex3d", (GLvoid *) glVertex3d, _gloffset_Vertex3d },
605 { "glVertex3dv", (GLvoid *) glVertex3dv, _gloffset_Vertex3dv },
606 { "glVertex3f", (GLvoid *) glVertex3f, _gloffset_Vertex3f },
607 { "glVertex3fv", (GLvoid *) glVertex3fv, _gloffset_Vertex3fv },
608 { "glVertex3i", (GLvoid *) glVertex3i, _gloffset_Vertex3i },
609 { "glVertex3iv", (GLvoid *) glVertex3iv, _gloffset_Vertex3iv },
610 { "glVertex3s", (GLvoid *) glVertex3s, _gloffset_Vertex3s },
611 { "glVertex3sv", (GLvoid *) glVertex3sv, _gloffset_Vertex3sv },
612 { "glVertex4d", (GLvoid *) glVertex4d, _gloffset_Vertex4d },
613 { "glVertex4dv", (GLvoid *) glVertex4dv, _gloffset_Vertex4dv },
614 { "glVertex4f", (GLvoid *) glVertex4f, _gloffset_Vertex4f },
615 { "glVertex4fv", (GLvoid *) glVertex4fv, _gloffset_Vertex4fv },
616 { "glVertex4i", (GLvoid *) glVertex4i, _gloffset_Vertex4i },
617 { "glVertex4iv", (GLvoid *) glVertex4iv, _gloffset_Vertex4iv },
618 { "glVertex4s", (GLvoid *) glVertex4s, _gloffset_Vertex4s },
619 { "glVertex4sv", (GLvoid *) glVertex4sv, _gloffset_Vertex4sv },
620 { "glClipPlane", (GLvoid *) glClipPlane, _gloffset_ClipPlane },
621 { "glColorMaterial", (GLvoid *) glColorMaterial, _gloffset_ColorMaterial },
622 { "glCullFace", (GLvoid *) glCullFace, _gloffset_CullFace },
623 { "glFogf", (GLvoid *) glFogf, _gloffset_Fogf },
624 { "glFogfv", (GLvoid *) glFogfv, _gloffset_Fogfv },
625 { "glFogi", (GLvoid *) glFogi, _gloffset_Fogi },
626 { "glFogiv", (GLvoid *) glFogiv, _gloffset_Fogiv },
627 { "glFrontFace", (GLvoid *) glFrontFace, _gloffset_FrontFace },
628 { "glHint", (GLvoid *) glHint, _gloffset_Hint },
629 { "glLightf", (GLvoid *) glLightf, _gloffset_Lightf },
630 { "glLightfv", (GLvoid *) glLightfv, _gloffset_Lightfv },
631 { "glLighti", (GLvoid *) glLighti, _gloffset_Lighti },
632 { "glLightiv", (GLvoid *) glLightiv, _gloffset_Lightiv },
633 { "glLightModelf", (GLvoid *) glLightModelf, _gloffset_LightModelf },
634 { "glLightModelfv", (GLvoid *) glLightModelfv, _gloffset_LightModelfv },
635 { "glLightModeli", (GLvoid *) glLightModeli, _gloffset_LightModeli },
636 { "glLightModeliv", (GLvoid *) glLightModeliv, _gloffset_LightModeliv },
637 { "glLineStipple", (GLvoid *) glLineStipple, _gloffset_LineStipple },
638 { "glLineWidth", (GLvoid *) glLineWidth, _gloffset_LineWidth },
639 { "glMaterialf", (GLvoid *) glMaterialf, _gloffset_Materialf },
640 { "glMaterialfv", (GLvoid *) glMaterialfv, _gloffset_Materialfv },
641 { "glMateriali", (GLvoid *) glMateriali, _gloffset_Materiali },
642 { "glMaterialiv", (GLvoid *) glMaterialiv, _gloffset_Materialiv },
643 { "glPointSize", (GLvoid *) glPointSize, _gloffset_PointSize },
644 { "glPolygonMode", (GLvoid *) glPolygonMode, _gloffset_PolygonMode },
645 { "glPolygonStipple", (GLvoid *) glPolygonStipple, _gloffset_PolygonStipple },
646 { "glScissor", (GLvoid *) glScissor, _gloffset_Scissor },
647 { "glShadeModel", (GLvoid *) glShadeModel, _gloffset_ShadeModel },
648 { "glTexParameterf", (GLvoid *) glTexParameterf, _gloffset_TexParameterf },
649 { "glTexParameterfv", (GLvoid *) glTexParameterfv, _gloffset_TexParameterfv },
650 { "glTexParameteri", (GLvoid *) glTexParameteri, _gloffset_TexParameteri },
651 { "glTexParameteriv", (GLvoid *) glTexParameteriv, _gloffset_TexParameteriv },
652 { "glTexImage1D", (GLvoid *) glTexImage1D, _gloffset_TexImage1D },
653 { "glTexImage2D", (GLvoid *) glTexImage2D, _gloffset_TexImage2D },
654 { "glTexEnvf", (GLvoid *) glTexEnvf, _gloffset_TexEnvf },
655 { "glTexEnvfv", (GLvoid *) glTexEnvfv, _gloffset_TexEnvfv },
656 { "glTexEnvi", (GLvoid *) glTexEnvi, _gloffset_TexEnvi },
657 { "glTexEnviv", (GLvoid *) glTexEnviv, _gloffset_TexEnviv },
658 { "glTexGend", (GLvoid *) glTexGend, _gloffset_TexGend },
659 { "glTexGendv", (GLvoid *) glTexGendv, _gloffset_TexGendv },
660 { "glTexGenf", (GLvoid *) glTexGenf, _gloffset_TexGenf },
661 { "glTexGenfv", (GLvoid *) glTexGenfv, _gloffset_TexGenfv },
662 { "glTexGeni", (GLvoid *) glTexGeni, _gloffset_TexGeni },
663 { "glTexGeniv", (GLvoid *) glTexGeniv, _gloffset_TexGeniv },
664 { "glFeedbackBuffer", (GLvoid *) glFeedbackBuffer, _gloffset_FeedbackBuffer },
665 { "glSelectBuffer", (GLvoid *) glSelectBuffer, _gloffset_SelectBuffer },
666 { "glRenderMode", (GLvoid *) glRenderMode, _gloffset_RenderMode },
667 { "glInitNames", (GLvoid *) glInitNames, _gloffset_InitNames },
668 { "glLoadName", (GLvoid *) glLoadName, _gloffset_LoadName },
669 { "glPassThrough", (GLvoid *) glPassThrough, _gloffset_PassThrough },
670 { "glPopName", (GLvoid *) glPopName, _gloffset_PopName },
671 { "glPushName", (GLvoid *) glPushName, _gloffset_PushName },
672 { "glDrawBuffer", (GLvoid *) glDrawBuffer, _gloffset_DrawBuffer },
673 { "glClear", (GLvoid *) glClear, _gloffset_Clear },
674 { "glClearAccum", (GLvoid *) glClearAccum, _gloffset_ClearAccum },
675 { "glClearIndex", (GLvoid *) glClearIndex, _gloffset_ClearIndex },
676 { "glClearColor", (GLvoid *) glClearColor, _gloffset_ClearColor },
677 { "glClearStencil", (GLvoid *) glClearStencil, _gloffset_ClearStencil },
678 { "glClearDepth", (GLvoid *) glClearDepth, _gloffset_ClearDepth },
679 { "glStencilMask", (GLvoid *) glStencilMask, _gloffset_StencilMask },
680 { "glColorMask", (GLvoid *) glColorMask, _gloffset_ColorMask },
681 { "glDepthMask", (GLvoid *) glDepthMask, _gloffset_DepthMask },
682 { "glIndexMask", (GLvoid *) glIndexMask, _gloffset_IndexMask },
683 { "glAccum", (GLvoid *) glAccum, _gloffset_Accum },
684 { "glDisable", (GLvoid *) glDisable, _gloffset_Disable },
685 { "glEnable", (GLvoid *) glEnable, _gloffset_Enable },
686 { "glFinish", (GLvoid *) glFinish, _gloffset_Finish },
687 { "glFlush", (GLvoid *) glFlush, _gloffset_Flush },
688 { "glPopAttrib", (GLvoid *) glPopAttrib, _gloffset_PopAttrib },
689 { "glPushAttrib", (GLvoid *) glPushAttrib, _gloffset_PushAttrib },
690 { "glMap1d", (GLvoid *) glMap1d, _gloffset_Map1d },
691 { "glMap1f", (GLvoid *) glMap1f, _gloffset_Map1f },
692 { "glMap2d", (GLvoid *) glMap2d, _gloffset_Map2d },
693 { "glMap2f", (GLvoid *) glMap2f, _gloffset_Map2f },
694 { "glMapGrid1d", (GLvoid *) glMapGrid1d, _gloffset_MapGrid1d },
695 { "glMapGrid1f", (GLvoid *) glMapGrid1f, _gloffset_MapGrid1f },
696 { "glMapGrid2d", (GLvoid *) glMapGrid2d, _gloffset_MapGrid2d },
697 { "glMapGrid2f", (GLvoid *) glMapGrid2f, _gloffset_MapGrid2f },
698 { "glEvalCoord1d", (GLvoid *) glEvalCoord1d, _gloffset_EvalCoord1d },
699 { "glEvalCoord1dv", (GLvoid *) glEvalCoord1dv, _gloffset_EvalCoord1dv },
700 { "glEvalCoord1f", (GLvoid *) glEvalCoord1f, _gloffset_EvalCoord1f },
701 { "glEvalCoord1fv", (GLvoid *) glEvalCoord1fv, _gloffset_EvalCoord1fv },
702 { "glEvalCoord2d", (GLvoid *) glEvalCoord2d, _gloffset_EvalCoord2d },
703 { "glEvalCoord2dv", (GLvoid *) glEvalCoord2dv, _gloffset_EvalCoord2dv },
704 { "glEvalCoord2f", (GLvoid *) glEvalCoord2f, _gloffset_EvalCoord2f },
705 { "glEvalCoord2fv", (GLvoid *) glEvalCoord2fv, _gloffset_EvalCoord2fv },
706 { "glEvalMesh1", (GLvoid *) glEvalMesh1, _gloffset_EvalMesh1 },
707 { "glEvalPoint1", (GLvoid *) glEvalPoint1, _gloffset_EvalPoint1 },
708 { "glEvalMesh2", (GLvoid *) glEvalMesh2, _gloffset_EvalMesh2 },
709 { "glEvalPoint2", (GLvoid *) glEvalPoint2, _gloffset_EvalPoint2 },
710 { "glAlphaFunc", (GLvoid *) glAlphaFunc, _gloffset_AlphaFunc },
711 { "glBlendFunc", (GLvoid *) glBlendFunc, _gloffset_BlendFunc },
712 { "glLogicOp", (GLvoid *) glLogicOp, _gloffset_LogicOp },
713 { "glStencilFunc", (GLvoid *) glStencilFunc, _gloffset_StencilFunc },
714 { "glStencilOp", (GLvoid *) glStencilOp, _gloffset_StencilOp },
715 { "glDepthFunc", (GLvoid *) glDepthFunc, _gloffset_DepthFunc },
716 { "glPixelZoom", (GLvoid *) glPixelZoom, _gloffset_PixelZoom },
717 { "glPixelTransferf", (GLvoid *) glPixelTransferf, _gloffset_PixelTransferf },
718 { "glPixelTransferi", (GLvoid *) glPixelTransferi, _gloffset_PixelTransferi },
719 { "glPixelStoref", (GLvoid *) glPixelStoref, _gloffset_PixelStoref },
720 { "glPixelStorei", (GLvoid *) glPixelStorei, _gloffset_PixelStorei },
721 { "glPixelMapfv", (GLvoid *) glPixelMapfv, _gloffset_PixelMapfv },
722 { "glPixelMapuiv", (GLvoid *) glPixelMapuiv, _gloffset_PixelMapuiv },
723 { "glPixelMapusv", (GLvoid *) glPixelMapusv, _gloffset_PixelMapusv },
724 { "glReadBuffer", (GLvoid *) glReadBuffer, _gloffset_ReadBuffer },
725 { "glCopyPixels", (GLvoid *) glCopyPixels, _gloffset_CopyPixels },
726 { "glReadPixels", (GLvoid *) glReadPixels, _gloffset_ReadPixels },
727 { "glDrawPixels", (GLvoid *) glDrawPixels, _gloffset_DrawPixels },
728 { "glGetBooleanv", (GLvoid *) glGetBooleanv, _gloffset_GetBooleanv },
729 { "glGetClipPlane", (GLvoid *) glGetClipPlane, _gloffset_GetClipPlane },
730 { "glGetDoublev", (GLvoid *) glGetDoublev, _gloffset_GetDoublev },
731 { "glGetError", (GLvoid *) glGetError, _gloffset_GetError },
732 { "glGetFloatv", (GLvoid *) glGetFloatv, _gloffset_GetFloatv },
733 { "glGetIntegerv", (GLvoid *) glGetIntegerv, _gloffset_GetIntegerv },
734 { "glGetLightfv", (GLvoid *) glGetLightfv, _gloffset_GetLightfv },
735 { "glGetLightiv", (GLvoid *) glGetLightiv, _gloffset_GetLightiv },
736 { "glGetMapdv", (GLvoid *) glGetMapdv, _gloffset_GetMapdv },
737 { "glGetMapfv", (GLvoid *) glGetMapfv, _gloffset_GetMapfv },
738 { "glGetMapiv", (GLvoid *) glGetMapiv, _gloffset_GetMapiv },
739 { "glGetMaterialfv", (GLvoid *) glGetMaterialfv, _gloffset_GetMaterialfv },
740 { "glGetMaterialiv", (GLvoid *) glGetMaterialiv, _gloffset_GetMaterialiv },
741 { "glGetPixelMapfv", (GLvoid *) glGetPixelMapfv, _gloffset_GetPixelMapfv },
742 { "glGetPixelMapuiv", (GLvoid *) glGetPixelMapuiv, _gloffset_GetPixelMapuiv },
743 { "glGetPixelMapusv", (GLvoid *) glGetPixelMapusv, _gloffset_GetPixelMapusv },
744 { "glGetPolygonStipple", (GLvoid *) glGetPolygonStipple, _gloffset_GetPolygonStipple },
745 { "glGetString", (GLvoid *) glGetString, _gloffset_GetString },
746 { "glGetTexEnvfv", (GLvoid *) glGetTexEnvfv, _gloffset_GetTexEnvfv },
747 { "glGetTexEnviv", (GLvoid *) glGetTexEnviv, _gloffset_GetTexEnviv },
748 { "glGetTexGendv", (GLvoid *) glGetTexGendv, _gloffset_GetTexGendv },
749 { "glGetTexGenfv", (GLvoid *) glGetTexGenfv, _gloffset_GetTexGenfv },
750 { "glGetTexGeniv", (GLvoid *) glGetTexGeniv, _gloffset_GetTexGeniv },
751 { "glGetTexImage", (GLvoid *) glGetTexImage, _gloffset_GetTexImage },
752 { "glGetTexParameterfv", (GLvoid *) glGetTexParameterfv, _gloffset_GetTexParameterfv },
753 { "glGetTexParameteriv", (GLvoid *) glGetTexParameteriv, _gloffset_GetTexParameteriv },
754 { "glGetTexLevelParameterfv", (GLvoid *) glGetTexLevelParameterfv, _gloffset_GetTexLevelParameterfv },
755 { "glGetTexLevelParameteriv", (GLvoid *) glGetTexLevelParameteriv, _gloffset_GetTexLevelParameteriv },
756 { "glIsEnabled", (GLvoid *) glIsEnabled, _gloffset_IsEnabled },
757 { "glIsList", (GLvoid *) glIsList, _gloffset_IsList },
758 { "glDepthRange", (GLvoid *) glDepthRange, _gloffset_DepthRange },
759 { "glFrustum", (GLvoid *) glFrustum, _gloffset_Frustum },
760 { "glLoadIdentity", (GLvoid *) glLoadIdentity, _gloffset_LoadIdentity },
761 { "glLoadMatrixf", (GLvoid *) glLoadMatrixf, _gloffset_LoadMatrixf },
762 { "glLoadMatrixd", (GLvoid *) glLoadMatrixd, _gloffset_LoadMatrixd },
763 { "glMatrixMode", (GLvoid *) glMatrixMode, _gloffset_MatrixMode },
764 { "glMultMatrixf", (GLvoid *) glMultMatrixf, _gloffset_MultMatrixf },
765 { "glMultMatrixd", (GLvoid *) glMultMatrixd, _gloffset_MultMatrixd },
766 { "glOrtho", (GLvoid *) glOrtho, _gloffset_Ortho },
767 { "glPopMatrix", (GLvoid *) glPopMatrix, _gloffset_PopMatrix },
768 { "glPushMatrix", (GLvoid *) glPushMatrix, _gloffset_PushMatrix },
769 { "glRotated", (GLvoid *) glRotated, _gloffset_Rotated },
770 { "glRotatef", (GLvoid *) glRotatef, _gloffset_Rotatef },
771 { "glScaled", (GLvoid *) glScaled, _gloffset_Scaled },
772 { "glScalef", (GLvoid *) glScalef, _gloffset_Scalef },
773 { "glTranslated", (GLvoid *) glTranslated, _gloffset_Translated },
774 { "glTranslatef", (GLvoid *) glTranslatef, _gloffset_Translatef },
775 { "glViewport", (GLvoid *) glViewport, _gloffset_Viewport },
776 /* 1.1 */
777 { "glArrayElement", (GLvoid *) glArrayElement, _gloffset_ArrayElement },
778 { "glColorPointer", (GLvoid *) glColorPointer, _gloffset_ColorPointer },
779 { "glDisableClientState", (GLvoid *) glDisableClientState, _gloffset_DisableClientState },
780 { "glDrawArrays", (GLvoid *) glDrawArrays, _gloffset_DrawArrays },
781 { "glDrawElements", (GLvoid *) glDrawElements, _gloffset_DrawElements },
782 { "glEdgeFlagPointer", (GLvoid *) glEdgeFlagPointer, _gloffset_EdgeFlagPointer },
783 { "glEnableClientState", (GLvoid *) glEnableClientState, _gloffset_EnableClientState },
784 { "glGetPointerv", (GLvoid *) glGetPointerv, _gloffset_GetPointerv },
785 { "glIndexPointer", (GLvoid *) glIndexPointer, _gloffset_IndexPointer },
786 { "glInterleavedArrays", (GLvoid *) glInterleavedArrays, _gloffset_InterleavedArrays },
787 { "glNormalPointer", (GLvoid *) glNormalPointer, _gloffset_NormalPointer },
788 { "glTexCoordPointer", (GLvoid *) glTexCoordPointer, _gloffset_TexCoordPointer },
789 { "glVertexPointer", (GLvoid *) glVertexPointer, _gloffset_VertexPointer },
790 { "glPolygonOffset", (GLvoid *) glPolygonOffset, _gloffset_PolygonOffset },
791 { "glCopyTexImage1D", (GLvoid *) glCopyTexImage1D, _gloffset_CopyTexImage1D },
792 { "glCopyTexImage2D", (GLvoid *) glCopyTexImage2D, _gloffset_CopyTexImage2D },
793 { "glCopyTexSubImage1D", (GLvoid *) glCopyTexSubImage1D, _gloffset_CopyTexSubImage1D },
794 { "glCopyTexSubImage2D", (GLvoid *) glCopyTexSubImage2D, _gloffset_CopyTexSubImage2D },
795 { "glTexSubImage1D", (GLvoid *) glTexSubImage1D, _gloffset_TexSubImage1D },
796 { "glTexSubImage2D", (GLvoid *) glTexSubImage2D, _gloffset_TexSubImage2D },
797 { "glAreTexturesResident", (GLvoid *) glAreTexturesResident, _gloffset_AreTexturesResident },
798 { "glBindTexture", (GLvoid *) glBindTexture, _gloffset_BindTexture },
799 { "glDeleteTextures", (GLvoid *) glDeleteTextures, _gloffset_DeleteTextures },
800 { "glGenTextures", (GLvoid *) glGenTextures, _gloffset_GenTextures },
801 { "glIsTexture", (GLvoid *) glIsTexture, _gloffset_IsTexture },
802 { "glPrioritizeTextures", (GLvoid *) glPrioritizeTextures, _gloffset_PrioritizeTextures },
803 { "glIndexub", (GLvoid *) glIndexub, _gloffset_Indexub },
804 { "glIndexubv", (GLvoid *) glIndexubv, _gloffset_Indexubv },
805 { "glPopClientAttrib", (GLvoid *) glPopClientAttrib, _gloffset_PopClientAttrib },
806 { "glPushClientAttrib", (GLvoid *) glPushClientAttrib, _gloffset_PushClientAttrib },
807 /* 1.2 */
808 #ifdef GL_VERSION_1_2
809 #define NAME(X) (GLvoid *) X
810 #else
811 #define NAME(X) NotImplemented
812 #endif
813 { "glBlendColor", (GLvoid *) NAME(glBlendColor), _gloffset_BlendColor },
814 { "glBlendEquation", (GLvoid *) NAME(glBlendEquation), _gloffset_BlendEquation },
815 { "glDrawRangeElements", (GLvoid *) NAME(glDrawRangeElements), _gloffset_DrawRangeElements },
816 { "glColorTable", (GLvoid *) NAME(glColorTable), _gloffset_ColorTable },
817 { "glColorTableParameterfv", (GLvoid *) NAME(glColorTableParameterfv), _gloffset_ColorTableParameterfv },
818 { "glColorTableParameteriv", (GLvoid *) NAME(glColorTableParameteriv), _gloffset_ColorTableParameteriv },
819 { "glCopyColorTable", (GLvoid *) NAME(glCopyColorTable), _gloffset_CopyColorTable },
820 { "glGetColorTable", (GLvoid *) NAME(glGetColorTable), _gloffset_GetColorTable },
821 { "glGetColorTableParameterfv", (GLvoid *) NAME(glGetColorTableParameterfv), _gloffset_GetColorTableParameterfv },
822 { "glGetColorTableParameteriv", (GLvoid *) NAME(glGetColorTableParameteriv), _gloffset_GetColorTableParameteriv },
823 { "glColorSubTable", (GLvoid *) NAME(glColorSubTable), _gloffset_ColorSubTable },
824 { "glCopyColorSubTable", (GLvoid *) NAME(glCopyColorSubTable), _gloffset_CopyColorSubTable },
825 { "glConvolutionFilter1D", (GLvoid *) NAME(glConvolutionFilter1D), _gloffset_ConvolutionFilter1D },
826 { "glConvolutionFilter2D", (GLvoid *) NAME(glConvolutionFilter2D), _gloffset_ConvolutionFilter2D },
827 { "glConvolutionParameterf", (GLvoid *) NAME(glConvolutionParameterf), _gloffset_ConvolutionParameterf },
828 { "glConvolutionParameterfv", (GLvoid *) NAME(glConvolutionParameterfv), _gloffset_ConvolutionParameterfv },
829 { "glConvolutionParameteri", (GLvoid *) NAME(glConvolutionParameteri), _gloffset_ConvolutionParameteri },
830 { "glConvolutionParameteriv", (GLvoid *) NAME(glConvolutionParameteriv), _gloffset_ConvolutionParameteriv },
831 { "glCopyConvolutionFilter1D", (GLvoid *) NAME(glCopyConvolutionFilter1D), _gloffset_CopyConvolutionFilter1D },
832 { "glCopyConvolutionFilter2D", (GLvoid *) NAME(glCopyConvolutionFilter2D), _gloffset_CopyConvolutionFilter2D },
833 { "glGetConvolutionFilter", (GLvoid *) NAME(glGetConvolutionFilter), _gloffset_GetConvolutionFilter },
834 { "glGetConvolutionParameterfv", (GLvoid *) NAME(glGetConvolutionParameterfv), _gloffset_GetConvolutionParameterfv },
835 { "glGetConvolutionParameteriv", (GLvoid *) NAME(glGetConvolutionParameteriv), _gloffset_GetConvolutionParameteriv },
836 { "glGetSeparableFilter", (GLvoid *) NAME(glGetSeparableFilter), _gloffset_GetSeparableFilter },
837 { "glSeparableFilter2D", (GLvoid *) NAME(glSeparableFilter2D), _gloffset_SeparableFilter2D },
838 { "glGetHistogram", (GLvoid *) NAME(glGetHistogram), _gloffset_GetHistogram },
839 { "glGetHistogramParameterfv", (GLvoid *) NAME(glGetHistogramParameterfv), _gloffset_GetHistogramParameterfv },
840 { "glGetHistogramParameteriv", (GLvoid *) NAME(glGetHistogramParameteriv), _gloffset_GetHistogramParameteriv },
841 { "glGetMinmax", (GLvoid *) NAME(glGetMinmax), _gloffset_GetMinmax },
842 { "glGetMinmaxParameterfv", (GLvoid *) NAME(glGetMinmaxParameterfv), _gloffset_GetMinmaxParameterfv },
843 { "glGetMinmaxParameteriv", (GLvoid *) NAME(glGetMinmaxParameteriv), _gloffset_GetMinmaxParameteriv },
844 { "glHistogram", (GLvoid *) NAME(glHistogram), _gloffset_Histogram },
845 { "glMinmax", (GLvoid *) NAME(glMinmax), _gloffset_Minmax },
846 { "glResetHistogram", (GLvoid *) NAME(glResetHistogram), _gloffset_ResetHistogram },
847 { "glResetMinmax", (GLvoid *) NAME(glResetMinmax), _gloffset_ResetMinmax },
848 { "glTexImage3D", (GLvoid *) NAME(glTexImage3D), _gloffset_TexImage3D },
849 { "glTexSubImage3D", (GLvoid *) NAME(glTexSubImage3D), _gloffset_TexSubImage3D },
850 { "glCopyTexSubImage3D", (GLvoid *) NAME(glCopyTexSubImage3D), _gloffset_CopyTexSubImage3D },
851 #undef NAME
852
853 /* 1.3 */
854 #ifdef GL_VERSION_1_3
855 #define NAME(X) (GLvoid *) X
856 #else
857 #define NAME(X) NotImplemented
858 #endif
859 { "glActiveTexture", (GLvoid *) NAME(glActiveTexture), _gloffset_ActiveTextureARB },
860 { "glClientActiveTexture", (GLvoid *) NAME(glClientActiveTexture), _gloffset_ClientActiveTextureARB },
861 { "glCompressedTexImage1D", (GLvoid *) NAME(glCompressedTexImage1D), _gloffset_CompressedTexImage1DARB },
862 { "glCompressedTexImage2D", (GLvoid *) NAME(glCompressedTexImage2D), _gloffset_CompressedTexImage2DARB },
863 { "glCompressedTexImage3D", (GLvoid *) NAME(glCompressedTexImage3D), _gloffset_CompressedTexImage3DARB },
864 { "glCompressedTexSubImage1D", (GLvoid *) NAME(glCompressedTexSubImage1D), _gloffset_CompressedTexSubImage1DARB },
865 { "glCompressedTexSubImage2D", (GLvoid *) NAME(glCompressedTexSubImage2D), _gloffset_CompressedTexSubImage2DARB },
866 { "glCompressedTexSubImage3D", (GLvoid *) NAME(glCompressedTexSubImage3D), _gloffset_CompressedTexSubImage3DARB },
867 { "glGetCompressedTexImage", (GLvoid *) NAME(glGetCompressedTexImage), _gloffset_GetCompressedTexImageARB },
868 { "glMultiTexCoord1d", (GLvoid *) NAME(glMultiTexCoord1d), _gloffset_MultiTexCoord1dARB },
869 { "glMultiTexCoord1dv", (GLvoid *) NAME(glMultiTexCoord1dv), _gloffset_MultiTexCoord1dvARB },
870 { "glMultiTexCoord1f", (GLvoid *) NAME(glMultiTexCoord1f), _gloffset_MultiTexCoord1fARB },
871 { "glMultiTexCoord1fv", (GLvoid *) NAME(glMultiTexCoord1fv), _gloffset_MultiTexCoord1fvARB },
872 { "glMultiTexCoord1i", (GLvoid *) NAME(glMultiTexCoord1i), _gloffset_MultiTexCoord1iARB },
873 { "glMultiTexCoord1iv", (GLvoid *) NAME(glMultiTexCoord1iv), _gloffset_MultiTexCoord1ivARB },
874 { "glMultiTexCoord1s", (GLvoid *) NAME(glMultiTexCoord1s), _gloffset_MultiTexCoord1sARB },
875 { "glMultiTexCoord1sv", (GLvoid *) NAME(glMultiTexCoord1sv), _gloffset_MultiTexCoord1svARB },
876 { "glMultiTexCoord2d", (GLvoid *) NAME(glMultiTexCoord2d), _gloffset_MultiTexCoord2dARB },
877 { "glMultiTexCoord2dv", (GLvoid *) NAME(glMultiTexCoord2dv), _gloffset_MultiTexCoord2dvARB },
878 { "glMultiTexCoord2f", (GLvoid *) NAME(glMultiTexCoord2f), _gloffset_MultiTexCoord2fARB },
879 { "glMultiTexCoord2fv", (GLvoid *) NAME(glMultiTexCoord2fv), _gloffset_MultiTexCoord2fvARB },
880 { "glMultiTexCoord2i", (GLvoid *) NAME(glMultiTexCoord2i), _gloffset_MultiTexCoord2iARB },
881 { "glMultiTexCoord2iv", (GLvoid *) NAME(glMultiTexCoord2iv), _gloffset_MultiTexCoord2ivARB },
882 { "glMultiTexCoord2s", (GLvoid *) NAME(glMultiTexCoord2s), _gloffset_MultiTexCoord2sARB },
883 { "glMultiTexCoord2sv", (GLvoid *) NAME(glMultiTexCoord2sv), _gloffset_MultiTexCoord2svARB },
884 { "glMultiTexCoord3d", (GLvoid *) NAME(glMultiTexCoord3d), _gloffset_MultiTexCoord3dARB },
885 { "glMultiTexCoord3dv", (GLvoid *) NAME(glMultiTexCoord3dv), _gloffset_MultiTexCoord3dvARB },
886 { "glMultiTexCoord3f", (GLvoid *) NAME(glMultiTexCoord3f), _gloffset_MultiTexCoord3fARB },
887 { "glMultiTexCoord3fv", (GLvoid *) NAME(glMultiTexCoord3fv), _gloffset_MultiTexCoord3fvARB },
888 { "glMultiTexCoord3i", (GLvoid *) NAME(glMultiTexCoord3i), _gloffset_MultiTexCoord3iARB },
889 { "glMultiTexCoord3iv", (GLvoid *) NAME(glMultiTexCoord3iv), _gloffset_MultiTexCoord3ivARB },
890 { "glMultiTexCoord3s", (GLvoid *) NAME(glMultiTexCoord3s), _gloffset_MultiTexCoord3sARB },
891 { "glMultiTexCoord3sv", (GLvoid *) NAME(glMultiTexCoord3sv), _gloffset_MultiTexCoord3svARB },
892 { "glMultiTexCoord4d", (GLvoid *) NAME(glMultiTexCoord4d), _gloffset_MultiTexCoord4dARB },
893 { "glMultiTexCoord4dv", (GLvoid *) NAME(glMultiTexCoord4dv), _gloffset_MultiTexCoord4dvARB },
894 { "glMultiTexCoord4f", (GLvoid *) NAME(glMultiTexCoord4f), _gloffset_MultiTexCoord4fARB },
895 { "glMultiTexCoord4fv", (GLvoid *) NAME(glMultiTexCoord4fv), _gloffset_MultiTexCoord4fvARB },
896 { "glMultiTexCoord4i", (GLvoid *) NAME(glMultiTexCoord4i), _gloffset_MultiTexCoord4iARB },
897 { "glMultiTexCoord4iv", (GLvoid *) NAME(glMultiTexCoord4iv), _gloffset_MultiTexCoord4ivARB },
898 { "glMultiTexCoord4s", (GLvoid *) NAME(glMultiTexCoord4s), _gloffset_MultiTexCoord4sARB },
899 { "glMultiTexCoord4sv", (GLvoid *) NAME(glMultiTexCoord4sv), _gloffset_MultiTexCoord4svARB },
900 { "glLoadTransposeMatrixd", (GLvoid *) NAME(glLoadTransposeMatrixd), _gloffset_LoadTransposeMatrixdARB },
901 { "glLoadTransposeMatrixf", (GLvoid *) NAME(glLoadTransposeMatrixf), _gloffset_LoadTransposeMatrixfARB },
902 { "glMultTransposeMatrixd", (GLvoid *) NAME(glMultTransposeMatrixd), _gloffset_MultTransposeMatrixdARB },
903 { "glMultTransposeMatrixf", (GLvoid *) NAME(glMultTransposeMatrixf), _gloffset_MultTransposeMatrixfARB },
904 { "glSampleCoverage", (GLvoid *) NAME(glSampleCoverage), _gloffset_SampleCoverageARB },
905 { "glSamplePass", (GLvoid *) NAME(glSamplePass), _gloffset_SamplePassARB },
906 #undef NAME
907
908 /* ARB 1. GL_ARB_multitexture */
909 #ifdef GL_ARB_multitexture
910 #define NAME(X) (GLvoid *) X
911 #else
912 #define NAME(X) NotImplemented
913 #endif
914 { "glActiveTextureARB", (GLvoid *) NAME(glActiveTextureARB), _gloffset_ActiveTextureARB },
915 { "glClientActiveTextureARB", (GLvoid *) NAME(glClientActiveTextureARB), _gloffset_ClientActiveTextureARB },
916 { "glMultiTexCoord1dARB", (GLvoid *) NAME(glMultiTexCoord1dARB), _gloffset_MultiTexCoord1dARB },
917 { "glMultiTexCoord1dvARB", (GLvoid *) NAME(glMultiTexCoord1dvARB), _gloffset_MultiTexCoord1dvARB },
918 { "glMultiTexCoord1fARB", (GLvoid *) NAME(glMultiTexCoord1fARB), _gloffset_MultiTexCoord1fARB },
919 { "glMultiTexCoord1fvARB", (GLvoid *) NAME(glMultiTexCoord1fvARB), _gloffset_MultiTexCoord1fvARB },
920 { "glMultiTexCoord1iARB", (GLvoid *) NAME(glMultiTexCoord1iARB), _gloffset_MultiTexCoord1iARB },
921 { "glMultiTexCoord1ivARB", (GLvoid *) NAME(glMultiTexCoord1ivARB), _gloffset_MultiTexCoord1ivARB },
922 { "glMultiTexCoord1sARB", (GLvoid *) NAME(glMultiTexCoord1sARB), _gloffset_MultiTexCoord1sARB },
923 { "glMultiTexCoord1svARB", (GLvoid *) NAME(glMultiTexCoord1svARB), _gloffset_MultiTexCoord1svARB },
924 { "glMultiTexCoord2dARB", (GLvoid *) NAME(glMultiTexCoord2dARB), _gloffset_MultiTexCoord2dARB },
925 { "glMultiTexCoord2dvARB", (GLvoid *) NAME(glMultiTexCoord2dvARB), _gloffset_MultiTexCoord2dvARB },
926 { "glMultiTexCoord2fARB", (GLvoid *) NAME(glMultiTexCoord2fARB), _gloffset_MultiTexCoord2fARB },
927 { "glMultiTexCoord2fvARB", (GLvoid *) NAME(glMultiTexCoord2fvARB), _gloffset_MultiTexCoord2fvARB },
928 { "glMultiTexCoord2iARB", (GLvoid *) NAME(glMultiTexCoord2iARB), _gloffset_MultiTexCoord2iARB },
929 { "glMultiTexCoord2ivARB", (GLvoid *) NAME(glMultiTexCoord2ivARB), _gloffset_MultiTexCoord2ivARB },
930 { "glMultiTexCoord2sARB", (GLvoid *) NAME(glMultiTexCoord2sARB), _gloffset_MultiTexCoord2sARB },
931 { "glMultiTexCoord2svARB", (GLvoid *) NAME(glMultiTexCoord2svARB), _gloffset_MultiTexCoord2svARB },
932 { "glMultiTexCoord3dARB", (GLvoid *) NAME(glMultiTexCoord3dARB), _gloffset_MultiTexCoord3dARB },
933 { "glMultiTexCoord3dvARB", (GLvoid *) NAME(glMultiTexCoord3dvARB), _gloffset_MultiTexCoord3dvARB },
934 { "glMultiTexCoord3fARB", (GLvoid *) NAME(glMultiTexCoord3fARB), _gloffset_MultiTexCoord3fARB },
935 { "glMultiTexCoord3fvARB", (GLvoid *) NAME(glMultiTexCoord3fvARB), _gloffset_MultiTexCoord3fvARB },
936 { "glMultiTexCoord3iARB", (GLvoid *) NAME(glMultiTexCoord3iARB), _gloffset_MultiTexCoord3iARB },
937 { "glMultiTexCoord3ivARB", (GLvoid *) NAME(glMultiTexCoord3ivARB), _gloffset_MultiTexCoord3ivARB },
938 { "glMultiTexCoord3sARB", (GLvoid *) NAME(glMultiTexCoord3sARB), _gloffset_MultiTexCoord3sARB },
939 { "glMultiTexCoord3svARB", (GLvoid *) NAME(glMultiTexCoord3svARB), _gloffset_MultiTexCoord3svARB },
940 { "glMultiTexCoord4dARB", (GLvoid *) NAME(glMultiTexCoord4dARB), _gloffset_MultiTexCoord4dARB },
941 { "glMultiTexCoord4dvARB", (GLvoid *) NAME(glMultiTexCoord4dvARB), _gloffset_MultiTexCoord4dvARB },
942 { "glMultiTexCoord4fARB", (GLvoid *) NAME(glMultiTexCoord4fARB), _gloffset_MultiTexCoord4fARB },
943 { "glMultiTexCoord4fvARB", (GLvoid *) NAME(glMultiTexCoord4fvARB), _gloffset_MultiTexCoord4fvARB },
944 { "glMultiTexCoord4iARB", (GLvoid *) NAME(glMultiTexCoord4iARB), _gloffset_MultiTexCoord4iARB },
945 { "glMultiTexCoord4ivARB", (GLvoid *) NAME(glMultiTexCoord4ivARB), _gloffset_MultiTexCoord4ivARB },
946 { "glMultiTexCoord4sARB", (GLvoid *) NAME(glMultiTexCoord4sARB), _gloffset_MultiTexCoord4sARB },
947 { "glMultiTexCoord4svARB", (GLvoid *) NAME(glMultiTexCoord4svARB), _gloffset_MultiTexCoord4svARB },
948 #undef NAME
949
950 /* ARB 3. GL_ARB_transpose_matrix */
951 #ifdef GL_ARB_transpose_matrix
952 #define NAME(X) (GLvoid *) X
953 #else
954 #define NAME(X) NotImplemented
955 #endif
956 { "glLoadTransposeMatrixdARB", (GLvoid *) NAME(glLoadTransposeMatrixdARB), _gloffset_LoadTransposeMatrixdARB },
957 { "glLoadTransposeMatrixfARB", (GLvoid *) NAME(glLoadTransposeMatrixfARB), _gloffset_LoadTransposeMatrixfARB },
958 { "glMultTransposeMatrixdARB", (GLvoid *) NAME(glMultTransposeMatrixdARB), _gloffset_MultTransposeMatrixdARB },
959 { "glMultTransposeMatrixfARB", (GLvoid *) NAME(glMultTransposeMatrixfARB), _gloffset_MultTransposeMatrixfARB },
960 #undef NAME
961
962 /* ARB 5. GL_ARB_multisample */
963 #ifdef GL_ARB_multisample
964 #define NAME(X) (GLvoid *) X
965 #else
966 #define NAME(X) (GLvoid *) NotImplemented
967 #endif
968 { "glSampleCoverageARB", NAME(glSampleCoverageARB), _gloffset_SampleCoverageARB },
969 #undef NAME
970
971 /* ARB 12. GL_ARB_texture_compression */
972 #if 000
973 #if defined(GL_ARB_texture_compression) && defined(_gloffset_CompressedTexImage3DARB)
974 #define NAME(X) (GLvoid *) X
975 #else
976 #define NAME(X) (GLvoid *) NotImplemented
977 #endif
978 { "glCompressedTexImage3DARB", NAME(glCompressedTexImage3DARB), _gloffset_CompressedTexImage3DARB },
979 { "glCompressedTexImage2DARB", NAME(glCompressedTexImage2DARB), _gloffset_CompressedTexImage2DARB },
980 { "glCompressedTexImage1DARB", NAME(glCompressedTexImage1DARB), _gloffset_CompressedTexImage1DARB },
981 { "glCompressedTexSubImage3DARB", NAME(glCompressedTexSubImage3DARB), _gloffset_CompressedTexSubImage3DARB },
982 { "glCompressedTexSubImage2DARB", NAME(glCompressedTexSubImage2DARB), _gloffset_CompressedTexSubImage2DARB },
983 { "glCompressedTexSubImage1DARB", NAME(glCompressedTexSubImage1DARB), _gloffset_CompressedTexSubImage1DARB },
984 { "glGetCompressedTexImageARB", NAME(glGetCompressedTexImageARB), _gloffset_GetCompressedTexImageARB },
985 #undef NAME
986 #endif
987
988 /* 2. GL_EXT_blend_color */
989 #ifdef GL_EXT_blend_color
990 #define NAME(X) (GLvoid *) X
991 #else
992 #define NAME(X) (GLvoid *) NotImplemented
993 #endif
994 { "glBlendColorEXT", NAME(glBlendColorEXT), _gloffset_BlendColor },
995 #undef NAME
996
997 /* 3. GL_EXT_polygon_offset */
998 #ifdef GL_EXT_polygon_offset
999 #define NAME(X) (GLvoid *) X
1000 #else
1001 #define NAME(X) (GLvoid *) NotImplemented
1002 #endif
1003 { "glPolygonOffsetEXT", NAME(glPolygonOffsetEXT), _gloffset_PolygonOffsetEXT },
1004 #undef NAME
1005
1006 /* 6. GL_EXT_texture3D */
1007 #ifdef GL_EXT_texture3D
1008 #define NAME(X) (GLvoid *) X
1009 #else
1010 #define NAME(X) (GLvoid *) NotImplemented
1011 #endif
1012 { "glCopyTexSubImage3DEXT", NAME(glCopyTexSubImage3DEXT), _gloffset_CopyTexSubImage3D },
1013 { "glTexImage3DEXT", NAME(glTexImage3DEXT), _gloffset_TexImage3D },
1014 { "glTexSubImage3DEXT", NAME(glTexSubImage3DEXT), _gloffset_TexSubImage3D },
1015 #undef NAME
1016
1017 /* 7. GL_SGI_texture_filter4 */
1018 #ifdef GL_SGI_texture_filter4
1019 #define NAME(X) (GLvoid *) X
1020 #else
1021 #define NAME(X) (GLvoid *) NotImplemented
1022 #endif
1023 { "glGetTexFilterFuncSGIS", NAME(glGetTexFilterFuncSGIS), _gloffset_GetTexFilterFuncSGIS },
1024 { "glTexFilterFuncSGIS", NAME(glTexFilterFuncSGIS), _gloffset_TexFilterFuncSGIS },
1025 #undef NAME
1026
1027 /* 9. GL_EXT_subtexture */
1028 #ifdef GL_EXT_subtexture
1029 #define NAME(X) (GLvoid *) X
1030 #else
1031 #define NAME(X) (GLvoid *) NotImplemented
1032 #endif
1033 { "glTexSubImage1DEXT", NAME(glTexSubImage1DEXT), _gloffset_TexSubImage1D },
1034 { "glTexSubImage2DEXT", NAME(glTexSubImage2DEXT), _gloffset_TexSubImage2D },
1035 #undef NAME
1036
1037 /* 10. GL_EXT_copy_texture */
1038 #ifdef GL_EXT_copy_texture
1039 #define NAME(X) (GLvoid *) X
1040 #else
1041 #define NAME(X) (GLvoid *) NotImplemented
1042 #endif
1043 { "glCopyTexImage1DEXT", NAME(glCopyTexImage1DEXT), _gloffset_CopyTexImage1D },
1044 { "glCopyTexImage2DEXT", NAME(glCopyTexImage2DEXT), _gloffset_CopyTexImage2D },
1045 { "glCopyTexSubImage1DEXT", NAME(glCopyTexSubImage1DEXT), _gloffset_CopyTexSubImage1D },
1046 { "glCopyTexSubImage2DEXT", NAME(glCopyTexSubImage2DEXT), _gloffset_CopyTexSubImage2D },
1047 #undef NAME
1048
1049 /* 11. GL_EXT_histogram */
1050 #ifdef GL_EXT_histogram
1051 #define NAME(X) (GLvoid *) X
1052 #else
1053 #define NAME(X) (GLvoid *) NotImplemented
1054 #endif
1055 { "glGetHistogramEXT", NAME(glGetHistogramEXT), _gloffset_GetHistogramEXT },
1056 { "glGetHistogramParameterfvEXT", NAME(glGetHistogramParameterfvEXT), _gloffset_GetHistogramParameterfvEXT },
1057 { "glGetHistogramParameterivEXT", NAME(glGetHistogramParameterivEXT), _gloffset_GetHistogramParameterivEXT },
1058 { "glGetMinmaxEXT", NAME(glGetMinmaxEXT), _gloffset_GetMinmaxEXT },
1059 { "glGetMinmaxParameterfvEXT", NAME(glGetMinmaxParameterfvEXT), _gloffset_GetMinmaxParameterfvEXT },
1060 { "glGetMinmaxParameterivEXT", NAME(glGetMinmaxParameterivEXT), _gloffset_GetMinmaxParameterivEXT },
1061 { "glHistogramEXT", NAME(glHistogramEXT), _gloffset_Histogram },
1062 { "glMinmaxEXT", NAME(glMinmaxEXT), _gloffset_Minmax },
1063 { "glResetHistogramEXT", NAME(glResetHistogramEXT), _gloffset_ResetHistogram },
1064 { "glResetMinmaxEXT", NAME(glResetMinmaxEXT), _gloffset_ResetMinmax },
1065 #undef NAME
1066
1067 /* 12. GL_EXT_convolution */
1068 #ifdef GL_EXT_convolution
1069 #define NAME(X) (GLvoid *) X
1070 #else
1071 #define NAME(X) (GLvoid *) NotImplemented
1072 #endif
1073 { "glConvolutionFilter1DEXT", NAME(glConvolutionFilter1DEXT), _gloffset_ConvolutionFilter1D },
1074 { "glConvolutionFilter2DEXT", NAME(glConvolutionFilter2DEXT), _gloffset_ConvolutionFilter2D },
1075 { "glConvolutionParameterfEXT", NAME(glConvolutionParameterfEXT), _gloffset_ConvolutionParameterf },
1076 { "glConvolutionParameterfvEXT", NAME(glConvolutionParameterfvEXT), _gloffset_ConvolutionParameterfv },
1077 { "glConvolutionParameteriEXT", NAME(glConvolutionParameteriEXT), _gloffset_ConvolutionParameteri },
1078 { "glConvolutionParameterivEXT", NAME(glConvolutionParameterivEXT), _gloffset_ConvolutionParameteriv },
1079 { "glCopyConvolutionFilter1DEXT", NAME(glCopyConvolutionFilter1DEXT), _gloffset_CopyConvolutionFilter1D },
1080 { "glCopyConvolutionFilter2DEXT", NAME(glCopyConvolutionFilter2DEXT), _gloffset_CopyConvolutionFilter2D },
1081 { "glGetConvolutionFilterEXT", NAME(glGetConvolutionFilterEXT), _gloffset_GetConvolutionFilterEXT },
1082 { "glGetConvolutionParameterivEXT", NAME(glGetConvolutionParameterivEXT), _gloffset_GetConvolutionParameterivEXT },
1083 { "glGetConvolutionParameterfvEXT", NAME(glGetConvolutionParameterfvEXT), _gloffset_GetConvolutionParameterfvEXT },
1084 { "glGetSeparableFilterEXT", NAME(glGetSeparableFilterEXT), _gloffset_GetSeparableFilterEXT },
1085 { "glSeparableFilter2DEXT", NAME(glSeparableFilter2DEXT), _gloffset_SeparableFilter2D },
1086 #undef NAME
1087
1088 /* 14. GL_SGI_color_table */
1089 #ifdef GL_SGI_color_table
1090 #define NAME(X) (GLvoid *) X
1091 #else
1092 #define NAME(X) (GLvoid *) NotImplemented
1093 #endif
1094 { "glColorTableSGI", NAME(glColorTableSGI), _gloffset_ColorTable },
1095 { "glColorTableParameterfvSGI", NAME(glColorTableParameterfvSGI), _gloffset_ColorTableParameterfv },
1096 { "glColorTableParameterivSGI", NAME(glColorTableParameterivSGI), _gloffset_ColorTableParameteriv },
1097 { "glCopyColorTableSGI", NAME(glCopyColorTableSGI), _gloffset_CopyColorTable },
1098 { "glGetColorTableSGI", NAME(glGetColorTableSGI), _gloffset_GetColorTableSGI },
1099 { "glGetColorTableParameterfvSGI", NAME(glGetColorTableParameterfvSGI), _gloffset_GetColorTableParameterfvSGI },
1100 { "glGetColorTableParameterivSGI", NAME(glGetColorTableParameterivSGI), _gloffset_GetColorTableParameterivSGI },
1101 #undef NAME
1102
1103 /* 15. GL_SGIS_pixel_texture */
1104 #ifdef GL_SGIS_pixel_texture
1105 #define NAME(X) (GLvoid *) X
1106 #else
1107 #define NAME(X) (GLvoid *) NotImplemented
1108 #endif
1109 { "glPixelTexGenParameterfSGIS", NAME(glPixelTexGenParameterfSGIS), _gloffset_PixelTexGenParameterfSGIS },
1110 { "glPixelTexGenParameteriSGIS", NAME(glPixelTexGenParameteriSGIS), _gloffset_PixelTexGenParameteriSGIS },
1111 { "glGetPixelTexGenParameterfvSGIS", NAME(glGetPixelTexGenParameterfvSGIS), _gloffset_GetPixelTexGenParameterfvSGIS },
1112 { "glGetPixelTexGenParameterivSGIS", NAME(glGetPixelTexGenParameterivSGIS), _gloffset_GetPixelTexGenParameterivSGIS },
1113 #undef NAME
1114
1115 /* 16. GL_SGIS_texture4D */
1116 #ifdef GL_SGIS_texture4D
1117 #define NAME(X) (GLvoid *) X
1118 #else
1119 #define NAME(X) (GLvoid *) NotImplemented
1120 #endif
1121 { "glTexImage4DSGIS", NAME(glTexImage4DSGIS), _gloffset_TexImage4DSGIS },
1122 { "glTexSubImage4DSGIS", NAME(glTexSubImage4DSGIS), _gloffset_TexSubImage4DSGIS },
1123 #undef NAME
1124
1125 /* 20. GL_EXT_texture_object */
1126 #ifdef GL_EXT_texture_object
1127 #define NAME(X) (GLvoid *) X
1128 #else
1129 #define NAME(X) (GLvoid *) NotImplemented
1130 #endif
1131 { "glAreTexturesResidentEXT", NAME(glAreTexturesResidentEXT), _gloffset_AreTexturesResidentEXT },
1132 { "glBindTextureEXT", NAME(glBindTextureEXT), _gloffset_BindTexture },
1133 { "glDeleteTexturesEXT", NAME(glDeleteTexturesEXT), _gloffset_DeleteTextures },
1134 { "glGenTexturesEXT", NAME(glGenTexturesEXT), _gloffset_GenTexturesEXT },
1135 { "glIsTextureEXT", NAME(glIsTextureEXT), _gloffset_IsTextureEXT },
1136 { "glPrioritizeTexturesEXT", NAME(glPrioritizeTexturesEXT), _gloffset_PrioritizeTextures },
1137 #undef NAME
1138
1139 /* 21. GL_SGIS_detail_texture */
1140 #ifdef GL_SGIS_detail_texture
1141 #define NAME(X) (GLvoid *) X
1142 #else
1143 #define NAME(X) (GLvoid *) NotImplemented
1144 #endif
1145 { "glDetailTexFuncSGIS", NAME(glDetailTexFuncSGIS), _gloffset_DetailTexFuncSGIS },
1146 { "glGetDetailTexFuncSGIS", NAME(glGetDetailTexFuncSGIS), _gloffset_GetDetailTexFuncSGIS },
1147 #undef NAME
1148
1149 /* 22. GL_SGIS_sharpen_texture */
1150 #ifdef GL_SGIS_sharpen_texture
1151 #define NAME(X) (GLvoid *) X
1152 #else
1153 #define NAME(X) (GLvoid *) NotImplemented
1154 #endif
1155 { "glGetSharpenTexFuncSGIS", NAME(glGetSharpenTexFuncSGIS), _gloffset_GetSharpenTexFuncSGIS },
1156 { "glSharpenTexFuncSGIS", NAME(glSharpenTexFuncSGIS), _gloffset_SharpenTexFuncSGIS },
1157 #undef NAME
1158
1159 /* 25. GL_SGIS_multisample */
1160 #ifdef GL_SGIS_multisample
1161 #define NAME(X) (GLvoid *) X
1162 #else
1163 #define NAME(X) (GLvoid *) NotImplemented
1164 #endif
1165 { "glSampleMaskSGIS", NAME(glSampleMaskSGIS), _gloffset_SampleMaskSGIS },
1166 { "glSamplePatternSGIS", NAME(glSamplePatternSGIS), _gloffset_SamplePatternSGIS },
1167 #undef NAME
1168
1169 /* 30. GL_EXT_vertex_array */
1170 #ifdef GL_EXT_vertex_array
1171 #define NAME(X) (GLvoid *) X
1172 #else
1173 #define NAME(X) (GLvoid *) NotImplemented
1174 #endif
1175 { "glArrayElementEXT", NAME(glArrayElementEXT), _gloffset_ArrayElement },
1176 { "glColorPointerEXT", NAME(glColorPointerEXT), _gloffset_ColorPointerEXT },
1177 { "glDrawArraysEXT", NAME(glDrawArraysEXT), _gloffset_DrawArrays },
1178 { "glEdgeFlagPointerEXT", NAME(glEdgeFlagPointerEXT), _gloffset_EdgeFlagPointerEXT },
1179 { "glGetPointervEXT", NAME(glGetPointervEXT), _gloffset_GetPointerv },
1180 { "glIndexPointerEXT", NAME(glIndexPointerEXT), _gloffset_IndexPointerEXT },
1181 { "glNormalPointerEXT", NAME(glNormalPointerEXT), _gloffset_NormalPointerEXT },
1182 { "glTexCoordPointerEXT", NAME(glTexCoordPointerEXT), _gloffset_TexCoordPointerEXT },
1183 { "glVertexPointerEXT", NAME(glVertexPointerEXT), _gloffset_VertexPointerEXT },
1184 #undef NAME
1185
1186 /* 37. GL_EXT_blend_minmax */
1187 #ifdef GL_EXT_blend_minmax
1188 #define NAME(X) (GLvoid *) X
1189 #else
1190 #define NAME(X) (GLvoid *) NotImplemented
1191 #endif
1192 { "glBlendEquationEXT", NAME(glBlendEquationEXT), _gloffset_BlendEquation },
1193 #undef NAME
1194
1195 /* 52. GL_SGIX_sprite */
1196 #ifdef GL_SGIX_sprite
1197 #define NAME(X) (GLvoid *) X
1198 #else
1199 #define NAME(X) (GLvoid *) NotImplemented
1200 #endif
1201 { "glSpriteParameterfSGIX", NAME(glSpriteParameterfSGIX), _gloffset_SpriteParameterfSGIX },
1202 { "glSpriteParameterfvSGIX", NAME(glSpriteParameterfvSGIX), _gloffset_SpriteParameterfvSGIX },
1203 { "glSpriteParameteriSGIX", NAME(glSpriteParameteriSGIX), _gloffset_SpriteParameteriSGIX },
1204 { "glSpriteParameterivSGIX", NAME(glSpriteParameterivSGIX), _gloffset_SpriteParameterivSGIX },
1205 #undef NAME
1206
1207 /* 54. GL_EXT_point_parameters */
1208 #ifdef GL_EXT_point_parameters
1209 #define NAME(X) (GLvoid *) X
1210 #else
1211 #define NAME(X) (GLvoid *) NotImplemented
1212 #endif
1213 { "glPointParameterfEXT", NAME(glPointParameterfEXT), _gloffset_PointParameterfEXT },
1214 { "glPointParameterfvEXT", NAME(glPointParameterfvEXT), _gloffset_PointParameterfvEXT },
1215 { "glPointParameterfSGIS", NAME(glPointParameterfSGIS), _gloffset_PointParameterfEXT },
1216 { "glPointParameterfvSGIS", NAME(glPointParameterfvSGIS), _gloffset_PointParameterfvEXT },
1217 #undef NAME
1218
1219 /* 55. GL_SGIX_instruments */
1220 #ifdef GL_SGIX_instruments
1221 #define NAME(X) (GLvoid *) X
1222 #else
1223 #define NAME(X) (GLvoid *) NotImplemented
1224 #endif
1225 { "glInstrumentsBufferSGIX", NAME(glInstrumentsBufferSGIX), _gloffset_InstrumentsBufferSGIX },
1226 { "glStartInstrumentsSGIX", NAME(glStartInstrumentsSGIX), _gloffset_StartInstrumentsSGIX },
1227 { "glStopInstrumentsSGIX", NAME(glStopInstrumentsSGIX), _gloffset_StopInstrumentsSGIX },
1228 { "glReadInstrumentsSGIX", NAME(glReadInstrumentsSGIX), _gloffset_ReadInstrumentsSGIX },
1229 { "glPollInstrumentsSGIX", NAME(glPollInstrumentsSGIX), _gloffset_PollInstrumentsSGIX },
1230 { "glGetInstrumentsSGIX", NAME(glGetInstrumentsSGIX), _gloffset_GetInstrumentsSGIX },
1231 #undef NAME
1232
1233 /* 57. GL_SGIX_framezoom */
1234 #ifdef GL_SGIX_framezoom
1235 #define NAME(X) (GLvoid *) X
1236 #else
1237 #define NAME(X) (GLvoid *) NotImplemented
1238 #endif
1239 { "glFrameZoomSGIX", NAME(glFrameZoomSGIX), _gloffset_FrameZoomSGIX },
1240 #undef NAME
1241
1242 /* 58. GL_SGIX_tag_sample_buffer */
1243 #ifdef GL_SGIX_tag_sample_buffer
1244 #define NAME(X) (GLvoid *) X
1245 #else
1246 #define NAME(X) (GLvoid *) NotImplemented
1247 #endif
1248 { "glTagSampleBufferSGIX", NAME(glTagSampleBufferSGIX), _gloffset_TagSampleBufferSGIX },
1249 #undef NAME
1250
1251 /* 60. GL_SGIX_reference_plane */
1252 #ifdef GL_SGIX_reference_plane
1253 #define NAME(X) (GLvoid *) X
1254 #else
1255 #define NAME(X) (GLvoid *) NotImplemented
1256 #endif
1257 { "glReferencePlaneSGIX", NAME(glReferencePlaneSGIX), _gloffset_ReferencePlaneSGIX },
1258 #undef NAME
1259
1260 /* 61. GL_SGIX_flush_raster */
1261 #ifdef GL_SGIX_flush_raster
1262 #define NAME(X) (GLvoid *) X
1263 #else
1264 #define NAME(X) (GLvoid *) NotImplemented
1265 #endif
1266 { "glFlushRasterSGIX", NAME(glFlushRasterSGIX), _gloffset_FlushRasterSGIX },
1267 #undef NAME
1268
1269 /* 66. GL_HP_image_transform */
1270 #if 0
1271 #ifdef GL_HP_image_transform
1272 #define NAME(X) (GLvoid *) X
1273 #else
1274 #define NAME(X) (GLvoid *) NotImplemented
1275 #endif
1276 { "glGetImageTransformParameterfvHP", NAME(glGetImageTransformParameterfvHP), _gloffset_GetImageTransformParameterfvHP },
1277 { "glGetImageTransformParameterivHP", NAME(glGetImageTransformParameterivHP), _gloffset_GetImageTransformParameterivHP },
1278 { "glImageTransformParameterfHP", NAME(glImageTransformParameterfHP), _gloffset_ImageTransformParameterfHP },
1279 { "glImageTransformParameterfvHP", NAME(glImageTransformParameterfvHP), _gloffset_ImageTransformParameterfvHP },
1280 { "glImageTransformParameteriHP", NAME(glImageTransformParameteriHP), _gloffset_ImageTransformParameteriHP },
1281 { "glImageTransformParameterivHP", NAME(glImageTransformParameterivHP), _gloffset_ImageTransformParameterivHP },
1282 #undef NAME
1283 #endif
1284
1285 /* 74. GL_EXT_color_subtable */
1286 #ifdef GL_EXT_color_subtable
1287 #define NAME(X) (GLvoid *) X
1288 #else
1289 #define NAME(X) (GLvoid *) NotImplemented
1290 #endif
1291 { "glColorSubTableEXT", NAME(glColorSubTableEXT), _gloffset_ColorSubTable },
1292 { "glCopyColorSubTableEXT", NAME(glCopyColorSubTableEXT), _gloffset_CopyColorSubTable },
1293 #undef NAME
1294
1295 /* 77. GL_PGI_misc_hints */
1296 #ifdef GL_PGI_misc_hints
1297 #define NAME(X) (GLvoid *) X
1298 #else
1299 #define NAME(X) (GLvoid *) NotImplemented
1300 #endif
1301 { "glHintPGI", NAME(glHintPGI), _gloffset_HintPGI },
1302 #undef NAME
1303
1304 /* 78. GL_EXT_paletted_texture */
1305 #ifdef GL_EXT_paletted_texture
1306 #define NAME(X) (GLvoid *) X
1307 #else
1308 #define NAME(X) (GLvoid *) NotImplemented
1309 #endif
1310 { "glColorTableEXT", NAME(glColorTableEXT), _gloffset_ColorTable },
1311 { "glGetColorTableEXT", NAME(glGetColorTableEXT), _gloffset_GetColorTable },
1312 { "glGetColorTableParameterfvEXT", NAME(glGetColorTableParameterfvEXT), _gloffset_GetColorTableParameterfv },
1313 { "glGetColorTableParameterivEXT", NAME(glGetColorTableParameterivEXT), _gloffset_GetColorTableParameteriv },
1314 #undef NAME
1315
1316 /* 80. GL_SGIX_list_priority */
1317 #ifdef GL_SGIX_list_priority
1318 #define NAME(X) (GLvoid *) X
1319 #else
1320 #define NAME(X) (GLvoid *) NotImplemented
1321 #endif
1322 { "glGetListParameterfvSGIX", NAME(glGetListParameterfvSGIX), _gloffset_GetListParameterfvSGIX },
1323 { "glGetListParameterivSGIX", NAME(glGetListParameterivSGIX), _gloffset_GetListParameterivSGIX },
1324 { "glListParameterfSGIX", NAME(glListParameterfSGIX), _gloffset_ListParameterfSGIX },
1325 { "glListParameterfvSGIX", NAME(glListParameterfvSGIX), _gloffset_ListParameterfvSGIX },
1326 { "glListParameteriSGIX", NAME(glListParameteriSGIX), _gloffset_ListParameteriSGIX },
1327 { "glListParameterivSGIX", NAME(glListParameterivSGIX), _gloffset_ListParameterivSGIX },
1328 #undef NAME
1329
1330 /* 94. GL_EXT_index_material */
1331 #ifdef GL_EXT_index_material
1332 #define NAME(X) (GLvoid *) X
1333 #else
1334 #define NAME(X) (GLvoid *) NotImplemented
1335 #endif
1336 { "glIndexMaterialEXT", NAME(glIndexMaterialEXT), _gloffset_IndexMaterialEXT },
1337 #undef NAME
1338
1339 /* 95. GL_EXT_index_func */
1340 #ifdef GL_EXT_index_func
1341 #define NAME(X) (GLvoid *) X
1342 #else
1343 #define NAME(X) (GLvoid *) NotImplemented
1344 #endif
1345 { "glIndexFuncEXT", NAME(glIndexFuncEXT), _gloffset_IndexFuncEXT },
1346 #undef NAME
1347
1348 /* 97. GL_EXT_compiled_vertex_array */
1349 #ifdef GL_EXT_compiled_vertex_array
1350 #define NAME(X) (GLvoid *) X
1351 #else
1352 #define NAME(X) (GLvoid *) NotImplemented
1353 #endif
1354 { "glLockArraysEXT", NAME(glLockArraysEXT), _gloffset_LockArraysEXT },
1355 { "glUnlockArraysEXT", NAME(glUnlockArraysEXT), _gloffset_UnlockArraysEXT },
1356 #undef NAME
1357
1358 /* 98. GL_EXT_cull_vertex */
1359 #ifdef GL_EXT_cull_vertex
1360 #define NAME(X) (GLvoid *) X
1361 #else
1362 #define NAME(X) (GLvoid *) NotImplemented
1363 #endif
1364 { "glCullParameterfvEXT", NAME(glCullParameterfvEXT), _gloffset_CullParameterfvEXT },
1365 { "glCullParameterdvEXT", NAME(glCullParameterdvEXT), _gloffset_CullParameterdvEXT },
1366 #undef NAME
1367
1368 /* 102. GL_SGIX_fragment_lighting */
1369 #ifdef GL_SGIX_fragment_lighting
1370 #define NAME(X) (GLvoid *) X
1371 #else
1372 #define NAME(X) (GLvoid *) NotImplemented
1373 #endif
1374 { "glFragmentColorMaterialSGIX", NAME(glFragmentColorMaterialSGIX), _gloffset_FragmentColorMaterialSGIX },
1375 { "glFragmentLightfSGIX", NAME(glFragmentLightfSGIX), _gloffset_FragmentLightfSGIX },
1376 { "glFragmentLightfvSGIX", NAME(glFragmentLightfvSGIX), _gloffset_FragmentLightfvSGIX },
1377 { "glFragmentLightiSGIX", NAME(glFragmentLightiSGIX), _gloffset_FragmentLightiSGIX },
1378 { "glFragmentLightivSGIX", NAME(glFragmentLightivSGIX), _gloffset_FragmentLightivSGIX },
1379 { "glFragmentLightModelfSGIX", NAME(glFragmentLightModelfSGIX), _gloffset_FragmentLightModelfSGIX },
1380 { "glFragmentLightModelfvSGIX", NAME(glFragmentLightModelfvSGIX), _gloffset_FragmentLightModelfvSGIX },
1381 { "glFragmentLightModeliSGIX", NAME(glFragmentLightModeliSGIX), _gloffset_FragmentLightModeliSGIX },
1382 { "glFragmentLightModelivSGIX", NAME(glFragmentLightModelivSGIX), _gloffset_FragmentLightModelivSGIX },
1383 { "glFragmentMaterialfSGIX", NAME(glFragmentMaterialfSGIX), _gloffset_FragmentMaterialfSGIX },
1384 { "glFragmentMaterialfvSGIX", NAME(glFragmentMaterialfvSGIX), _gloffset_FragmentMaterialfvSGIX },
1385 { "glFragmentMaterialiSGIX", NAME(glFragmentMaterialiSGIX), _gloffset_FragmentMaterialiSGIX },
1386 { "glFragmentMaterialivSGIX", NAME(glFragmentMaterialivSGIX), _gloffset_FragmentMaterialivSGIX },
1387 { "glGetFragmentLightfvSGIX", NAME(glGetFragmentLightfvSGIX), _gloffset_GetFragmentLightfvSGIX },
1388 { "glGetFragmentLightivSGIX", NAME(glGetFragmentLightivSGIX), _gloffset_GetFragmentLightivSGIX },
1389 { "glGetFragmentMaterialfvSGIX", NAME(glGetFragmentMaterialfvSGIX), _gloffset_GetFragmentMaterialfvSGIX },
1390 { "glGetFragmentMaterialivSGIX", NAME(glGetFragmentMaterialivSGIX), _gloffset_GetFragmentMaterialivSGIX },
1391 { "glLightEnviSGIX", NAME(glLightEnviSGIX), _gloffset_LightEnviSGIX },
1392 #undef NAME
1393
1394 /* 112. GL_EXT_draw_range_elements */
1395 #if 000
1396 #ifdef GL_EXT_draw_range_elements
1397 #define NAME(X) (GLvoid *) X
1398 #else
1399 #define NAME(X) (GLvoid *) NotImplemented
1400 #endif
1401 { "glDrawRangeElementsEXT", NAME(glDrawRangeElementsEXT), _gloffset_DrawRangeElementsEXT },
1402 #undef NAME
1403 #endif
1404
1405 /* 117. GL_EXT_light_texture */
1406 #if 000
1407 #ifdef GL_EXT_light_texture
1408 #define NAME(X) (GLvoid *) X
1409 #else
1410 #define NAME(X) (GLvoid *) NotImplemented
1411 #endif
1412 { "glApplyTextureEXT", NAME(glApplyTextureEXT), _gloffset_ApplyTextureEXT },
1413 { "glTextureLightEXT", NAME(glTextureLightEXT), _gloffset_TextureLightEXT },
1414 { "glTextureMaterialEXT", NAME(glTextureMaterialEXT), _gloffset_TextureMaterialEXT },
1415 #undef NAME
1416
1417 /* 135. GL_INTEL_texture_scissor */
1418 #ifdef GL_INTEL_texture_scissor
1419 #define NAME(X) (GLvoid *) X
1420 #else
1421 #define NAME(X) (GLvoid *) NotImplemented
1422 #endif
1423 { "glTexScissorINTEL", NAME(glTexScissorINTEL), _gloffset_TexScissorINTEL },
1424 { "glTexScissorFuncINTEL", NAME(glTexScissorFuncINTEL), _gloffset_glTexScissorFuncINTEL },
1425 #undef NAME
1426
1427 /* 136. GL_INTEL_parallel_arrays */
1428 #ifdef GL_INTEL_parallel_arrays
1429 #define NAME(X) (GLvoid *) X
1430 #else
1431 #define NAME(X) (GLvoid *) NotImplemented
1432 #endif
1433 { "glVertexPointervINTEL", NAME(glVertexPointervINTEL), _gloffset_VertexPointervINTEL },
1434 { "glNormalPointervINTEL", NAME(glNormalPointervINTEL), _gloffset_NormalPointervINTEL },
1435 { "glColorPointervINTEL", NAME(glColorPointervINTEL), _gloffset_ColorPointervINTEL },
1436 { "glTexCoordPointervINTEL", NAME(glTexCoordPointervINTEL), _gloffset_glxCoordPointervINTEL },
1437 #undef NAME
1438 #endif
1439
1440 /* 138. GL_EXT_pixel_transform */
1441 #if 000
1442 #ifdef GL_EXT_pixel_transform
1443 #define NAME(X) (GLvoid *) X
1444 #else
1445 #define NAME(X) (GLvoid *) NotImplemented
1446 #endif
1447 { "glPixelTransformParameteriEXT", NAME(glPixelTransformParameteriEXT), _gloffset_PixelTransformParameteriEXT },
1448 { "glPixelTransformParameterfEXT", NAME(glPixelTransformParameterfEXT), _gloffset_PixelTransformParameterfEXT },
1449 { "glPixelTransformParameterivEXT", NAME(glPixelTransformParameterivEXT), _gloffset_PixelTransformParameterivEXT },
1450 { "glPixelTransformParameterfvEXT", NAME(glPixelTransformParameterfvEXT), _gloffset_PixelTransformParameterfvEXT },
1451 { "glGetPixelTransformParameterivEXT", NAME(glGetPixelTransformParameterivEXT), _gloffset_GetPixelTransformParameterivEXT },
1452 { "glGetPixelTransformParameterfvEXT", NAME(glGetPixelTransformParameterfvEXT), _gloffset_GetPixelTransformParameterfvEXT },
1453 #undef NAME
1454 #endif
1455
1456 /* 145. GL_EXT_secondary_color */
1457 #ifdef GL_EXT_secondary_color
1458 #define NAME(X) (GLvoid *) X
1459 #else
1460 #define NAME(X) (GLvoid *) NotImplemented
1461 #endif
1462 { "glSecondaryColor3bEXT", NAME(glSecondaryColor3bEXT), _gloffset_SecondaryColor3bEXT },
1463 { "glSecondaryColor3dEXT", NAME(glSecondaryColor3dEXT), _gloffset_SecondaryColor3dEXT },
1464 { "glSecondaryColor3fEXT", NAME(glSecondaryColor3fEXT), _gloffset_SecondaryColor3fEXT },
1465 { "glSecondaryColor3iEXT", NAME(glSecondaryColor3iEXT), _gloffset_SecondaryColor3iEXT },
1466 { "glSecondaryColor3sEXT", NAME(glSecondaryColor3sEXT), _gloffset_SecondaryColor3sEXT },
1467 { "glSecondaryColor3ubEXT", NAME(glSecondaryColor3ubEXT), _gloffset_SecondaryColor3ubEXT },
1468 { "glSecondaryColor3uiEXT", NAME(glSecondaryColor3uiEXT), _gloffset_SecondaryColor3uiEXT },
1469 { "glSecondaryColor3usEXT", NAME(glSecondaryColor3usEXT), _gloffset_SecondaryColor3usEXT },
1470 { "glSecondaryColor3bvEXT", NAME(glSecondaryColor3bvEXT), _gloffset_SecondaryColor3bvEXT },
1471 { "glSecondaryColor3dvEXT", NAME(glSecondaryColor3dvEXT), _gloffset_SecondaryColor3dvEXT },
1472 { "glSecondaryColor3fvEXT", NAME(glSecondaryColor3fvEXT), _gloffset_SecondaryColor3fvEXT },
1473 { "glSecondaryColor3ivEXT", NAME(glSecondaryColor3ivEXT), _gloffset_SecondaryColor3ivEXT },
1474 { "glSecondaryColor3svEXT", NAME(glSecondaryColor3svEXT), _gloffset_SecondaryColor3svEXT },
1475 { "glSecondaryColor3ubvEXT", NAME(glSecondaryColor3ubvEXT), _gloffset_SecondaryColor3ubvEXT },
1476 { "glSecondaryColor3uivEXT", NAME(glSecondaryColor3uivEXT), _gloffset_SecondaryColor3uivEXT },
1477 { "glSecondaryColor3usvEXT", NAME(glSecondaryColor3usvEXT), _gloffset_SecondaryColor3usvEXT },
1478 { "glSecondaryColorPointerEXT", NAME(glSecondaryColorPointerEXT), _gloffset_SecondaryColorPointerEXT },
1479 #undef NAME
1480
1481 /* 147. GL_EXT_texture_perturb_normal */
1482 #if 000
1483 #ifdef GL_EXT_texture_perturb_normal
1484 #define NAME(X) (GLvoid *) X
1485 #else
1486 #define NAME(X) (GLvoid *) NotImplemented
1487 #endif
1488 { "glTextureNormalEXT", NAME(glTextureNormalEXT), _gloffset_TextureNormalEXT },
1489 #undef NAME
1490 #endif
1491
1492 /* 148. GL_EXT_multi_draw_arrays */
1493 #if 000
1494 #ifdef GL_EXT_multi_draw_arrays
1495 #define NAME(X) (GLvoid *) X
1496 #else
1497 #define NAME(X) (GLvoid *) NotImplemented
1498 #endif
1499 { "glMultiDrawArraysEXT", NAME(glMultiDrawArraysEXT), _gloffset_MultiDrawArraysEXT },
1500 #undef NAME
1501 #endif
1502
1503 /* 149. GL_EXT_fog_coord */
1504 #ifdef GL_EXT_fog_coord
1505 #define NAME(X) (GLvoid *) X
1506 #else
1507 #define NAME(X) (GLvoid *) NotImplemented
1508 #endif
1509 { "glFogCoordfEXT", NAME(glFogCoordfEXT), _gloffset_FogCoordfEXT },
1510 { "glFogCoordfvEXT", NAME(glFogCoordfvEXT), _gloffset_FogCoordfvEXT },
1511 { "glFogCoorddEXT", NAME(glFogCoorddEXT), _gloffset_FogCoorddEXT },
1512 { "glFogCoorddEXT", NAME(glFogCoorddEXT), _gloffset_FogCoorddEXT },
1513 { "glFogCoordPointerEXT", NAME(glFogCoordPointerEXT), _gloffset_FogCoordPointerEXT },
1514 #undef NAME
1515
1516 /* 156. GL_EXT_coordinate_frame */
1517 #if 000
1518 #ifdef GL_EXT_coordinate_frame
1519 #define NAME(X) (GLvoid *) X
1520 #else
1521 #define NAME(X) (GLvoid *) NotImplemented
1522 #endif
1523 { "glTangent3bEXT", NAME(glTangent3bEXT), _gloffset_Tangent3bEXT },
1524 { "glTangent3dEXT", NAME(glTangent3dEXT), _gloffset_Tangent3dEXT },
1525 { "glTangent3fEXT", NAME(glTangent3fEXT), _gloffset_Tangent3fEXT },
1526 { "glTangent3iEXT", NAME(glTangent3iEXT), _gloffset_Tangent3iEXT },
1527 { "glTangent3sEXT", NAME(glTangent3sEXT), _gloffset_Tangent3sEXT },
1528 { "glTangent3bvEXT", NAME(glTangent3bvEXT), _gloffset_Tangent3bvEXT },
1529 { "glTangent3dvEXT", NAME(glTangent3dvEXT), _gloffset_Tangent3dvEXT },
1530 { "glTangent3fvEXT", NAME(glTangent3fvEXT), _gloffset_Tangent3fvEXT },
1531 { "glTangent3ivEXT", NAME(glTangent3ivEXT), _gloffset_Tangent3ivEXT },
1532 { "glTangent3svEXT", NAME(glTangent3svEXT), _gloffset_Tangent3svEXT },
1533 { "glBinormal3bEXT", NAME(glBinormal3bEXT), _gloffset_Binormal3bEXT },
1534 { "glBinormal3dEXT", NAME(glBinormal3dEXT), _gloffset_Binormal3dEXT },
1535 { "glBinormal3fEXT", NAME(glBinormal3fEXT), _gloffset_Binormal3fEXT },
1536 { "glBinormal3iEXT", NAME(glBinormal3iEXT), _gloffset_Binormal3iEXT },
1537 { "glBinormal3sEXT", NAME(glBinormal3sEXT), _gloffset_Binormal3sEXT },
1538 { "glBinormal3bvEXT", NAME(glBinormal3bvEXT), _gloffset_Binormal3bvEXT },
1539 { "glBinormal3dvEXT", NAME(glBinormal3dvEXT), _gloffset_Binormal3dvEXT },
1540 { "glBinormal3fvEXT", NAME(glBinormal3fvEXT), _gloffset_Binormal3fvEXT },
1541 { "glBinormal3ivEXT", NAME(glBinormal3ivEXT), _gloffset_Binormal3ivEXT },
1542 { "glBinormal3svEXT", NAME(glBinormal3svEXT), _gloffset_Binormal3svEXT },
1543 { "glTangentPointerEXT", NAME(glTangentPointerEXT), _gloffset_TangentPointerEXT },
1544 { "glBinormalPointerEXT", NAME(glBinormalPointerEXT), _gloffset_BinormalPointerEXT },
1545 #undef NAME
1546 #endif
1547
1548 /* 164. GL_SUN_global_alpha */
1549 #if 000
1550 #ifdef GL_SUN_global_alpha
1551 #define NAME(X) (GLvoid *) X
1552 #else
1553 #define NAME(X) (GLvoid *) NotImplemented
1554 #endif
1555 { "glGlobalAlphaFactorbSUN", NAME(glGlobalAlphaFactorbSUN), _gloffset_GlobalAlphaFactorbSUN },
1556 { "glGlobalAlphaFactorsSUN", NAME(glGlobalAlphaFactorsSUN), _gloffset_GlobalAlphaFactorsSUN },
1557 { "glGlobalAlphaFactoriSUN", NAME(glGlobalAlphaFactoriSUN), _gloffset_GlobalAlphaFactoriSUN },
1558 { "glGlobalAlphaFactorfSUN", NAME(glGlobalAlphaFactorfSUN), _gloffset_GlobalAlphaFactorfSUN },
1559 { "glGlobalAlphaFactordSUN", NAME(glGlobalAlphaFactordSUN), _gloffset_GlobalAlphaFactordSUN },
1560 { "glGlobalAlphaFactorubSUN", NAME(glGlobalAlphaFactorubSUN), _gloffset_GlobalAlphaFactorubSUN },
1561 { "glGlobalAlphaFactorusSUN", NAME(glGlobalAlphaFactorusSUN), _gloffset_GlobalAlphaFactorusSUN },
1562 { "glGlobalAlphaFactoruiSUN", NAME(glGlobalAlphaFactoruiSUN), _gloffset_GlobalAlphaFactoruiSUN },
1563 #undef NAME
1564 #endif
1565
1566 /* 165. GL_SUN_triangle_list */
1567 #if 000
1568 #ifdef GL_SUN_triangle_list
1569 #define NAME(X) (GLvoid *) X
1570 #else
1571 #define NAME(X) (GLvoid *) NotImplemented
1572 #endif
1573 { "glReplacementCodeuiSUN", NAME(glReplacementCodeuiSUN), _gloffset_ReplacementCodeuiSUN },
1574 { "glReplacementCodeusSUN", NAME(glReplacementCodeusSUN), _gloffset_ReplacementCodeusSUN },
1575 { "glReplacementCodeubSUN", NAME(glReplacementCodeubSUN), _gloffset_ReplacementCodeubSUN },
1576 { "glReplacementCodeuivSUN", NAME(glReplacementCodeuivSUN), _gloffset_ReplacementCodeuivSUN },
1577 { "glReplacementCodeusvSUN", NAME(glReplacementCodeusvSUN), _gloffset_ReplacementCodeusvSUN },
1578 { "glReplacementCodeubvSUN", NAME(glReplacementCodeubvSUN), _gloffset_ReplacementCodeubvSUN },
1579 { "glReplacementCodePointerSUN", NAME(glReplacementCodePointerSUN), _gloffset_ReplacementCodePointerSUN },
1580 #undef NAME
1581 #endif
1582
1583 /* 166. GL_SUN_vertex */
1584 #if 000
1585 #ifdef GL_SUN_vertex
1586 #define NAME(X) (GLvoid *) X
1587 #else
1588 #define NAME(X) (GLvoid *) NotImplemented
1589 #endif
1590 { "glColor4ubVertex2fSUN", NAME(glColor4ubVertex2fSUN), _gloffset_Color4ubVertex2fSUN },
1591 { "glColor4ubVertex2fvSUN", NAME(glColor4ubVertex2fvSUN), _gloffset_Color4ubVertex2fvSUN },
1592 { "glColor4ubVertex3fSUN", NAME(glColor4ubVertex3fSUN), _gloffset_Color4ubVertex3fSUN },
1593 { "glColor4ubVertex3fvSUN", NAME(glColor4ubVertex3fvSUN), _gloffset_Color4ubVertex3fvSUN },
1594 { "glColor3fVertex3fSUN", NAME(glColor3fVertex3fSUN), _gloffset_Color3fVertex3fSUN },
1595 { "glColor3fVertex3fvSUN", NAME(glColor3fVertex3fvSUN), _gloffset_Color3fVertex3fvSUN },
1596 { "glNormal3fVertex3fSUN", NAME(glNormal3fVertex3fSUN), _gloffset_Normal3fVertex3fSUN },
1597 { "glNormal3fVertex3fvSUN", NAME(glNormal3fVertex3fvSUN), _gloffset_Normal3fVertex3fvSUN },
1598 { "glColor4fNormal3fVertex3fSUN", NAME(glColor4fNormal3fVertex3fSUN), _gloffset_Color4fNormal3fVertex3fSUN },
1599 { "glColor4fNormal3fVertex3fvSUN", NAME(glColor4fNormal3fVertex3fvSUN), _gloffset_Color4fNormal3fVertex3fvSUN },
1600 { "glTexCoord2fVertex3fSUN", NAME(glTexCoord2fVertex3fSUN), _gloffset_TexCoord2fVertex3fSUN },
1601 { "glTexCoord2fVertex3fvSUN", NAME(glTexCoord2fVertex3fvSUN), _gloffset_TexCoord2fVertex3fvSUN },
1602 { "glTexCoord4fVertex4fSUN", NAME(glTexCoord4fVertex4fSUN), _gloffset_TexCoord4fVertex4fSUN },
1603 { "glTexCoord4fVertex4fvSUN", NAME(glTexCoord4fVertex4fvSUN), _gloffset_TexCoord4fVertex4fvSUN },
1604 { "glTexCoord2fColor4ubVertex3fSUN", NAME(glTexCoord2fColor4ubVertex3fSUN), _gloffset_TexCoord2fColor4ubVertex3fSUN },
1605 { "glTexCoord2fColor4ubVertex3fvSUN", NAME(glTexCoord2fColor4ubVertex3fvSUN), _gloffset_TexCoord2fColor4ubVertex3fvSUN },
1606 { "glTexCoord2fColor3fVertex3fSUN", NAME(glTexCoord2fColor3fVertex3fSUN), _gloffset_TexCoord2fColor3fVertex3fSUN },
1607 { "glTexCoord2fColor3fVertex3fvSUN", NAME(glTexCoord2fColor3fVertex3fvSUN), _gloffset_TexCoord2fColor3fVertex3fvSUN },
1608 { "glTexCoord2fNormal3fVertex3fSUN", NAME(glTexCoord2fNormal3fVertex3fSUN), _gloffset_TexCoord2fNormal3fVertex3fSUN },
1609 { "glTexCoord2fNormal3fVertex3fvSUN", NAME(glTexCoord2fNormal3fVertex3fvSUN), _gloffset_TexCoord2fNormal3fVertex3fvSUN },
1610 { "glTexCoord2fColor4fNormal3fVertex3fSUN", NAME(glTexCoord2fColor4fNormal3fVertex3fSUN), _gloffset_TexCoord2fColor4fNormal3fVertex3fSUN },
1611 { "glTexCoord2fColor4fNormal3fVertex3fvSUN", NAME(glTexCoord2fColor4fNormal3fVertex3fvSUN), _gloffset_TexCoord2fColor4fNormal3fVertex3fvSUN },
1612 { "glTexCoord4fColor4fNormal3fVertex4fSUN", NAME(glTexCoord4fColor4fNormal3fVertex4fSUN), _gloffset_TexCoord4fColor4fNormal3fVertex4fSUN },
1613 { "glTexCoord4fColor4fNormal3fVertex4fvSUN", NAME(glTexCoord4fColor4fNormal3fVertex4fvSUN), _gloffset_TexCoord4fColor4fNormal3fVertex4fvSUN },
1614 { "glReplacementCodeuiVertex3fSUN", NAME(glReplacementCodeuiVertex3fSUN), _gloffset_ReplacementCodeuiVertex3fSUN },
1615 { "glReplacementCodeuiVertex3fvSUN", NAME(glReplacementCodeuiVertex3fvSUN), _gloffset_ReplacementCodeuiVertex3fvSUN },
1616 { "glReplacementCodeuiColor4ubVertex3fSUN", NAME(glReplacementCodeuiColor4ubVertex3fSUN), _gloffset_ReplacementCodeuiColor4ubVertex3fSUN },
1617 { "glReplacementCodeuiColor4ubVertex3fvSUN", NAME(glReplacementCodeuiColor4ubVertex3fvSUN), _gloffset_ReplacementCodeuiColor4ubVertex3fvSUN },
1618 { "glReplacementCodeuiColor3fVertex3fSUN", NAME(glReplacementCodeuiColor3fVertex3fSUN), _gloffset_ReplacementCodeuiColor3fVertex3fSUN },
1619 { "glReplacementCodeuiColor3fVertex3fvSUN", NAME(glReplacementCodeuiColor3fVertex3fvSUN), _gloffset_ReplacementCodeuiColor3fVertex3fvSUN },
1620 { "glReplacementCodeuiNormal3fVertex3fSUN", NAME(glReplacementCodeuiNormal3fVertex3fSUN), _gloffset_ReplacementCodeuiNormal3fVertex3fSUN },
1621 { "glReplacementCodeuiNormal3fVertex3fvSUN", NAME(glReplacementCodeuiNormal3fVertex3fvSUN), _gloffset_ReplacementCodeuiNormal3fVertex3fvSUN },
1622 { "glReplacementCodeuiColor4fNormal3fVertex3fSUN", NAME(glReplacementCodeuiColor4fNormal3fVertex3fSUN), _gloffset_ReplacementCodeuiColor4fNormal3fVertex3fSUN },
1623 { "glReplacementCodeuiColor4fNormal3fVertex3fvSUN", NAME(glReplacementCodeuiColor4fNormal3fVertex3fvSUN), _gloffset_ReplacementCodeuiColor4fNormal3fVertex3fvSUN },
1624 { "glReplacementCodeuiTexCoord2fVertex3fSUN", NAME(glReplacementCodeuiTexCoord2fVertex3fSUN), _gloffset_ReplacementCodeuiTexCoord2fVertex3fSUN },
1625 { "glReplacementCodeuiTexCoord2fVertex3fvSUN", NAME(glReplacementCodeuiTexCoord2fVertex3fvSUN), _gloffset_ReplacementCodeuiTexCoord2fVertex3fvSUN },
1626 { "glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN", NAME(glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN), _gloffset_ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN },
1627 { "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN", NAME(glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN), _gloffset_ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN },
1628 { "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN", NAME(glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN), _gloffset_ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN },
1629 { "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN", NAME(glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN), _gloffset_ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN },
1630 #undef NAME
1631 #endif
1632
1633 /* 173. GL_EXT/INGR_blend_func_separate */
1634 #ifdef GL_EXT_blend_func_separate
1635 #define NAME(X) (GLvoid *) X
1636 #else
1637 #define NAME(X) (GLvoid *) NotImplemented
1638 #endif
1639 { "glBlendFuncSeparateEXT", NAME(glBlendFuncSeparateEXT), _gloffset_BlendFuncSeparateEXT },
1640 { "glBlendFuncSeparateINGR", NAME(glBlendFuncSeparateEXT), _gloffset_BlendFuncSeparateEXT },
1641 #undef NAME
1642
1643 /* 188. GL_EXT_vertex_weighting */
1644 #ifdef GL_EXT_vertex_weighting
1645 #define NAME(X) (GLvoid *) X
1646 #else
1647 #define NAME(X) (GLvoid *) NotImplemented
1648 #endif
1649 { "glVertexWeightfEXT", NAME(glVertexWeightfEXT), _gloffset_VertexWeightfEXT },
1650 { "glVertexWeightfvEXT", NAME(glVertexWeightfvEXT), _gloffset_VertexWeightfvEXT },
1651 { "glVertexWeightPointerEXT", NAME(glVertexWeightPointerEXT), _gloffset_VertexWeightPointerEXT },
1652 #undef NAME
1653
1654 /* 190. GL_NV_vertex_array_range */
1655 #ifdef GL_NV_vertex_array_range
1656 #define NAME(X) (GLvoid *) X
1657 #else
1658 #define NAME(X) (GLvoid *) NotImplemented
1659 #endif
1660 { "glFlushVertexArrayRangeNV", NAME(glFlushVertexArrayRangeNV), _gloffset_FlushVertexArrayRangeNV },
1661 { "glVertexArrayRangeNV", NAME(glVertexArrayRangeNV), _gloffset_VertexArrayRangeNV },
1662 #undef NAME
1663
1664 /* 191. GL_NV_register_combiners */
1665 #ifdef GL_NV_register_combiners
1666 #define NAME(X) (GLvoid *) X
1667 #else
1668 #define NAME(X) (GLvoid *) NotImplemented
1669 #endif
1670 { "glCombinerParameterfvNV", NAME(glCombinerParameterfvNV), _gloffset_CombinerParameterfvNV },
1671 { "glCombinerParameterfNV", NAME(glCombinerParameterfNV), _gloffset_CombinerParameterfNV },
1672 { "glCombinerParameterivNV", NAME(glCombinerParameterivNV), _gloffset_CombinerParameterivNV },
1673 { "glCombinerParameteriNV", NAME(glCombinerParameteriNV), _gloffset_CombinerParameteriNV },
1674 { "glCombinerInputNV", NAME(glCombinerInputNV), _gloffset_CombinerInputNV },
1675 { "glCombinerOutputNV", NAME(glCombinerOutputNV), _gloffset_CombinerOutputNV },
1676 { "glFinalCombinerInputNV", NAME(glFinalCombinerInputNV), _gloffset_FinalCombinerInputNV },
1677 { "glGetCombinerInputParameterfvNV", NAME(glGetCombinerInputParameterfvNV), _gloffset_GetCombinerInputParameterfvNV },
1678 { "glGetCombinerInputParameterivNV", NAME(glGetCombinerInputParameterivNV), _gloffset_GetCombinerInputParameterivNV },
1679 { "glGetCombinerOutputParameterfvNV", NAME(glGetCombinerOutputParameterfvNV), _gloffset_GetCombinerOutputParameterfvNV },
1680 { "glGetCombinerOutputParameterivNV", NAME(glGetCombinerOutputParameterivNV), _gloffset_GetCombinerOutputParameterivNV },
1681 { "glGetFinalCombinerInputParameterfvNV", NAME(glGetFinalCombinerInputParameterfvNV), _gloffset_GetFinalCombinerInputParameterfvNV },
1682 { "glGetFinalCombinerInputParameterivNV", NAME(glGetFinalCombinerInputParameterivNV), _gloffset_GetFinalCombinerInputParameterivNV },
1683 #undef NAME
1684
1685 /* 196. GL_MESA_resize_buffers */
1686 #ifdef MESA_resize_buffers
1687 #define NAME(X) (GLvoid *) X
1688 #else
1689 #define NAME(X) (GLvoid *) NotImplemented
1690 #endif
1691 { "glResizeBuffersMESA", NAME(glResizeBuffersMESA), _gloffset_ResizeBuffersMESA },
1692 #undef NAME
1693
1694 /* 197. GL_MESA_window_pos */
1695 #ifdef MESA_window_pos
1696 #define NAME(X) (GLvoid *) X
1697 #else
1698 #define NAME(X) (GLvoid *) NotImplemented
1699 #endif
1700 { "glWindowPos4fMESA", NAME(glWindowPos4fMESA), _gloffset_WindowPos4fMESA },
1701 #undef NAME
1702
1703 /* 209. WGL_EXT_multisample */
1704 #ifdef WGL_EXT_multisample
1705 #define NAME(X) (GLvoid *) X
1706 #else
1707 #define NAME(X) (GLvoid *) NotImplemented
1708 #endif
1709 { "glSampleMaskEXT", NAME(glSampleMaskEXT), _gloffset_SampleMaskSGIS },
1710 { "glSamplePatternEXT", NAME(glSamplePatternEXT), _gloffset_SamplePatternSGIS },
1711 #undef NAME
1712
1713 { NULL, NULL } /* end of list marker */
1714 };
1715
1716
1717
1718 /*
1719 * Return dispatch table offset of the named static (built-in) function.
1720 * Return -1 if function not found.
1721 */
1722 static GLint
1723 get_static_proc_offset(const char *funcName)
1724 {
1725 GLuint i;
1726 for (i = 0; static_functions[i].Name; i++) {
1727 if (strcmp(static_functions[i].Name, funcName) == 0) {
1728 return static_functions[i].Offset;
1729 }
1730 }
1731 return -1;
1732 }
1733
1734
1735 /*
1736 * Return dispatch function address the named static (built-in) function.
1737 * Return NULL if function not found.
1738 */
1739 static GLvoid *
1740 get_static_proc_address(const char *funcName)
1741 {
1742 GLint i;
1743 for (i = 0; static_functions[i].Name; i++) {
1744 if (strcmp(static_functions[i].Name, funcName) == 0) {
1745 return static_functions[i].Address;
1746 }
1747 }
1748 return NULL;
1749 }
1750
1751
1752
1753 /**********************************************************************
1754 * Extension function management.
1755 */
1756
1757
1758 #define MAX_EXTENSION_FUNCS 1000
1759
1760 static struct name_address_offset ExtEntryTable[MAX_EXTENSION_FUNCS];
1761 static GLuint NumExtEntryPoints = 0;
1762
1763 #ifdef USE_SPARC_ASM
1764 extern void __glapi_sparc_icache_flush(unsigned int *);
1765 #endif
1766
1767 /*
1768 * Generate a dispatch function (entrypoint) which jumps through
1769 * the given slot number (offset) in the current dispatch table.
1770 * We need assembly language in order to accomplish this.
1771 */
1772 static void *
1773 generate_entrypoint(GLuint functionOffset)
1774 {
1775 #if defined(USE_X86_ASM)
1776 /*
1777 * This x86 code contributed by Josh Vanderhoof.
1778 *
1779 * 0: a1 10 32 54 76 movl __glapi_Dispatch,%eax
1780 * 00 01 02 03 04
1781 * 5: 85 c0 testl %eax,%eax
1782 * 05 06
1783 * 7: 74 06 je f <entrypoint+0xf>
1784 * 07 08
1785 * 9: ff a0 10 32 54 76 jmp *0x76543210(%eax)
1786 * 09 0a 0b 0c 0d 0e
1787 * f: e8 fc ff ff ff call __glapi_get_dispatch
1788 * 0f 10 11 12 13
1789 * 14: ff a0 10 32 54 76 jmp *0x76543210(%eax)
1790 * 14 15 16 17 18 19
1791 */
1792 static const unsigned char temp[] = {
1793 0xa1, 0x00, 0x00, 0x00, 0x00,
1794 0x85, 0xc0,
1795 0x74, 0x06,
1796 0xff, 0xa0, 0x00, 0x00, 0x00, 0x00,
1797 0xe8, 0x00, 0x00, 0x00, 0x00,
1798 0xff, 0xa0, 0x00, 0x00, 0x00, 0x00
1799 };
1800 unsigned char *code = malloc(sizeof(temp));
1801 unsigned int next_insn;
1802 if (code) {
1803 memcpy(code, temp, sizeof(temp));
1804
1805 *(unsigned int *)(code + 0x01) = (unsigned int)&_glapi_Dispatch;
1806 *(unsigned int *)(code + 0x0b) = (unsigned int)functionOffset * 4;
1807 next_insn = (unsigned int)(code + 0x14);
1808 *(unsigned int *)(code + 0x10) = (unsigned int)_glapi_get_dispatch - next_insn;
1809 *(unsigned int *)(code + 0x16) = (unsigned int)functionOffset * 4;
1810 }
1811 return code;
1812 #elif defined(USE_SPARC_ASM)
1813
1814 #ifdef __sparc_v9__
1815 static const unsigned int insn_template[] = {
1816 0x05000000, /* sethi %uhi(_glapi_Dispatch), %g2 */
1817 0x03000000, /* sethi %hi(_glapi_Dispatch), %g1 */
1818 0x8410a000, /* or %g2, %ulo(_glapi_Dispatch), %g2 */
1819 0x82106000, /* or %g1, %lo(_glapi_Dispatch), %g1 */
1820 0x8528b020, /* sllx %g2, 32, %g2 */
1821 0xc2584002, /* ldx [%g1 + %g2], %g1 */
1822 0x05000000, /* sethi %hi(8 * glapioffset), %g2 */
1823 0x8410a000, /* or %g2, %lo(8 * glapioffset), %g2 */
1824 0xc6584002, /* ldx [%g1 + %g2], %g3 */
1825 0x81c0c000, /* jmpl %g3, %g0 */
1826 0x01000000 /* nop */
1827 };
1828 #else
1829 static const unsigned int insn_template[] = {
1830 0x03000000, /* sethi %hi(_glapi_Dispatch), %g1 */
1831 0xc2006000, /* ld [%g1 + %lo(_glapi_Dispatch)], %g1 */
1832 0xc6006000, /* ld [%g1 + %lo(4*glapioffset)], %g3 */
1833 0x81c0c000, /* jmpl %g3, %g0 */
1834 0x01000000 /* nop */
1835 };
1836 #endif
1837 unsigned int *code = malloc(sizeof(insn_template));
1838 unsigned long glapi_addr = (unsigned long) &_glapi_Dispatch;
1839 if (code) {
1840 memcpy(code, insn_template, sizeof(insn_template));
1841
1842 #ifdef __sparc_v9__
1843 code[0] |= (glapi_addr >> (32 + 10));
1844 code[1] |= ((glapi_addr & 0xffffffff) >> 10);
1845 __glapi_sparc_icache_flush(&code[0]);
1846 code[2] |= ((glapi_addr >> 32) & ((1 << 10) - 1));
1847 code[3] |= (glapi_addr & ((1 << 10) - 1));
1848 __glapi_sparc_icache_flush(&code[2]);
1849 code[6] |= ((functionOffset * 8) >> 10);
1850 code[7] |= ((functionOffset * 8) & ((1 << 10) - 1));
1851 __glapi_sparc_icache_flush(&code[6]);
1852 #else
1853 code[0] |= (glapi_addr >> 10);
1854 code[1] |= (glapi_addr & ((1 << 10) - 1));
1855 __glapi_sparc_icache_flush(&code[0]);
1856 code[2] |= (functionOffset * 4);
1857 __glapi_sparc_icache_flush(&code[2]);
1858 #endif
1859 }
1860 return code;
1861 #else
1862 return NULL;
1863 #endif
1864 }
1865
1866
1867
1868 /*
1869 * Add a new extension function entrypoint.
1870 * Return: GL_TRUE = success or GL_FALSE = failure
1871 */
1872 GLboolean
1873 _glapi_add_entrypoint(const char *funcName, GLuint offset)
1874 {
1875 /* first check if the named function is already statically present */
1876 {
1877 GLint index = get_static_proc_offset(funcName);
1878 if (index >= 0) {
1879 return (GLboolean) ((GLuint) index == offset); /* bad offset! */
1880 }
1881 }
1882
1883 {
1884 /* make sure this offset/name pair is legal */
1885 const char *name = _glapi_get_proc_name(offset);
1886 if (name && strcmp(name, funcName) != 0)
1887 return GL_FALSE; /* bad name! */
1888 }
1889
1890 {
1891 /* be sure index and name match known data */
1892 GLuint i;
1893 for (i = 0; i < NumExtEntryPoints; i++) {
1894 if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
1895 /* function already registered with api */
1896 if (ExtEntryTable[i].Offset == offset) {
1897 return GL_TRUE; /* offsets match */
1898 }
1899 else {
1900 return GL_FALSE; /* bad offset! */
1901 }
1902 }
1903 }
1904
1905 /* Make sure we don't try to add a new entrypoint after someone
1906 * has already called _glapi_get_dispatch_table_size()! If that's
1907 * happened the caller's information would become out of date.
1908 */
1909 if (GetSizeCalled)
1910 return GL_FALSE;
1911
1912 /* make sure we have space */
1913 if (NumExtEntryPoints >= MAX_EXTENSION_FUNCS) {
1914 return GL_FALSE;
1915 }
1916 else {
1917 void *entrypoint = generate_entrypoint(offset);
1918 if (!entrypoint)
1919 return GL_FALSE;
1920
1921 ExtEntryTable[NumExtEntryPoints].Name = str_dup(funcName);
1922 ExtEntryTable[NumExtEntryPoints].Offset = offset;
1923 ExtEntryTable[NumExtEntryPoints].Address = entrypoint;
1924 NumExtEntryPoints++;
1925
1926 if (offset > MaxDispatchOffset)
1927 MaxDispatchOffset = offset;
1928
1929 return GL_TRUE; /* success */
1930 }
1931 }
1932
1933 /* should never get here, but play it safe */
1934 return GL_FALSE;
1935 }
1936
1937
1938
1939 #if 0000 /* prototype code for dynamic extension slot allocation */
1940
1941 static int NextFreeOffset = 409; /*XXX*/
1942 #define MAX_DISPATCH_TABLE_SIZE 1000
1943
1944 /*
1945 * Dynamically allocate a dispatch slot for an extension entrypoint
1946 * and generate the assembly language dispatch stub.
1947 * Return the dispatch offset for the function or -1 if no room or error.
1948 */
1949 GLint
1950 _glapi_add_entrypoint2(const char *funcName)
1951 {
1952 int offset;
1953
1954 /* first see if extension func is already known */
1955 offset = _glapi_get_proc_offset(funcName);
1956 if (offset >= 0)
1957 return offset;
1958
1959 if (NumExtEntryPoints < MAX_EXTENSION_FUNCS
1960 && NextFreeOffset < MAX_DISPATCH_TABLE_SIZE) {
1961 void *entryPoint;
1962 offset = NextFreeOffset;
1963 entryPoint = generate_entrypoint(offset);
1964 if (entryPoint) {
1965 NextFreeOffset++;
1966 ExtEntryTable[NumExtEntryPoints].Name = str_dup(funcName);
1967 ExtEntryTable[NumExtEntryPoints].Offset = offset;
1968 ExtEntryTable[NumExtEntryPoints].Address = entryPoint;
1969 NumExtEntryPoints++;
1970 return offset;
1971 }
1972 }
1973 return -1;
1974 }
1975
1976 #endif
1977
1978
1979
1980 /*
1981 * Return offset of entrypoint for named function within dispatch table.
1982 */
1983 GLint
1984 _glapi_get_proc_offset(const char *funcName)
1985 {
1986 /* search extension functions first */
1987 GLuint i;
1988 for (i = 0; i < NumExtEntryPoints; i++) {
1989 if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
1990 return ExtEntryTable[i].Offset;
1991 }
1992 }
1993
1994 /* search static functions */
1995 return get_static_proc_offset(funcName);
1996 }
1997
1998
1999
2000 /*
2001 * Return entrypoint for named function.
2002 */
2003 const GLvoid *
2004 _glapi_get_proc_address(const char *funcName)
2005 {
2006 /* search extension functions first */
2007 GLuint i;
2008 for (i = 0; i < NumExtEntryPoints; i++) {
2009 if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
2010 return ExtEntryTable[i].Address;
2011 }
2012 }
2013
2014 /* search static functions */
2015 return get_static_proc_address(funcName);
2016 }
2017
2018
2019
2020
2021 /*
2022 * Return the name of the function at the given dispatch offset.
2023 * This is only intended for debugging.
2024 */
2025 const char *
2026 _glapi_get_proc_name(GLuint offset)
2027 {
2028 const GLuint n = sizeof(static_functions) / sizeof(struct name_address_offset);
2029 GLuint i;
2030 for (i = 0; i < n; i++) {
2031 if (static_functions[i].Offset == offset)
2032 return static_functions[i].Name;
2033 }
2034
2035 /* search added extension functions */
2036 for (i = 0; i < NumExtEntryPoints; i++) {
2037 if (ExtEntryTable[i].Offset == offset) {
2038 return ExtEntryTable[i].Name;
2039 }
2040 }
2041 return NULL;
2042 }
2043
2044
2045
2046 /*
2047 * Make sure there are no NULL pointers in the given dispatch table.
2048 * Intented for debugging purposes.
2049 */
2050 void
2051 _glapi_check_table(const struct _glapi_table *table)
2052 {
2053 const GLuint entries = _glapi_get_dispatch_table_size();
2054 const void **tab = (const void **) table;
2055 GLuint i;
2056 for (i = 1; i < entries; i++) {
2057 assert(tab[i]);
2058 }
2059
2060 #ifdef DEBUG
2061 /* Do some spot checks to be sure that the dispatch table
2062 * slots are assigned correctly.
2063 */
2064 {
2065 GLuint BeginOffset = _glapi_get_proc_offset("glBegin");
2066 char *BeginFunc = (char*) &table->Begin;
2067 GLuint offset = (BeginFunc - (char *) table) / sizeof(void *);
2068 assert(BeginOffset == _gloffset_Begin);
2069 assert(BeginOffset == offset);
2070 }
2071 {
2072 GLuint viewportOffset = _glapi_get_proc_offset("glViewport");
2073 char *viewportFunc = (char*) &table->Viewport;
2074 GLuint offset = (viewportFunc - (char *) table) / sizeof(void *);
2075 assert(viewportOffset == _gloffset_Viewport);
2076 assert(viewportOffset == offset);
2077 }
2078 {
2079 GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer");
2080 char *VertexPointerFunc = (char*) &table->VertexPointer;
2081 GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *);
2082 assert(VertexPointerOffset == _gloffset_VertexPointer);
2083 assert(VertexPointerOffset == offset);
2084 }
2085 {
2086 GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax");
2087 char *ResetMinMaxFunc = (char*) &table->ResetMinmax;
2088 GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *);
2089 assert(ResetMinMaxOffset == _gloffset_ResetMinmax);
2090 assert(ResetMinMaxOffset == offset);
2091 }
2092 {
2093 GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColor");
2094 char *blendColorFunc = (char*) &table->BlendColor;
2095 GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *);
2096 assert(blendColorOffset == _gloffset_BlendColor);
2097 assert(blendColorOffset == offset);
2098 }
2099 {
2100 GLuint istextureOffset = _glapi_get_proc_offset("glIsTextureEXT");
2101 char *istextureFunc = (char*) &table->IsTextureEXT;
2102 GLuint offset = (istextureFunc - (char *) table) / sizeof(void *);
2103 assert(istextureOffset == _gloffset_IsTextureEXT);
2104 assert(istextureOffset == offset);
2105 }
2106 {
2107 GLuint secondaryColor3fOffset = _glapi_get_proc_offset("glSecondaryColor3fEXT");
2108 char *secondaryColor3fFunc = (char*) &table->SecondaryColor3fEXT;
2109 GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *);
2110 assert(secondaryColor3fOffset == _gloffset_SecondaryColor3fEXT);
2111 assert(secondaryColor3fOffset == offset);
2112 assert(_glapi_get_proc_address("glSecondaryColor3fEXT") == (void *) &glSecondaryColor3fEXT);
2113 }
2114 #endif
2115 }