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