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