fa74a0d85b5f502f51b9040012144a6a1ffd850e
[mesa.git] / src / mesa / glapi / glapi.c
1 /* $Id: glapi.c,v 1.22 2000/01/10 04:29:09 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.3
6 *
7 * Copyright (C) 1999 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 static struct _glapi_table *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; /* to help with debugging */
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 Dispatch = NULL; /* to help with debugging */
181 else
182 Dispatch = dispatch;
183 #else
184 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(Dispatch);
202 return Dispatch;
203 }
204 #else
205 return 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 /* Do some spot checks to be sure that the dispatch table
446 * slots are assigned correctly.
447 */
448 {
449 GLuint BeginOffset = _glapi_get_proc_offset("glBegin");
450 char *BeginFunc = (char*) &table->Begin;
451 GLuint offset = (BeginFunc - (char *) table) / sizeof(void *);
452 assert(BeginOffset == _gloffset_Begin);
453 assert(BeginOffset == offset);
454 }
455 {
456 GLuint viewportOffset = _glapi_get_proc_offset("glViewport");
457 char *viewportFunc = (char*) &table->Viewport;
458 GLuint offset = (viewportFunc - (char *) table) / sizeof(void *);
459 assert(viewportOffset == _gloffset_Viewport);
460 assert(viewportOffset == offset);
461 }
462 {
463 GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer");
464 char *VertexPointerFunc = (char*) &table->VertexPointer;
465 GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *);
466 assert(VertexPointerOffset == _gloffset_VertexPointer);
467 assert(VertexPointerOffset == offset);
468 }
469 {
470 GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax");
471 char *ResetMinMaxFunc = (char*) &table->ResetMinmax;
472 GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *);
473 assert(ResetMinMaxOffset == _gloffset_ResetMinmax);
474 assert(ResetMinMaxOffset == offset);
475 }
476 {
477 GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColorEXT");
478 char *blendColorFunc = (char*) &table->BlendColorEXT;
479 GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *);
480 assert(blendColorOffset == _gloffset_BlendColorEXT);
481 assert(blendColorOffset == offset);
482 }
483 {
484 GLuint istextureOffset = _glapi_get_proc_offset("glIsTextureEXT");
485 char *istextureFunc = (char*) &table->IsTextureEXT;
486 GLuint offset = (istextureFunc - (char *) table) / sizeof(void *);
487 assert(istextureOffset == _gloffset_IsTextureEXT);
488 assert(istextureOffset == offset);
489 }
490 }
491
492
493 /**********************************************************************
494 * Generate the GL entrypoint functions here.
495 */
496
497 #define KEYWORD1
498 #define KEYWORD2 GLAPIENTRY
499 #ifdef USE_MGL_NAMESPACE
500 #define NAME(func) mgl##func
501 #else
502 #define NAME(func) gl##func
503 #endif
504
505 #ifdef DEBUG
506
507 #include <stdio.h>
508
509 static int
510 trace(void)
511 {
512 static int trace = -1;
513 if (trace < 0)
514 trace = getenv("MESA_TRACE") ? 1 : 0;
515 return trace > 0;
516 }
517
518 #define DISPATCH(FUNC, ARGS, MESSAGE) \
519 const struct _glapi_table *dispatch; \
520 dispatch = Dispatch ? Dispatch : _glapi_get_dispatch(); \
521 if (trace()) printf MESSAGE; \
522 (dispatch->FUNC) ARGS
523
524 #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
525 const struct _glapi_table *dispatch; \
526 dispatch = Dispatch ? Dispatch : _glapi_get_dispatch(); \
527 if (trace()) printf MESSAGE; \
528 return (dispatch->FUNC) ARGS
529
530 #else
531
532 #define DISPATCH(FUNC, ARGS, MESSAGE) \
533 const struct _glapi_table *dispatch; \
534 dispatch = Dispatch ? Dispatch : _glapi_get_dispatch(); \
535 (dispatch->FUNC) ARGS
536
537 #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
538 const struct _glapi_table *dispatch; \
539 dispatch = Dispatch ? Dispatch : _glapi_get_dispatch(); \
540 return (dispatch->FUNC) ARGS
541
542 #endif
543
544
545 #ifndef GLAPIENTRY
546 #define GLAPIENTRY
547 #endif
548
549 #include "glapitemp.h"
550
551
552 /*
553 * For each entry in static_functions[] which use this function
554 * we should implement a dispatch function in glapitemp.h and
555 * in glapinoop.c
556 */
557 static int NotImplemented(void)
558 {
559 return 0;
560 }
561
562
563
564 static struct name_address_pair static_functions[] = {
565 { "NotImplemented", (GLvoid *) NotImplemented },
566
567 /* GL 1.1 */
568 { "glAccum", (GLvoid *) glAccum },
569 { "glAlphaFunc", (GLvoid *) glAlphaFunc },
570 { "glBegin", (GLvoid *) glBegin },
571 { "glBitmap", (GLvoid *) glBitmap },
572 { "glBlendFunc", (GLvoid *) glBlendFunc },
573 { "glCallList", (GLvoid *) glCallList },
574 { "glCallLists", (GLvoid *) glCallLists },
575 { "glClear", (GLvoid *) glClear },
576 { "glClearAccum", (GLvoid *) glClearAccum },
577 { "glClearColor", (GLvoid *) glClearColor },
578 { "glClearDepth", (GLvoid *) glClearDepth },
579 { "glClearIndex", (GLvoid *) glClearIndex },
580 { "glClearStencil", (GLvoid *) glClearStencil },
581 { "glClipPlane", (GLvoid *) glClipPlane },
582 { "glColor3b", (GLvoid *) glColor3b },
583 { "glColor3bv", (GLvoid *) glColor3bv },
584 { "glColor3d", (GLvoid *) glColor3d },
585 { "glColor3dv", (GLvoid *) glColor3dv },
586 { "glColor3f", (GLvoid *) glColor3f },
587 { "glColor3fv", (GLvoid *) glColor3fv },
588 { "glColor3i", (GLvoid *) glColor3i },
589 { "glColor3iv", (GLvoid *) glColor3iv },
590 { "glColor3s", (GLvoid *) glColor3s },
591 { "glColor3sv", (GLvoid *) glColor3sv },
592 { "glColor3ub", (GLvoid *) glColor3ub },
593 { "glColor3ubv", (GLvoid *) glColor3ubv },
594 { "glColor3ui", (GLvoid *) glColor3ui },
595 { "glColor3uiv", (GLvoid *) glColor3uiv },
596 { "glColor3us", (GLvoid *) glColor3us },
597 { "glColor3usv", (GLvoid *) glColor3usv },
598 { "glColor4b", (GLvoid *) glColor4b },
599 { "glColor4bv", (GLvoid *) glColor4bv },
600 { "glColor4d", (GLvoid *) glColor4d },
601 { "glColor4dv", (GLvoid *) glColor4dv },
602 { "glColor4f", (GLvoid *) glColor4f },
603 { "glColor4fv", (GLvoid *) glColor4fv },
604 { "glColor4i", (GLvoid *) glColor4i },
605 { "glColor4iv", (GLvoid *) glColor4iv },
606 { "glColor4s", (GLvoid *) glColor4s },
607 { "glColor4sv", (GLvoid *) glColor4sv },
608 { "glColor4ub", (GLvoid *) glColor4ub },
609 { "glColor4ubv", (GLvoid *) glColor4ubv },
610 { "glColor4ui", (GLvoid *) glColor4ui },
611 { "glColor4uiv", (GLvoid *) glColor4uiv },
612 { "glColor4us", (GLvoid *) glColor4us },
613 { "glColor4usv", (GLvoid *) glColor4usv },
614 { "glColorMask", (GLvoid *) glColorMask },
615 { "glColorMaterial", (GLvoid *) glColorMaterial },
616 { "glCopyPixels", (GLvoid *) glCopyPixels },
617 { "glCullFace", (GLvoid *) glCullFace },
618 { "glDeleteLists", (GLvoid *) glDeleteLists },
619 { "glDepthFunc", (GLvoid *) glDepthFunc },
620 { "glDepthMask", (GLvoid *) glDepthMask },
621 { "glDepthRange", (GLvoid *) glDepthRange },
622 { "glDisable", (GLvoid *) glDisable },
623 { "glDrawBuffer", (GLvoid *) glDrawBuffer },
624 { "glDrawPixels", (GLvoid *) glDrawPixels },
625 { "glEdgeFlag", (GLvoid *) glEdgeFlag },
626 { "glEdgeFlagv", (GLvoid *) glEdgeFlagv },
627 { "glEnable", (GLvoid *) glEnable },
628 { "glEnd", (GLvoid *) glEnd },
629 { "glEndList", (GLvoid *) glEndList },
630 { "glEvalCoord1d", (GLvoid *) glEvalCoord1d },
631 { "glEvalCoord1dv", (GLvoid *) glEvalCoord1dv },
632 { "glEvalCoord1f", (GLvoid *) glEvalCoord1f },
633 { "glEvalCoord1fv", (GLvoid *) glEvalCoord1fv },
634 { "glEvalCoord2d", (GLvoid *) glEvalCoord2d },
635 { "glEvalCoord2dv", (GLvoid *) glEvalCoord2dv },
636 { "glEvalCoord2f", (GLvoid *) glEvalCoord2f },
637 { "glEvalCoord2fv", (GLvoid *) glEvalCoord2fv },
638 { "glEvalMesh1", (GLvoid *) glEvalMesh1 },
639 { "glEvalMesh2", (GLvoid *) glEvalMesh2 },
640 { "glEvalPoint1", (GLvoid *) glEvalPoint1 },
641 { "glEvalPoint2", (GLvoid *) glEvalPoint2 },
642 { "glFeedbackBuffer", (GLvoid *) glFeedbackBuffer },
643 { "glFinish", (GLvoid *) glFinish },
644 { "glFlush", (GLvoid *) glFlush },
645 { "glFogf", (GLvoid *) glFogf },
646 { "glFogfv", (GLvoid *) glFogfv },
647 { "glFogi", (GLvoid *) glFogi },
648 { "glFogiv", (GLvoid *) glFogiv },
649 { "glFrontFace", (GLvoid *) glFrontFace },
650 { "glFrustum", (GLvoid *) glFrustum },
651 { "glGenLists", (GLvoid *) glGenLists },
652 { "glGetBooleanv", (GLvoid *) glGetBooleanv },
653 { "glGetClipPlane", (GLvoid *) glGetClipPlane },
654 { "glGetDoublev", (GLvoid *) glGetDoublev },
655 { "glGetError", (GLvoid *) glGetError },
656 { "glGetFloatv", (GLvoid *) glGetFloatv },
657 { "glGetIntegerv", (GLvoid *) glGetIntegerv },
658 { "glGetLightfv", (GLvoid *) glGetLightfv },
659 { "glGetLightiv", (GLvoid *) glGetLightiv },
660 { "glGetMapdv", (GLvoid *) glGetMapdv },
661 { "glGetMapfv", (GLvoid *) glGetMapfv },
662 { "glGetMapiv", (GLvoid *) glGetMapiv },
663 { "glGetMaterialfv", (GLvoid *) glGetMaterialfv },
664 { "glGetMaterialiv", (GLvoid *) glGetMaterialiv },
665 { "glGetPixelMapfv", (GLvoid *) glGetPixelMapfv },
666 { "glGetPixelMapuiv", (GLvoid *) glGetPixelMapuiv },
667 { "glGetPixelMapusv", (GLvoid *) glGetPixelMapusv },
668 { "glGetPolygonStipple", (GLvoid *) glGetPolygonStipple },
669 { "glGetString", (GLvoid *) glGetString },
670 { "glGetTexEnvfv", (GLvoid *) glGetTexEnvfv },
671 { "glGetTexEnviv", (GLvoid *) glGetTexEnviv },
672 { "glGetTexGendv", (GLvoid *) glGetTexGendv },
673 { "glGetTexGenfv", (GLvoid *) glGetTexGenfv },
674 { "glGetTexGeniv", (GLvoid *) glGetTexGeniv },
675 { "glGetTexImage", (GLvoid *) glGetTexImage },
676 { "glGetTexLevelParameterfv", (GLvoid *) glGetTexLevelParameterfv },
677 { "glGetTexLevelParameteriv", (GLvoid *) glGetTexLevelParameteriv },
678 { "glGetTexParameterfv", (GLvoid *) glGetTexParameterfv },
679 { "glGetTexParameteriv", (GLvoid *) glGetTexParameteriv },
680 { "glHint", (GLvoid *) glHint },
681 { "glIndexMask", (GLvoid *) glIndexMask },
682 { "glIndexd", (GLvoid *) glIndexd },
683 { "glIndexdv", (GLvoid *) glIndexdv },
684 { "glIndexf", (GLvoid *) glIndexf },
685 { "glIndexfv", (GLvoid *) glIndexfv },
686 { "glIndexi", (GLvoid *) glIndexi },
687 { "glIndexiv", (GLvoid *) glIndexiv },
688 { "glIndexs", (GLvoid *) glIndexs },
689 { "glIndexsv", (GLvoid *) glIndexsv },
690 { "glInitNames", (GLvoid *) glInitNames },
691 { "glIsEnabled", (GLvoid *) glIsEnabled },
692 { "glIsList", (GLvoid *) glIsList },
693 { "glLightModelf", (GLvoid *) glLightModelf },
694 { "glLightModelfv", (GLvoid *) glLightModelfv },
695 { "glLightModeli", (GLvoid *) glLightModeli },
696 { "glLightModeliv", (GLvoid *) glLightModeliv },
697 { "glLightf", (GLvoid *) glLightf },
698 { "glLightfv", (GLvoid *) glLightfv },
699 { "glLighti", (GLvoid *) glLighti },
700 { "glLightiv", (GLvoid *) glLightiv },
701 { "glLineStipple", (GLvoid *) glLineStipple },
702 { "glLineWidth", (GLvoid *) glLineWidth },
703 { "glListBase", (GLvoid *) glListBase },
704 { "glLoadIdentity", (GLvoid *) glLoadIdentity },
705 { "glLoadMatrixd", (GLvoid *) glLoadMatrixd },
706 { "glLoadMatrixf", (GLvoid *) glLoadMatrixf },
707 { "glLoadName", (GLvoid *) glLoadName },
708 { "glLogicOp", (GLvoid *) glLogicOp },
709 { "glMap1d", (GLvoid *) glMap1d },
710 { "glMap1f", (GLvoid *) glMap1f },
711 { "glMap2d", (GLvoid *) glMap2d },
712 { "glMap2f", (GLvoid *) glMap2f },
713 { "glMapGrid1d", (GLvoid *) glMapGrid1d },
714 { "glMapGrid1f", (GLvoid *) glMapGrid1f },
715 { "glMapGrid2d", (GLvoid *) glMapGrid2d },
716 { "glMapGrid2f", (GLvoid *) glMapGrid2f },
717 { "glMaterialf", (GLvoid *) glMaterialf },
718 { "glMaterialfv", (GLvoid *) glMaterialfv },
719 { "glMateriali", (GLvoid *) glMateriali },
720 { "glMaterialiv", (GLvoid *) glMaterialiv },
721 { "glMatrixMode", (GLvoid *) glMatrixMode },
722 { "glMultMatrixd", (GLvoid *) glMultMatrixd },
723 { "glMultMatrixf", (GLvoid *) glMultMatrixf },
724 { "glNewList", (GLvoid *) glNewList },
725 { "glNormal3b", (GLvoid *) glNormal3b },
726 { "glNormal3bv", (GLvoid *) glNormal3bv },
727 { "glNormal3d", (GLvoid *) glNormal3d },
728 { "glNormal3dv", (GLvoid *) glNormal3dv },
729 { "glNormal3f", (GLvoid *) glNormal3f },
730 { "glNormal3fv", (GLvoid *) glNormal3fv },
731 { "glNormal3i", (GLvoid *) glNormal3i },
732 { "glNormal3iv", (GLvoid *) glNormal3iv },
733 { "glNormal3s", (GLvoid *) glNormal3s },
734 { "glNormal3sv", (GLvoid *) glNormal3sv },
735 { "glOrtho", (GLvoid *) glOrtho },
736 { "glPassThrough", (GLvoid *) glPassThrough },
737 { "glPixelMapfv", (GLvoid *) glPixelMapfv },
738 { "glPixelMapuiv", (GLvoid *) glPixelMapuiv },
739 { "glPixelMapusv", (GLvoid *) glPixelMapusv },
740 { "glPixelStoref", (GLvoid *) glPixelStoref },
741 { "glPixelStorei", (GLvoid *) glPixelStorei },
742 { "glPixelTransferf", (GLvoid *) glPixelTransferf },
743 { "glPixelTransferi", (GLvoid *) glPixelTransferi },
744 { "glPixelZoom", (GLvoid *) glPixelZoom },
745 { "glPointSize", (GLvoid *) glPointSize },
746 { "glPolygonMode", (GLvoid *) glPolygonMode },
747 { "glPolygonOffset", (GLvoid *) glPolygonOffset },
748 { "glPolygonStipple", (GLvoid *) glPolygonStipple },
749 { "glPopAttrib", (GLvoid *) glPopAttrib },
750 { "glPopMatrix", (GLvoid *) glPopMatrix },
751 { "glPopName", (GLvoid *) glPopName },
752 { "glPushAttrib", (GLvoid *) glPushAttrib },
753 { "glPushMatrix", (GLvoid *) glPushMatrix },
754 { "glPushName", (GLvoid *) glPushName },
755 { "glRasterPos2d", (GLvoid *) glRasterPos2d },
756 { "glRasterPos2dv", (GLvoid *) glRasterPos2dv },
757 { "glRasterPos2f", (GLvoid *) glRasterPos2f },
758 { "glRasterPos2fv", (GLvoid *) glRasterPos2fv },
759 { "glRasterPos2i", (GLvoid *) glRasterPos2i },
760 { "glRasterPos2iv", (GLvoid *) glRasterPos2iv },
761 { "glRasterPos2s", (GLvoid *) glRasterPos2s },
762 { "glRasterPos2sv", (GLvoid *) glRasterPos2sv },
763 { "glRasterPos3d", (GLvoid *) glRasterPos3d },
764 { "glRasterPos3dv", (GLvoid *) glRasterPos3dv },
765 { "glRasterPos3f", (GLvoid *) glRasterPos3f },
766 { "glRasterPos3fv", (GLvoid *) glRasterPos3fv },
767 { "glRasterPos3i", (GLvoid *) glRasterPos3i },
768 { "glRasterPos3iv", (GLvoid *) glRasterPos3iv },
769 { "glRasterPos3s", (GLvoid *) glRasterPos3s },
770 { "glRasterPos3sv", (GLvoid *) glRasterPos3sv },
771 { "glRasterPos4d", (GLvoid *) glRasterPos4d },
772 { "glRasterPos4dv", (GLvoid *) glRasterPos4dv },
773 { "glRasterPos4f", (GLvoid *) glRasterPos4f },
774 { "glRasterPos4fv", (GLvoid *) glRasterPos4fv },
775 { "glRasterPos4i", (GLvoid *) glRasterPos4i },
776 { "glRasterPos4iv", (GLvoid *) glRasterPos4iv },
777 { "glRasterPos4s", (GLvoid *) glRasterPos4s },
778 { "glRasterPos4sv", (GLvoid *) glRasterPos4sv },
779 { "glReadBuffer", (GLvoid *) glReadBuffer },
780 { "glReadPixels", (GLvoid *) glReadPixels },
781 { "glRectd", (GLvoid *) glRectd },
782 { "glRectdv", (GLvoid *) glRectdv },
783 { "glRectf", (GLvoid *) glRectf },
784 { "glRectfv", (GLvoid *) glRectfv },
785 { "glRecti", (GLvoid *) glRecti },
786 { "glRectiv", (GLvoid *) glRectiv },
787 { "glRects", (GLvoid *) glRects },
788 { "glRectsv", (GLvoid *) glRectsv },
789 { "glRenderMode", (GLvoid *) glRenderMode },
790 { "glRotated", (GLvoid *) glRotated },
791 { "glRotatef", (GLvoid *) glRotatef },
792 { "glScaled", (GLvoid *) glScaled },
793 { "glScalef", (GLvoid *) glScalef },
794 { "glScissor", (GLvoid *) glScissor },
795 { "glSelectBuffer", (GLvoid *) glSelectBuffer },
796 { "glShadeModel", (GLvoid *) glShadeModel },
797 { "glStencilFunc", (GLvoid *) glStencilFunc },
798 { "glStencilMask", (GLvoid *) glStencilMask },
799 { "glStencilOp", (GLvoid *) glStencilOp },
800 { "glTexCoord1d", (GLvoid *) glTexCoord1d },
801 { "glTexCoord1dv", (GLvoid *) glTexCoord1dv },
802 { "glTexCoord1f", (GLvoid *) glTexCoord1f },
803 { "glTexCoord1fv", (GLvoid *) glTexCoord1fv },
804 { "glTexCoord1i", (GLvoid *) glTexCoord1i },
805 { "glTexCoord1iv", (GLvoid *) glTexCoord1iv },
806 { "glTexCoord1s", (GLvoid *) glTexCoord1s },
807 { "glTexCoord1sv", (GLvoid *) glTexCoord1sv },
808 { "glTexCoord2d", (GLvoid *) glTexCoord2d },
809 { "glTexCoord2dv", (GLvoid *) glTexCoord2dv },
810 { "glTexCoord2f", (GLvoid *) glTexCoord2f },
811 { "glTexCoord2fv", (GLvoid *) glTexCoord2fv },
812 { "glTexCoord2i", (GLvoid *) glTexCoord2i },
813 { "glTexCoord2iv", (GLvoid *) glTexCoord2iv },
814 { "glTexCoord2s", (GLvoid *) glTexCoord2s },
815 { "glTexCoord2sv", (GLvoid *) glTexCoord2sv },
816 { "glTexCoord3d", (GLvoid *) glTexCoord3d },
817 { "glTexCoord3dv", (GLvoid *) glTexCoord3dv },
818 { "glTexCoord3f", (GLvoid *) glTexCoord3f },
819 { "glTexCoord3fv", (GLvoid *) glTexCoord3fv },
820 { "glTexCoord3i", (GLvoid *) glTexCoord3i },
821 { "glTexCoord3iv", (GLvoid *) glTexCoord3iv },
822 { "glTexCoord3s", (GLvoid *) glTexCoord3s },
823 { "glTexCoord3sv", (GLvoid *) glTexCoord3sv },
824 { "glTexCoord4d", (GLvoid *) glTexCoord4d },
825 { "glTexCoord4dv", (GLvoid *) glTexCoord4dv },
826 { "glTexCoord4f", (GLvoid *) glTexCoord4f },
827 { "glTexCoord4fv", (GLvoid *) glTexCoord4fv },
828 { "glTexCoord4i", (GLvoid *) glTexCoord4i },
829 { "glTexCoord4iv", (GLvoid *) glTexCoord4iv },
830 { "glTexCoord4s", (GLvoid *) glTexCoord4s },
831 { "glTexCoord4sv", (GLvoid *) glTexCoord4sv },
832 { "glTexEnvf", (GLvoid *) glTexEnvf },
833 { "glTexEnvfv", (GLvoid *) glTexEnvfv },
834 { "glTexEnvi", (GLvoid *) glTexEnvi },
835 { "glTexEnviv", (GLvoid *) glTexEnviv },
836 { "glTexGend", (GLvoid *) glTexGend },
837 { "glTexGendv", (GLvoid *) glTexGendv },
838 { "glTexGenf", (GLvoid *) glTexGenf },
839 { "glTexGenfv", (GLvoid *) glTexGenfv },
840 { "glTexGeni", (GLvoid *) glTexGeni },
841 { "glTexGeniv", (GLvoid *) glTexGeniv },
842 { "glTexImage1D", (GLvoid *) glTexImage1D },
843 { "glTexImage2D", (GLvoid *) glTexImage2D },
844 { "glTexParameterf", (GLvoid *) glTexParameterf },
845 { "glTexParameterfv", (GLvoid *) glTexParameterfv },
846 { "glTexParameteri", (GLvoid *) glTexParameteri },
847 { "glTexParameteriv", (GLvoid *) glTexParameteriv },
848 { "glTranslated", (GLvoid *) glTranslated },
849 { "glTranslatef", (GLvoid *) glTranslatef },
850 { "glVertex2d", (GLvoid *) glVertex2d },
851 { "glVertex2dv", (GLvoid *) glVertex2dv },
852 { "glVertex2f", (GLvoid *) glVertex2f },
853 { "glVertex2fv", (GLvoid *) glVertex2fv },
854 { "glVertex2i", (GLvoid *) glVertex2i },
855 { "glVertex2iv", (GLvoid *) glVertex2iv },
856 { "glVertex2s", (GLvoid *) glVertex2s },
857 { "glVertex2sv", (GLvoid *) glVertex2sv },
858 { "glVertex3d", (GLvoid *) glVertex3d },
859 { "glVertex3dv", (GLvoid *) glVertex3dv },
860 { "glVertex3f", (GLvoid *) glVertex3f },
861 { "glVertex3fv", (GLvoid *) glVertex3fv },
862 { "glVertex3i", (GLvoid *) glVertex3i },
863 { "glVertex3iv", (GLvoid *) glVertex3iv },
864 { "glVertex3s", (GLvoid *) glVertex3s },
865 { "glVertex3sv", (GLvoid *) glVertex3sv },
866 { "glVertex4d", (GLvoid *) glVertex4d },
867 { "glVertex4dv", (GLvoid *) glVertex4dv },
868 { "glVertex4f", (GLvoid *) glVertex4f },
869 { "glVertex4fv", (GLvoid *) glVertex4fv },
870 { "glVertex4i", (GLvoid *) glVertex4i },
871 { "glVertex4iv", (GLvoid *) glVertex4iv },
872 { "glVertex4s", (GLvoid *) glVertex4s },
873 { "glVertex4sv", (GLvoid *) glVertex4sv },
874 { "glViewport", (GLvoid *) glViewport },
875
876 /* GL 1.1 */
877 #ifdef GL_VERSION_1_1
878 #define NAME(X) X
879 #else
880 #define NAME(X) NotImplemented
881 #endif
882 { "glAreTexturesResident", (GLvoid *) NAME(glAreTexturesResident) },
883 { "glArrayElement", (GLvoid *) NAME(glArrayElement) },
884 { "glBindTexture", (GLvoid *) NAME(glBindTexture) },
885 { "glColorPointer", (GLvoid *) NAME(glColorPointer) },
886 { "glCopyTexImage1D", (GLvoid *) NAME(glCopyTexImage1D) },
887 { "glCopyTexImage2D", (GLvoid *) NAME(glCopyTexImage2D) },
888 { "glCopyTexSubImage1D", (GLvoid *) NAME(glCopyTexSubImage1D) },
889 { "glCopyTexSubImage2D", (GLvoid *) NAME(glCopyTexSubImage2D) },
890 { "glDeleteTextures", (GLvoid *) NAME(glDeleteTextures) },
891 { "glDisableClientState", (GLvoid *) NAME(glDisableClientState) },
892 { "glDrawArrays", (GLvoid *) NAME(glDrawArrays) },
893 { "glDrawElements", (GLvoid *) NAME(glDrawElements) },
894 { "glEdgeFlagPointer", (GLvoid *) NAME(glEdgeFlagPointer) },
895 { "glEnableClientState", (GLvoid *) NAME(glEnableClientState) },
896 { "glGenTextures", (GLvoid *) NAME(glGenTextures) },
897 { "glGetPointerv", (GLvoid *) NAME(glGetPointerv) },
898 { "glIndexPointer", (GLvoid *) NAME(glIndexPointer) },
899 { "glIndexub", (GLvoid *) NAME(glIndexub) },
900 { "glIndexubv", (GLvoid *) NAME(glIndexubv) },
901 { "glInterleavedArrays", (GLvoid *) NAME(glInterleavedArrays) },
902 { "glIsTexture", (GLvoid *) NAME(glIsTexture) },
903 { "glNormalPointer", (GLvoid *) NAME(glNormalPointer) },
904 { "glPopClientAttrib", (GLvoid *) NAME(glPopClientAttrib) },
905 { "glPrioritizeTextures", (GLvoid *) NAME(glPrioritizeTextures) },
906 { "glPushClientAttrib", (GLvoid *) NAME(glPushClientAttrib) },
907 { "glTexCoordPointer", (GLvoid *) NAME(glTexCoordPointer) },
908 { "glTexSubImage1D", (GLvoid *) NAME(glTexSubImage1D) },
909 { "glTexSubImage2D", (GLvoid *) NAME(glTexSubImage2D) },
910 { "glVertexPointer", (GLvoid *) NAME(glVertexPointer) },
911 #undef NAME
912
913 /* GL 1.2 */
914 #ifdef GL_VERSION_1_2
915 #define NAME(X) X
916 #else
917 #define NAME(X) NotImplemented
918 #endif
919 { "glCopyTexSubImage3D", (GLvoid *) NAME(glCopyTexSubImage3D) },
920 { "glDrawRangeElements", (GLvoid *) NAME(glDrawRangeElements) },
921 { "glTexImage3D", (GLvoid *) NAME(glTexImage3D) },
922 { "glTexSubImage3D", (GLvoid *) NAME(glTexSubImage3D) },
923 #undef NAME
924
925 /* GL_ARB_imaging */
926 #ifdef GL_ARB_imaging
927 #define NAME(X) X
928 #else
929 #define NAME(X) NotImplemented
930 #endif
931 { "glBlendColor", (GLvoid *) NAME(glBlendColor) },
932 { "glBlendEquation", (GLvoid *) NAME(glBlendEquation) },
933 { "glColorSubTable", (GLvoid *) NAME(glColorSubTable) },
934 { "glColorTable", (GLvoid *) NAME(glColorTable) },
935 { "glColorTableParameterfv", (GLvoid *) NAME(glColorTableParameterfv) },
936 { "glColorTableParameteriv", (GLvoid *) NAME(glColorTableParameteriv) },
937 { "glConvolutionFilter1D", (GLvoid *) NAME(glConvolutionFilter1D) },
938 { "glConvolutionFilter2D", (GLvoid *) NAME(glConvolutionFilter2D) },
939 { "glConvolutionParameterf", (GLvoid *) NAME(glConvolutionParameterf) },
940 { "glConvolutionParameterfv", (GLvoid *) NAME(glConvolutionParameterfv) },
941 { "glConvolutionParameteri", (GLvoid *) NAME(glConvolutionParameteri) },
942 { "glConvolutionParameteriv", (GLvoid *) NAME(glConvolutionParameteriv) },
943 { "glCopyColorSubTable", (GLvoid *) NAME(glCopyColorSubTable) },
944 { "glCopyColorTable", (GLvoid *) NAME(glCopyColorTable) },
945 { "glCopyConvolutionFilter1D", (GLvoid *) NAME(glCopyConvolutionFilter1D) },
946 { "glCopyConvolutionFilter2D", (GLvoid *) NAME(glCopyConvolutionFilter2D) },
947 { "glGetColorTable", (GLvoid *) NAME(glGetColorTable) },
948 { "glGetColorTableParameterfv", (GLvoid *) NAME(glGetColorTableParameterfv) },
949 { "glGetColorTableParameteriv", (GLvoid *) NAME(glGetColorTableParameteriv) },
950 { "glGetConvolutionFilter", (GLvoid *) NAME(glGetConvolutionFilter) },
951 { "glGetConvolutionParameterfv", (GLvoid *) NAME(glGetConvolutionParameterfv) },
952 { "glGetConvolutionParameteriv", (GLvoid *) NAME(glGetConvolutionParameteriv) },
953 { "glGetHistogram", (GLvoid *) NAME(glGetHistogram) },
954 { "glGetHistogramParameterfv", (GLvoid *) NAME(glGetHistogramParameterfv) },
955 { "glGetHistogramParameteriv", (GLvoid *) NAME(glGetHistogramParameteriv) },
956 { "glGetMinmax", (GLvoid *) NAME(glGetMinmax) },
957 { "glGetMinmaxParameterfv", (GLvoid *) NAME(glGetMinmaxParameterfv) },
958 { "glGetMinmaxParameteriv", (GLvoid *) NAME(glGetMinmaxParameteriv) },
959 { "glGetSeparableFilter", (GLvoid *) NAME(glGetSeparableFilter) },
960 { "glHistogram", (GLvoid *) NAME(glHistogram) },
961 { "glMinmax", (GLvoid *) NAME(glMinmax) },
962 { "glResetHistogram", (GLvoid *) NAME(glResetHistogram) },
963 { "glResetMinmax", (GLvoid *) NAME(glResetMinmax) },
964 { "glSeparableFilter2D", (GLvoid *) NAME(glSeparableFilter2D) },
965 #undef NAME
966
967 /* GL_ARB_multitexture */
968 #ifdef GL_ARB_multitexture
969 #define NAME(X) X
970 #else
971 #define NAME(X) NotImplemented
972 #endif
973 { "glActiveTextureARB", (GLvoid *) NAME(glActiveTextureARB) },
974 { "glClientActiveTextureARB", (GLvoid *) NAME(glClientActiveTextureARB) },
975 { "glMultiTexCoord1dARB", (GLvoid *) NAME(glMultiTexCoord1dARB) },
976 { "glMultiTexCoord1dvARB", (GLvoid *) NAME(glMultiTexCoord1dvARB) },
977 { "glMultiTexCoord1fARB", (GLvoid *) NAME(glMultiTexCoord1fARB) },
978 { "glMultiTexCoord1fvARB", (GLvoid *) NAME(glMultiTexCoord1fvARB) },
979 { "glMultiTexCoord1iARB", (GLvoid *) NAME(glMultiTexCoord1iARB) },
980 { "glMultiTexCoord1ivARB", (GLvoid *) NAME(glMultiTexCoord1ivARB) },
981 { "glMultiTexCoord1sARB", (GLvoid *) NAME(glMultiTexCoord1sARB) },
982 { "glMultiTexCoord1svARB", (GLvoid *) NAME(glMultiTexCoord1svARB) },
983 { "glMultiTexCoord2dARB", (GLvoid *) NAME(glMultiTexCoord2dARB) },
984 { "glMultiTexCoord2dvARB", (GLvoid *) NAME(glMultiTexCoord2dvARB) },
985 { "glMultiTexCoord2fARB", (GLvoid *) NAME(glMultiTexCoord2fARB) },
986 { "glMultiTexCoord2fvARB", (GLvoid *) NAME(glMultiTexCoord2fvARB) },
987 { "glMultiTexCoord2iARB", (GLvoid *) NAME(glMultiTexCoord2iARB) },
988 { "glMultiTexCoord2ivARB", (GLvoid *) NAME(glMultiTexCoord2ivARB) },
989 { "glMultiTexCoord2sARB", (GLvoid *) NAME(glMultiTexCoord2sARB) },
990 { "glMultiTexCoord2svARB", (GLvoid *) NAME(glMultiTexCoord2svARB) },
991 { "glMultiTexCoord3dARB", (GLvoid *) NAME(glMultiTexCoord3dARB) },
992 { "glMultiTexCoord3dvARB", (GLvoid *) NAME(glMultiTexCoord3dvARB) },
993 { "glMultiTexCoord3fARB", (GLvoid *) NAME(glMultiTexCoord3fARB) },
994 { "glMultiTexCoord3fvARB", (GLvoid *) NAME(glMultiTexCoord3fvARB) },
995 { "glMultiTexCoord3iARB", (GLvoid *) NAME(glMultiTexCoord3iARB) },
996 { "glMultiTexCoord3ivARB", (GLvoid *) NAME(glMultiTexCoord3ivARB) },
997 { "glMultiTexCoord3sARB", (GLvoid *) NAME(glMultiTexCoord3sARB) },
998 { "glMultiTexCoord3svARB", (GLvoid *) NAME(glMultiTexCoord3svARB) },
999 { "glMultiTexCoord4dARB", (GLvoid *) NAME(glMultiTexCoord4dARB) },
1000 { "glMultiTexCoord4dvARB", (GLvoid *) NAME(glMultiTexCoord4dvARB) },
1001 { "glMultiTexCoord4fARB", (GLvoid *) NAME(glMultiTexCoord4fARB) },
1002 { "glMultiTexCoord4fvARB", (GLvoid *) NAME(glMultiTexCoord4fvARB) },
1003 { "glMultiTexCoord4iARB", (GLvoid *) NAME(glMultiTexCoord4iARB) },
1004 { "glMultiTexCoord4ivARB", (GLvoid *) NAME(glMultiTexCoord4ivARB) },
1005 { "glMultiTexCoord4sARB", (GLvoid *) NAME(glMultiTexCoord4sARB) },
1006 { "glMultiTexCoord4svARB", (GLvoid *) NAME(glMultiTexCoord4svARB) },
1007 #undef NAME
1008
1009 /* 2. GL_EXT_blend_color */
1010 #ifdef GL_EXT_blend_color
1011 #define NAME(X) X
1012 #else
1013 #define NAME(X) NotImplemented
1014 #endif
1015 { "glBlendColorEXT", (GLvoid *) NAME(glBlendColorEXT) },
1016 #undef NAME
1017
1018 /* 3. GL_EXT_polygon_offset */
1019 #ifdef GL_EXT_polygon_offset
1020 #define NAME(X) X
1021 #else
1022 #define NAME(X) NotImplemented
1023 #endif
1024 { "glPolygonOffsetEXT", (GLvoid *) NAME(glPolygonOffsetEXT) },
1025 #undef NAME
1026
1027 /* 6. GL_EXT_texture3D */
1028 #ifdef GL_EXT_texture3D
1029 #define NAME(X) X
1030 #else
1031 #define NAME(X) NotImplemented
1032 #endif
1033 { "glCopyTexSubImage3DEXT", (GLvoid *) NAME(glCopyTexSubImage3DEXT) },
1034 { "glTexImage3DEXT", (GLvoid *) NAME(glTexImage3DEXT) },
1035 { "glTexSubImage3DEXT", (GLvoid *) NAME(glTexSubImage3DEXT) },
1036 #undef NAME
1037
1038 /* 7. GL_SGI_texture_filter4 */
1039 #ifdef GL_SGI_texture_filter4
1040 #define NAME(X) X
1041 #else
1042 #define NAME(X) NotImplemented
1043 #endif
1044 { "glGetTexFilterFuncSGIS", (GLvoid *) NAME(glGetTexFilterFuncSGIS) },
1045 { "glTexFilterFuncSGIS", (GLvoid *) NAME(glTexFilterFuncSGIS) },
1046 #undef NAME
1047
1048 /* 9. GL_EXT_subtexture */
1049 #ifdef GL_EXT_subtexture
1050 #define NAME(X) X
1051 #else
1052 #define NAME(X) NotImplemented
1053 #endif
1054 { "glTexSubImage1DEXT", (GLvoid *) NAME(glTexSubImage1DEXT) },
1055 { "glTexSubImage2DEXT", (GLvoid *) NAME(glTexSubImage2DEXT) },
1056 #undef NAME
1057
1058 /* 10. GL_EXT_copy_texture */
1059 #ifdef GL_EXT_copy_texture
1060 #define NAME(X) X
1061 #else
1062 #define NAME(X) NotImplemented
1063 #endif
1064 { "glCopyTexImage1DEXT", (GLvoid *) NAME(glCopyTexImage1DEXT) },
1065 { "glCopyTexImage2DEXT", (GLvoid *) NAME(glCopyTexImage2DEXT) },
1066 { "glCopyTexSubImage1DEXT", (GLvoid *) NAME(glCopyTexSubImage1DEXT) },
1067 { "glCopyTexSubImage2DEXT", (GLvoid *) NAME(glCopyTexSubImage2DEXT) },
1068 #undef NAME
1069
1070 /* 11. GL_EXT_histogram */
1071 #ifdef GL_EXT_histogram
1072 #define NAME(X) X
1073 #else
1074 #define NAME(X) NotImplemented
1075 #endif
1076 { "glGetHistogramEXT", (GLvoid *) NAME(glGetHistogramEXT) },
1077 { "glGetHistogramParameterfvEXT", (GLvoid *) NAME(glGetHistogramParameterfvEXT) },
1078 { "glGetHistogramParameterivEXT", (GLvoid *) NAME(glGetHistogramParameterivEXT) },
1079 { "glGetMinmaxEXT", (GLvoid *) NAME(glGetMinmaxEXT) },
1080 { "glGetMinmaxParameterfvEXT", (GLvoid *) NAME(glGetMinmaxParameterfvEXT) },
1081 { "glGetMinmaxParameterivEXT", (GLvoid *) NAME(glGetMinmaxParameterivEXT) },
1082 { "glHistogramEXT", (GLvoid *) NAME(glHistogramEXT) },
1083 { "glMinmaxEXT", (GLvoid *) NAME(glMinmaxEXT) },
1084 { "glResetHistogramEXT", (GLvoid *) NAME(glResetHistogramEXT) },
1085 { "glResetMinmaxEXT", (GLvoid *) NAME(glResetMinmaxEXT) },
1086 #undef NAME
1087
1088 /* 12. GL_EXT_convolution */
1089 #ifdef GL_EXT_convolution
1090 #define NAME(X) X
1091 #else
1092 #define NAME(X) NotImplemented
1093 #endif
1094 { "glConvolutionFilter1DEXT", (GLvoid *) NAME(glConvolutionFilter1DEXT) },
1095 { "glConvolutionFilter2DEXT", (GLvoid *) NAME(glConvolutionFilter2DEXT) },
1096 { "glConvolutionParameterfEXT", (GLvoid *) NAME(glConvolutionParameterfEXT) },
1097 { "glConvolutionParameterfvEXT", (GLvoid *) NAME(glConvolutionParameterfvEXT) },
1098 { "glConvolutionParameteriEXT", (GLvoid *) NAME(glConvolutionParameteriEXT) },
1099 { "glConvolutionParameterivEXT", (GLvoid *) NAME(glConvolutionParameterivEXT) },
1100 { "glCopyConvolutionFilter1DEXT", (GLvoid *) NAME(glCopyConvolutionFilter1DEXT) },
1101 { "glCopyConvolutionFilter2DEXT", (GLvoid *) NAME(glCopyConvolutionFilter2DEXT) },
1102 { "glGetConvolutionFilterEXT", (GLvoid *) NAME(glGetConvolutionFilterEXT) },
1103 { "glGetConvolutionParameterivEXT", (GLvoid *) NAME(glGetConvolutionParameterivEXT) },
1104 { "glGetConvolutionParameterfvEXT", (GLvoid *) NAME(glGetConvolutionParameterfvEXT) },
1105 { "glGetSeparableFilterEXT", (GLvoid *) NAME(glGetSeparableFilterEXT) },
1106 { "glSeparableFilter2DEXT", (GLvoid *) NAME(glSeparableFilter2DEXT) },
1107 #undef NAME
1108
1109 /* 14. GL_SGI_color_table */
1110 #ifdef GL_SGI_color_table
1111 #define NAME(X) X
1112 #else
1113 #define NAME(X) NotImplemented
1114 #endif
1115 { "glColorTableSGI", (GLvoid *) NAME(glColorTableSGI) },
1116 { "glColorTableParameterfvSGI", (GLvoid *) NAME(glColorTableParameterfvSGI) },
1117 { "glColorTableParameterivSGI", (GLvoid *) NAME(glColorTableParameterivSGI) },
1118 { "glCopyColorTableSGI", (GLvoid *) NAME(glCopyColorTableSGI) },
1119 { "glGetColorTableSGI", (GLvoid *) NAME(glGetColorTableSGI) },
1120 { "glGetColorTableParameterfvSGI", (GLvoid *) NAME(glGetColorTableParameterfvSGI) },
1121 { "glGetColorTableParameterivSGI", (GLvoid *) NAME(glGetColorTableParameterivSGI) },
1122 #undef NAME
1123
1124 /* 15. GL_SGIS_pixel_texture */
1125 #ifdef GL_SGIS_pixel_texture
1126 #define NAME(X) X
1127 #else
1128 #define NAME(X) NotImplemented
1129 #endif
1130 { "glPixelTexGenParameterfSGIS", (GLvoid *) NAME(glPixelTexGenParameterfSGIS) },
1131 { "glPixelTexGenParameteriSGIS", (GLvoid *) NAME(glPixelTexGenParameteriSGIS) },
1132 { "glGetPixelTexGenParameterfvSGIS", (GLvoid *) NAME(glGetPixelTexGenParameterfvSGIS) },
1133 { "glGetPixelTexGenParameterivSGIS", (GLvoid *) NAME(glGetPixelTexGenParameterivSGIS) },
1134 #undef NAME
1135
1136 /* 16. GL_SGIS_texture4D */
1137 #ifdef GL_SGIS_texture4D
1138 #define NAME(X) X
1139 #else
1140 #define NAME(X) NotImplemented
1141 #endif
1142 { "glTexImage4DSGIS", (GLvoid *) NAME(glTexImage4DSGIS) },
1143 { "glTexSubImage4DSGIS", (GLvoid *) NAME(glTexSubImage4DSGIS) },
1144 #undef NAME
1145
1146 /* 20. GL_EXT_texture_object */
1147 #ifdef GL_EXT_texture_object
1148 #define NAME(X) X
1149 #else
1150 #define NAME(X) NotImplemented
1151 #endif
1152 { "glAreTexturesResidentEXT", (GLvoid *) NAME(glAreTexturesResidentEXT) },
1153 { "glBindTextureEXT", (GLvoid *) NAME(glBindTextureEXT) },
1154 { "glDeleteTexturesEXT", (GLvoid *) NAME(glDeleteTexturesEXT) },
1155 { "glGenTexturesEXT", (GLvoid *) NAME(glGenTexturesEXT) },
1156 { "glIsTextureEXT", (GLvoid *) NAME(glIsTextureEXT) },
1157 { "glPrioritizeTexturesEXT", (GLvoid *) NAME(glPrioritizeTexturesEXT) },
1158 #undef NAME
1159
1160 /* 21. GL_SGIS_detail_texture */
1161 #ifdef GL_SGIS_detail_texture
1162 #define NAME(X) X
1163 #else
1164 #define NAME(X) NotImplemented
1165 #endif
1166 { "glDetailTexFuncSGIS", (GLvoid *) NAME(glDetailTexFuncSGIS) },
1167 { "glGetDetailTexFuncSGIS", (GLvoid *) NAME(glGetDetailTexFuncSGIS) },
1168 #undef NAME
1169
1170 /* 22. GL_SGIS_sharpen_texture */
1171 #ifdef GL_SGIS_sharpen_texture
1172 #define NAME(X) X
1173 #else
1174 #define NAME(X) NotImplemented
1175 #endif
1176 { "glGetSharpenTexFuncSGIS", (GLvoid *) NAME(glGetSharpenTexFuncSGIS) },
1177 { "glSharpenTexFuncSGIS", (GLvoid *) NAME(glSharpenTexFuncSGIS) },
1178 #undef NAME
1179
1180 /* 25. GL_SGIS_multisample */
1181 #ifdef GL_SGIS_multisample
1182 #define NAME(X) X
1183 #else
1184 #define NAME(X) NotImplemented
1185 #endif
1186 { "glSampleMaskSGIS", (GLvoid *) NAME(glSampleMaskSGIS) },
1187 { "glSamplePatternSGIS", (GLvoid *) NAME(glSamplePatternSGIS) },
1188 #undef NAME
1189
1190 /* 30. GL_EXT_vertex_array */
1191 #ifdef GL_EXT_vertex_array
1192 #define NAME(X) X
1193 #else
1194 #define NAME(X) NotImplemented
1195 #endif
1196 { "glArrayElementEXT", (GLvoid *) NAME(glArrayElementEXT) },
1197 { "glColorPointerEXT", (GLvoid *) NAME(glColorPointerEXT) },
1198 { "glDrawArraysEXT", (GLvoid *) NAME(glDrawArraysEXT) },
1199 { "glEdgeFlagPointerEXT", (GLvoid *) NAME(glEdgeFlagPointerEXT) },
1200 { "glGetPointervEXT", (GLvoid *) NAME(glGetPointervEXT) },
1201 { "glIndexPointerEXT", (GLvoid *) NAME(glIndexPointerEXT) },
1202 { "glNormalPointerEXT", (GLvoid *) NAME(glNormalPointerEXT) },
1203 { "glTexCoordPointerEXT", (GLvoid *) NAME(glTexCoordPointerEXT) },
1204 { "glVertexPointerEXT", (GLvoid *) NAME(glVertexPointerEXT) },
1205 #undef NAME
1206
1207 /* 37. GL_EXT_blend_minmax */
1208 #ifdef GL_EXT_blend_minmax
1209 #define NAME(X) X
1210 #else
1211 #define NAME(X) NotImplemented
1212 #endif
1213 { "glBlendEquationEXT", (GLvoid *) NAME(glBlendEquationEXT) },
1214 #undef NAME
1215
1216 /* 52. GL_SGIX_sprite */
1217 #ifdef GL_SGIX_sprite
1218 #define NAME(X) X
1219 #else
1220 #define NAME(X) NotImplemented
1221 #endif
1222 { "glSpriteParameterfSGIX", (GLvoid *) NAME(glSpriteParameterfSGIX) },
1223 { "glSpriteParameterfvSGIX", (GLvoid *) NAME(glSpriteParameterfvSGIX) },
1224 { "glSpriteParameteriSGIX", (GLvoid *) NAME(glSpriteParameteriSGIX) },
1225 { "glSpriteParameterivSGIX", (GLvoid *) NAME(glSpriteParameterivSGIX) },
1226 #undef NAME
1227
1228 /* 54. GL_EXT_point_parameters */
1229 #ifdef GL_EXT_point_parameters
1230 #define NAME(X) X
1231 #else
1232 #define NAME(X) NotImplemented
1233 #endif
1234 { "glPointParameterfEXT", (GLvoid *) NAME(glPointParameterfEXT) },
1235 { "glPointParameterfvEXT", (GLvoid *) NAME(glPointParameterfvEXT) },
1236 #undef NAME
1237
1238 /* 55. GL_SGIX_instruments */
1239 #ifdef GL_SGIX_instruments
1240 #define NAME(X) X
1241 #else
1242 #define NAME(X) NotImplemented
1243 #endif
1244 { "glInstrumentsBufferSGIX", (GLvoid *) NAME(glInstrumentsBufferSGIX) },
1245 { "glStartInstrumentsSGIX", (GLvoid *) NAME(glStartInstrumentsSGIX) },
1246 { "glStopInstrumentsSGIX", (GLvoid *) NAME(glStopInstrumentsSGIX) },
1247 { "glReadInstrumentsSGIX", (GLvoid *) NAME(glReadInstrumentsSGIX) },
1248 { "glPollInstrumentsSGIX", (GLvoid *) NAME(glPollInstrumentsSGIX) },
1249 { "glGetInstrumentsSGIX", (GLvoid *) NAME(glGetInstrumentsSGIX) },
1250 #undef NAME
1251
1252 /* 57. GL_SGIX_framezoom */
1253 #ifdef GL_SGIX_framezoom
1254 #define NAME(X) X
1255 #else
1256 #define NAME(X) NotImplemented
1257 #endif
1258 { "glFrameZoomSGIX", (GLvoid *) NAME(glFrameZoomSGIX) },
1259 #undef NAME
1260
1261 /* 60. GL_SGIX_reference_plane */
1262 #ifdef GL_SGIX_reference_plane
1263 #define NAME(X) X
1264 #else
1265 #define NAME(X) NotImplemented
1266 #endif
1267 { "glReferencePlaneSGIX", (GLvoid *) NAME(glReferencePlaneSGIX) },
1268 #undef NAME
1269
1270 /* 61. GL_SGIX_flush_raster */
1271 #ifdef GL_SGIX_flush_raster
1272 #define NAME(X) X
1273 #else
1274 #define NAME(X) NotImplemented
1275 #endif
1276 { "glFlushRasterSGIX", (GLvoid *) NAME(glFlushRasterSGIX) },
1277 #undef NAME
1278
1279 /* 66. GL_HP_image_transform */
1280 #ifdef GL_HP_image_transform
1281 #define NAME(X) X
1282 #else
1283 #define NAME(X) NotImplemented
1284 #endif
1285 { "glGetImageTransformParameterfvHP", (GLvoid *) NAME(glGetImageTransformParameterfvHP) },
1286 { "glGetImageTransformParameterivHP", (GLvoid *) NAME(glGetImageTransformParameterivHP) },
1287 { "glImageTransformParameterfHP", (GLvoid *) NAME(glImageTransformParameterfHP) },
1288 { "glImageTransformParameterfvHP", (GLvoid *) NAME(glImageTransformParameterfvHP) },
1289 { "glImageTransformParameteriHP", (GLvoid *) NAME(glImageTransformParameteriHP) },
1290 { "glImageTransformParameterivHP", (GLvoid *) NAME(glImageTransformParameterivHP) },
1291 #undef NAME
1292
1293 /* 74. GL_EXT_color_subtable */
1294 #ifdef GL_EXT_color_subtable
1295 #define NAME(X) X
1296 #else
1297 #define NAME(X) NotImplemented
1298 #endif
1299 { "glColorSubTableEXT", (GLvoid *) NAME(glColorSubTableEXT) },
1300 { "glCopyColorSubTableEXT", (GLvoid *) NAME(glCopyColorSubTableEXT) },
1301 #undef NAME
1302
1303 /* 77. GL_PGI_misc_hints */
1304 #ifdef GL_PGI_misc_hints
1305 #define NAME(X) X
1306 #else
1307 #define NAME(X) NotImplemented
1308 #endif
1309 { "glHintPGI", (GLvoid *) NAME(glHintPGI) },
1310 #undef NAME
1311
1312 /* 78. GL_EXT_paletted_texture */
1313 #ifdef GL_EXT_paletted_texture
1314 #define NAME(X) X
1315 #else
1316 #define NAME(X) NotImplemented
1317 #endif
1318 { "glColorTableEXT", (GLvoid *) NAME(glColorTableEXT) },
1319 { "glGetColorTableEXT", (GLvoid *) NAME(glGetColorTableEXT) },
1320 { "glGetColorTableParameterfvEXT", (GLvoid *) NAME(glGetColorTableParameterfvEXT) },
1321 { "glGetColorTableParameterivEXT", (GLvoid *) NAME(glGetColorTableParameterivEXT) },
1322 #undef NAME
1323
1324 /* 80. GL_SGIX_list_priority */
1325 #ifdef GL_SGIX_list_priority
1326 #define NAME(X) X
1327 #else
1328 #define NAME(X) NotImplemented
1329 #endif
1330 { "glGetListParameterfvSGIX", (GLvoid *) NAME(glGetListParameterfvSGIX) },
1331 { "glGetListParameterivSGIX", (GLvoid *) NAME(glGetListParameterivSGIX) },
1332 { "glListParameterfSGIX", (GLvoid *) NAME(glListParameterfSGIX) },
1333 { "glListParameterfvSGIX", (GLvoid *) NAME(glListParameterfvSGIX) },
1334 { "glListParameteriSGIX", (GLvoid *) NAME(glListParameteriSGIX) },
1335 { "glListParameterivSGIX", (GLvoid *) NAME(glListParameterivSGIX) },
1336 #undef NAME
1337
1338 /* 94. GL_EXT_index_material */
1339 #ifdef GL_EXT_index_material
1340 #define NAME(X) X
1341 #else
1342 #define NAME(X) NotImplemented
1343 #endif
1344 { "glIndexMaterialEXT", (GLvoid *) NAME(glIndexMaterialEXT) },
1345 #undef NAME
1346
1347 /* 95. GL_EXT_index_func */
1348 #ifdef GL_EXT_index_func
1349 #define NAME(X) X
1350 #else
1351 #define NAME(X) NotImplemented
1352 #endif
1353 { "glIndexFuncEXT", (GLvoid *) NAME(glIndexFuncEXT) },
1354 #undef NAME
1355
1356 /* 97. GL_EXT_compiled_vertex_array */
1357 #ifdef GL_EXT_compiled_vertex_array
1358 #define NAME(X) X
1359 #else
1360 #define NAME(X) NotImplemented
1361 #endif
1362 { "glLockArraysEXT", (GLvoid *) NAME(glLockArraysEXT) },
1363 { "glUnlockArraysEXT", (GLvoid *) NAME(glUnlockArraysEXT) },
1364 #undef NAME
1365
1366 /* 98. GL_EXT_cull_vertex */
1367 #ifdef GL_EXT_cull_vertex
1368 #define NAME(X) X
1369 #else
1370 #define NAME(X) NotImplemented
1371 #endif
1372 { "glCullParameterfvEXT", (GLvoid *) NAME(glCullParameterfvEXT) },
1373 { "glCullParameterdvEXT", (GLvoid *) NAME(glCullParameterdvEXT) },
1374 #undef NAME
1375
1376 /* 173. GL_EXT/INGR_blend_func_separate */
1377 #ifdef GL_INGR_blend_func_separate
1378 #define NAME(X) X
1379 #else
1380 #define NAME(X) NotImplemented
1381 #endif
1382 { "glBlendFuncSeparateINGR", (GLvoid *) NAME(glBlendFuncSeparateINGR) },
1383 #undef NAME
1384
1385 /* GL_MESA_window_pos */
1386 #ifdef MESA_window_pos
1387 #define NAME(X) X
1388 #else
1389 #define NAME(X) NotImplemented
1390 #endif
1391 { "glWindowPos4fMESA", (GLvoid *) NAME(glWindowPos4fMESA) },
1392 #undef NAME
1393
1394 /* GL_MESA_resize_buffers */
1395 #ifdef MESA_resize_buffers
1396 #define NAME(X) X
1397 #else
1398 #define NAME(X) NotImplemented
1399 #endif
1400 { "glResizeBuffersMESA", (GLvoid *) NAME(glResizeBuffersMESA) },
1401 #undef NAME
1402
1403 /* GL_ARB_transpose_matrix */
1404 #ifdef GL_ARB_transpose_matrix
1405 #define NAME(X) X
1406 #else
1407 #define NAME(X) NotImplemented
1408 #endif
1409 { "glLoadTransposeMatrixdARB", (GLvoid *) NAME(glLoadTransposeMatrixdARB) },
1410 { "glLoadTransposeMatrixfARB", (GLvoid *) NAME(glLoadTransposeMatrixfARB) },
1411 { "glMultTransposeMatrixdARB", (GLvoid *) NAME(glMultTransposeMatrixdARB) },
1412 { "glMultTransposeMatrixfARB", (GLvoid *) NAME(glMultTransposeMatrixfARB) },
1413 #undef NAME
1414
1415 /*
1416 * XXX many more extenstion functions to add.
1417 */
1418
1419 { NULL, NULL } /* end of list marker */
1420 };
1421