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