updated for new glext.h
[mesa.git] / src / mesa / glapi / glapi.c
1 /* $Id: glapi.c,v 1.58 2001/10/17 13:34:08 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 #if 0
906 { "glSamplePass", (GLvoid *) NAME(glSamplePass), _gloffset_SamplePassARB },
907 #endif
908 #undef NAME
909
910 /* ARB 1. GL_ARB_multitexture */
911 #ifdef GL_ARB_multitexture
912 #define NAME(X) (GLvoid *) X
913 #else
914 #define NAME(X) NotImplemented
915 #endif
916 { "glActiveTextureARB", (GLvoid *) NAME(glActiveTextureARB), _gloffset_ActiveTextureARB },
917 { "glClientActiveTextureARB", (GLvoid *) NAME(glClientActiveTextureARB), _gloffset_ClientActiveTextureARB },
918 { "glMultiTexCoord1dARB", (GLvoid *) NAME(glMultiTexCoord1dARB), _gloffset_MultiTexCoord1dARB },
919 { "glMultiTexCoord1dvARB", (GLvoid *) NAME(glMultiTexCoord1dvARB), _gloffset_MultiTexCoord1dvARB },
920 { "glMultiTexCoord1fARB", (GLvoid *) NAME(glMultiTexCoord1fARB), _gloffset_MultiTexCoord1fARB },
921 { "glMultiTexCoord1fvARB", (GLvoid *) NAME(glMultiTexCoord1fvARB), _gloffset_MultiTexCoord1fvARB },
922 { "glMultiTexCoord1iARB", (GLvoid *) NAME(glMultiTexCoord1iARB), _gloffset_MultiTexCoord1iARB },
923 { "glMultiTexCoord1ivARB", (GLvoid *) NAME(glMultiTexCoord1ivARB), _gloffset_MultiTexCoord1ivARB },
924 { "glMultiTexCoord1sARB", (GLvoid *) NAME(glMultiTexCoord1sARB), _gloffset_MultiTexCoord1sARB },
925 { "glMultiTexCoord1svARB", (GLvoid *) NAME(glMultiTexCoord1svARB), _gloffset_MultiTexCoord1svARB },
926 { "glMultiTexCoord2dARB", (GLvoid *) NAME(glMultiTexCoord2dARB), _gloffset_MultiTexCoord2dARB },
927 { "glMultiTexCoord2dvARB", (GLvoid *) NAME(glMultiTexCoord2dvARB), _gloffset_MultiTexCoord2dvARB },
928 { "glMultiTexCoord2fARB", (GLvoid *) NAME(glMultiTexCoord2fARB), _gloffset_MultiTexCoord2fARB },
929 { "glMultiTexCoord2fvARB", (GLvoid *) NAME(glMultiTexCoord2fvARB), _gloffset_MultiTexCoord2fvARB },
930 { "glMultiTexCoord2iARB", (GLvoid *) NAME(glMultiTexCoord2iARB), _gloffset_MultiTexCoord2iARB },
931 { "glMultiTexCoord2ivARB", (GLvoid *) NAME(glMultiTexCoord2ivARB), _gloffset_MultiTexCoord2ivARB },
932 { "glMultiTexCoord2sARB", (GLvoid *) NAME(glMultiTexCoord2sARB), _gloffset_MultiTexCoord2sARB },
933 { "glMultiTexCoord2svARB", (GLvoid *) NAME(glMultiTexCoord2svARB), _gloffset_MultiTexCoord2svARB },
934 { "glMultiTexCoord3dARB", (GLvoid *) NAME(glMultiTexCoord3dARB), _gloffset_MultiTexCoord3dARB },
935 { "glMultiTexCoord3dvARB", (GLvoid *) NAME(glMultiTexCoord3dvARB), _gloffset_MultiTexCoord3dvARB },
936 { "glMultiTexCoord3fARB", (GLvoid *) NAME(glMultiTexCoord3fARB), _gloffset_MultiTexCoord3fARB },
937 { "glMultiTexCoord3fvARB", (GLvoid *) NAME(glMultiTexCoord3fvARB), _gloffset_MultiTexCoord3fvARB },
938 { "glMultiTexCoord3iARB", (GLvoid *) NAME(glMultiTexCoord3iARB), _gloffset_MultiTexCoord3iARB },
939 { "glMultiTexCoord3ivARB", (GLvoid *) NAME(glMultiTexCoord3ivARB), _gloffset_MultiTexCoord3ivARB },
940 { "glMultiTexCoord3sARB", (GLvoid *) NAME(glMultiTexCoord3sARB), _gloffset_MultiTexCoord3sARB },
941 { "glMultiTexCoord3svARB", (GLvoid *) NAME(glMultiTexCoord3svARB), _gloffset_MultiTexCoord3svARB },
942 { "glMultiTexCoord4dARB", (GLvoid *) NAME(glMultiTexCoord4dARB), _gloffset_MultiTexCoord4dARB },
943 { "glMultiTexCoord4dvARB", (GLvoid *) NAME(glMultiTexCoord4dvARB), _gloffset_MultiTexCoord4dvARB },
944 { "glMultiTexCoord4fARB", (GLvoid *) NAME(glMultiTexCoord4fARB), _gloffset_MultiTexCoord4fARB },
945 { "glMultiTexCoord4fvARB", (GLvoid *) NAME(glMultiTexCoord4fvARB), _gloffset_MultiTexCoord4fvARB },
946 { "glMultiTexCoord4iARB", (GLvoid *) NAME(glMultiTexCoord4iARB), _gloffset_MultiTexCoord4iARB },
947 { "glMultiTexCoord4ivARB", (GLvoid *) NAME(glMultiTexCoord4ivARB), _gloffset_MultiTexCoord4ivARB },
948 { "glMultiTexCoord4sARB", (GLvoid *) NAME(glMultiTexCoord4sARB), _gloffset_MultiTexCoord4sARB },
949 { "glMultiTexCoord4svARB", (GLvoid *) NAME(glMultiTexCoord4svARB), _gloffset_MultiTexCoord4svARB },
950 #undef NAME
951
952 /* ARB 3. GL_ARB_transpose_matrix */
953 #ifdef GL_ARB_transpose_matrix
954 #define NAME(X) (GLvoid *) X
955 #else
956 #define NAME(X) NotImplemented
957 #endif
958 { "glLoadTransposeMatrixdARB", (GLvoid *) NAME(glLoadTransposeMatrixdARB), _gloffset_LoadTransposeMatrixdARB },
959 { "glLoadTransposeMatrixfARB", (GLvoid *) NAME(glLoadTransposeMatrixfARB), _gloffset_LoadTransposeMatrixfARB },
960 { "glMultTransposeMatrixdARB", (GLvoid *) NAME(glMultTransposeMatrixdARB), _gloffset_MultTransposeMatrixdARB },
961 { "glMultTransposeMatrixfARB", (GLvoid *) NAME(glMultTransposeMatrixfARB), _gloffset_MultTransposeMatrixfARB },
962 #undef NAME
963
964 /* ARB 5. GL_ARB_multisample */
965 #ifdef GL_ARB_multisample
966 #define NAME(X) (GLvoid *) X
967 #else
968 #define NAME(X) (GLvoid *) NotImplemented
969 #endif
970 { "glSampleCoverageARB", NAME(glSampleCoverageARB), _gloffset_SampleCoverageARB },
971 #undef NAME
972
973 /* ARB 12. GL_ARB_texture_compression */
974 #if 000
975 #if defined(GL_ARB_texture_compression) && defined(_gloffset_CompressedTexImage3DARB)
976 #define NAME(X) (GLvoid *) X
977 #else
978 #define NAME(X) (GLvoid *) NotImplemented
979 #endif
980 { "glCompressedTexImage3DARB", NAME(glCompressedTexImage3DARB), _gloffset_CompressedTexImage3DARB },
981 { "glCompressedTexImage2DARB", NAME(glCompressedTexImage2DARB), _gloffset_CompressedTexImage2DARB },
982 { "glCompressedTexImage1DARB", NAME(glCompressedTexImage1DARB), _gloffset_CompressedTexImage1DARB },
983 { "glCompressedTexSubImage3DARB", NAME(glCompressedTexSubImage3DARB), _gloffset_CompressedTexSubImage3DARB },
984 { "glCompressedTexSubImage2DARB", NAME(glCompressedTexSubImage2DARB), _gloffset_CompressedTexSubImage2DARB },
985 { "glCompressedTexSubImage1DARB", NAME(glCompressedTexSubImage1DARB), _gloffset_CompressedTexSubImage1DARB },
986 { "glGetCompressedTexImageARB", NAME(glGetCompressedTexImageARB), _gloffset_GetCompressedTexImageARB },
987 #undef NAME
988 #endif
989
990 /* 2. GL_EXT_blend_color */
991 #ifdef GL_EXT_blend_color
992 #define NAME(X) (GLvoid *) X
993 #else
994 #define NAME(X) (GLvoid *) NotImplemented
995 #endif
996 { "glBlendColorEXT", NAME(glBlendColorEXT), _gloffset_BlendColor },
997 #undef NAME
998
999 /* 3. GL_EXT_polygon_offset */
1000 #ifdef GL_EXT_polygon_offset
1001 #define NAME(X) (GLvoid *) X
1002 #else
1003 #define NAME(X) (GLvoid *) NotImplemented
1004 #endif
1005 { "glPolygonOffsetEXT", NAME(glPolygonOffsetEXT), _gloffset_PolygonOffsetEXT },
1006 #undef NAME
1007
1008 /* 6. GL_EXT_texture3D */
1009 #ifdef GL_EXT_texture3D
1010 #define NAME(X) (GLvoid *) X
1011 #else
1012 #define NAME(X) (GLvoid *) NotImplemented
1013 #endif
1014 { "glCopyTexSubImage3DEXT", NAME(glCopyTexSubImage3DEXT), _gloffset_CopyTexSubImage3D },
1015 { "glTexImage3DEXT", NAME(glTexImage3DEXT), _gloffset_TexImage3D },
1016 { "glTexSubImage3DEXT", NAME(glTexSubImage3DEXT), _gloffset_TexSubImage3D },
1017 #undef NAME
1018
1019 /* 7. GL_SGI_texture_filter4 */
1020 #ifdef GL_SGI_texture_filter4
1021 #define NAME(X) (GLvoid *) X
1022 #else
1023 #define NAME(X) (GLvoid *) NotImplemented
1024 #endif
1025 { "glGetTexFilterFuncSGIS", NAME(glGetTexFilterFuncSGIS), _gloffset_GetTexFilterFuncSGIS },
1026 { "glTexFilterFuncSGIS", NAME(glTexFilterFuncSGIS), _gloffset_TexFilterFuncSGIS },
1027 #undef NAME
1028
1029 /* 9. GL_EXT_subtexture */
1030 #ifdef GL_EXT_subtexture
1031 #define NAME(X) (GLvoid *) X
1032 #else
1033 #define NAME(X) (GLvoid *) NotImplemented
1034 #endif
1035 { "glTexSubImage1DEXT", NAME(glTexSubImage1DEXT), _gloffset_TexSubImage1D },
1036 { "glTexSubImage2DEXT", NAME(glTexSubImage2DEXT), _gloffset_TexSubImage2D },
1037 #undef NAME
1038
1039 /* 10. GL_EXT_copy_texture */
1040 #ifdef GL_EXT_copy_texture
1041 #define NAME(X) (GLvoid *) X
1042 #else
1043 #define NAME(X) (GLvoid *) NotImplemented
1044 #endif
1045 { "glCopyTexImage1DEXT", NAME(glCopyTexImage1DEXT), _gloffset_CopyTexImage1D },
1046 { "glCopyTexImage2DEXT", NAME(glCopyTexImage2DEXT), _gloffset_CopyTexImage2D },
1047 { "glCopyTexSubImage1DEXT", NAME(glCopyTexSubImage1DEXT), _gloffset_CopyTexSubImage1D },
1048 { "glCopyTexSubImage2DEXT", NAME(glCopyTexSubImage2DEXT), _gloffset_CopyTexSubImage2D },
1049 #undef NAME
1050
1051 /* 11. GL_EXT_histogram */
1052 #ifdef GL_EXT_histogram
1053 #define NAME(X) (GLvoid *) X
1054 #else
1055 #define NAME(X) (GLvoid *) NotImplemented
1056 #endif
1057 { "glGetHistogramEXT", NAME(glGetHistogramEXT), _gloffset_GetHistogramEXT },
1058 { "glGetHistogramParameterfvEXT", NAME(glGetHistogramParameterfvEXT), _gloffset_GetHistogramParameterfvEXT },
1059 { "glGetHistogramParameterivEXT", NAME(glGetHistogramParameterivEXT), _gloffset_GetHistogramParameterivEXT },
1060 { "glGetMinmaxEXT", NAME(glGetMinmaxEXT), _gloffset_GetMinmaxEXT },
1061 { "glGetMinmaxParameterfvEXT", NAME(glGetMinmaxParameterfvEXT), _gloffset_GetMinmaxParameterfvEXT },
1062 { "glGetMinmaxParameterivEXT", NAME(glGetMinmaxParameterivEXT), _gloffset_GetMinmaxParameterivEXT },
1063 { "glHistogramEXT", NAME(glHistogramEXT), _gloffset_Histogram },
1064 { "glMinmaxEXT", NAME(glMinmaxEXT), _gloffset_Minmax },
1065 { "glResetHistogramEXT", NAME(glResetHistogramEXT), _gloffset_ResetHistogram },
1066 { "glResetMinmaxEXT", NAME(glResetMinmaxEXT), _gloffset_ResetMinmax },
1067 #undef NAME
1068
1069 /* 12. GL_EXT_convolution */
1070 #ifdef GL_EXT_convolution
1071 #define NAME(X) (GLvoid *) X
1072 #else
1073 #define NAME(X) (GLvoid *) NotImplemented
1074 #endif
1075 { "glConvolutionFilter1DEXT", NAME(glConvolutionFilter1DEXT), _gloffset_ConvolutionFilter1D },
1076 { "glConvolutionFilter2DEXT", NAME(glConvolutionFilter2DEXT), _gloffset_ConvolutionFilter2D },
1077 { "glConvolutionParameterfEXT", NAME(glConvolutionParameterfEXT), _gloffset_ConvolutionParameterf },
1078 { "glConvolutionParameterfvEXT", NAME(glConvolutionParameterfvEXT), _gloffset_ConvolutionParameterfv },
1079 { "glConvolutionParameteriEXT", NAME(glConvolutionParameteriEXT), _gloffset_ConvolutionParameteri },
1080 { "glConvolutionParameterivEXT", NAME(glConvolutionParameterivEXT), _gloffset_ConvolutionParameteriv },
1081 { "glCopyConvolutionFilter1DEXT", NAME(glCopyConvolutionFilter1DEXT), _gloffset_CopyConvolutionFilter1D },
1082 { "glCopyConvolutionFilter2DEXT", NAME(glCopyConvolutionFilter2DEXT), _gloffset_CopyConvolutionFilter2D },
1083 { "glGetConvolutionFilterEXT", NAME(glGetConvolutionFilterEXT), _gloffset_GetConvolutionFilterEXT },
1084 { "glGetConvolutionParameterivEXT", NAME(glGetConvolutionParameterivEXT), _gloffset_GetConvolutionParameterivEXT },
1085 { "glGetConvolutionParameterfvEXT", NAME(glGetConvolutionParameterfvEXT), _gloffset_GetConvolutionParameterfvEXT },
1086 { "glGetSeparableFilterEXT", NAME(glGetSeparableFilterEXT), _gloffset_GetSeparableFilterEXT },
1087 { "glSeparableFilter2DEXT", NAME(glSeparableFilter2DEXT), _gloffset_SeparableFilter2D },
1088 #undef NAME
1089
1090 /* 14. GL_SGI_color_table */
1091 #ifdef GL_SGI_color_table
1092 #define NAME(X) (GLvoid *) X
1093 #else
1094 #define NAME(X) (GLvoid *) NotImplemented
1095 #endif
1096 { "glColorTableSGI", NAME(glColorTableSGI), _gloffset_ColorTable },
1097 { "glColorTableParameterfvSGI", NAME(glColorTableParameterfvSGI), _gloffset_ColorTableParameterfv },
1098 { "glColorTableParameterivSGI", NAME(glColorTableParameterivSGI), _gloffset_ColorTableParameteriv },
1099 { "glCopyColorTableSGI", NAME(glCopyColorTableSGI), _gloffset_CopyColorTable },
1100 { "glGetColorTableSGI", NAME(glGetColorTableSGI), _gloffset_GetColorTableSGI },
1101 { "glGetColorTableParameterfvSGI", NAME(glGetColorTableParameterfvSGI), _gloffset_GetColorTableParameterfvSGI },
1102 { "glGetColorTableParameterivSGI", NAME(glGetColorTableParameterivSGI), _gloffset_GetColorTableParameterivSGI },
1103 #undef NAME
1104
1105 /* 15. GL_SGIS_pixel_texture */
1106 #ifdef GL_SGIS_pixel_texture
1107 #define NAME(X) (GLvoid *) X
1108 #else
1109 #define NAME(X) (GLvoid *) NotImplemented
1110 #endif
1111 { "glPixelTexGenParameterfSGIS", NAME(glPixelTexGenParameterfSGIS), _gloffset_PixelTexGenParameterfSGIS },
1112 { "glPixelTexGenParameteriSGIS", NAME(glPixelTexGenParameteriSGIS), _gloffset_PixelTexGenParameteriSGIS },
1113 { "glGetPixelTexGenParameterfvSGIS", NAME(glGetPixelTexGenParameterfvSGIS), _gloffset_GetPixelTexGenParameterfvSGIS },
1114 { "glGetPixelTexGenParameterivSGIS", NAME(glGetPixelTexGenParameterivSGIS), _gloffset_GetPixelTexGenParameterivSGIS },
1115 #undef NAME
1116
1117 /* 16. GL_SGIS_texture4D */
1118 #ifdef GL_SGIS_texture4D
1119 #define NAME(X) (GLvoid *) X
1120 #else
1121 #define NAME(X) (GLvoid *) NotImplemented
1122 #endif
1123 { "glTexImage4DSGIS", NAME(glTexImage4DSGIS), _gloffset_TexImage4DSGIS },
1124 { "glTexSubImage4DSGIS", NAME(glTexSubImage4DSGIS), _gloffset_TexSubImage4DSGIS },
1125 #undef NAME
1126
1127 /* 20. GL_EXT_texture_object */
1128 #ifdef GL_EXT_texture_object
1129 #define NAME(X) (GLvoid *) X
1130 #else
1131 #define NAME(X) (GLvoid *) NotImplemented
1132 #endif
1133 { "glAreTexturesResidentEXT", NAME(glAreTexturesResidentEXT), _gloffset_AreTexturesResidentEXT },
1134 { "glBindTextureEXT", NAME(glBindTextureEXT), _gloffset_BindTexture },
1135 { "glDeleteTexturesEXT", NAME(glDeleteTexturesEXT), _gloffset_DeleteTextures },
1136 { "glGenTexturesEXT", NAME(glGenTexturesEXT), _gloffset_GenTexturesEXT },
1137 { "glIsTextureEXT", NAME(glIsTextureEXT), _gloffset_IsTextureEXT },
1138 { "glPrioritizeTexturesEXT", NAME(glPrioritizeTexturesEXT), _gloffset_PrioritizeTextures },
1139 #undef NAME
1140
1141 /* 21. GL_SGIS_detail_texture */
1142 #ifdef GL_SGIS_detail_texture
1143 #define NAME(X) (GLvoid *) X
1144 #else
1145 #define NAME(X) (GLvoid *) NotImplemented
1146 #endif
1147 { "glDetailTexFuncSGIS", NAME(glDetailTexFuncSGIS), _gloffset_DetailTexFuncSGIS },
1148 { "glGetDetailTexFuncSGIS", NAME(glGetDetailTexFuncSGIS), _gloffset_GetDetailTexFuncSGIS },
1149 #undef NAME
1150
1151 /* 22. GL_SGIS_sharpen_texture */
1152 #ifdef GL_SGIS_sharpen_texture
1153 #define NAME(X) (GLvoid *) X
1154 #else
1155 #define NAME(X) (GLvoid *) NotImplemented
1156 #endif
1157 { "glGetSharpenTexFuncSGIS", NAME(glGetSharpenTexFuncSGIS), _gloffset_GetSharpenTexFuncSGIS },
1158 { "glSharpenTexFuncSGIS", NAME(glSharpenTexFuncSGIS), _gloffset_SharpenTexFuncSGIS },
1159 #undef NAME
1160
1161 /* 25. GL_SGIS_multisample */
1162 #ifdef GL_SGIS_multisample
1163 #define NAME(X) (GLvoid *) X
1164 #else
1165 #define NAME(X) (GLvoid *) NotImplemented
1166 #endif
1167 { "glSampleMaskSGIS", NAME(glSampleMaskSGIS), _gloffset_SampleMaskSGIS },
1168 { "glSamplePatternSGIS", NAME(glSamplePatternSGIS), _gloffset_SamplePatternSGIS },
1169 #undef NAME
1170
1171 /* 30. GL_EXT_vertex_array */
1172 #ifdef GL_EXT_vertex_array
1173 #define NAME(X) (GLvoid *) X
1174 #else
1175 #define NAME(X) (GLvoid *) NotImplemented
1176 #endif
1177 { "glArrayElementEXT", NAME(glArrayElementEXT), _gloffset_ArrayElement },
1178 { "glColorPointerEXT", NAME(glColorPointerEXT), _gloffset_ColorPointerEXT },
1179 { "glDrawArraysEXT", NAME(glDrawArraysEXT), _gloffset_DrawArrays },
1180 { "glEdgeFlagPointerEXT", NAME(glEdgeFlagPointerEXT), _gloffset_EdgeFlagPointerEXT },
1181 { "glGetPointervEXT", NAME(glGetPointervEXT), _gloffset_GetPointerv },
1182 { "glIndexPointerEXT", NAME(glIndexPointerEXT), _gloffset_IndexPointerEXT },
1183 { "glNormalPointerEXT", NAME(glNormalPointerEXT), _gloffset_NormalPointerEXT },
1184 { "glTexCoordPointerEXT", NAME(glTexCoordPointerEXT), _gloffset_TexCoordPointerEXT },
1185 { "glVertexPointerEXT", NAME(glVertexPointerEXT), _gloffset_VertexPointerEXT },
1186 #undef NAME
1187
1188 /* 37. GL_EXT_blend_minmax */
1189 #ifdef GL_EXT_blend_minmax
1190 #define NAME(X) (GLvoid *) X
1191 #else
1192 #define NAME(X) (GLvoid *) NotImplemented
1193 #endif
1194 { "glBlendEquationEXT", NAME(glBlendEquationEXT), _gloffset_BlendEquation },
1195 #undef NAME
1196
1197 /* 52. GL_SGIX_sprite */
1198 #ifdef GL_SGIX_sprite
1199 #define NAME(X) (GLvoid *) X
1200 #else
1201 #define NAME(X) (GLvoid *) NotImplemented
1202 #endif
1203 { "glSpriteParameterfSGIX", NAME(glSpriteParameterfSGIX), _gloffset_SpriteParameterfSGIX },
1204 { "glSpriteParameterfvSGIX", NAME(glSpriteParameterfvSGIX), _gloffset_SpriteParameterfvSGIX },
1205 { "glSpriteParameteriSGIX", NAME(glSpriteParameteriSGIX), _gloffset_SpriteParameteriSGIX },
1206 { "glSpriteParameterivSGIX", NAME(glSpriteParameterivSGIX), _gloffset_SpriteParameterivSGIX },
1207 #undef NAME
1208
1209 /* 54. GL_EXT_point_parameters */
1210 #ifdef GL_EXT_point_parameters
1211 #define NAME(X) (GLvoid *) X
1212 #else
1213 #define NAME(X) (GLvoid *) NotImplemented
1214 #endif
1215 { "glPointParameterfEXT", NAME(glPointParameterfEXT), _gloffset_PointParameterfEXT },
1216 { "glPointParameterfvEXT", NAME(glPointParameterfvEXT), _gloffset_PointParameterfvEXT },
1217 { "glPointParameterfSGIS", NAME(glPointParameterfSGIS), _gloffset_PointParameterfEXT },
1218 { "glPointParameterfvSGIS", NAME(glPointParameterfvSGIS), _gloffset_PointParameterfvEXT },
1219 #undef NAME
1220
1221 /* 55. GL_SGIX_instruments */
1222 #ifdef GL_SGIX_instruments
1223 #define NAME(X) (GLvoid *) X
1224 #else
1225 #define NAME(X) (GLvoid *) NotImplemented
1226 #endif
1227 { "glInstrumentsBufferSGIX", NAME(glInstrumentsBufferSGIX), _gloffset_InstrumentsBufferSGIX },
1228 { "glStartInstrumentsSGIX", NAME(glStartInstrumentsSGIX), _gloffset_StartInstrumentsSGIX },
1229 { "glStopInstrumentsSGIX", NAME(glStopInstrumentsSGIX), _gloffset_StopInstrumentsSGIX },
1230 { "glReadInstrumentsSGIX", NAME(glReadInstrumentsSGIX), _gloffset_ReadInstrumentsSGIX },
1231 { "glPollInstrumentsSGIX", NAME(glPollInstrumentsSGIX), _gloffset_PollInstrumentsSGIX },
1232 { "glGetInstrumentsSGIX", NAME(glGetInstrumentsSGIX), _gloffset_GetInstrumentsSGIX },
1233 #undef NAME
1234
1235 /* 57. GL_SGIX_framezoom */
1236 #ifdef GL_SGIX_framezoom
1237 #define NAME(X) (GLvoid *) X
1238 #else
1239 #define NAME(X) (GLvoid *) NotImplemented
1240 #endif
1241 { "glFrameZoomSGIX", NAME(glFrameZoomSGIX), _gloffset_FrameZoomSGIX },
1242 #undef NAME
1243
1244 /* 58. GL_SGIX_tag_sample_buffer */
1245 #ifdef GL_SGIX_tag_sample_buffer
1246 #define NAME(X) (GLvoid *) X
1247 #else
1248 #define NAME(X) (GLvoid *) NotImplemented
1249 #endif
1250 { "glTagSampleBufferSGIX", NAME(glTagSampleBufferSGIX), _gloffset_TagSampleBufferSGIX },
1251 #undef NAME
1252
1253 /* 60. GL_SGIX_reference_plane */
1254 #ifdef GL_SGIX_reference_plane
1255 #define NAME(X) (GLvoid *) X
1256 #else
1257 #define NAME(X) (GLvoid *) NotImplemented
1258 #endif
1259 { "glReferencePlaneSGIX", NAME(glReferencePlaneSGIX), _gloffset_ReferencePlaneSGIX },
1260 #undef NAME
1261
1262 /* 61. GL_SGIX_flush_raster */
1263 #ifdef GL_SGIX_flush_raster
1264 #define NAME(X) (GLvoid *) X
1265 #else
1266 #define NAME(X) (GLvoid *) NotImplemented
1267 #endif
1268 { "glFlushRasterSGIX", NAME(glFlushRasterSGIX), _gloffset_FlushRasterSGIX },
1269 #undef NAME
1270
1271 /* 66. GL_HP_image_transform */
1272 #if 0
1273 #ifdef GL_HP_image_transform
1274 #define NAME(X) (GLvoid *) X
1275 #else
1276 #define NAME(X) (GLvoid *) NotImplemented
1277 #endif
1278 { "glGetImageTransformParameterfvHP", NAME(glGetImageTransformParameterfvHP), _gloffset_GetImageTransformParameterfvHP },
1279 { "glGetImageTransformParameterivHP", NAME(glGetImageTransformParameterivHP), _gloffset_GetImageTransformParameterivHP },
1280 { "glImageTransformParameterfHP", NAME(glImageTransformParameterfHP), _gloffset_ImageTransformParameterfHP },
1281 { "glImageTransformParameterfvHP", NAME(glImageTransformParameterfvHP), _gloffset_ImageTransformParameterfvHP },
1282 { "glImageTransformParameteriHP", NAME(glImageTransformParameteriHP), _gloffset_ImageTransformParameteriHP },
1283 { "glImageTransformParameterivHP", NAME(glImageTransformParameterivHP), _gloffset_ImageTransformParameterivHP },
1284 #undef NAME
1285 #endif
1286
1287 /* 74. GL_EXT_color_subtable */
1288 #ifdef GL_EXT_color_subtable
1289 #define NAME(X) (GLvoid *) X
1290 #else
1291 #define NAME(X) (GLvoid *) NotImplemented
1292 #endif
1293 { "glColorSubTableEXT", NAME(glColorSubTableEXT), _gloffset_ColorSubTable },
1294 { "glCopyColorSubTableEXT", NAME(glCopyColorSubTableEXT), _gloffset_CopyColorSubTable },
1295 #undef NAME
1296
1297 /* 77. GL_PGI_misc_hints */
1298 #ifdef GL_PGI_misc_hints
1299 #define NAME(X) (GLvoid *) X
1300 #else
1301 #define NAME(X) (GLvoid *) NotImplemented
1302 #endif
1303 { "glHintPGI", NAME(glHintPGI), _gloffset_HintPGI },
1304 #undef NAME
1305
1306 /* 78. GL_EXT_paletted_texture */
1307 #ifdef GL_EXT_paletted_texture
1308 #define NAME(X) (GLvoid *) X
1309 #else
1310 #define NAME(X) (GLvoid *) NotImplemented
1311 #endif
1312 { "glColorTableEXT", NAME(glColorTableEXT), _gloffset_ColorTable },
1313 { "glGetColorTableEXT", NAME(glGetColorTableEXT), _gloffset_GetColorTable },
1314 { "glGetColorTableParameterfvEXT", NAME(glGetColorTableParameterfvEXT), _gloffset_GetColorTableParameterfv },
1315 { "glGetColorTableParameterivEXT", NAME(glGetColorTableParameterivEXT), _gloffset_GetColorTableParameteriv },
1316 #undef NAME
1317
1318 /* 80. GL_SGIX_list_priority */
1319 #ifdef GL_SGIX_list_priority
1320 #define NAME(X) (GLvoid *) X
1321 #else
1322 #define NAME(X) (GLvoid *) NotImplemented
1323 #endif
1324 { "glGetListParameterfvSGIX", NAME(glGetListParameterfvSGIX), _gloffset_GetListParameterfvSGIX },
1325 { "glGetListParameterivSGIX", NAME(glGetListParameterivSGIX), _gloffset_GetListParameterivSGIX },
1326 { "glListParameterfSGIX", NAME(glListParameterfSGIX), _gloffset_ListParameterfSGIX },
1327 { "glListParameterfvSGIX", NAME(glListParameterfvSGIX), _gloffset_ListParameterfvSGIX },
1328 { "glListParameteriSGIX", NAME(glListParameteriSGIX), _gloffset_ListParameteriSGIX },
1329 { "glListParameterivSGIX", NAME(glListParameterivSGIX), _gloffset_ListParameterivSGIX },
1330 #undef NAME
1331
1332 /* 94. GL_EXT_index_material */
1333 #ifdef GL_EXT_index_material
1334 #define NAME(X) (GLvoid *) X
1335 #else
1336 #define NAME(X) (GLvoid *) NotImplemented
1337 #endif
1338 { "glIndexMaterialEXT", NAME(glIndexMaterialEXT), _gloffset_IndexMaterialEXT },
1339 #undef NAME
1340
1341 /* 95. GL_EXT_index_func */
1342 #ifdef GL_EXT_index_func
1343 #define NAME(X) (GLvoid *) X
1344 #else
1345 #define NAME(X) (GLvoid *) NotImplemented
1346 #endif
1347 { "glIndexFuncEXT", NAME(glIndexFuncEXT), _gloffset_IndexFuncEXT },
1348 #undef NAME
1349
1350 /* 97. GL_EXT_compiled_vertex_array */
1351 #ifdef GL_EXT_compiled_vertex_array
1352 #define NAME(X) (GLvoid *) X
1353 #else
1354 #define NAME(X) (GLvoid *) NotImplemented
1355 #endif
1356 { "glLockArraysEXT", NAME(glLockArraysEXT), _gloffset_LockArraysEXT },
1357 { "glUnlockArraysEXT", NAME(glUnlockArraysEXT), _gloffset_UnlockArraysEXT },
1358 #undef NAME
1359
1360 /* 98. GL_EXT_cull_vertex */
1361 #ifdef GL_EXT_cull_vertex
1362 #define NAME(X) (GLvoid *) X
1363 #else
1364 #define NAME(X) (GLvoid *) NotImplemented
1365 #endif
1366 { "glCullParameterfvEXT", NAME(glCullParameterfvEXT), _gloffset_CullParameterfvEXT },
1367 { "glCullParameterdvEXT", NAME(glCullParameterdvEXT), _gloffset_CullParameterdvEXT },
1368 #undef NAME
1369
1370 /* 102. GL_SGIX_fragment_lighting */
1371 #ifdef GL_SGIX_fragment_lighting
1372 #define NAME(X) (GLvoid *) X
1373 #else
1374 #define NAME(X) (GLvoid *) NotImplemented
1375 #endif
1376 { "glFragmentColorMaterialSGIX", NAME(glFragmentColorMaterialSGIX), _gloffset_FragmentColorMaterialSGIX },
1377 { "glFragmentLightfSGIX", NAME(glFragmentLightfSGIX), _gloffset_FragmentLightfSGIX },
1378 { "glFragmentLightfvSGIX", NAME(glFragmentLightfvSGIX), _gloffset_FragmentLightfvSGIX },
1379 { "glFragmentLightiSGIX", NAME(glFragmentLightiSGIX), _gloffset_FragmentLightiSGIX },
1380 { "glFragmentLightivSGIX", NAME(glFragmentLightivSGIX), _gloffset_FragmentLightivSGIX },
1381 { "glFragmentLightModelfSGIX", NAME(glFragmentLightModelfSGIX), _gloffset_FragmentLightModelfSGIX },
1382 { "glFragmentLightModelfvSGIX", NAME(glFragmentLightModelfvSGIX), _gloffset_FragmentLightModelfvSGIX },
1383 { "glFragmentLightModeliSGIX", NAME(glFragmentLightModeliSGIX), _gloffset_FragmentLightModeliSGIX },
1384 { "glFragmentLightModelivSGIX", NAME(glFragmentLightModelivSGIX), _gloffset_FragmentLightModelivSGIX },
1385 { "glFragmentMaterialfSGIX", NAME(glFragmentMaterialfSGIX), _gloffset_FragmentMaterialfSGIX },
1386 { "glFragmentMaterialfvSGIX", NAME(glFragmentMaterialfvSGIX), _gloffset_FragmentMaterialfvSGIX },
1387 { "glFragmentMaterialiSGIX", NAME(glFragmentMaterialiSGIX), _gloffset_FragmentMaterialiSGIX },
1388 { "glFragmentMaterialivSGIX", NAME(glFragmentMaterialivSGIX), _gloffset_FragmentMaterialivSGIX },
1389 { "glGetFragmentLightfvSGIX", NAME(glGetFragmentLightfvSGIX), _gloffset_GetFragmentLightfvSGIX },
1390 { "glGetFragmentLightivSGIX", NAME(glGetFragmentLightivSGIX), _gloffset_GetFragmentLightivSGIX },
1391 { "glGetFragmentMaterialfvSGIX", NAME(glGetFragmentMaterialfvSGIX), _gloffset_GetFragmentMaterialfvSGIX },
1392 { "glGetFragmentMaterialivSGIX", NAME(glGetFragmentMaterialivSGIX), _gloffset_GetFragmentMaterialivSGIX },
1393 { "glLightEnviSGIX", NAME(glLightEnviSGIX), _gloffset_LightEnviSGIX },
1394 #undef NAME
1395
1396 /* 112. GL_EXT_draw_range_elements */
1397 #if 000
1398 #ifdef GL_EXT_draw_range_elements
1399 #define NAME(X) (GLvoid *) X
1400 #else
1401 #define NAME(X) (GLvoid *) NotImplemented
1402 #endif
1403 { "glDrawRangeElementsEXT", NAME(glDrawRangeElementsEXT), _gloffset_DrawRangeElementsEXT },
1404 #undef NAME
1405 #endif
1406
1407 /* 117. GL_EXT_light_texture */
1408 #if 000
1409 #ifdef GL_EXT_light_texture
1410 #define NAME(X) (GLvoid *) X
1411 #else
1412 #define NAME(X) (GLvoid *) NotImplemented
1413 #endif
1414 { "glApplyTextureEXT", NAME(glApplyTextureEXT), _gloffset_ApplyTextureEXT },
1415 { "glTextureLightEXT", NAME(glTextureLightEXT), _gloffset_TextureLightEXT },
1416 { "glTextureMaterialEXT", NAME(glTextureMaterialEXT), _gloffset_TextureMaterialEXT },
1417 #undef NAME
1418
1419 /* 135. GL_INTEL_texture_scissor */
1420 #ifdef GL_INTEL_texture_scissor
1421 #define NAME(X) (GLvoid *) X
1422 #else
1423 #define NAME(X) (GLvoid *) NotImplemented
1424 #endif
1425 { "glTexScissorINTEL", NAME(glTexScissorINTEL), _gloffset_TexScissorINTEL },
1426 { "glTexScissorFuncINTEL", NAME(glTexScissorFuncINTEL), _gloffset_glTexScissorFuncINTEL },
1427 #undef NAME
1428
1429 /* 136. GL_INTEL_parallel_arrays */
1430 #ifdef GL_INTEL_parallel_arrays
1431 #define NAME(X) (GLvoid *) X
1432 #else
1433 #define NAME(X) (GLvoid *) NotImplemented
1434 #endif
1435 { "glVertexPointervINTEL", NAME(glVertexPointervINTEL), _gloffset_VertexPointervINTEL },
1436 { "glNormalPointervINTEL", NAME(glNormalPointervINTEL), _gloffset_NormalPointervINTEL },
1437 { "glColorPointervINTEL", NAME(glColorPointervINTEL), _gloffset_ColorPointervINTEL },
1438 { "glTexCoordPointervINTEL", NAME(glTexCoordPointervINTEL), _gloffset_glxCoordPointervINTEL },
1439 #undef NAME
1440 #endif
1441
1442 /* 138. GL_EXT_pixel_transform */
1443 #if 000
1444 #ifdef GL_EXT_pixel_transform
1445 #define NAME(X) (GLvoid *) X
1446 #else
1447 #define NAME(X) (GLvoid *) NotImplemented
1448 #endif
1449 { "glPixelTransformParameteriEXT", NAME(glPixelTransformParameteriEXT), _gloffset_PixelTransformParameteriEXT },
1450 { "glPixelTransformParameterfEXT", NAME(glPixelTransformParameterfEXT), _gloffset_PixelTransformParameterfEXT },
1451 { "glPixelTransformParameterivEXT", NAME(glPixelTransformParameterivEXT), _gloffset_PixelTransformParameterivEXT },
1452 { "glPixelTransformParameterfvEXT", NAME(glPixelTransformParameterfvEXT), _gloffset_PixelTransformParameterfvEXT },
1453 { "glGetPixelTransformParameterivEXT", NAME(glGetPixelTransformParameterivEXT), _gloffset_GetPixelTransformParameterivEXT },
1454 { "glGetPixelTransformParameterfvEXT", NAME(glGetPixelTransformParameterfvEXT), _gloffset_GetPixelTransformParameterfvEXT },
1455 #undef NAME
1456 #endif
1457
1458 /* 145. GL_EXT_secondary_color */
1459 #ifdef GL_EXT_secondary_color
1460 #define NAME(X) (GLvoid *) X
1461 #else
1462 #define NAME(X) (GLvoid *) NotImplemented
1463 #endif
1464 { "glSecondaryColor3bEXT", NAME(glSecondaryColor3bEXT), _gloffset_SecondaryColor3bEXT },
1465 { "glSecondaryColor3dEXT", NAME(glSecondaryColor3dEXT), _gloffset_SecondaryColor3dEXT },
1466 { "glSecondaryColor3fEXT", NAME(glSecondaryColor3fEXT), _gloffset_SecondaryColor3fEXT },
1467 { "glSecondaryColor3iEXT", NAME(glSecondaryColor3iEXT), _gloffset_SecondaryColor3iEXT },
1468 { "glSecondaryColor3sEXT", NAME(glSecondaryColor3sEXT), _gloffset_SecondaryColor3sEXT },
1469 { "glSecondaryColor3ubEXT", NAME(glSecondaryColor3ubEXT), _gloffset_SecondaryColor3ubEXT },
1470 { "glSecondaryColor3uiEXT", NAME(glSecondaryColor3uiEXT), _gloffset_SecondaryColor3uiEXT },
1471 { "glSecondaryColor3usEXT", NAME(glSecondaryColor3usEXT), _gloffset_SecondaryColor3usEXT },
1472 { "glSecondaryColor3bvEXT", NAME(glSecondaryColor3bvEXT), _gloffset_SecondaryColor3bvEXT },
1473 { "glSecondaryColor3dvEXT", NAME(glSecondaryColor3dvEXT), _gloffset_SecondaryColor3dvEXT },
1474 { "glSecondaryColor3fvEXT", NAME(glSecondaryColor3fvEXT), _gloffset_SecondaryColor3fvEXT },
1475 { "glSecondaryColor3ivEXT", NAME(glSecondaryColor3ivEXT), _gloffset_SecondaryColor3ivEXT },
1476 { "glSecondaryColor3svEXT", NAME(glSecondaryColor3svEXT), _gloffset_SecondaryColor3svEXT },
1477 { "glSecondaryColor3ubvEXT", NAME(glSecondaryColor3ubvEXT), _gloffset_SecondaryColor3ubvEXT },
1478 { "glSecondaryColor3uivEXT", NAME(glSecondaryColor3uivEXT), _gloffset_SecondaryColor3uivEXT },
1479 { "glSecondaryColor3usvEXT", NAME(glSecondaryColor3usvEXT), _gloffset_SecondaryColor3usvEXT },
1480 { "glSecondaryColorPointerEXT", NAME(glSecondaryColorPointerEXT), _gloffset_SecondaryColorPointerEXT },
1481 #undef NAME
1482
1483 /* 147. GL_EXT_texture_perturb_normal */
1484 #if 000
1485 #ifdef GL_EXT_texture_perturb_normal
1486 #define NAME(X) (GLvoid *) X
1487 #else
1488 #define NAME(X) (GLvoid *) NotImplemented
1489 #endif
1490 { "glTextureNormalEXT", NAME(glTextureNormalEXT), _gloffset_TextureNormalEXT },
1491 #undef NAME
1492 #endif
1493
1494 /* 148. GL_EXT_multi_draw_arrays */
1495 #if 000
1496 #ifdef GL_EXT_multi_draw_arrays
1497 #define NAME(X) (GLvoid *) X
1498 #else
1499 #define NAME(X) (GLvoid *) NotImplemented
1500 #endif
1501 { "glMultiDrawArraysEXT", NAME(glMultiDrawArraysEXT), _gloffset_MultiDrawArraysEXT },
1502 #undef NAME
1503 #endif
1504
1505 /* 149. GL_EXT_fog_coord */
1506 #ifdef GL_EXT_fog_coord
1507 #define NAME(X) (GLvoid *) X
1508 #else
1509 #define NAME(X) (GLvoid *) NotImplemented
1510 #endif
1511 { "glFogCoordfEXT", NAME(glFogCoordfEXT), _gloffset_FogCoordfEXT },
1512 { "glFogCoordfvEXT", NAME(glFogCoordfvEXT), _gloffset_FogCoordfvEXT },
1513 { "glFogCoorddEXT", NAME(glFogCoorddEXT), _gloffset_FogCoorddEXT },
1514 { "glFogCoorddEXT", NAME(glFogCoorddEXT), _gloffset_FogCoorddEXT },
1515 { "glFogCoordPointerEXT", NAME(glFogCoordPointerEXT), _gloffset_FogCoordPointerEXT },
1516 #undef NAME
1517
1518 /* 156. GL_EXT_coordinate_frame */
1519 #if 000
1520 #ifdef GL_EXT_coordinate_frame
1521 #define NAME(X) (GLvoid *) X
1522 #else
1523 #define NAME(X) (GLvoid *) NotImplemented
1524 #endif
1525 { "glTangent3bEXT", NAME(glTangent3bEXT), _gloffset_Tangent3bEXT },
1526 { "glTangent3dEXT", NAME(glTangent3dEXT), _gloffset_Tangent3dEXT },
1527 { "glTangent3fEXT", NAME(glTangent3fEXT), _gloffset_Tangent3fEXT },
1528 { "glTangent3iEXT", NAME(glTangent3iEXT), _gloffset_Tangent3iEXT },
1529 { "glTangent3sEXT", NAME(glTangent3sEXT), _gloffset_Tangent3sEXT },
1530 { "glTangent3bvEXT", NAME(glTangent3bvEXT), _gloffset_Tangent3bvEXT },
1531 { "glTangent3dvEXT", NAME(glTangent3dvEXT), _gloffset_Tangent3dvEXT },
1532 { "glTangent3fvEXT", NAME(glTangent3fvEXT), _gloffset_Tangent3fvEXT },
1533 { "glTangent3ivEXT", NAME(glTangent3ivEXT), _gloffset_Tangent3ivEXT },
1534 { "glTangent3svEXT", NAME(glTangent3svEXT), _gloffset_Tangent3svEXT },
1535 { "glBinormal3bEXT", NAME(glBinormal3bEXT), _gloffset_Binormal3bEXT },
1536 { "glBinormal3dEXT", NAME(glBinormal3dEXT), _gloffset_Binormal3dEXT },
1537 { "glBinormal3fEXT", NAME(glBinormal3fEXT), _gloffset_Binormal3fEXT },
1538 { "glBinormal3iEXT", NAME(glBinormal3iEXT), _gloffset_Binormal3iEXT },
1539 { "glBinormal3sEXT", NAME(glBinormal3sEXT), _gloffset_Binormal3sEXT },
1540 { "glBinormal3bvEXT", NAME(glBinormal3bvEXT), _gloffset_Binormal3bvEXT },
1541 { "glBinormal3dvEXT", NAME(glBinormal3dvEXT), _gloffset_Binormal3dvEXT },
1542 { "glBinormal3fvEXT", NAME(glBinormal3fvEXT), _gloffset_Binormal3fvEXT },
1543 { "glBinormal3ivEXT", NAME(glBinormal3ivEXT), _gloffset_Binormal3ivEXT },
1544 { "glBinormal3svEXT", NAME(glBinormal3svEXT), _gloffset_Binormal3svEXT },
1545 { "glTangentPointerEXT", NAME(glTangentPointerEXT), _gloffset_TangentPointerEXT },
1546 { "glBinormalPointerEXT", NAME(glBinormalPointerEXT), _gloffset_BinormalPointerEXT },
1547 #undef NAME
1548 #endif
1549
1550 /* 164. GL_SUN_global_alpha */
1551 #if 000
1552 #ifdef GL_SUN_global_alpha
1553 #define NAME(X) (GLvoid *) X
1554 #else
1555 #define NAME(X) (GLvoid *) NotImplemented
1556 #endif
1557 { "glGlobalAlphaFactorbSUN", NAME(glGlobalAlphaFactorbSUN), _gloffset_GlobalAlphaFactorbSUN },
1558 { "glGlobalAlphaFactorsSUN", NAME(glGlobalAlphaFactorsSUN), _gloffset_GlobalAlphaFactorsSUN },
1559 { "glGlobalAlphaFactoriSUN", NAME(glGlobalAlphaFactoriSUN), _gloffset_GlobalAlphaFactoriSUN },
1560 { "glGlobalAlphaFactorfSUN", NAME(glGlobalAlphaFactorfSUN), _gloffset_GlobalAlphaFactorfSUN },
1561 { "glGlobalAlphaFactordSUN", NAME(glGlobalAlphaFactordSUN), _gloffset_GlobalAlphaFactordSUN },
1562 { "glGlobalAlphaFactorubSUN", NAME(glGlobalAlphaFactorubSUN), _gloffset_GlobalAlphaFactorubSUN },
1563 { "glGlobalAlphaFactorusSUN", NAME(glGlobalAlphaFactorusSUN), _gloffset_GlobalAlphaFactorusSUN },
1564 { "glGlobalAlphaFactoruiSUN", NAME(glGlobalAlphaFactoruiSUN), _gloffset_GlobalAlphaFactoruiSUN },
1565 #undef NAME
1566 #endif
1567
1568 /* 165. GL_SUN_triangle_list */
1569 #if 000
1570 #ifdef GL_SUN_triangle_list
1571 #define NAME(X) (GLvoid *) X
1572 #else
1573 #define NAME(X) (GLvoid *) NotImplemented
1574 #endif
1575 { "glReplacementCodeuiSUN", NAME(glReplacementCodeuiSUN), _gloffset_ReplacementCodeuiSUN },
1576 { "glReplacementCodeusSUN", NAME(glReplacementCodeusSUN), _gloffset_ReplacementCodeusSUN },
1577 { "glReplacementCodeubSUN", NAME(glReplacementCodeubSUN), _gloffset_ReplacementCodeubSUN },
1578 { "glReplacementCodeuivSUN", NAME(glReplacementCodeuivSUN), _gloffset_ReplacementCodeuivSUN },
1579 { "glReplacementCodeusvSUN", NAME(glReplacementCodeusvSUN), _gloffset_ReplacementCodeusvSUN },
1580 { "glReplacementCodeubvSUN", NAME(glReplacementCodeubvSUN), _gloffset_ReplacementCodeubvSUN },
1581 { "glReplacementCodePointerSUN", NAME(glReplacementCodePointerSUN), _gloffset_ReplacementCodePointerSUN },
1582 #undef NAME
1583 #endif
1584
1585 /* 166. GL_SUN_vertex */
1586 #if 000
1587 #ifdef GL_SUN_vertex
1588 #define NAME(X) (GLvoid *) X
1589 #else
1590 #define NAME(X) (GLvoid *) NotImplemented
1591 #endif
1592 { "glColor4ubVertex2fSUN", NAME(glColor4ubVertex2fSUN), _gloffset_Color4ubVertex2fSUN },
1593 { "glColor4ubVertex2fvSUN", NAME(glColor4ubVertex2fvSUN), _gloffset_Color4ubVertex2fvSUN },
1594 { "glColor4ubVertex3fSUN", NAME(glColor4ubVertex3fSUN), _gloffset_Color4ubVertex3fSUN },
1595 { "glColor4ubVertex3fvSUN", NAME(glColor4ubVertex3fvSUN), _gloffset_Color4ubVertex3fvSUN },
1596 { "glColor3fVertex3fSUN", NAME(glColor3fVertex3fSUN), _gloffset_Color3fVertex3fSUN },
1597 { "glColor3fVertex3fvSUN", NAME(glColor3fVertex3fvSUN), _gloffset_Color3fVertex3fvSUN },
1598 { "glNormal3fVertex3fSUN", NAME(glNormal3fVertex3fSUN), _gloffset_Normal3fVertex3fSUN },
1599 { "glNormal3fVertex3fvSUN", NAME(glNormal3fVertex3fvSUN), _gloffset_Normal3fVertex3fvSUN },
1600 { "glColor4fNormal3fVertex3fSUN", NAME(glColor4fNormal3fVertex3fSUN), _gloffset_Color4fNormal3fVertex3fSUN },
1601 { "glColor4fNormal3fVertex3fvSUN", NAME(glColor4fNormal3fVertex3fvSUN), _gloffset_Color4fNormal3fVertex3fvSUN },
1602 { "glTexCoord2fVertex3fSUN", NAME(glTexCoord2fVertex3fSUN), _gloffset_TexCoord2fVertex3fSUN },
1603 { "glTexCoord2fVertex3fvSUN", NAME(glTexCoord2fVertex3fvSUN), _gloffset_TexCoord2fVertex3fvSUN },
1604 { "glTexCoord4fVertex4fSUN", NAME(glTexCoord4fVertex4fSUN), _gloffset_TexCoord4fVertex4fSUN },
1605 { "glTexCoord4fVertex4fvSUN", NAME(glTexCoord4fVertex4fvSUN), _gloffset_TexCoord4fVertex4fvSUN },
1606 { "glTexCoord2fColor4ubVertex3fSUN", NAME(glTexCoord2fColor4ubVertex3fSUN), _gloffset_TexCoord2fColor4ubVertex3fSUN },
1607 { "glTexCoord2fColor4ubVertex3fvSUN", NAME(glTexCoord2fColor4ubVertex3fvSUN), _gloffset_TexCoord2fColor4ubVertex3fvSUN },
1608 { "glTexCoord2fColor3fVertex3fSUN", NAME(glTexCoord2fColor3fVertex3fSUN), _gloffset_TexCoord2fColor3fVertex3fSUN },
1609 { "glTexCoord2fColor3fVertex3fvSUN", NAME(glTexCoord2fColor3fVertex3fvSUN), _gloffset_TexCoord2fColor3fVertex3fvSUN },
1610 { "glTexCoord2fNormal3fVertex3fSUN", NAME(glTexCoord2fNormal3fVertex3fSUN), _gloffset_TexCoord2fNormal3fVertex3fSUN },
1611 { "glTexCoord2fNormal3fVertex3fvSUN", NAME(glTexCoord2fNormal3fVertex3fvSUN), _gloffset_TexCoord2fNormal3fVertex3fvSUN },
1612 { "glTexCoord2fColor4fNormal3fVertex3fSUN", NAME(glTexCoord2fColor4fNormal3fVertex3fSUN), _gloffset_TexCoord2fColor4fNormal3fVertex3fSUN },
1613 { "glTexCoord2fColor4fNormal3fVertex3fvSUN", NAME(glTexCoord2fColor4fNormal3fVertex3fvSUN), _gloffset_TexCoord2fColor4fNormal3fVertex3fvSUN },
1614 { "glTexCoord4fColor4fNormal3fVertex4fSUN", NAME(glTexCoord4fColor4fNormal3fVertex4fSUN), _gloffset_TexCoord4fColor4fNormal3fVertex4fSUN },
1615 { "glTexCoord4fColor4fNormal3fVertex4fvSUN", NAME(glTexCoord4fColor4fNormal3fVertex4fvSUN), _gloffset_TexCoord4fColor4fNormal3fVertex4fvSUN },
1616 { "glReplacementCodeuiVertex3fSUN", NAME(glReplacementCodeuiVertex3fSUN), _gloffset_ReplacementCodeuiVertex3fSUN },
1617 { "glReplacementCodeuiVertex3fvSUN", NAME(glReplacementCodeuiVertex3fvSUN), _gloffset_ReplacementCodeuiVertex3fvSUN },
1618 { "glReplacementCodeuiColor4ubVertex3fSUN", NAME(glReplacementCodeuiColor4ubVertex3fSUN), _gloffset_ReplacementCodeuiColor4ubVertex3fSUN },
1619 { "glReplacementCodeuiColor4ubVertex3fvSUN", NAME(glReplacementCodeuiColor4ubVertex3fvSUN), _gloffset_ReplacementCodeuiColor4ubVertex3fvSUN },
1620 { "glReplacementCodeuiColor3fVertex3fSUN", NAME(glReplacementCodeuiColor3fVertex3fSUN), _gloffset_ReplacementCodeuiColor3fVertex3fSUN },
1621 { "glReplacementCodeuiColor3fVertex3fvSUN", NAME(glReplacementCodeuiColor3fVertex3fvSUN), _gloffset_ReplacementCodeuiColor3fVertex3fvSUN },
1622 { "glReplacementCodeuiNormal3fVertex3fSUN", NAME(glReplacementCodeuiNormal3fVertex3fSUN), _gloffset_ReplacementCodeuiNormal3fVertex3fSUN },
1623 { "glReplacementCodeuiNormal3fVertex3fvSUN", NAME(glReplacementCodeuiNormal3fVertex3fvSUN), _gloffset_ReplacementCodeuiNormal3fVertex3fvSUN },
1624 { "glReplacementCodeuiColor4fNormal3fVertex3fSUN", NAME(glReplacementCodeuiColor4fNormal3fVertex3fSUN), _gloffset_ReplacementCodeuiColor4fNormal3fVertex3fSUN },
1625 { "glReplacementCodeuiColor4fNormal3fVertex3fvSUN", NAME(glReplacementCodeuiColor4fNormal3fVertex3fvSUN), _gloffset_ReplacementCodeuiColor4fNormal3fVertex3fvSUN },
1626 { "glReplacementCodeuiTexCoord2fVertex3fSUN", NAME(glReplacementCodeuiTexCoord2fVertex3fSUN), _gloffset_ReplacementCodeuiTexCoord2fVertex3fSUN },
1627 { "glReplacementCodeuiTexCoord2fVertex3fvSUN", NAME(glReplacementCodeuiTexCoord2fVertex3fvSUN), _gloffset_ReplacementCodeuiTexCoord2fVertex3fvSUN },
1628 { "glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN", NAME(glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN), _gloffset_ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN },
1629 { "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN", NAME(glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN), _gloffset_ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN },
1630 { "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN", NAME(glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN), _gloffset_ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN },
1631 { "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN", NAME(glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN), _gloffset_ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN },
1632 #undef NAME
1633 #endif
1634
1635 /* 173. GL_EXT/INGR_blend_func_separate */
1636 #ifdef GL_EXT_blend_func_separate
1637 #define NAME(X) (GLvoid *) X
1638 #else
1639 #define NAME(X) (GLvoid *) NotImplemented
1640 #endif
1641 { "glBlendFuncSeparateEXT", NAME(glBlendFuncSeparateEXT), _gloffset_BlendFuncSeparateEXT },
1642 { "glBlendFuncSeparateINGR", NAME(glBlendFuncSeparateEXT), _gloffset_BlendFuncSeparateEXT },
1643 #undef NAME
1644
1645 /* 188. GL_EXT_vertex_weighting */
1646 #ifdef GL_EXT_vertex_weighting
1647 #define NAME(X) (GLvoid *) X
1648 #else
1649 #define NAME(X) (GLvoid *) NotImplemented
1650 #endif
1651 { "glVertexWeightfEXT", NAME(glVertexWeightfEXT), _gloffset_VertexWeightfEXT },
1652 { "glVertexWeightfvEXT", NAME(glVertexWeightfvEXT), _gloffset_VertexWeightfvEXT },
1653 { "glVertexWeightPointerEXT", NAME(glVertexWeightPointerEXT), _gloffset_VertexWeightPointerEXT },
1654 #undef NAME
1655
1656 /* 190. GL_NV_vertex_array_range */
1657 #ifdef GL_NV_vertex_array_range
1658 #define NAME(X) (GLvoid *) X
1659 #else
1660 #define NAME(X) (GLvoid *) NotImplemented
1661 #endif
1662 { "glFlushVertexArrayRangeNV", NAME(glFlushVertexArrayRangeNV), _gloffset_FlushVertexArrayRangeNV },
1663 { "glVertexArrayRangeNV", NAME(glVertexArrayRangeNV), _gloffset_VertexArrayRangeNV },
1664 #undef NAME
1665
1666 /* 191. GL_NV_register_combiners */
1667 #ifdef GL_NV_register_combiners
1668 #define NAME(X) (GLvoid *) X
1669 #else
1670 #define NAME(X) (GLvoid *) NotImplemented
1671 #endif
1672 { "glCombinerParameterfvNV", NAME(glCombinerParameterfvNV), _gloffset_CombinerParameterfvNV },
1673 { "glCombinerParameterfNV", NAME(glCombinerParameterfNV), _gloffset_CombinerParameterfNV },
1674 { "glCombinerParameterivNV", NAME(glCombinerParameterivNV), _gloffset_CombinerParameterivNV },
1675 { "glCombinerParameteriNV", NAME(glCombinerParameteriNV), _gloffset_CombinerParameteriNV },
1676 { "glCombinerInputNV", NAME(glCombinerInputNV), _gloffset_CombinerInputNV },
1677 { "glCombinerOutputNV", NAME(glCombinerOutputNV), _gloffset_CombinerOutputNV },
1678 { "glFinalCombinerInputNV", NAME(glFinalCombinerInputNV), _gloffset_FinalCombinerInputNV },
1679 { "glGetCombinerInputParameterfvNV", NAME(glGetCombinerInputParameterfvNV), _gloffset_GetCombinerInputParameterfvNV },
1680 { "glGetCombinerInputParameterivNV", NAME(glGetCombinerInputParameterivNV), _gloffset_GetCombinerInputParameterivNV },
1681 { "glGetCombinerOutputParameterfvNV", NAME(glGetCombinerOutputParameterfvNV), _gloffset_GetCombinerOutputParameterfvNV },
1682 { "glGetCombinerOutputParameterivNV", NAME(glGetCombinerOutputParameterivNV), _gloffset_GetCombinerOutputParameterivNV },
1683 { "glGetFinalCombinerInputParameterfvNV", NAME(glGetFinalCombinerInputParameterfvNV), _gloffset_GetFinalCombinerInputParameterfvNV },
1684 { "glGetFinalCombinerInputParameterivNV", NAME(glGetFinalCombinerInputParameterivNV), _gloffset_GetFinalCombinerInputParameterivNV },
1685 #undef NAME
1686
1687 /* 196. GL_MESA_resize_buffers */
1688 #ifdef MESA_resize_buffers
1689 #define NAME(X) (GLvoid *) X
1690 #else
1691 #define NAME(X) (GLvoid *) NotImplemented
1692 #endif
1693 { "glResizeBuffersMESA", NAME(glResizeBuffersMESA), _gloffset_ResizeBuffersMESA },
1694 #undef NAME
1695
1696 /* 197. GL_MESA_window_pos */
1697 #ifdef MESA_window_pos
1698 #define NAME(X) (GLvoid *) X
1699 #else
1700 #define NAME(X) (GLvoid *) NotImplemented
1701 #endif
1702 { "glWindowPos4fMESA", NAME(glWindowPos4fMESA), _gloffset_WindowPos4fMESA },
1703 #undef NAME
1704
1705 /* 209. WGL_EXT_multisample */
1706 #ifdef WGL_EXT_multisample
1707 #define NAME(X) (GLvoid *) X
1708 #else
1709 #define NAME(X) (GLvoid *) NotImplemented
1710 #endif
1711 { "glSampleMaskEXT", NAME(glSampleMaskEXT), _gloffset_SampleMaskSGIS },
1712 { "glSamplePatternEXT", NAME(glSamplePatternEXT), _gloffset_SamplePatternSGIS },
1713 #undef NAME
1714
1715 { NULL, NULL } /* end of list marker */
1716 };
1717
1718
1719
1720 /*
1721 * Return dispatch table offset of the named static (built-in) function.
1722 * Return -1 if function not found.
1723 */
1724 static GLint
1725 get_static_proc_offset(const char *funcName)
1726 {
1727 GLuint i;
1728 for (i = 0; static_functions[i].Name; i++) {
1729 if (strcmp(static_functions[i].Name, funcName) == 0) {
1730 return static_functions[i].Offset;
1731 }
1732 }
1733 return -1;
1734 }
1735
1736
1737 /*
1738 * Return dispatch function address the named static (built-in) function.
1739 * Return NULL if function not found.
1740 */
1741 static GLvoid *
1742 get_static_proc_address(const char *funcName)
1743 {
1744 GLint i;
1745 for (i = 0; static_functions[i].Name; i++) {
1746 if (strcmp(static_functions[i].Name, funcName) == 0) {
1747 return static_functions[i].Address;
1748 }
1749 }
1750 return NULL;
1751 }
1752
1753
1754
1755 /**********************************************************************
1756 * Extension function management.
1757 */
1758
1759
1760 #define MAX_EXTENSION_FUNCS 1000
1761
1762 static struct name_address_offset ExtEntryTable[MAX_EXTENSION_FUNCS];
1763 static GLuint NumExtEntryPoints = 0;
1764
1765 #ifdef USE_SPARC_ASM
1766 extern void __glapi_sparc_icache_flush(unsigned int *);
1767 #endif
1768
1769 /*
1770 * Generate a dispatch function (entrypoint) which jumps through
1771 * the given slot number (offset) in the current dispatch table.
1772 * We need assembly language in order to accomplish this.
1773 */
1774 static void *
1775 generate_entrypoint(GLuint functionOffset)
1776 {
1777 #if defined(USE_X86_ASM)
1778 /*
1779 * This x86 code contributed by Josh Vanderhoof.
1780 *
1781 * 0: a1 10 32 54 76 movl __glapi_Dispatch,%eax
1782 * 00 01 02 03 04
1783 * 5: 85 c0 testl %eax,%eax
1784 * 05 06
1785 * 7: 74 06 je f <entrypoint+0xf>
1786 * 07 08
1787 * 9: ff a0 10 32 54 76 jmp *0x76543210(%eax)
1788 * 09 0a 0b 0c 0d 0e
1789 * f: e8 fc ff ff ff call __glapi_get_dispatch
1790 * 0f 10 11 12 13
1791 * 14: ff a0 10 32 54 76 jmp *0x76543210(%eax)
1792 * 14 15 16 17 18 19
1793 */
1794 static const unsigned char temp[] = {
1795 0xa1, 0x00, 0x00, 0x00, 0x00,
1796 0x85, 0xc0,
1797 0x74, 0x06,
1798 0xff, 0xa0, 0x00, 0x00, 0x00, 0x00,
1799 0xe8, 0x00, 0x00, 0x00, 0x00,
1800 0xff, 0xa0, 0x00, 0x00, 0x00, 0x00
1801 };
1802 unsigned char *code = malloc(sizeof(temp));
1803 unsigned int next_insn;
1804 if (code) {
1805 memcpy(code, temp, sizeof(temp));
1806
1807 *(unsigned int *)(code + 0x01) = (unsigned int)&_glapi_Dispatch;
1808 *(unsigned int *)(code + 0x0b) = (unsigned int)functionOffset * 4;
1809 next_insn = (unsigned int)(code + 0x14);
1810 *(unsigned int *)(code + 0x10) = (unsigned int)_glapi_get_dispatch - next_insn;
1811 *(unsigned int *)(code + 0x16) = (unsigned int)functionOffset * 4;
1812 }
1813 return code;
1814 #elif defined(USE_SPARC_ASM)
1815
1816 #ifdef __sparc_v9__
1817 static const unsigned int insn_template[] = {
1818 0x05000000, /* sethi %uhi(_glapi_Dispatch), %g2 */
1819 0x03000000, /* sethi %hi(_glapi_Dispatch), %g1 */
1820 0x8410a000, /* or %g2, %ulo(_glapi_Dispatch), %g2 */
1821 0x82106000, /* or %g1, %lo(_glapi_Dispatch), %g1 */
1822 0x8528b020, /* sllx %g2, 32, %g2 */
1823 0xc2584002, /* ldx [%g1 + %g2], %g1 */
1824 0x05000000, /* sethi %hi(8 * glapioffset), %g2 */
1825 0x8410a000, /* or %g2, %lo(8 * glapioffset), %g2 */
1826 0xc6584002, /* ldx [%g1 + %g2], %g3 */
1827 0x81c0c000, /* jmpl %g3, %g0 */
1828 0x01000000 /* nop */
1829 };
1830 #else
1831 static const unsigned int insn_template[] = {
1832 0x03000000, /* sethi %hi(_glapi_Dispatch), %g1 */
1833 0xc2006000, /* ld [%g1 + %lo(_glapi_Dispatch)], %g1 */
1834 0xc6006000, /* ld [%g1 + %lo(4*glapioffset)], %g3 */
1835 0x81c0c000, /* jmpl %g3, %g0 */
1836 0x01000000 /* nop */
1837 };
1838 #endif
1839 unsigned int *code = malloc(sizeof(insn_template));
1840 unsigned long glapi_addr = (unsigned long) &_glapi_Dispatch;
1841 if (code) {
1842 memcpy(code, insn_template, sizeof(insn_template));
1843
1844 #ifdef __sparc_v9__
1845 code[0] |= (glapi_addr >> (32 + 10));
1846 code[1] |= ((glapi_addr & 0xffffffff) >> 10);
1847 __glapi_sparc_icache_flush(&code[0]);
1848 code[2] |= ((glapi_addr >> 32) & ((1 << 10) - 1));
1849 code[3] |= (glapi_addr & ((1 << 10) - 1));
1850 __glapi_sparc_icache_flush(&code[2]);
1851 code[6] |= ((functionOffset * 8) >> 10);
1852 code[7] |= ((functionOffset * 8) & ((1 << 10) - 1));
1853 __glapi_sparc_icache_flush(&code[6]);
1854 #else
1855 code[0] |= (glapi_addr >> 10);
1856 code[1] |= (glapi_addr & ((1 << 10) - 1));
1857 __glapi_sparc_icache_flush(&code[0]);
1858 code[2] |= (functionOffset * 4);
1859 __glapi_sparc_icache_flush(&code[2]);
1860 #endif
1861 }
1862 return code;
1863 #else
1864 return NULL;
1865 #endif
1866 }
1867
1868
1869
1870 /*
1871 * Add a new extension function entrypoint.
1872 * Return: GL_TRUE = success or GL_FALSE = failure
1873 */
1874 GLboolean
1875 _glapi_add_entrypoint(const char *funcName, GLuint offset)
1876 {
1877 /* first check if the named function is already statically present */
1878 {
1879 GLint index = get_static_proc_offset(funcName);
1880 if (index >= 0) {
1881 return (GLboolean) ((GLuint) index == offset); /* bad offset! */
1882 }
1883 }
1884
1885 {
1886 /* make sure this offset/name pair is legal */
1887 const char *name = _glapi_get_proc_name(offset);
1888 if (name && strcmp(name, funcName) != 0)
1889 return GL_FALSE; /* bad name! */
1890 }
1891
1892 {
1893 /* be sure index and name match known data */
1894 GLuint i;
1895 for (i = 0; i < NumExtEntryPoints; i++) {
1896 if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
1897 /* function already registered with api */
1898 if (ExtEntryTable[i].Offset == offset) {
1899 return GL_TRUE; /* offsets match */
1900 }
1901 else {
1902 return GL_FALSE; /* bad offset! */
1903 }
1904 }
1905 }
1906
1907 /* Make sure we don't try to add a new entrypoint after someone
1908 * has already called _glapi_get_dispatch_table_size()! If that's
1909 * happened the caller's information would become out of date.
1910 */
1911 if (GetSizeCalled)
1912 return GL_FALSE;
1913
1914 /* make sure we have space */
1915 if (NumExtEntryPoints >= MAX_EXTENSION_FUNCS) {
1916 return GL_FALSE;
1917 }
1918 else {
1919 void *entrypoint = generate_entrypoint(offset);
1920 if (!entrypoint)
1921 return GL_FALSE;
1922
1923 ExtEntryTable[NumExtEntryPoints].Name = str_dup(funcName);
1924 ExtEntryTable[NumExtEntryPoints].Offset = offset;
1925 ExtEntryTable[NumExtEntryPoints].Address = entrypoint;
1926 NumExtEntryPoints++;
1927
1928 if (offset > MaxDispatchOffset)
1929 MaxDispatchOffset = offset;
1930
1931 return GL_TRUE; /* success */
1932 }
1933 }
1934
1935 /* should never get here, but play it safe */
1936 return GL_FALSE;
1937 }
1938
1939
1940
1941 #if 0000 /* prototype code for dynamic extension slot allocation */
1942
1943 static int NextFreeOffset = 409; /*XXX*/
1944 #define MAX_DISPATCH_TABLE_SIZE 1000
1945
1946 /*
1947 * Dynamically allocate a dispatch slot for an extension entrypoint
1948 * and generate the assembly language dispatch stub.
1949 * Return the dispatch offset for the function or -1 if no room or error.
1950 */
1951 GLint
1952 _glapi_add_entrypoint2(const char *funcName)
1953 {
1954 int offset;
1955
1956 /* first see if extension func is already known */
1957 offset = _glapi_get_proc_offset(funcName);
1958 if (offset >= 0)
1959 return offset;
1960
1961 if (NumExtEntryPoints < MAX_EXTENSION_FUNCS
1962 && NextFreeOffset < MAX_DISPATCH_TABLE_SIZE) {
1963 void *entryPoint;
1964 offset = NextFreeOffset;
1965 entryPoint = generate_entrypoint(offset);
1966 if (entryPoint) {
1967 NextFreeOffset++;
1968 ExtEntryTable[NumExtEntryPoints].Name = str_dup(funcName);
1969 ExtEntryTable[NumExtEntryPoints].Offset = offset;
1970 ExtEntryTable[NumExtEntryPoints].Address = entryPoint;
1971 NumExtEntryPoints++;
1972 return offset;
1973 }
1974 }
1975 return -1;
1976 }
1977
1978 #endif
1979
1980
1981
1982 /*
1983 * Return offset of entrypoint for named function within dispatch table.
1984 */
1985 GLint
1986 _glapi_get_proc_offset(const char *funcName)
1987 {
1988 /* search extension functions first */
1989 GLuint i;
1990 for (i = 0; i < NumExtEntryPoints; i++) {
1991 if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
1992 return ExtEntryTable[i].Offset;
1993 }
1994 }
1995
1996 /* search static functions */
1997 return get_static_proc_offset(funcName);
1998 }
1999
2000
2001
2002 /*
2003 * Return entrypoint for named function.
2004 */
2005 const GLvoid *
2006 _glapi_get_proc_address(const char *funcName)
2007 {
2008 /* search extension functions first */
2009 GLuint i;
2010 for (i = 0; i < NumExtEntryPoints; i++) {
2011 if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
2012 return ExtEntryTable[i].Address;
2013 }
2014 }
2015
2016 /* search static functions */
2017 return get_static_proc_address(funcName);
2018 }
2019
2020
2021
2022
2023 /*
2024 * Return the name of the function at the given dispatch offset.
2025 * This is only intended for debugging.
2026 */
2027 const char *
2028 _glapi_get_proc_name(GLuint offset)
2029 {
2030 const GLuint n = sizeof(static_functions) / sizeof(struct name_address_offset);
2031 GLuint i;
2032 for (i = 0; i < n; i++) {
2033 if (static_functions[i].Offset == offset)
2034 return static_functions[i].Name;
2035 }
2036
2037 /* search added extension functions */
2038 for (i = 0; i < NumExtEntryPoints; i++) {
2039 if (ExtEntryTable[i].Offset == offset) {
2040 return ExtEntryTable[i].Name;
2041 }
2042 }
2043 return NULL;
2044 }
2045
2046
2047
2048 /*
2049 * Make sure there are no NULL pointers in the given dispatch table.
2050 * Intented for debugging purposes.
2051 */
2052 void
2053 _glapi_check_table(const struct _glapi_table *table)
2054 {
2055 const GLuint entries = _glapi_get_dispatch_table_size();
2056 const void **tab = (const void **) table;
2057 GLuint i;
2058 for (i = 1; i < entries; i++) {
2059 assert(tab[i]);
2060 }
2061
2062 #ifdef DEBUG
2063 /* Do some spot checks to be sure that the dispatch table
2064 * slots are assigned correctly.
2065 */
2066 {
2067 GLuint BeginOffset = _glapi_get_proc_offset("glBegin");
2068 char *BeginFunc = (char*) &table->Begin;
2069 GLuint offset = (BeginFunc - (char *) table) / sizeof(void *);
2070 assert(BeginOffset == _gloffset_Begin);
2071 assert(BeginOffset == offset);
2072 }
2073 {
2074 GLuint viewportOffset = _glapi_get_proc_offset("glViewport");
2075 char *viewportFunc = (char*) &table->Viewport;
2076 GLuint offset = (viewportFunc - (char *) table) / sizeof(void *);
2077 assert(viewportOffset == _gloffset_Viewport);
2078 assert(viewportOffset == offset);
2079 }
2080 {
2081 GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer");
2082 char *VertexPointerFunc = (char*) &table->VertexPointer;
2083 GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *);
2084 assert(VertexPointerOffset == _gloffset_VertexPointer);
2085 assert(VertexPointerOffset == offset);
2086 }
2087 {
2088 GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax");
2089 char *ResetMinMaxFunc = (char*) &table->ResetMinmax;
2090 GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *);
2091 assert(ResetMinMaxOffset == _gloffset_ResetMinmax);
2092 assert(ResetMinMaxOffset == offset);
2093 }
2094 {
2095 GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColor");
2096 char *blendColorFunc = (char*) &table->BlendColor;
2097 GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *);
2098 assert(blendColorOffset == _gloffset_BlendColor);
2099 assert(blendColorOffset == offset);
2100 }
2101 {
2102 GLuint istextureOffset = _glapi_get_proc_offset("glIsTextureEXT");
2103 char *istextureFunc = (char*) &table->IsTextureEXT;
2104 GLuint offset = (istextureFunc - (char *) table) / sizeof(void *);
2105 assert(istextureOffset == _gloffset_IsTextureEXT);
2106 assert(istextureOffset == offset);
2107 }
2108 {
2109 GLuint secondaryColor3fOffset = _glapi_get_proc_offset("glSecondaryColor3fEXT");
2110 char *secondaryColor3fFunc = (char*) &table->SecondaryColor3fEXT;
2111 GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *);
2112 assert(secondaryColor3fOffset == _gloffset_SecondaryColor3fEXT);
2113 assert(secondaryColor3fOffset == offset);
2114 assert(_glapi_get_proc_address("glSecondaryColor3fEXT") == (void *) &glSecondaryColor3fEXT);
2115 }
2116 #endif
2117 }