7306e02bc37de961d0ab8624236609de850ee4ad
[mesa.git] / src / mesa / glapi / glapi.c
1 /* $Id: glapi.c,v 1.26 2000/01/17 19:45:37 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.3
6 *
7 * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 */
26
27
28 /*
29 * This file manages the OpenGL API dispatch layer.
30 * The dispatch table (struct _glapi_table) is basically just a list
31 * of function pointers.
32 * There are functions to set/get the current dispatch table for the
33 * current thread and to manage registration/dispatch of dynamically
34 * added extension functions.
35 */
36
37
38
39 #include <assert.h>
40 #include <stdlib.h> /* to get NULL */
41 #include <string.h>
42 #include "glapi.h"
43 #include "glapinoop.h"
44 #include "glapioffsets.h"
45 #include "glapitable.h"
46
47
48
49 /* This is used when thread safety is disabled */
50 struct _glapi_table *_glapi_Dispatch = &__glapi_noop_table;
51
52 /* Used when thread safety disabled */
53 void *_glapi_CurrentContext = NULL;
54
55
56 #if defined(THREADS)
57
58 #include "glthread.h"
59
60 /* Flag to indicate whether thread-safe dispatch is enabled */
61 static GLboolean ThreadSafe = GL_FALSE;
62
63 static _glthread_TSD DispatchTSD;
64
65 static void dispatch_thread_init()
66 {
67 _glthread_InitTSD(&DispatchTSD);
68 }
69
70
71 static _glthread_TSD ContextTSD;
72
73 static void context_thread_init()
74 {
75 _glthread_InitTSD(&ContextTSD);
76 }
77
78 #endif
79
80
81
82 static GLuint MaxDispatchOffset = sizeof(struct _glapi_table) / sizeof(void *) - 1;
83 static GLboolean GetSizeCalled = GL_FALSE;
84
85
86
87 /*
88 * We should call this periodically from a function such as glXMakeCurrent
89 * in order to test if multiple threads are being used. When we detect
90 * that situation we should then call _glapi_enable_thread_safety()
91 */
92 void
93 _glapi_check_multithread(void)
94 {
95 #if defined(THREADS)
96 if (!ThreadSafe) {
97 static unsigned long knownID;
98 static GLboolean firstCall = GL_TRUE;
99 if (firstCall) {
100 knownID = _glthread_GetID();
101 firstCall = GL_FALSE;
102 }
103 else if (knownID != _glthread_GetID()) {
104 ThreadSafe = GL_TRUE;
105 }
106 }
107 if (ThreadSafe) {
108 /* make sure that this thread's dispatch pointer isn't null */
109 if (!_glapi_get_dispatch()) {
110 _glapi_set_dispatch(NULL);
111 }
112 }
113 #endif
114 }
115
116
117
118 /*
119 * Set the current context pointer for this thread.
120 * The context pointer is an opaque type which should be cast to
121 * void from the real context pointer type.
122 */
123 void
124 _glapi_set_current_context(void *context)
125 {
126 #if defined(THREADS)
127 _glthread_SetTSD(&ContextTSD, context, context_thread_init);
128 if (ThreadSafe)
129 _glapi_CurrentContext = NULL;
130 else
131 _glapi_CurrentContext = context;
132 #else
133 _glapi_CurrentContext = context;
134 #endif
135 }
136
137
138
139 /*
140 * Get the current context pointer for this thread.
141 * The context pointer is an opaque type which should be cast from
142 * void to the real context pointer type.
143 */
144 void *
145 _glapi_get_current_context(void)
146 {
147 #if defined(THREADS)
148 if (ThreadSafe) {
149 return _glthread_GetTSD(&ContextTSD);
150 }
151 else {
152 return _glapi_CurrentContext;
153 }
154 #else
155 return _glapi_CurrentContext;
156 #endif
157 }
158
159
160
161 /*
162 * Set the global or per-thread dispatch table pointer.
163 */
164 void
165 _glapi_set_dispatch(struct _glapi_table *dispatch)
166 {
167 if (!dispatch) {
168 /* use the no-op functions */
169 dispatch = &__glapi_noop_table;
170 }
171 #ifdef DEBUG
172 else {
173 _glapi_check_table(dispatch);
174 }
175 #endif
176
177 #if defined(THREADS)
178 _glthread_SetTSD(&DispatchTSD, (void*) dispatch, dispatch_thread_init);
179 if (ThreadSafe)
180 _glapi_Dispatch = NULL;
181 else
182 _glapi_Dispatch = dispatch;
183 #else
184 _glapi_Dispatch = dispatch;
185 #endif
186 }
187
188
189
190 /*
191 * Return pointer to current dispatch table for calling thread.
192 */
193 struct _glapi_table *
194 _glapi_get_dispatch(void)
195 {
196 #if defined(THREADS)
197 if (ThreadSafe) {
198 return (struct _glapi_table *) _glthread_GetTSD(&DispatchTSD);
199 }
200 else {
201 assert(_glapi_Dispatch);
202 return _glapi_Dispatch;
203 }
204 #else
205 return _glapi_Dispatch;
206 #endif
207 }
208
209
210
211 /*
212 * Return size of dispatch table struct as number of functions (or
213 * slots).
214 */
215 GLuint
216 _glapi_get_dispatch_table_size(void)
217 {
218 /* return sizeof(struct _glapi_table) / sizeof(void *);*/
219 GetSizeCalled = GL_TRUE;
220 return MaxDispatchOffset + 1;
221 }
222
223
224
225 /*
226 * Get API dispatcher version string.
227 * XXX this isn't well defined yet.
228 */
229 const char *
230 _glapi_get_version(void)
231 {
232 return "1.2";
233 }
234
235
236 struct name_address_pair {
237 const char *Name;
238 GLvoid *Address;
239 };
240
241 static struct name_address_pair static_functions[1000];
242
243
244
245 /*
246 * Return dispatch table offset of the named static (built-in) function.
247 * Return -1 if function not found.
248 */
249 static GLint
250 get_static_proc_offset(const char *funcName)
251 {
252 GLuint i;
253 for (i = 0; static_functions[i].Name; i++) {
254 if (strcmp(static_functions[i].Name, funcName) == 0) {
255 return i;
256 }
257 }
258 return -1;
259 }
260
261
262 /*
263 * Return dispatch function address the named static (built-in) function.
264 * Return NULL if function not found.
265 */
266 static GLvoid *
267 get_static_proc_address(const char *funcName)
268 {
269 GLuint i = get_static_proc_offset(funcName);
270 if (i >= 0)
271 return static_functions[i].Address;
272 else
273 return NULL;
274 }
275
276
277
278 /**********************************************************************
279 * Extension function management.
280 */
281
282
283 struct _glapi_ext_entrypoint {
284 const char *Name; /* the extension function's name */
285 GLuint Offset; /* relative to start of dispatch table */
286 GLvoid *Address; /* address of dispatch function */
287 };
288
289 static struct _glapi_ext_entrypoint ExtEntryTable[_GLAPI_EXTRA_SLOTS];
290 static GLuint NumExtEntryPoints = 0;
291
292
293
294 /*
295 * Generate a dispatch function (entrypoint) which jumps through
296 * the given slot number (offset) in the current dispatch table.
297 */
298 static void *
299 generate_entrypoint(GLuint offset)
300 {
301 /* XXX need to generate some assembly code here */
302
303 return NULL;
304 }
305
306
307
308 /*
309 * Add a new extension function entrypoint.
310 * Return: GL_TRUE = success or GL_FALSE = failure
311 */
312 GLboolean
313 _glapi_add_entrypoint(const char *funcName, GLuint offset)
314 {
315 GLint index;
316
317 /* Make sure we don't try to add a new entrypoint after someone
318 * has already called _glapi_get_dispatch_table_size()! If that's
319 * happened the caller's information will now be out of date.
320 */
321 assert(!GetSizeCalled);
322
323 /* first check if the named function is already statically present */
324 index = get_static_proc_offset(funcName);
325
326 if (index >= 0) {
327 assert(index == offset);
328 return GL_TRUE;
329 }
330 /* else if (offset < _glapi_get_dispatch_table_size()) { */
331 else {
332 /* be sure index and name match known data */
333 GLuint i;
334 for (i = 0; i < NumExtEntryPoints; i++) {
335 if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
336 /* function already registered with api */
337 if (ExtEntryTable[i].Offset == offset) {
338 return GL_TRUE; /* offsets match */
339 }
340 else {
341 return GL_FALSE; /* bad offset! */
342 }
343 }
344 }
345 assert(NumExtEntryPoints < _GLAPI_EXTRA_SLOTS);
346 ExtEntryTable[NumExtEntryPoints].Name = strdup(funcName);
347 ExtEntryTable[NumExtEntryPoints].Offset = offset;
348 ExtEntryTable[NumExtEntryPoints].Address = generate_entrypoint(offset);
349 NumExtEntryPoints++;
350
351 if (offset > MaxDispatchOffset)
352 MaxDispatchOffset = offset;
353
354 return GL_TRUE;
355 }
356 /*
357 else {
358 return GL_FALSE;
359 }
360 */
361 }
362
363
364
365 /*
366 * Return offset of entrypoint for named function within dispatch table.
367 */
368 GLint
369 _glapi_get_proc_offset(const char *funcName)
370 {
371 /* search extension functions first */
372 GLint i;
373 for (i = 0; i < NumExtEntryPoints; i++) {
374 if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
375 return ExtEntryTable[i].Offset;
376 }
377 }
378
379 /* search static functions */
380 return get_static_proc_offset(funcName);
381 }
382
383
384
385 /*
386 * Return entrypoint for named function.
387 */
388 const GLvoid *
389 _glapi_get_proc_address(const char *funcName)
390 {
391 /* search extension functions first */
392 GLint i;
393 for (i = 0; i < NumExtEntryPoints; i++) {
394 if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
395 return ExtEntryTable[i].Address;
396 }
397 }
398
399 /* search static functions */
400 return get_static_proc_address(funcName);
401 }
402
403
404
405
406 /*
407 * Return the name of the function at the given dispatch offset.
408 * This is only intended for debugging.
409 */
410 const char *
411 _glapi_get_proc_name(GLuint offset)
412 {
413 GLuint n = sizeof(static_functions) / sizeof(struct name_address_pair);
414 if (offset < n) {
415 return static_functions[offset].Name;
416 }
417 else {
418 /* search added extension functions */
419 GLuint i;
420 for (i = 0; i < NumExtEntryPoints; i++) {
421 if (ExtEntryTable[i].Offset == offset) {
422 return ExtEntryTable[i].Name;
423 }
424 }
425 return NULL;
426 }
427 }
428
429
430
431 /*
432 * Make sure there are no NULL pointers in the given dispatch table.
433 * Intented for debugging purposes.
434 */
435 void
436 _glapi_check_table(const struct _glapi_table *table)
437 {
438 const GLuint entries = _glapi_get_dispatch_table_size();
439 const void **tab = (const void **) table;
440 GLuint i;
441 for (i = 1; i < entries; i++) {
442 assert(tab[i]);
443 }
444
445 #ifdef DEBUG
446 /* Do some spot checks to be sure that the dispatch table
447 * slots are assigned correctly.
448 */
449 {
450 GLuint BeginOffset = _glapi_get_proc_offset("glBegin");
451 char *BeginFunc = (char*) &table->Begin;
452 GLuint offset = (BeginFunc - (char *) table) / sizeof(void *);
453 assert(BeginOffset == _gloffset_Begin);
454 assert(BeginOffset == offset);
455 }
456 {
457 GLuint viewportOffset = _glapi_get_proc_offset("glViewport");
458 char *viewportFunc = (char*) &table->Viewport;
459 GLuint offset = (viewportFunc - (char *) table) / sizeof(void *);
460 assert(viewportOffset == _gloffset_Viewport);
461 assert(viewportOffset == offset);
462 }
463 {
464 GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer");
465 char *VertexPointerFunc = (char*) &table->VertexPointer;
466 GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *);
467 assert(VertexPointerOffset == _gloffset_VertexPointer);
468 assert(VertexPointerOffset == offset);
469 }
470 {
471 GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax");
472 char *ResetMinMaxFunc = (char*) &table->ResetMinmax;
473 GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *);
474 assert(ResetMinMaxOffset == _gloffset_ResetMinmax);
475 assert(ResetMinMaxOffset == offset);
476 }
477 {
478 GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColorEXT");
479 char *blendColorFunc = (char*) &table->BlendColorEXT;
480 GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *);
481 assert(blendColorOffset == _gloffset_BlendColorEXT);
482 assert(blendColorOffset == offset);
483 }
484 {
485 GLuint istextureOffset = _glapi_get_proc_offset("glIsTextureEXT");
486 char *istextureFunc = (char*) &table->IsTextureEXT;
487 GLuint offset = (istextureFunc - (char *) table) / sizeof(void *);
488 assert(istextureOffset == _gloffset_IsTextureEXT);
489 assert(istextureOffset == offset);
490 }
491 #endif
492 }
493
494
495 /**********************************************************************
496 * Generate the GL entrypoint functions here.
497 */
498
499 #define KEYWORD1
500 #define KEYWORD2 GLAPIENTRY
501 #if defined(USE_X86_ASM) && !defined(__WIN32__) && !defined(XF86DRI)
502 #define NAME(func) _glapi_fallback_##func
503 #elif defined(USE_MGL_NAMESPACE)
504 #define NAME(func) mgl##func
505 #else
506 #define NAME(func) gl##func
507 #endif
508
509 #ifdef DEBUG
510
511 #include <stdio.h>
512
513 static int
514 trace(void)
515 {
516 static int trace = -1;
517 if (trace < 0)
518 trace = getenv("MESA_TRACE") ? 1 : 0;
519 return trace > 0;
520 }
521
522 #define DISPATCH(FUNC, ARGS, MESSAGE) \
523 const struct _glapi_table *dispatch; \
524 dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
525 if (trace()) printf MESSAGE; \
526 (dispatch->FUNC) ARGS
527
528 #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
529 const struct _glapi_table *dispatch; \
530 dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
531 if (trace()) printf MESSAGE; \
532 return (dispatch->FUNC) ARGS
533
534 #else
535
536 #define DISPATCH(FUNC, ARGS, MESSAGE) \
537 const struct _glapi_table *dispatch; \
538 dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
539 (dispatch->FUNC) ARGS
540
541 #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
542 const struct _glapi_table *dispatch; \
543 dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
544 return (dispatch->FUNC) ARGS
545
546 #endif
547
548
549 #ifndef GLAPIENTRY
550 #define GLAPIENTRY
551 #endif
552
553 #include "glapitemp.h"
554
555
556 /*
557 * For each entry in static_functions[] which use this function
558 * we should implement a dispatch function in glapitemp.h and
559 * in glapinoop.c
560 */
561 static int NotImplemented(void)
562 {
563 return 0;
564 }
565
566
567
568 static struct name_address_pair static_functions[] = {
569 { "NotImplemented", (GLvoid *) NotImplemented },
570
571 /* GL 1.1 */
572 { "glAccum", (GLvoid *) glAccum },
573 { "glAlphaFunc", (GLvoid *) glAlphaFunc },
574 { "glBegin", (GLvoid *) glBegin },
575 { "glBitmap", (GLvoid *) glBitmap },
576 { "glBlendFunc", (GLvoid *) glBlendFunc },
577 { "glCallList", (GLvoid *) glCallList },
578 { "glCallLists", (GLvoid *) glCallLists },
579 { "glClear", (GLvoid *) glClear },
580 { "glClearAccum", (GLvoid *) glClearAccum },
581 { "glClearColor", (GLvoid *) glClearColor },
582 { "glClearDepth", (GLvoid *) glClearDepth },
583 { "glClearIndex", (GLvoid *) glClearIndex },
584 { "glClearStencil", (GLvoid *) glClearStencil },
585 { "glClipPlane", (GLvoid *) glClipPlane },
586 { "glColor3b", (GLvoid *) glColor3b },
587 { "glColor3bv", (GLvoid *) glColor3bv },
588 { "glColor3d", (GLvoid *) glColor3d },
589 { "glColor3dv", (GLvoid *) glColor3dv },
590 { "glColor3f", (GLvoid *) glColor3f },
591 { "glColor3fv", (GLvoid *) glColor3fv },
592 { "glColor3i", (GLvoid *) glColor3i },
593 { "glColor3iv", (GLvoid *) glColor3iv },
594 { "glColor3s", (GLvoid *) glColor3s },
595 { "glColor3sv", (GLvoid *) glColor3sv },
596 { "glColor3ub", (GLvoid *) glColor3ub },
597 { "glColor3ubv", (GLvoid *) glColor3ubv },
598 { "glColor3ui", (GLvoid *) glColor3ui },
599 { "glColor3uiv", (GLvoid *) glColor3uiv },
600 { "glColor3us", (GLvoid *) glColor3us },
601 { "glColor3usv", (GLvoid *) glColor3usv },
602 { "glColor4b", (GLvoid *) glColor4b },
603 { "glColor4bv", (GLvoid *) glColor4bv },
604 { "glColor4d", (GLvoid *) glColor4d },
605 { "glColor4dv", (GLvoid *) glColor4dv },
606 { "glColor4f", (GLvoid *) glColor4f },
607 { "glColor4fv", (GLvoid *) glColor4fv },
608 { "glColor4i", (GLvoid *) glColor4i },
609 { "glColor4iv", (GLvoid *) glColor4iv },
610 { "glColor4s", (GLvoid *) glColor4s },
611 { "glColor4sv", (GLvoid *) glColor4sv },
612 { "glColor4ub", (GLvoid *) glColor4ub },
613 { "glColor4ubv", (GLvoid *) glColor4ubv },
614 { "glColor4ui", (GLvoid *) glColor4ui },
615 { "glColor4uiv", (GLvoid *) glColor4uiv },
616 { "glColor4us", (GLvoid *) glColor4us },
617 { "glColor4usv", (GLvoid *) glColor4usv },
618 { "glColorMask", (GLvoid *) glColorMask },
619 { "glColorMaterial", (GLvoid *) glColorMaterial },
620 { "glCopyPixels", (GLvoid *) glCopyPixels },
621 { "glCullFace", (GLvoid *) glCullFace },
622 { "glDeleteLists", (GLvoid *) glDeleteLists },
623 { "glDepthFunc", (GLvoid *) glDepthFunc },
624 { "glDepthMask", (GLvoid *) glDepthMask },
625 { "glDepthRange", (GLvoid *) glDepthRange },
626 { "glDisable", (GLvoid *) glDisable },
627 { "glDrawBuffer", (GLvoid *) glDrawBuffer },
628 { "glDrawPixels", (GLvoid *) glDrawPixels },
629 { "glEdgeFlag", (GLvoid *) glEdgeFlag },
630 { "glEdgeFlagv", (GLvoid *) glEdgeFlagv },
631 { "glEnable", (GLvoid *) glEnable },
632 { "glEnd", (GLvoid *) glEnd },
633 { "glEndList", (GLvoid *) glEndList },
634 { "glEvalCoord1d", (GLvoid *) glEvalCoord1d },
635 { "glEvalCoord1dv", (GLvoid *) glEvalCoord1dv },
636 { "glEvalCoord1f", (GLvoid *) glEvalCoord1f },
637 { "glEvalCoord1fv", (GLvoid *) glEvalCoord1fv },
638 { "glEvalCoord2d", (GLvoid *) glEvalCoord2d },
639 { "glEvalCoord2dv", (GLvoid *) glEvalCoord2dv },
640 { "glEvalCoord2f", (GLvoid *) glEvalCoord2f },
641 { "glEvalCoord2fv", (GLvoid *) glEvalCoord2fv },
642 { "glEvalMesh1", (GLvoid *) glEvalMesh1 },
643 { "glEvalMesh2", (GLvoid *) glEvalMesh2 },
644 { "glEvalPoint1", (GLvoid *) glEvalPoint1 },
645 { "glEvalPoint2", (GLvoid *) glEvalPoint2 },
646 { "glFeedbackBuffer", (GLvoid *) glFeedbackBuffer },
647 { "glFinish", (GLvoid *) glFinish },
648 { "glFlush", (GLvoid *) glFlush },
649 { "glFogf", (GLvoid *) glFogf },
650 { "glFogfv", (GLvoid *) glFogfv },
651 { "glFogi", (GLvoid *) glFogi },
652 { "glFogiv", (GLvoid *) glFogiv },
653 { "glFrontFace", (GLvoid *) glFrontFace },
654 { "glFrustum", (GLvoid *) glFrustum },
655 { "glGenLists", (GLvoid *) glGenLists },
656 { "glGetBooleanv", (GLvoid *) glGetBooleanv },
657 { "glGetClipPlane", (GLvoid *) glGetClipPlane },
658 { "glGetDoublev", (GLvoid *) glGetDoublev },
659 { "glGetError", (GLvoid *) glGetError },
660 { "glGetFloatv", (GLvoid *) glGetFloatv },
661 { "glGetIntegerv", (GLvoid *) glGetIntegerv },
662 { "glGetLightfv", (GLvoid *) glGetLightfv },
663 { "glGetLightiv", (GLvoid *) glGetLightiv },
664 { "glGetMapdv", (GLvoid *) glGetMapdv },
665 { "glGetMapfv", (GLvoid *) glGetMapfv },
666 { "glGetMapiv", (GLvoid *) glGetMapiv },
667 { "glGetMaterialfv", (GLvoid *) glGetMaterialfv },
668 { "glGetMaterialiv", (GLvoid *) glGetMaterialiv },
669 { "glGetPixelMapfv", (GLvoid *) glGetPixelMapfv },
670 { "glGetPixelMapuiv", (GLvoid *) glGetPixelMapuiv },
671 { "glGetPixelMapusv", (GLvoid *) glGetPixelMapusv },
672 { "glGetPolygonStipple", (GLvoid *) glGetPolygonStipple },
673 { "glGetString", (GLvoid *) glGetString },
674 { "glGetTexEnvfv", (GLvoid *) glGetTexEnvfv },
675 { "glGetTexEnviv", (GLvoid *) glGetTexEnviv },
676 { "glGetTexGendv", (GLvoid *) glGetTexGendv },
677 { "glGetTexGenfv", (GLvoid *) glGetTexGenfv },
678 { "glGetTexGeniv", (GLvoid *) glGetTexGeniv },
679 { "glGetTexImage", (GLvoid *) glGetTexImage },
680 { "glGetTexLevelParameterfv", (GLvoid *) glGetTexLevelParameterfv },
681 { "glGetTexLevelParameteriv", (GLvoid *) glGetTexLevelParameteriv },
682 { "glGetTexParameterfv", (GLvoid *) glGetTexParameterfv },
683 { "glGetTexParameteriv", (GLvoid *) glGetTexParameteriv },
684 { "glHint", (GLvoid *) glHint },
685 { "glIndexMask", (GLvoid *) glIndexMask },
686 { "glIndexd", (GLvoid *) glIndexd },
687 { "glIndexdv", (GLvoid *) glIndexdv },
688 { "glIndexf", (GLvoid *) glIndexf },
689 { "glIndexfv", (GLvoid *) glIndexfv },
690 { "glIndexi", (GLvoid *) glIndexi },
691 { "glIndexiv", (GLvoid *) glIndexiv },
692 { "glIndexs", (GLvoid *) glIndexs },
693 { "glIndexsv", (GLvoid *) glIndexsv },
694 { "glInitNames", (GLvoid *) glInitNames },
695 { "glIsEnabled", (GLvoid *) glIsEnabled },
696 { "glIsList", (GLvoid *) glIsList },
697 { "glLightModelf", (GLvoid *) glLightModelf },
698 { "glLightModelfv", (GLvoid *) glLightModelfv },
699 { "glLightModeli", (GLvoid *) glLightModeli },
700 { "glLightModeliv", (GLvoid *) glLightModeliv },
701 { "glLightf", (GLvoid *) glLightf },
702 { "glLightfv", (GLvoid *) glLightfv },
703 { "glLighti", (GLvoid *) glLighti },
704 { "glLightiv", (GLvoid *) glLightiv },
705 { "glLineStipple", (GLvoid *) glLineStipple },
706 { "glLineWidth", (GLvoid *) glLineWidth },
707 { "glListBase", (GLvoid *) glListBase },
708 { "glLoadIdentity", (GLvoid *) glLoadIdentity },
709 { "glLoadMatrixd", (GLvoid *) glLoadMatrixd },
710 { "glLoadMatrixf", (GLvoid *) glLoadMatrixf },
711 { "glLoadName", (GLvoid *) glLoadName },
712 { "glLogicOp", (GLvoid *) glLogicOp },
713 { "glMap1d", (GLvoid *) glMap1d },
714 { "glMap1f", (GLvoid *) glMap1f },
715 { "glMap2d", (GLvoid *) glMap2d },
716 { "glMap2f", (GLvoid *) glMap2f },
717 { "glMapGrid1d", (GLvoid *) glMapGrid1d },
718 { "glMapGrid1f", (GLvoid *) glMapGrid1f },
719 { "glMapGrid2d", (GLvoid *) glMapGrid2d },
720 { "glMapGrid2f", (GLvoid *) glMapGrid2f },
721 { "glMaterialf", (GLvoid *) glMaterialf },
722 { "glMaterialfv", (GLvoid *) glMaterialfv },
723 { "glMateriali", (GLvoid *) glMateriali },
724 { "glMaterialiv", (GLvoid *) glMaterialiv },
725 { "glMatrixMode", (GLvoid *) glMatrixMode },
726 { "glMultMatrixd", (GLvoid *) glMultMatrixd },
727 { "glMultMatrixf", (GLvoid *) glMultMatrixf },
728 { "glNewList", (GLvoid *) glNewList },
729 { "glNormal3b", (GLvoid *) glNormal3b },
730 { "glNormal3bv", (GLvoid *) glNormal3bv },
731 { "glNormal3d", (GLvoid *) glNormal3d },
732 { "glNormal3dv", (GLvoid *) glNormal3dv },
733 { "glNormal3f", (GLvoid *) glNormal3f },
734 { "glNormal3fv", (GLvoid *) glNormal3fv },
735 { "glNormal3i", (GLvoid *) glNormal3i },
736 { "glNormal3iv", (GLvoid *) glNormal3iv },
737 { "glNormal3s", (GLvoid *) glNormal3s },
738 { "glNormal3sv", (GLvoid *) glNormal3sv },
739 { "glOrtho", (GLvoid *) glOrtho },
740 { "glPassThrough", (GLvoid *) glPassThrough },
741 { "glPixelMapfv", (GLvoid *) glPixelMapfv },
742 { "glPixelMapuiv", (GLvoid *) glPixelMapuiv },
743 { "glPixelMapusv", (GLvoid *) glPixelMapusv },
744 { "glPixelStoref", (GLvoid *) glPixelStoref },
745 { "glPixelStorei", (GLvoid *) glPixelStorei },
746 { "glPixelTransferf", (GLvoid *) glPixelTransferf },
747 { "glPixelTransferi", (GLvoid *) glPixelTransferi },
748 { "glPixelZoom", (GLvoid *) glPixelZoom },
749 { "glPointSize", (GLvoid *) glPointSize },
750 { "glPolygonMode", (GLvoid *) glPolygonMode },
751 { "glPolygonOffset", (GLvoid *) glPolygonOffset },
752 { "glPolygonStipple", (GLvoid *) glPolygonStipple },
753 { "glPopAttrib", (GLvoid *) glPopAttrib },
754 { "glPopMatrix", (GLvoid *) glPopMatrix },
755 { "glPopName", (GLvoid *) glPopName },
756 { "glPushAttrib", (GLvoid *) glPushAttrib },
757 { "glPushMatrix", (GLvoid *) glPushMatrix },
758 { "glPushName", (GLvoid *) glPushName },
759 { "glRasterPos2d", (GLvoid *) glRasterPos2d },
760 { "glRasterPos2dv", (GLvoid *) glRasterPos2dv },
761 { "glRasterPos2f", (GLvoid *) glRasterPos2f },
762 { "glRasterPos2fv", (GLvoid *) glRasterPos2fv },
763 { "glRasterPos2i", (GLvoid *) glRasterPos2i },
764 { "glRasterPos2iv", (GLvoid *) glRasterPos2iv },
765 { "glRasterPos2s", (GLvoid *) glRasterPos2s },
766 { "glRasterPos2sv", (GLvoid *) glRasterPos2sv },
767 { "glRasterPos3d", (GLvoid *) glRasterPos3d },
768 { "glRasterPos3dv", (GLvoid *) glRasterPos3dv },
769 { "glRasterPos3f", (GLvoid *) glRasterPos3f },
770 { "glRasterPos3fv", (GLvoid *) glRasterPos3fv },
771 { "glRasterPos3i", (GLvoid *) glRasterPos3i },
772 { "glRasterPos3iv", (GLvoid *) glRasterPos3iv },
773 { "glRasterPos3s", (GLvoid *) glRasterPos3s },
774 { "glRasterPos3sv", (GLvoid *) glRasterPos3sv },
775 { "glRasterPos4d", (GLvoid *) glRasterPos4d },
776 { "glRasterPos4dv", (GLvoid *) glRasterPos4dv },
777 { "glRasterPos4f", (GLvoid *) glRasterPos4f },
778 { "glRasterPos4fv", (GLvoid *) glRasterPos4fv },
779 { "glRasterPos4i", (GLvoid *) glRasterPos4i },
780 { "glRasterPos4iv", (GLvoid *) glRasterPos4iv },
781 { "glRasterPos4s", (GLvoid *) glRasterPos4s },
782 { "glRasterPos4sv", (GLvoid *) glRasterPos4sv },
783 { "glReadBuffer", (GLvoid *) glReadBuffer },
784 { "glReadPixels", (GLvoid *) glReadPixels },
785 { "glRectd", (GLvoid *) glRectd },
786 { "glRectdv", (GLvoid *) glRectdv },
787 { "glRectf", (GLvoid *) glRectf },
788 { "glRectfv", (GLvoid *) glRectfv },
789 { "glRecti", (GLvoid *) glRecti },
790 { "glRectiv", (GLvoid *) glRectiv },
791 { "glRects", (GLvoid *) glRects },
792 { "glRectsv", (GLvoid *) glRectsv },
793 { "glRenderMode", (GLvoid *) glRenderMode },
794 { "glRotated", (GLvoid *) glRotated },
795 { "glRotatef", (GLvoid *) glRotatef },
796 { "glScaled", (GLvoid *) glScaled },
797 { "glScalef", (GLvoid *) glScalef },
798 { "glScissor", (GLvoid *) glScissor },
799 { "glSelectBuffer", (GLvoid *) glSelectBuffer },
800 { "glShadeModel", (GLvoid *) glShadeModel },
801 { "glStencilFunc", (GLvoid *) glStencilFunc },
802 { "glStencilMask", (GLvoid *) glStencilMask },
803 { "glStencilOp", (GLvoid *) glStencilOp },
804 { "glTexCoord1d", (GLvoid *) glTexCoord1d },
805 { "glTexCoord1dv", (GLvoid *) glTexCoord1dv },
806 { "glTexCoord1f", (GLvoid *) glTexCoord1f },
807 { "glTexCoord1fv", (GLvoid *) glTexCoord1fv },
808 { "glTexCoord1i", (GLvoid *) glTexCoord1i },
809 { "glTexCoord1iv", (GLvoid *) glTexCoord1iv },
810 { "glTexCoord1s", (GLvoid *) glTexCoord1s },
811 { "glTexCoord1sv", (GLvoid *) glTexCoord1sv },
812 { "glTexCoord2d", (GLvoid *) glTexCoord2d },
813 { "glTexCoord2dv", (GLvoid *) glTexCoord2dv },
814 { "glTexCoord2f", (GLvoid *) glTexCoord2f },
815 { "glTexCoord2fv", (GLvoid *) glTexCoord2fv },
816 { "glTexCoord2i", (GLvoid *) glTexCoord2i },
817 { "glTexCoord2iv", (GLvoid *) glTexCoord2iv },
818 { "glTexCoord2s", (GLvoid *) glTexCoord2s },
819 { "glTexCoord2sv", (GLvoid *) glTexCoord2sv },
820 { "glTexCoord3d", (GLvoid *) glTexCoord3d },
821 { "glTexCoord3dv", (GLvoid *) glTexCoord3dv },
822 { "glTexCoord3f", (GLvoid *) glTexCoord3f },
823 { "glTexCoord3fv", (GLvoid *) glTexCoord3fv },
824 { "glTexCoord3i", (GLvoid *) glTexCoord3i },
825 { "glTexCoord3iv", (GLvoid *) glTexCoord3iv },
826 { "glTexCoord3s", (GLvoid *) glTexCoord3s },
827 { "glTexCoord3sv", (GLvoid *) glTexCoord3sv },
828 { "glTexCoord4d", (GLvoid *) glTexCoord4d },
829 { "glTexCoord4dv", (GLvoid *) glTexCoord4dv },
830 { "glTexCoord4f", (GLvoid *) glTexCoord4f },
831 { "glTexCoord4fv", (GLvoid *) glTexCoord4fv },
832 { "glTexCoord4i", (GLvoid *) glTexCoord4i },
833 { "glTexCoord4iv", (GLvoid *) glTexCoord4iv },
834 { "glTexCoord4s", (GLvoid *) glTexCoord4s },
835 { "glTexCoord4sv", (GLvoid *) glTexCoord4sv },
836 { "glTexEnvf", (GLvoid *) glTexEnvf },
837 { "glTexEnvfv", (GLvoid *) glTexEnvfv },
838 { "glTexEnvi", (GLvoid *) glTexEnvi },
839 { "glTexEnviv", (GLvoid *) glTexEnviv },
840 { "glTexGend", (GLvoid *) glTexGend },
841 { "glTexGendv", (GLvoid *) glTexGendv },
842 { "glTexGenf", (GLvoid *) glTexGenf },
843 { "glTexGenfv", (GLvoid *) glTexGenfv },
844 { "glTexGeni", (GLvoid *) glTexGeni },
845 { "glTexGeniv", (GLvoid *) glTexGeniv },
846 { "glTexImage1D", (GLvoid *) glTexImage1D },
847 { "glTexImage2D", (GLvoid *) glTexImage2D },
848 { "glTexParameterf", (GLvoid *) glTexParameterf },
849 { "glTexParameterfv", (GLvoid *) glTexParameterfv },
850 { "glTexParameteri", (GLvoid *) glTexParameteri },
851 { "glTexParameteriv", (GLvoid *) glTexParameteriv },
852 { "glTranslated", (GLvoid *) glTranslated },
853 { "glTranslatef", (GLvoid *) glTranslatef },
854 { "glVertex2d", (GLvoid *) glVertex2d },
855 { "glVertex2dv", (GLvoid *) glVertex2dv },
856 { "glVertex2f", (GLvoid *) glVertex2f },
857 { "glVertex2fv", (GLvoid *) glVertex2fv },
858 { "glVertex2i", (GLvoid *) glVertex2i },
859 { "glVertex2iv", (GLvoid *) glVertex2iv },
860 { "glVertex2s", (GLvoid *) glVertex2s },
861 { "glVertex2sv", (GLvoid *) glVertex2sv },
862 { "glVertex3d", (GLvoid *) glVertex3d },
863 { "glVertex3dv", (GLvoid *) glVertex3dv },
864 { "glVertex3f", (GLvoid *) glVertex3f },
865 { "glVertex3fv", (GLvoid *) glVertex3fv },
866 { "glVertex3i", (GLvoid *) glVertex3i },
867 { "glVertex3iv", (GLvoid *) glVertex3iv },
868 { "glVertex3s", (GLvoid *) glVertex3s },
869 { "glVertex3sv", (GLvoid *) glVertex3sv },
870 { "glVertex4d", (GLvoid *) glVertex4d },
871 { "glVertex4dv", (GLvoid *) glVertex4dv },
872 { "glVertex4f", (GLvoid *) glVertex4f },
873 { "glVertex4fv", (GLvoid *) glVertex4fv },
874 { "glVertex4i", (GLvoid *) glVertex4i },
875 { "glVertex4iv", (GLvoid *) glVertex4iv },
876 { "glVertex4s", (GLvoid *) glVertex4s },
877 { "glVertex4sv", (GLvoid *) glVertex4sv },
878 { "glViewport", (GLvoid *) glViewport },
879
880 /* GL 1.1 */
881 #ifdef GL_VERSION_1_1
882 #define NAME(X) X
883 #else
884 #define NAME(X) NotImplemented
885 #endif
886 { "glAreTexturesResident", (GLvoid *) NAME(glAreTexturesResident) },
887 { "glArrayElement", (GLvoid *) NAME(glArrayElement) },
888 { "glBindTexture", (GLvoid *) NAME(glBindTexture) },
889 { "glColorPointer", (GLvoid *) NAME(glColorPointer) },
890 { "glCopyTexImage1D", (GLvoid *) NAME(glCopyTexImage1D) },
891 { "glCopyTexImage2D", (GLvoid *) NAME(glCopyTexImage2D) },
892 { "glCopyTexSubImage1D", (GLvoid *) NAME(glCopyTexSubImage1D) },
893 { "glCopyTexSubImage2D", (GLvoid *) NAME(glCopyTexSubImage2D) },
894 { "glDeleteTextures", (GLvoid *) NAME(glDeleteTextures) },
895 { "glDisableClientState", (GLvoid *) NAME(glDisableClientState) },
896 { "glDrawArrays", (GLvoid *) NAME(glDrawArrays) },
897 { "glDrawElements", (GLvoid *) NAME(glDrawElements) },
898 { "glEdgeFlagPointer", (GLvoid *) NAME(glEdgeFlagPointer) },
899 { "glEnableClientState", (GLvoid *) NAME(glEnableClientState) },
900 { "glGenTextures", (GLvoid *) NAME(glGenTextures) },
901 { "glGetPointerv", (GLvoid *) NAME(glGetPointerv) },
902 { "glIndexPointer", (GLvoid *) NAME(glIndexPointer) },
903 { "glIndexub", (GLvoid *) NAME(glIndexub) },
904 { "glIndexubv", (GLvoid *) NAME(glIndexubv) },
905 { "glInterleavedArrays", (GLvoid *) NAME(glInterleavedArrays) },
906 { "glIsTexture", (GLvoid *) NAME(glIsTexture) },
907 { "glNormalPointer", (GLvoid *) NAME(glNormalPointer) },
908 { "glPopClientAttrib", (GLvoid *) NAME(glPopClientAttrib) },
909 { "glPrioritizeTextures", (GLvoid *) NAME(glPrioritizeTextures) },
910 { "glPushClientAttrib", (GLvoid *) NAME(glPushClientAttrib) },
911 { "glTexCoordPointer", (GLvoid *) NAME(glTexCoordPointer) },
912 { "glTexSubImage1D", (GLvoid *) NAME(glTexSubImage1D) },
913 { "glTexSubImage2D", (GLvoid *) NAME(glTexSubImage2D) },
914 { "glVertexPointer", (GLvoid *) NAME(glVertexPointer) },
915 #undef NAME
916
917 /* GL 1.2 */
918 #ifdef GL_VERSION_1_2
919 #define NAME(X) X
920 #else
921 #define NAME(X) NotImplemented
922 #endif
923 { "glCopyTexSubImage3D", (GLvoid *) NAME(glCopyTexSubImage3D) },
924 { "glDrawRangeElements", (GLvoid *) NAME(glDrawRangeElements) },
925 { "glTexImage3D", (GLvoid *) NAME(glTexImage3D) },
926 { "glTexSubImage3D", (GLvoid *) NAME(glTexSubImage3D) },
927 #undef NAME
928
929 /* GL_ARB_imaging */
930 #ifdef GL_ARB_imaging
931 #define NAME(X) X
932 #else
933 #define NAME(X) NotImplemented
934 #endif
935 { "glBlendColor", (GLvoid *) NAME(glBlendColor) },
936 { "glBlendEquation", (GLvoid *) NAME(glBlendEquation) },
937 { "glColorSubTable", (GLvoid *) NAME(glColorSubTable) },
938 { "glColorTable", (GLvoid *) NAME(glColorTable) },
939 { "glColorTableParameterfv", (GLvoid *) NAME(glColorTableParameterfv) },
940 { "glColorTableParameteriv", (GLvoid *) NAME(glColorTableParameteriv) },
941 { "glConvolutionFilter1D", (GLvoid *) NAME(glConvolutionFilter1D) },
942 { "glConvolutionFilter2D", (GLvoid *) NAME(glConvolutionFilter2D) },
943 { "glConvolutionParameterf", (GLvoid *) NAME(glConvolutionParameterf) },
944 { "glConvolutionParameterfv", (GLvoid *) NAME(glConvolutionParameterfv) },
945 { "glConvolutionParameteri", (GLvoid *) NAME(glConvolutionParameteri) },
946 { "glConvolutionParameteriv", (GLvoid *) NAME(glConvolutionParameteriv) },
947 { "glCopyColorSubTable", (GLvoid *) NAME(glCopyColorSubTable) },
948 { "glCopyColorTable", (GLvoid *) NAME(glCopyColorTable) },
949 { "glCopyConvolutionFilter1D", (GLvoid *) NAME(glCopyConvolutionFilter1D) },
950 { "glCopyConvolutionFilter2D", (GLvoid *) NAME(glCopyConvolutionFilter2D) },
951 { "glGetColorTable", (GLvoid *) NAME(glGetColorTable) },
952 { "glGetColorTableParameterfv", (GLvoid *) NAME(glGetColorTableParameterfv) },
953 { "glGetColorTableParameteriv", (GLvoid *) NAME(glGetColorTableParameteriv) },
954 { "glGetConvolutionFilter", (GLvoid *) NAME(glGetConvolutionFilter) },
955 { "glGetConvolutionParameterfv", (GLvoid *) NAME(glGetConvolutionParameterfv) },
956 { "glGetConvolutionParameteriv", (GLvoid *) NAME(glGetConvolutionParameteriv) },
957 { "glGetHistogram", (GLvoid *) NAME(glGetHistogram) },
958 { "glGetHistogramParameterfv", (GLvoid *) NAME(glGetHistogramParameterfv) },
959 { "glGetHistogramParameteriv", (GLvoid *) NAME(glGetHistogramParameteriv) },
960 { "glGetMinmax", (GLvoid *) NAME(glGetMinmax) },
961 { "glGetMinmaxParameterfv", (GLvoid *) NAME(glGetMinmaxParameterfv) },
962 { "glGetMinmaxParameteriv", (GLvoid *) NAME(glGetMinmaxParameteriv) },
963 { "glGetSeparableFilter", (GLvoid *) NAME(glGetSeparableFilter) },
964 { "glHistogram", (GLvoid *) NAME(glHistogram) },
965 { "glMinmax", (GLvoid *) NAME(glMinmax) },
966 { "glResetHistogram", (GLvoid *) NAME(glResetHistogram) },
967 { "glResetMinmax", (GLvoid *) NAME(glResetMinmax) },
968 { "glSeparableFilter2D", (GLvoid *) NAME(glSeparableFilter2D) },
969 #undef NAME
970
971 /* GL_ARB_multitexture */
972 #ifdef GL_ARB_multitexture
973 #define NAME(X) X
974 #else
975 #define NAME(X) NotImplemented
976 #endif
977 { "glActiveTextureARB", (GLvoid *) NAME(glActiveTextureARB) },
978 { "glClientActiveTextureARB", (GLvoid *) NAME(glClientActiveTextureARB) },
979 { "glMultiTexCoord1dARB", (GLvoid *) NAME(glMultiTexCoord1dARB) },
980 { "glMultiTexCoord1dvARB", (GLvoid *) NAME(glMultiTexCoord1dvARB) },
981 { "glMultiTexCoord1fARB", (GLvoid *) NAME(glMultiTexCoord1fARB) },
982 { "glMultiTexCoord1fvARB", (GLvoid *) NAME(glMultiTexCoord1fvARB) },
983 { "glMultiTexCoord1iARB", (GLvoid *) NAME(glMultiTexCoord1iARB) },
984 { "glMultiTexCoord1ivARB", (GLvoid *) NAME(glMultiTexCoord1ivARB) },
985 { "glMultiTexCoord1sARB", (GLvoid *) NAME(glMultiTexCoord1sARB) },
986 { "glMultiTexCoord1svARB", (GLvoid *) NAME(glMultiTexCoord1svARB) },
987 { "glMultiTexCoord2dARB", (GLvoid *) NAME(glMultiTexCoord2dARB) },
988 { "glMultiTexCoord2dvARB", (GLvoid *) NAME(glMultiTexCoord2dvARB) },
989 { "glMultiTexCoord2fARB", (GLvoid *) NAME(glMultiTexCoord2fARB) },
990 { "glMultiTexCoord2fvARB", (GLvoid *) NAME(glMultiTexCoord2fvARB) },
991 { "glMultiTexCoord2iARB", (GLvoid *) NAME(glMultiTexCoord2iARB) },
992 { "glMultiTexCoord2ivARB", (GLvoid *) NAME(glMultiTexCoord2ivARB) },
993 { "glMultiTexCoord2sARB", (GLvoid *) NAME(glMultiTexCoord2sARB) },
994 { "glMultiTexCoord2svARB", (GLvoid *) NAME(glMultiTexCoord2svARB) },
995 { "glMultiTexCoord3dARB", (GLvoid *) NAME(glMultiTexCoord3dARB) },
996 { "glMultiTexCoord3dvARB", (GLvoid *) NAME(glMultiTexCoord3dvARB) },
997 { "glMultiTexCoord3fARB", (GLvoid *) NAME(glMultiTexCoord3fARB) },
998 { "glMultiTexCoord3fvARB", (GLvoid *) NAME(glMultiTexCoord3fvARB) },
999 { "glMultiTexCoord3iARB", (GLvoid *) NAME(glMultiTexCoord3iARB) },
1000 { "glMultiTexCoord3ivARB", (GLvoid *) NAME(glMultiTexCoord3ivARB) },
1001 { "glMultiTexCoord3sARB", (GLvoid *) NAME(glMultiTexCoord3sARB) },
1002 { "glMultiTexCoord3svARB", (GLvoid *) NAME(glMultiTexCoord3svARB) },
1003 { "glMultiTexCoord4dARB", (GLvoid *) NAME(glMultiTexCoord4dARB) },
1004 { "glMultiTexCoord4dvARB", (GLvoid *) NAME(glMultiTexCoord4dvARB) },
1005 { "glMultiTexCoord4fARB", (GLvoid *) NAME(glMultiTexCoord4fARB) },
1006 { "glMultiTexCoord4fvARB", (GLvoid *) NAME(glMultiTexCoord4fvARB) },
1007 { "glMultiTexCoord4iARB", (GLvoid *) NAME(glMultiTexCoord4iARB) },
1008 { "glMultiTexCoord4ivARB", (GLvoid *) NAME(glMultiTexCoord4ivARB) },
1009 { "glMultiTexCoord4sARB", (GLvoid *) NAME(glMultiTexCoord4sARB) },
1010 { "glMultiTexCoord4svARB", (GLvoid *) NAME(glMultiTexCoord4svARB) },
1011 #undef NAME
1012
1013 /* 2. GL_EXT_blend_color */
1014 #ifdef GL_EXT_blend_color
1015 #define NAME(X) X
1016 #else
1017 #define NAME(X) NotImplemented
1018 #endif
1019 { "glBlendColorEXT", (GLvoid *) NAME(glBlendColorEXT) },
1020 #undef NAME
1021
1022 /* 3. GL_EXT_polygon_offset */
1023 #ifdef GL_EXT_polygon_offset
1024 #define NAME(X) X
1025 #else
1026 #define NAME(X) NotImplemented
1027 #endif
1028 { "glPolygonOffsetEXT", (GLvoid *) NAME(glPolygonOffsetEXT) },
1029 #undef NAME
1030
1031 /* 6. GL_EXT_texture3D */
1032 #ifdef GL_EXT_texture3D
1033 #define NAME(X) X
1034 #else
1035 #define NAME(X) NotImplemented
1036 #endif
1037 { "glCopyTexSubImage3DEXT", (GLvoid *) NAME(glCopyTexSubImage3DEXT) },
1038 { "glTexImage3DEXT", (GLvoid *) NAME(glTexImage3DEXT) },
1039 { "glTexSubImage3DEXT", (GLvoid *) NAME(glTexSubImage3DEXT) },
1040 #undef NAME
1041
1042 /* 7. GL_SGI_texture_filter4 */
1043 #ifdef GL_SGI_texture_filter4
1044 #define NAME(X) X
1045 #else
1046 #define NAME(X) NotImplemented
1047 #endif
1048 { "glGetTexFilterFuncSGIS", (GLvoid *) NAME(glGetTexFilterFuncSGIS) },
1049 { "glTexFilterFuncSGIS", (GLvoid *) NAME(glTexFilterFuncSGIS) },
1050 #undef NAME
1051
1052 /* 9. GL_EXT_subtexture */
1053 #ifdef GL_EXT_subtexture
1054 #define NAME(X) X
1055 #else
1056 #define NAME(X) NotImplemented
1057 #endif
1058 { "glTexSubImage1DEXT", (GLvoid *) NAME(glTexSubImage1DEXT) },
1059 { "glTexSubImage2DEXT", (GLvoid *) NAME(glTexSubImage2DEXT) },
1060 #undef NAME
1061
1062 /* 10. GL_EXT_copy_texture */
1063 #ifdef GL_EXT_copy_texture
1064 #define NAME(X) X
1065 #else
1066 #define NAME(X) NotImplemented
1067 #endif
1068 { "glCopyTexImage1DEXT", (GLvoid *) NAME(glCopyTexImage1DEXT) },
1069 { "glCopyTexImage2DEXT", (GLvoid *) NAME(glCopyTexImage2DEXT) },
1070 { "glCopyTexSubImage1DEXT", (GLvoid *) NAME(glCopyTexSubImage1DEXT) },
1071 { "glCopyTexSubImage2DEXT", (GLvoid *) NAME(glCopyTexSubImage2DEXT) },
1072 #undef NAME
1073
1074 /* 11. GL_EXT_histogram */
1075 #ifdef GL_EXT_histogram
1076 #define NAME(X) X
1077 #else
1078 #define NAME(X) NotImplemented
1079 #endif
1080 { "glGetHistogramEXT", (GLvoid *) NAME(glGetHistogramEXT) },
1081 { "glGetHistogramParameterfvEXT", (GLvoid *) NAME(glGetHistogramParameterfvEXT) },
1082 { "glGetHistogramParameterivEXT", (GLvoid *) NAME(glGetHistogramParameterivEXT) },
1083 { "glGetMinmaxEXT", (GLvoid *) NAME(glGetMinmaxEXT) },
1084 { "glGetMinmaxParameterfvEXT", (GLvoid *) NAME(glGetMinmaxParameterfvEXT) },
1085 { "glGetMinmaxParameterivEXT", (GLvoid *) NAME(glGetMinmaxParameterivEXT) },
1086 { "glHistogramEXT", (GLvoid *) NAME(glHistogramEXT) },
1087 { "glMinmaxEXT", (GLvoid *) NAME(glMinmaxEXT) },
1088 { "glResetHistogramEXT", (GLvoid *) NAME(glResetHistogramEXT) },
1089 { "glResetMinmaxEXT", (GLvoid *) NAME(glResetMinmaxEXT) },
1090 #undef NAME
1091
1092 /* 12. GL_EXT_convolution */
1093 #ifdef GL_EXT_convolution
1094 #define NAME(X) X
1095 #else
1096 #define NAME(X) NotImplemented
1097 #endif
1098 { "glConvolutionFilter1DEXT", (GLvoid *) NAME(glConvolutionFilter1DEXT) },
1099 { "glConvolutionFilter2DEXT", (GLvoid *) NAME(glConvolutionFilter2DEXT) },
1100 { "glConvolutionParameterfEXT", (GLvoid *) NAME(glConvolutionParameterfEXT) },
1101 { "glConvolutionParameterfvEXT", (GLvoid *) NAME(glConvolutionParameterfvEXT) },
1102 { "glConvolutionParameteriEXT", (GLvoid *) NAME(glConvolutionParameteriEXT) },
1103 { "glConvolutionParameterivEXT", (GLvoid *) NAME(glConvolutionParameterivEXT) },
1104 { "glCopyConvolutionFilter1DEXT", (GLvoid *) NAME(glCopyConvolutionFilter1DEXT) },
1105 { "glCopyConvolutionFilter2DEXT", (GLvoid *) NAME(glCopyConvolutionFilter2DEXT) },
1106 { "glGetConvolutionFilterEXT", (GLvoid *) NAME(glGetConvolutionFilterEXT) },
1107 { "glGetConvolutionParameterivEXT", (GLvoid *) NAME(glGetConvolutionParameterivEXT) },
1108 { "glGetConvolutionParameterfvEXT", (GLvoid *) NAME(glGetConvolutionParameterfvEXT) },
1109 { "glGetSeparableFilterEXT", (GLvoid *) NAME(glGetSeparableFilterEXT) },
1110 { "glSeparableFilter2DEXT", (GLvoid *) NAME(glSeparableFilter2DEXT) },
1111 #undef NAME
1112
1113 /* 14. GL_SGI_color_table */
1114 #ifdef GL_SGI_color_table
1115 #define NAME(X) X
1116 #else
1117 #define NAME(X) NotImplemented
1118 #endif
1119 { "glColorTableSGI", (GLvoid *) NAME(glColorTableSGI) },
1120 { "glColorTableParameterfvSGI", (GLvoid *) NAME(glColorTableParameterfvSGI) },
1121 { "glColorTableParameterivSGI", (GLvoid *) NAME(glColorTableParameterivSGI) },
1122 { "glCopyColorTableSGI", (GLvoid *) NAME(glCopyColorTableSGI) },
1123 { "glGetColorTableSGI", (GLvoid *) NAME(glGetColorTableSGI) },
1124 { "glGetColorTableParameterfvSGI", (GLvoid *) NAME(glGetColorTableParameterfvSGI) },
1125 { "glGetColorTableParameterivSGI", (GLvoid *) NAME(glGetColorTableParameterivSGI) },
1126 #undef NAME
1127
1128 /* 15. GL_SGIS_pixel_texture */
1129 #ifdef GL_SGIS_pixel_texture
1130 #define NAME(X) X
1131 #else
1132 #define NAME(X) NotImplemented
1133 #endif
1134 { "glPixelTexGenParameterfSGIS", (GLvoid *) NAME(glPixelTexGenParameterfSGIS) },
1135 { "glPixelTexGenParameteriSGIS", (GLvoid *) NAME(glPixelTexGenParameteriSGIS) },
1136 { "glGetPixelTexGenParameterfvSGIS", (GLvoid *) NAME(glGetPixelTexGenParameterfvSGIS) },
1137 { "glGetPixelTexGenParameterivSGIS", (GLvoid *) NAME(glGetPixelTexGenParameterivSGIS) },
1138 #undef NAME
1139
1140 /* 16. GL_SGIS_texture4D */
1141 #ifdef GL_SGIS_texture4D
1142 #define NAME(X) X
1143 #else
1144 #define NAME(X) NotImplemented
1145 #endif
1146 { "glTexImage4DSGIS", (GLvoid *) NAME(glTexImage4DSGIS) },
1147 { "glTexSubImage4DSGIS", (GLvoid *) NAME(glTexSubImage4DSGIS) },
1148 #undef NAME
1149
1150 /* 20. GL_EXT_texture_object */
1151 #ifdef GL_EXT_texture_object
1152 #define NAME(X) X
1153 #else
1154 #define NAME(X) NotImplemented
1155 #endif
1156 { "glAreTexturesResidentEXT", (GLvoid *) NAME(glAreTexturesResidentEXT) },
1157 { "glBindTextureEXT", (GLvoid *) NAME(glBindTextureEXT) },
1158 { "glDeleteTexturesEXT", (GLvoid *) NAME(glDeleteTexturesEXT) },
1159 { "glGenTexturesEXT", (GLvoid *) NAME(glGenTexturesEXT) },
1160 { "glIsTextureEXT", (GLvoid *) NAME(glIsTextureEXT) },
1161 { "glPrioritizeTexturesEXT", (GLvoid *) NAME(glPrioritizeTexturesEXT) },
1162 #undef NAME
1163
1164 /* 21. GL_SGIS_detail_texture */
1165 #ifdef GL_SGIS_detail_texture
1166 #define NAME(X) X
1167 #else
1168 #define NAME(X) NotImplemented
1169 #endif
1170 { "glDetailTexFuncSGIS", (GLvoid *) NAME(glDetailTexFuncSGIS) },
1171 { "glGetDetailTexFuncSGIS", (GLvoid *) NAME(glGetDetailTexFuncSGIS) },
1172 #undef NAME
1173
1174 /* 22. GL_SGIS_sharpen_texture */
1175 #ifdef GL_SGIS_sharpen_texture
1176 #define NAME(X) X
1177 #else
1178 #define NAME(X) NotImplemented
1179 #endif
1180 { "glGetSharpenTexFuncSGIS", (GLvoid *) NAME(glGetSharpenTexFuncSGIS) },
1181 { "glSharpenTexFuncSGIS", (GLvoid *) NAME(glSharpenTexFuncSGIS) },
1182 #undef NAME
1183
1184 /* 25. GL_SGIS_multisample */
1185 #ifdef GL_SGIS_multisample
1186 #define NAME(X) X
1187 #else
1188 #define NAME(X) NotImplemented
1189 #endif
1190 { "glSampleMaskSGIS", (GLvoid *) NAME(glSampleMaskSGIS) },
1191 { "glSamplePatternSGIS", (GLvoid *) NAME(glSamplePatternSGIS) },
1192 #undef NAME
1193
1194 /* 30. GL_EXT_vertex_array */
1195 #ifdef GL_EXT_vertex_array
1196 #define NAME(X) X
1197 #else
1198 #define NAME(X) NotImplemented
1199 #endif
1200 { "glArrayElementEXT", (GLvoid *) NAME(glArrayElementEXT) },
1201 { "glColorPointerEXT", (GLvoid *) NAME(glColorPointerEXT) },
1202 { "glDrawArraysEXT", (GLvoid *) NAME(glDrawArraysEXT) },
1203 { "glEdgeFlagPointerEXT", (GLvoid *) NAME(glEdgeFlagPointerEXT) },
1204 { "glGetPointervEXT", (GLvoid *) NAME(glGetPointervEXT) },
1205 { "glIndexPointerEXT", (GLvoid *) NAME(glIndexPointerEXT) },
1206 { "glNormalPointerEXT", (GLvoid *) NAME(glNormalPointerEXT) },
1207 { "glTexCoordPointerEXT", (GLvoid *) NAME(glTexCoordPointerEXT) },
1208 { "glVertexPointerEXT", (GLvoid *) NAME(glVertexPointerEXT) },
1209 #undef NAME
1210
1211 /* 37. GL_EXT_blend_minmax */
1212 #ifdef GL_EXT_blend_minmax
1213 #define NAME(X) X
1214 #else
1215 #define NAME(X) NotImplemented
1216 #endif
1217 { "glBlendEquationEXT", (GLvoid *) NAME(glBlendEquationEXT) },
1218 #undef NAME
1219
1220 /* 52. GL_SGIX_sprite */
1221 #ifdef GL_SGIX_sprite
1222 #define NAME(X) X
1223 #else
1224 #define NAME(X) NotImplemented
1225 #endif
1226 { "glSpriteParameterfSGIX", (GLvoid *) NAME(glSpriteParameterfSGIX) },
1227 { "glSpriteParameterfvSGIX", (GLvoid *) NAME(glSpriteParameterfvSGIX) },
1228 { "glSpriteParameteriSGIX", (GLvoid *) NAME(glSpriteParameteriSGIX) },
1229 { "glSpriteParameterivSGIX", (GLvoid *) NAME(glSpriteParameterivSGIX) },
1230 #undef NAME
1231
1232 /* 54. GL_EXT_point_parameters */
1233 #ifdef GL_EXT_point_parameters
1234 #define NAME(X) X
1235 #else
1236 #define NAME(X) NotImplemented
1237 #endif
1238 { "glPointParameterfEXT", (GLvoid *) NAME(glPointParameterfEXT) },
1239 { "glPointParameterfvEXT", (GLvoid *) NAME(glPointParameterfvEXT) },
1240 #undef NAME
1241
1242 /* 55. GL_SGIX_instruments */
1243 #ifdef GL_SGIX_instruments
1244 #define NAME(X) X
1245 #else
1246 #define NAME(X) NotImplemented
1247 #endif
1248 { "glInstrumentsBufferSGIX", (GLvoid *) NAME(glInstrumentsBufferSGIX) },
1249 { "glStartInstrumentsSGIX", (GLvoid *) NAME(glStartInstrumentsSGIX) },
1250 { "glStopInstrumentsSGIX", (GLvoid *) NAME(glStopInstrumentsSGIX) },
1251 { "glReadInstrumentsSGIX", (GLvoid *) NAME(glReadInstrumentsSGIX) },
1252 { "glPollInstrumentsSGIX", (GLvoid *) NAME(glPollInstrumentsSGIX) },
1253 { "glGetInstrumentsSGIX", (GLvoid *) NAME(glGetInstrumentsSGIX) },
1254 #undef NAME
1255
1256 /* 57. GL_SGIX_framezoom */
1257 #ifdef GL_SGIX_framezoom
1258 #define NAME(X) X
1259 #else
1260 #define NAME(X) NotImplemented
1261 #endif
1262 { "glFrameZoomSGIX", (GLvoid *) NAME(glFrameZoomSGIX) },
1263 #undef NAME
1264
1265 /* 60. GL_SGIX_reference_plane */
1266 #ifdef GL_SGIX_reference_plane
1267 #define NAME(X) X
1268 #else
1269 #define NAME(X) NotImplemented
1270 #endif
1271 { "glReferencePlaneSGIX", (GLvoid *) NAME(glReferencePlaneSGIX) },
1272 #undef NAME
1273
1274 /* 61. GL_SGIX_flush_raster */
1275 #ifdef GL_SGIX_flush_raster
1276 #define NAME(X) X
1277 #else
1278 #define NAME(X) NotImplemented
1279 #endif
1280 { "glFlushRasterSGIX", (GLvoid *) NAME(glFlushRasterSGIX) },
1281 #undef NAME
1282
1283 /* 66. GL_HP_image_transform */
1284 #ifdef GL_HP_image_transform
1285 #define NAME(X) X
1286 #else
1287 #define NAME(X) NotImplemented
1288 #endif
1289 { "glGetImageTransformParameterfvHP", (GLvoid *) NAME(glGetImageTransformParameterfvHP) },
1290 { "glGetImageTransformParameterivHP", (GLvoid *) NAME(glGetImageTransformParameterivHP) },
1291 { "glImageTransformParameterfHP", (GLvoid *) NAME(glImageTransformParameterfHP) },
1292 { "glImageTransformParameterfvHP", (GLvoid *) NAME(glImageTransformParameterfvHP) },
1293 { "glImageTransformParameteriHP", (GLvoid *) NAME(glImageTransformParameteriHP) },
1294 { "glImageTransformParameterivHP", (GLvoid *) NAME(glImageTransformParameterivHP) },
1295 #undef NAME
1296
1297 /* 74. GL_EXT_color_subtable */
1298 #ifdef GL_EXT_color_subtable
1299 #define NAME(X) X
1300 #else
1301 #define NAME(X) NotImplemented
1302 #endif
1303 { "glColorSubTableEXT", (GLvoid *) NAME(glColorSubTableEXT) },
1304 { "glCopyColorSubTableEXT", (GLvoid *) NAME(glCopyColorSubTableEXT) },
1305 #undef NAME
1306
1307 /* 77. GL_PGI_misc_hints */
1308 #ifdef GL_PGI_misc_hints
1309 #define NAME(X) X
1310 #else
1311 #define NAME(X) NotImplemented
1312 #endif
1313 { "glHintPGI", (GLvoid *) NAME(glHintPGI) },
1314 #undef NAME
1315
1316 /* 78. GL_EXT_paletted_texture */
1317 #ifdef GL_EXT_paletted_texture
1318 #define NAME(X) X
1319 #else
1320 #define NAME(X) NotImplemented
1321 #endif
1322 { "glColorTableEXT", (GLvoid *) NAME(glColorTableEXT) },
1323 { "glGetColorTableEXT", (GLvoid *) NAME(glGetColorTableEXT) },
1324 { "glGetColorTableParameterfvEXT", (GLvoid *) NAME(glGetColorTableParameterfvEXT) },
1325 { "glGetColorTableParameterivEXT", (GLvoid *) NAME(glGetColorTableParameterivEXT) },
1326 #undef NAME
1327
1328 /* 80. GL_SGIX_list_priority */
1329 #ifdef GL_SGIX_list_priority
1330 #define NAME(X) X
1331 #else
1332 #define NAME(X) NotImplemented
1333 #endif
1334 { "glGetListParameterfvSGIX", (GLvoid *) NAME(glGetListParameterfvSGIX) },
1335 { "glGetListParameterivSGIX", (GLvoid *) NAME(glGetListParameterivSGIX) },
1336 { "glListParameterfSGIX", (GLvoid *) NAME(glListParameterfSGIX) },
1337 { "glListParameterfvSGIX", (GLvoid *) NAME(glListParameterfvSGIX) },
1338 { "glListParameteriSGIX", (GLvoid *) NAME(glListParameteriSGIX) },
1339 { "glListParameterivSGIX", (GLvoid *) NAME(glListParameterivSGIX) },
1340 #undef NAME
1341
1342 /* 94. GL_EXT_index_material */
1343 #ifdef GL_EXT_index_material
1344 #define NAME(X) X
1345 #else
1346 #define NAME(X) NotImplemented
1347 #endif
1348 { "glIndexMaterialEXT", (GLvoid *) NAME(glIndexMaterialEXT) },
1349 #undef NAME
1350
1351 /* 95. GL_EXT_index_func */
1352 #ifdef GL_EXT_index_func
1353 #define NAME(X) X
1354 #else
1355 #define NAME(X) NotImplemented
1356 #endif
1357 { "glIndexFuncEXT", (GLvoid *) NAME(glIndexFuncEXT) },
1358 #undef NAME
1359
1360 /* 97. GL_EXT_compiled_vertex_array */
1361 #ifdef GL_EXT_compiled_vertex_array
1362 #define NAME(X) X
1363 #else
1364 #define NAME(X) NotImplemented
1365 #endif
1366 { "glLockArraysEXT", (GLvoid *) NAME(glLockArraysEXT) },
1367 { "glUnlockArraysEXT", (GLvoid *) NAME(glUnlockArraysEXT) },
1368 #undef NAME
1369
1370 /* 98. GL_EXT_cull_vertex */
1371 #ifdef GL_EXT_cull_vertex
1372 #define NAME(X) X
1373 #else
1374 #define NAME(X) NotImplemented
1375 #endif
1376 { "glCullParameterfvEXT", (GLvoid *) NAME(glCullParameterfvEXT) },
1377 { "glCullParameterdvEXT", (GLvoid *) NAME(glCullParameterdvEXT) },
1378 #undef NAME
1379
1380 /* 173. GL_EXT/INGR_blend_func_separate */
1381 #ifdef GL_INGR_blend_func_separate
1382 #define NAME(X) X
1383 #else
1384 #define NAME(X) NotImplemented
1385 #endif
1386 { "glBlendFuncSeparateINGR", (GLvoid *) NAME(glBlendFuncSeparateINGR) },
1387 #undef NAME
1388
1389 /* GL_MESA_window_pos */
1390 #ifdef MESA_window_pos
1391 #define NAME(X) X
1392 #else
1393 #define NAME(X) NotImplemented
1394 #endif
1395 { "glWindowPos4fMESA", (GLvoid *) NAME(glWindowPos4fMESA) },
1396 #undef NAME
1397
1398 /* GL_MESA_resize_buffers */
1399 #ifdef MESA_resize_buffers
1400 #define NAME(X) X
1401 #else
1402 #define NAME(X) NotImplemented
1403 #endif
1404 { "glResizeBuffersMESA", (GLvoid *) NAME(glResizeBuffersMESA) },
1405 #undef NAME
1406
1407 /* GL_ARB_transpose_matrix */
1408 #ifdef GL_ARB_transpose_matrix
1409 #define NAME(X) X
1410 #else
1411 #define NAME(X) NotImplemented
1412 #endif
1413 { "glLoadTransposeMatrixdARB", (GLvoid *) NAME(glLoadTransposeMatrixdARB) },
1414 { "glLoadTransposeMatrixfARB", (GLvoid *) NAME(glLoadTransposeMatrixfARB) },
1415 { "glMultTransposeMatrixdARB", (GLvoid *) NAME(glMultTransposeMatrixdARB) },
1416 { "glMultTransposeMatrixfARB", (GLvoid *) NAME(glMultTransposeMatrixfARB) },
1417 #undef NAME
1418
1419 /*
1420 * XXX many more extenstion functions to add.
1421 */
1422
1423 { NULL, NULL } /* end of list marker */
1424 };
1425