Merge branch 'master' of ../mesa into vulkan
[mesa.git] / src / mesa / main / tests / dispatch_sanity.cpp
1 /*
2 * Copyright © 2012 Intel Corporation
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
22 */
23
24 /**
25 * \name dispatch_sanity.cpp
26 *
27 * Verify that only set of functions that should be available in a particular
28 * API are available in that API.
29 *
30 * The list of expected functions originally came from the functions set by
31 * api_exec_es2.c. This file no longer exists in Mesa (but api_exec_es1.c was
32 * still generated at the time this test was written). It was the generated
33 * file that configured the dispatch table for ES2 contexts. This test
34 * verifies that all of the functions set by the old api_exec_es2.c (with the
35 * recent addition of VAO functions) are set in the dispatch table and
36 * everything else is a NOP.
37 *
38 * When adding extensions that add new functions, this test will need to be
39 * modified to expect dispatch functions for the new extension functions.
40 */
41
42 #include <gtest/gtest.h>
43
44 #include "GL/gl.h"
45 #include "GL/glext.h"
46 #include "main/compiler.h"
47 #include "main/api_exec.h"
48 #include "main/context.h"
49 #include "main/remap.h"
50 #include "main/vtxfmt.h"
51 #include "glapi/glapi.h"
52 #include "drivers/common/driverfuncs.h"
53
54 #include "swrast/swrast.h"
55 #include "vbo/vbo.h"
56 #include "tnl/tnl.h"
57 #include "swrast_setup/swrast_setup.h"
58
59 #ifndef GLAPIENTRYP
60 #define GLAPIENTRYP GL_APIENTRYP
61 #endif
62
63 #include "main/dispatch.h"
64
65 struct function {
66 const char *name;
67 unsigned int Version;
68 int offset;
69 };
70
71 extern const struct function common_desktop_functions_possible[];
72 extern const struct function gl_compatibility_functions_possible[];
73 extern const struct function gl_core_functions_possible[];
74 extern const struct function gles11_functions_possible[];
75 extern const struct function gles2_functions_possible[];
76 extern const struct function gles3_functions_possible[];
77 extern const struct function gles31_functions_possible[];
78
79 class DispatchSanity_test : public ::testing::Test {
80 public:
81 virtual void SetUp();
82 void SetUpCtx(gl_api api, unsigned int version);
83
84 struct gl_config visual;
85 struct dd_function_table driver_functions;
86 struct gl_context share_list;
87 struct gl_context ctx;
88 _glapi_proc *nop_table;
89 };
90
91 void
92 DispatchSanity_test::SetUp()
93 {
94 memset(&visual, 0, sizeof(visual));
95 memset(&driver_functions, 0, sizeof(driver_functions));
96 memset(&share_list, 0, sizeof(share_list));
97 memset(&ctx, 0, sizeof(ctx));
98
99 _mesa_init_driver_functions(&driver_functions);
100
101 const unsigned size = _glapi_get_dispatch_table_size();
102 nop_table = (_glapi_proc *) _mesa_new_nop_table(size);
103 }
104
105 void
106 DispatchSanity_test::SetUpCtx(gl_api api, unsigned int version)
107 {
108 _mesa_initialize_context(&ctx,
109 api,
110 &visual,
111 NULL, // share_list
112 &driver_functions);
113 _vbo_CreateContext(&ctx);
114
115 ctx.Version = version;
116
117 _mesa_initialize_dispatch_tables(&ctx);
118 _mesa_initialize_vbo_vtxfmt(&ctx);
119 }
120
121 static const char *
122 offset_to_proc_name_safe(unsigned offset)
123 {
124 const char *name = _glapi_get_proc_name(offset);
125 return name ? name : "???";
126 }
127
128 /* Scan through the dispatch table and check that all the functions in
129 * _glapi_proc *table exist.
130 */
131 static void
132 validate_functions(struct gl_context *ctx, const struct function *function_table,
133 const _glapi_proc *nop_table)
134 {
135 _glapi_proc *table = (_glapi_proc *) ctx->Exec;
136
137 for (unsigned i = 0; function_table[i].name != NULL; i++) {
138 /* The context version is >= the GL version where the function was
139 * introduced. Therefore, the function cannot be set to the nop
140 * function.
141 */
142 const bool cant_be_nop = ctx->Version >= function_table[i].Version;
143
144 const int offset = (function_table[i].offset != -1)
145 ? function_table[i].offset
146 : _glapi_get_proc_offset(function_table[i].name);
147
148 ASSERT_NE(-1, offset)
149 << "Function: " << function_table[i].name;
150 ASSERT_EQ(offset,
151 _glapi_get_proc_offset(function_table[i].name))
152 << "Function: " << function_table[i].name;
153 if (cant_be_nop) {
154 EXPECT_NE(nop_table[offset], table[offset])
155 << "Function: " << function_table[i].name
156 << " at offset " << offset;
157 }
158
159 table[offset] = nop_table[offset];
160 }
161 }
162
163 /* Scan through the table and ensure that there is nothing except
164 * nop functions (as set by validate_functions().
165 */
166 static void
167 validate_nops(struct gl_context *ctx, const _glapi_proc *nop_table)
168 {
169 _glapi_proc *table = (_glapi_proc *) ctx->Exec;
170
171 const unsigned size = _glapi_get_dispatch_table_size();
172 for (unsigned i = 0; i < size; i++) {
173 EXPECT_EQ(nop_table[i], table[i])
174 << "i = " << i << " (" << offset_to_proc_name_safe(i) << ")";
175 }
176 }
177
178 TEST_F(DispatchSanity_test, GL31_CORE)
179 {
180 SetUpCtx(API_OPENGL_CORE, 31);
181 validate_functions(&ctx, common_desktop_functions_possible, nop_table);
182 validate_functions(&ctx, gl_core_functions_possible, nop_table);
183 validate_nops(&ctx, nop_table);
184 }
185
186 TEST_F(DispatchSanity_test, GL30)
187 {
188 SetUpCtx(API_OPENGL_COMPAT, 30);
189 validate_functions(&ctx, common_desktop_functions_possible, nop_table);
190 validate_functions(&ctx, gl_compatibility_functions_possible, nop_table);
191 validate_nops(&ctx, nop_table);
192 }
193
194 TEST_F(DispatchSanity_test, GLES11)
195 {
196 SetUpCtx(API_OPENGLES, 11);
197 validate_functions(&ctx, gles11_functions_possible, nop_table);
198 validate_nops(&ctx, nop_table);
199 }
200
201 TEST_F(DispatchSanity_test, GLES2)
202 {
203 SetUpCtx(API_OPENGLES2, 20);
204 validate_functions(&ctx, gles2_functions_possible, nop_table);
205 validate_nops(&ctx, nop_table);
206 }
207
208 TEST_F(DispatchSanity_test, GLES3)
209 {
210 SetUpCtx(API_OPENGLES2, 30);
211 validate_functions(&ctx, gles2_functions_possible, nop_table);
212 validate_functions(&ctx, gles3_functions_possible, nop_table);
213 validate_nops(&ctx, nop_table);
214 }
215
216 TEST_F(DispatchSanity_test, GLES31)
217 {
218 SetUpCtx(API_OPENGLES2, 31);
219 validate_functions(&ctx, gles2_functions_possible, nop_table);
220 validate_functions(&ctx, gles3_functions_possible, nop_table);
221 validate_functions(&ctx, gles31_functions_possible, nop_table);
222 validate_nops(&ctx, nop_table);
223 }
224
225 const struct function common_desktop_functions_possible[] = {
226 { "glCullFace", 10, -1 },
227 { "glFrontFace", 10, -1 },
228 { "glHint", 10, -1 },
229 { "glLineWidth", 10, -1 },
230 { "glPointSize", 10, -1 },
231 { "glPolygonMode", 10, -1 },
232 { "glScissor", 10, -1 },
233 { "glTexParameterf", 10, -1 },
234 { "glTexParameterfv", 10, -1 },
235 { "glTexParameteri", 10, -1 },
236 { "glTexParameteriv", 10, -1 },
237 { "glTexImage1D", 10, _gloffset_TexImage1D },
238 { "glTexImage2D", 10, _gloffset_TexImage2D },
239 { "glDrawBuffer", 10, -1 },
240 { "glClear", 10, -1 },
241 { "glClearColor", 10, -1 },
242 { "glClearStencil", 10, -1 },
243 { "glClearDepth", 10, -1 },
244 { "glStencilMask", 10, -1 },
245 { "glColorMask", 10, -1 },
246 { "glDepthMask", 10, -1 },
247 { "glDisable", 10, -1 },
248 { "glEnable", 10, -1 },
249 { "glFinish", 10, -1 },
250 { "glFlush", 10, -1 },
251 { "glBlendFunc", 10, -1 },
252 { "glLogicOp", 10, -1 },
253 { "glStencilFunc", 10, -1 },
254 { "glStencilOp", 10, -1 },
255 { "glDepthFunc", 10, -1 },
256 { "glPixelStoref", 10, -1 },
257 { "glPixelStorei", 10, -1 },
258 { "glReadBuffer", 10, -1 },
259 { "glReadPixels", 10, -1 },
260 { "glGetBooleanv", 10, -1 },
261 { "glGetDoublev", 10, -1 },
262 { "glGetError", 10, -1 },
263 { "glGetFloatv", 10, -1 },
264 { "glGetIntegerv", 10, -1 },
265 { "glGetString", 10, -1 },
266 { "glGetTexImage", 10, -1 },
267 { "glGetTexParameterfv", 10, -1 },
268 { "glGetTexParameteriv", 10, -1 },
269 { "glGetTexLevelParameterfv", 10, -1 },
270 { "glGetTexLevelParameteriv", 10, -1 },
271 { "glIsEnabled", 10, -1 },
272 { "glDepthRange", 10, -1 },
273 { "glViewport", 10, -1 },
274
275 /* GL 1.1 */
276 { "glDrawArrays", 11, -1 },
277 { "glDrawElements", 11, -1 },
278 { "glGetPointerv", 11, -1 },
279 { "glPolygonOffset", 11, -1 },
280 { "glCopyTexImage1D", 11, -1 },
281 { "glCopyTexImage2D", 11, -1 },
282 { "glCopyTexSubImage1D", 11, -1 },
283 { "glCopyTexSubImage2D", 11, -1 },
284 { "glTexSubImage1D", 11, -1 },
285 { "glTexSubImage2D", 11, -1 },
286 { "glBindTexture", 11, -1 },
287 { "glDeleteTextures", 11, -1 },
288 { "glGenTextures", 11, -1 },
289 { "glIsTexture", 11, -1 },
290
291 /* GL 1.2 */
292 { "glBlendColor", 12, -1 },
293 { "glBlendEquation", 12, -1 },
294 { "glDrawRangeElements", 12, -1 },
295 { "glTexImage3D", 12, -1 },
296 { "glTexSubImage3D", 12, -1 },
297 { "glCopyTexSubImage3D", 12, -1 },
298
299 /* GL 1.3 */
300 { "glActiveTexture", 13, -1 },
301 { "glSampleCoverage", 13, -1 },
302 { "glCompressedTexImage3D", 13, -1 },
303 { "glCompressedTexImage2D", 13, -1 },
304 { "glCompressedTexImage1D", 13, -1 },
305 { "glCompressedTexSubImage3D", 13, -1 },
306 { "glCompressedTexSubImage2D", 13, -1 },
307 { "glCompressedTexSubImage1D", 13, -1 },
308 { "glGetCompressedTexImage", 13, -1 },
309
310 /* GL 1.4 */
311 { "glBlendFuncSeparate", 14, -1 },
312 { "glMultiDrawArrays", 14, -1 },
313 { "glMultiDrawElements", 14, -1 },
314 { "glPointParameterf", 14, -1 },
315 { "glPointParameterfv", 14, -1 },
316 { "glPointParameteri", 14, -1 },
317 { "glPointParameteriv", 14, -1 },
318
319 /* GL 1.5 */
320 { "glGenQueries", 15, -1 },
321 { "glDeleteQueries", 15, -1 },
322 { "glIsQuery", 15, -1 },
323 { "glBeginQuery", 15, -1 },
324 { "glEndQuery", 15, -1 },
325 { "glGetQueryiv", 15, -1 },
326 { "glGetQueryObjectiv", 15, -1 },
327 { "glGetQueryObjectuiv", 15, -1 },
328 { "glBindBuffer", 15, -1 },
329 { "glDeleteBuffers", 15, -1 },
330 { "glGenBuffers", 15, -1 },
331 { "glIsBuffer", 15, -1 },
332 { "glBufferData", 15, -1 },
333 { "glBufferSubData", 15, -1 },
334 { "glGetBufferSubData", 15, -1 },
335 { "glMapBuffer", 15, -1 },
336 { "glUnmapBuffer", 15, -1 },
337 { "glGetBufferParameteriv", 15, -1 },
338 { "glGetBufferPointerv", 15, -1 },
339
340 /* GL 2.0 */
341 { "glBlendEquationSeparate", 20, -1 },
342 { "glDrawBuffers", 20, -1 },
343 { "glStencilOpSeparate", 20, -1 },
344 { "glStencilFuncSeparate", 20, -1 },
345 { "glStencilMaskSeparate", 20, -1 },
346 { "glAttachShader", 20, -1 },
347 { "glBindAttribLocation", 20, -1 },
348 { "glCompileShader", 20, -1 },
349 { "glCreateProgram", 20, -1 },
350 { "glCreateShader", 20, -1 },
351 { "glDeleteProgram", 20, -1 },
352 { "glDeleteShader", 20, -1 },
353 { "glDetachShader", 20, -1 },
354 { "glDisableVertexAttribArray", 20, -1 },
355 { "glEnableVertexAttribArray", 20, -1 },
356 { "glGetActiveAttrib", 20, -1 },
357 { "glGetActiveUniform", 20, -1 },
358 { "glGetAttachedShaders", 20, -1 },
359 { "glGetAttribLocation", 20, -1 },
360 { "glGetProgramiv", 20, -1 },
361 { "glGetProgramInfoLog", 20, -1 },
362 { "glGetShaderiv", 20, -1 },
363 { "glGetShaderInfoLog", 20, -1 },
364 { "glGetShaderSource", 20, -1 },
365 { "glGetUniformLocation", 20, -1 },
366 { "glGetUniformfv", 20, -1 },
367 { "glGetUniformiv", 20, -1 },
368 { "glGetVertexAttribdv", 20, -1 },
369 { "glGetVertexAttribfv", 20, -1 },
370 { "glGetVertexAttribiv", 20, -1 },
371 { "glGetVertexAttribPointerv", 20, -1 },
372 { "glIsProgram", 20, -1 },
373 { "glIsShader", 20, -1 },
374 { "glLinkProgram", 20, -1 },
375 { "glShaderSource", 20, -1 },
376 { "glUseProgram", 20, -1 },
377 { "glUniform1f", 20, -1 },
378 { "glUniform2f", 20, -1 },
379 { "glUniform3f", 20, -1 },
380 { "glUniform4f", 20, -1 },
381 { "glUniform1i", 20, -1 },
382 { "glUniform2i", 20, -1 },
383 { "glUniform3i", 20, -1 },
384 { "glUniform4i", 20, -1 },
385 { "glUniform1fv", 20, -1 },
386 { "glUniform2fv", 20, -1 },
387 { "glUniform3fv", 20, -1 },
388 { "glUniform4fv", 20, -1 },
389 { "glUniform1iv", 20, -1 },
390 { "glUniform2iv", 20, -1 },
391 { "glUniform3iv", 20, -1 },
392 { "glUniform4iv", 20, -1 },
393 { "glUniformMatrix2fv", 20, -1 },
394 { "glUniformMatrix3fv", 20, -1 },
395 { "glUniformMatrix4fv", 20, -1 },
396 { "glValidateProgram", 20, -1 },
397 { "glVertexAttrib1d", 20, -1 },
398 { "glVertexAttrib1dv", 20, -1 },
399 { "glVertexAttrib1f", 20, -1 },
400 { "glVertexAttrib1fv", 20, -1 },
401 { "glVertexAttrib1s", 20, -1 },
402 { "glVertexAttrib1sv", 20, -1 },
403 { "glVertexAttrib2d", 20, -1 },
404 { "glVertexAttrib2dv", 20, -1 },
405 { "glVertexAttrib2f", 20, -1 },
406 { "glVertexAttrib2fv", 20, -1 },
407 { "glVertexAttrib2s", 20, -1 },
408 { "glVertexAttrib2sv", 20, -1 },
409 { "glVertexAttrib3d", 20, -1 },
410 { "glVertexAttrib3dv", 20, -1 },
411 { "glVertexAttrib3f", 20, -1 },
412 { "glVertexAttrib3fv", 20, -1 },
413 { "glVertexAttrib3s", 20, -1 },
414 { "glVertexAttrib3sv", 20, -1 },
415 { "glVertexAttrib4Nbv", 20, -1 },
416 { "glVertexAttrib4Niv", 20, -1 },
417 { "glVertexAttrib4Nsv", 20, -1 },
418 { "glVertexAttrib4Nub", 20, -1 },
419 { "glVertexAttrib4Nubv", 20, -1 },
420 { "glVertexAttrib4Nuiv", 20, -1 },
421 { "glVertexAttrib4Nusv", 20, -1 },
422 { "glVertexAttrib4bv", 20, -1 },
423 { "glVertexAttrib4d", 20, -1 },
424 { "glVertexAttrib4dv", 20, -1 },
425 { "glVertexAttrib4f", 20, -1 },
426 { "glVertexAttrib4fv", 20, -1 },
427 { "glVertexAttrib4iv", 20, -1 },
428 { "glVertexAttrib4s", 20, -1 },
429 { "glVertexAttrib4sv", 20, -1 },
430 { "glVertexAttrib4ubv", 20, -1 },
431 { "glVertexAttrib4uiv", 20, -1 },
432 { "glVertexAttrib4usv", 20, -1 },
433 { "glVertexAttribPointer", 20, -1 },
434
435 /* GL 2.1 */
436 { "glUniformMatrix2x3fv", 21, -1 },
437 { "glUniformMatrix3x2fv", 21, -1 },
438 { "glUniformMatrix2x4fv", 21, -1 },
439 { "glUniformMatrix4x2fv", 21, -1 },
440 { "glUniformMatrix3x4fv", 21, -1 },
441 { "glUniformMatrix4x3fv", 21, -1 },
442
443 /* GL 3.0 */
444 { "glColorMaski", 30, -1 },
445 { "glGetBooleani_v", 30, -1 },
446 { "glGetIntegeri_v", 30, -1 },
447 { "glEnablei", 30, -1 },
448 { "glDisablei", 30, -1 },
449 { "glIsEnabledi", 30, -1 },
450 { "glBeginTransformFeedback", 30, -1 },
451 { "glEndTransformFeedback", 30, -1 },
452 { "glBindBufferRange", 30, -1 },
453 { "glBindBufferBase", 30, -1 },
454 { "glTransformFeedbackVaryings", 30, -1 },
455 { "glGetTransformFeedbackVarying", 30, -1 },
456 { "glClampColor", 30, -1 },
457 { "glBeginConditionalRender", 30, -1 },
458 { "glEndConditionalRender", 30, -1 },
459 { "glVertexAttribIPointer", 30, -1 },
460 { "glGetVertexAttribIiv", 30, -1 },
461 { "glGetVertexAttribIuiv", 30, -1 },
462 { "glVertexAttribI1i", 30, -1 },
463 { "glVertexAttribI2i", 30, -1 },
464 { "glVertexAttribI3i", 30, -1 },
465 { "glVertexAttribI4i", 30, -1 },
466 { "glVertexAttribI1ui", 30, -1 },
467 { "glVertexAttribI2ui", 30, -1 },
468 { "glVertexAttribI3ui", 30, -1 },
469 { "glVertexAttribI4ui", 30, -1 },
470 { "glVertexAttribI1iv", 30, -1 },
471 { "glVertexAttribI2iv", 30, -1 },
472 { "glVertexAttribI3iv", 30, -1 },
473 { "glVertexAttribI4iv", 30, -1 },
474 { "glVertexAttribI1uiv", 30, -1 },
475 { "glVertexAttribI2uiv", 30, -1 },
476 { "glVertexAttribI3uiv", 30, -1 },
477 { "glVertexAttribI4uiv", 30, -1 },
478 { "glVertexAttribI4bv", 30, -1 },
479 { "glVertexAttribI4sv", 30, -1 },
480 { "glVertexAttribI4ubv", 30, -1 },
481 { "glVertexAttribI4usv", 30, -1 },
482 { "glGetUniformuiv", 30, -1 },
483 { "glBindFragDataLocation", 30, -1 },
484 { "glGetFragDataLocation", 30, -1 },
485 { "glUniform1ui", 30, -1 },
486 { "glUniform2ui", 30, -1 },
487 { "glUniform3ui", 30, -1 },
488 { "glUniform4ui", 30, -1 },
489 { "glUniform1uiv", 30, -1 },
490 { "glUniform2uiv", 30, -1 },
491 { "glUniform3uiv", 30, -1 },
492 { "glUniform4uiv", 30, -1 },
493 { "glTexParameterIiv", 30, -1 },
494 { "glTexParameterIuiv", 30, -1 },
495 { "glGetTexParameterIiv", 30, -1 },
496 { "glGetTexParameterIuiv", 30, -1 },
497 { "glClearBufferiv", 30, -1 },
498 { "glClearBufferuiv", 30, -1 },
499 { "glClearBufferfv", 30, -1 },
500 { "glClearBufferfi", 30, -1 },
501 { "glGetStringi", 30, -1 },
502
503 /* GL 3.1 */
504 { "glDrawArraysInstanced", 31, -1 },
505 { "glDrawElementsInstanced", 31, -1 },
506 { "glPrimitiveRestartIndex", 31, -1 },
507
508 /* GL_ARB_shader_objects */
509 { "glDeleteObjectARB", 31, -1 },
510 { "glGetHandleARB", 31, -1 },
511 { "glDetachObjectARB", 31, -1 },
512 { "glCreateShaderObjectARB", 31, -1 },
513 { "glCreateProgramObjectARB", 31, -1 },
514 { "glAttachObjectARB", 31, -1 },
515 { "glGetObjectParameterfvARB", 31, -1 },
516 { "glGetObjectParameterivARB", 31, -1 },
517 { "glGetInfoLogARB", 31, -1 },
518 { "glGetAttachedObjectsARB", 31, -1 },
519
520 /* GL_ARB_get_program_binary */
521 { "glGetProgramBinary", 30, -1 },
522 { "glProgramBinary", 30, -1 },
523 { "glProgramParameteri", 30, -1 },
524
525 /* GL_EXT_transform_feedback */
526 { "glBindBufferOffsetEXT", 31, -1 },
527
528 /* GL_IBM_multimode_draw_arrays */
529 { "glMultiModeDrawArraysIBM", 31, -1 },
530 { "glMultiModeDrawElementsIBM", 31, -1 },
531
532 /* GL_EXT_depth_bounds_test */
533 { "glDepthBoundsEXT", 31, -1 },
534
535 /* GL_apple_object_purgeable */
536 { "glObjectPurgeableAPPLE", 31, -1 },
537 { "glObjectUnpurgeableAPPLE", 31, -1 },
538 { "glGetObjectParameterivAPPLE", 31, -1 },
539
540 /* GL_ARB_instanced_arrays */
541 { "glVertexAttribDivisorARB", 31, -1 },
542
543 /* GL_NV_texture_barrier */
544 { "glTextureBarrierNV", 31, -1 },
545
546 /* GL_EXT_texture_integer */
547 { "glClearColorIiEXT", 31, -1 },
548 { "glClearColorIuiEXT", 31, -1 },
549
550 /* GL_OES_EGL_image */
551 { "glEGLImageTargetRenderbufferStorageOES", 31, -1 },
552 { "glEGLImageTargetTexture2DOES", 31, -1 },
553
554 /* GL 3.2 */
555 { "glGetInteger64i_v", 32, -1 },
556 { "glGetBufferParameteri64v", 32, -1 },
557 { "glFramebufferTexture", 32, -1 },
558 { "glProgramParameteri", 32, -1 },
559 { "glFramebufferTextureLayer", 32, -1 },
560
561 /* GL 3.3 */
562 { "glVertexAttribDivisor", 33, -1 },
563
564 /* GL 4.0 */
565 { "glMinSampleShading", 40, -1 },
566 { "glPatchParameteri", 40, -1 },
567 { "glPatchParameterfv", 40, -1 },
568 { "glBlendEquationi", 40, -1 },
569 { "glBlendEquationSeparatei", 40, -1 },
570 { "glBlendFunci", 40, -1 },
571 { "glBlendFuncSeparatei", 40, -1 },
572
573 /* GL 4.3 */
574 { "glIsRenderbuffer", 43, -1 },
575 { "glBindRenderbuffer", 43, -1 },
576 { "glDeleteRenderbuffers", 43, -1 },
577 { "glGenRenderbuffers", 43, -1 },
578 { "glRenderbufferStorage", 43, -1 },
579 { "glGetRenderbufferParameteriv", 43, -1 },
580 { "glIsFramebuffer", 43, -1 },
581 { "glBindFramebuffer", 43, -1 },
582 { "glDeleteFramebuffers", 43, -1 },
583 { "glGenFramebuffers", 43, -1 },
584 { "glCheckFramebufferStatus", 43, -1 },
585 { "glFramebufferTexture1D", 43, -1 },
586 { "glFramebufferTexture2D", 43, -1 },
587 { "glFramebufferTexture3D", 43, -1 },
588 { "glFramebufferRenderbuffer", 43, -1 },
589 { "glGetFramebufferAttachmentParameteriv", 43, -1 },
590 { "glGenerateMipmap", 43, -1 },
591 { "glBlitFramebuffer", 43, -1 },
592 { "glRenderbufferStorageMultisample", 43, -1 },
593 { "glFramebufferTextureLayer", 43, -1 },
594 { "glMapBufferRange", 43, -1 },
595 { "glFlushMappedBufferRange", 43, -1 },
596 { "glBindVertexArray", 43, -1 },
597 { "glDeleteVertexArrays", 43, -1 },
598 { "glGenVertexArrays", 43, -1 },
599 { "glIsVertexArray", 43, -1 },
600 { "glGetUniformIndices", 43, -1 },
601 { "glGetActiveUniformsiv", 43, -1 },
602 { "glGetActiveUniformName", 43, -1 },
603 { "glGetUniformBlockIndex", 43, -1 },
604 { "glGetActiveUniformBlockiv", 43, -1 },
605 { "glGetActiveUniformBlockName", 43, -1 },
606 { "glUniformBlockBinding", 43, -1 },
607 { "glCopyBufferSubData", 43, -1 },
608 { "glDrawElementsBaseVertex", 43, -1 },
609 { "glDrawRangeElementsBaseVertex", 43, -1 },
610 { "glDrawElementsInstancedBaseVertex", 43, -1 },
611 { "glMultiDrawElementsBaseVertex", 43, -1 },
612 { "glProvokingVertex", 43, -1 },
613 { "glFenceSync", 43, -1 },
614 { "glIsSync", 43, -1 },
615 { "glDeleteSync", 43, -1 },
616 { "glClientWaitSync", 43, -1 },
617 { "glWaitSync", 43, -1 },
618 { "glGetInteger64v", 43, -1 },
619 { "glGetSynciv", 43, -1 },
620 { "glTexImage2DMultisample", 43, -1 },
621 { "glTexImage3DMultisample", 43, -1 },
622 { "glGetMultisamplefv", 43, -1 },
623 { "glSampleMaski", 43, -1 },
624 { "glBlendEquationiARB", 43, -1 },
625 { "glBlendEquationSeparateiARB", 43, -1 },
626 { "glBlendFunciARB", 43, -1 },
627 { "glBlendFuncSeparateiARB", 43, -1 },
628 { "glMinSampleShadingARB", 43, -1 }, // XXX: Add to xml
629 // { "glNamedStringARB", 43, -1 }, // XXX: Add to xml
630 // { "glDeleteNamedStringARB", 43, -1 }, // XXX: Add to xml
631 // { "glCompileShaderIncludeARB", 43, -1 }, // XXX: Add to xml
632 // { "glIsNamedStringARB", 43, -1 }, // XXX: Add to xml
633 // { "glGetNamedStringARB", 43, -1 }, // XXX: Add to xml
634 // { "glGetNamedStringivARB", 43, -1 }, // XXX: Add to xml
635 { "glBindFragDataLocationIndexed", 43, -1 },
636 { "glGetFragDataIndex", 43, -1 },
637 { "glGenSamplers", 43, -1 },
638 { "glDeleteSamplers", 43, -1 },
639 { "glIsSampler", 43, -1 },
640 { "glBindSampler", 43, -1 },
641 { "glSamplerParameteri", 43, -1 },
642 { "glSamplerParameteriv", 43, -1 },
643 { "glSamplerParameterf", 43, -1 },
644 { "glSamplerParameterfv", 43, -1 },
645 { "glSamplerParameterIiv", 43, -1 },
646 { "glSamplerParameterIuiv", 43, -1 },
647 { "glGetSamplerParameteriv", 43, -1 },
648 { "glGetSamplerParameterIiv", 43, -1 },
649 { "glGetSamplerParameterfv", 43, -1 },
650 { "glGetSamplerParameterIuiv", 43, -1 },
651 { "glQueryCounter", 43, -1 },
652 { "glGetQueryObjecti64v", 43, -1 },
653 { "glGetQueryObjectui64v", 43, -1 },
654 { "glVertexP2ui", 43, -1 },
655 { "glVertexP2uiv", 43, -1 },
656 { "glVertexP3ui", 43, -1 },
657 { "glVertexP3uiv", 43, -1 },
658 { "glVertexP4ui", 43, -1 },
659 { "glVertexP4uiv", 43, -1 },
660 { "glTexCoordP1ui", 43, -1 },
661 { "glTexCoordP1uiv", 43, -1 },
662 { "glTexCoordP2ui", 43, -1 },
663 { "glTexCoordP2uiv", 43, -1 },
664 { "glTexCoordP3ui", 43, -1 },
665 { "glTexCoordP3uiv", 43, -1 },
666 { "glTexCoordP4ui", 43, -1 },
667 { "glTexCoordP4uiv", 43, -1 },
668 { "glMultiTexCoordP1ui", 43, -1 },
669 { "glMultiTexCoordP1uiv", 43, -1 },
670 { "glMultiTexCoordP2ui", 43, -1 },
671 { "glMultiTexCoordP2uiv", 43, -1 },
672 { "glMultiTexCoordP3ui", 43, -1 },
673 { "glMultiTexCoordP3uiv", 43, -1 },
674 { "glMultiTexCoordP4ui", 43, -1 },
675 { "glMultiTexCoordP4uiv", 43, -1 },
676 { "glNormalP3ui", 43, -1 },
677 { "glNormalP3uiv", 43, -1 },
678 { "glColorP3ui", 43, -1 },
679 { "glColorP3uiv", 43, -1 },
680 { "glColorP4ui", 43, -1 },
681 { "glColorP4uiv", 43, -1 },
682 { "glSecondaryColorP3ui", 43, -1 },
683 { "glSecondaryColorP3uiv", 43, -1 },
684 { "glVertexAttribP1ui", 43, -1 },
685 { "glVertexAttribP1uiv", 43, -1 },
686 { "glVertexAttribP2ui", 43, -1 },
687 { "glVertexAttribP2uiv", 43, -1 },
688 { "glVertexAttribP3ui", 43, -1 },
689 { "glVertexAttribP3uiv", 43, -1 },
690 { "glVertexAttribP4ui", 43, -1 },
691 { "glVertexAttribP4uiv", 43, -1 },
692 { "glDrawArraysIndirect", 43, -1 },
693 { "glDrawElementsIndirect", 43, -1 },
694 { "glBindTransformFeedback", 43, -1 },
695 { "glDeleteTransformFeedbacks", 43, -1 },
696 { "glGenTransformFeedbacks", 43, -1 },
697 { "glIsTransformFeedback", 43, -1 },
698 { "glPauseTransformFeedback", 43, -1 },
699 { "glResumeTransformFeedback", 43, -1 },
700 { "glDrawTransformFeedback", 43, -1 },
701 { "glDrawTransformFeedbackStream", 43, -1 },
702 { "glBeginQueryIndexed", 43, -1 },
703 { "glEndQueryIndexed", 43, -1 },
704 { "glGetQueryIndexediv", 43, -1 },
705 { "glReleaseShaderCompiler", 43, -1 },
706 { "glShaderBinary", 43, -1 },
707 { "glGetShaderPrecisionFormat", 43, -1 },
708 { "glDepthRangef", 43, -1 },
709 { "glClearDepthf", 43, -1 },
710 { "glGetProgramBinary", 43, -1 },
711 { "glProgramBinary", 43, -1 },
712 { "glProgramParameteri", 43, -1 },
713 { "glUseProgramStages", 43, -1 },
714 { "glActiveShaderProgram", 43, -1 },
715 { "glCreateShaderProgramv", 43, -1 },
716 { "glBindProgramPipeline", 43, -1 },
717 { "glDeleteProgramPipelines", 43, -1 },
718 { "glGenProgramPipelines", 43, -1 },
719 { "glIsProgramPipeline", 43, -1 },
720 { "glGetProgramPipelineiv", 43, -1 },
721 { "glProgramUniform1d", 43, -1 },
722 { "glProgramUniform1dv", 43, -1 },
723 { "glProgramUniform1i", 43, -1 },
724 { "glProgramUniform1iv", 43, -1 },
725 { "glProgramUniform1f", 43, -1 },
726 { "glProgramUniform1fv", 43, -1 },
727 { "glProgramUniform1ui", 43, -1 },
728 { "glProgramUniform1uiv", 43, -1 },
729 { "glProgramUniform2i", 43, -1 },
730 { "glProgramUniform2iv", 43, -1 },
731 { "glProgramUniform2f", 43, -1 },
732 { "glProgramUniform2fv", 43, -1 },
733 { "glProgramUniform2d", 40, -1 },
734 { "glProgramUniform2dv", 40, -1 },
735 { "glProgramUniform2ui", 43, -1 },
736 { "glProgramUniform2uiv", 43, -1 },
737 { "glProgramUniform3i", 43, -1 },
738 { "glProgramUniform3iv", 43, -1 },
739 { "glProgramUniform3f", 43, -1 },
740 { "glProgramUniform3fv", 43, -1 },
741 { "glProgramUniform3d", 40, -1 },
742 { "glProgramUniform3dv", 40, -1 },
743 { "glProgramUniform3ui", 43, -1 },
744 { "glProgramUniform3uiv", 43, -1 },
745 { "glProgramUniform4i", 43, -1 },
746 { "glProgramUniform4iv", 43, -1 },
747 { "glProgramUniform4d", 43, -1 },
748 { "glProgramUniform4dv", 43, -1 },
749 { "glProgramUniform4f", 43, -1 },
750 { "glProgramUniform4fv", 43, -1 },
751 { "glProgramUniform4ui", 43, -1 },
752 { "glProgramUniform4uiv", 43, -1 },
753 { "glProgramUniformMatrix2dv", 43, -1 },
754 { "glProgramUniformMatrix2fv", 43, -1 },
755 { "glProgramUniformMatrix3dv", 43, -1 },
756 { "glProgramUniformMatrix3fv", 43, -1 },
757 { "glProgramUniformMatrix4dv", 43, -1 },
758 { "glProgramUniformMatrix4fv", 43, -1 },
759 { "glProgramUniformMatrix2x3dv", 43, -1 },
760 { "glProgramUniformMatrix2x3fv", 43, -1 },
761 { "glProgramUniformMatrix3x2dv", 43, -1 },
762 { "glProgramUniformMatrix3x2fv", 43, -1 },
763 { "glProgramUniformMatrix2x4dv", 43, -1 },
764 { "glProgramUniformMatrix2x4fv", 43, -1 },
765 { "glProgramUniformMatrix4x2dv", 43, -1 },
766 { "glProgramUniformMatrix4x2fv", 43, -1 },
767 { "glProgramUniformMatrix3x4dv", 43, -1 },
768 { "glProgramUniformMatrix3x4fv", 43, -1 },
769 { "glProgramUniformMatrix4x3dv", 43, -1 },
770 { "glProgramUniformMatrix4x3fv", 43, -1 },
771 { "glValidateProgramPipeline", 43, -1 },
772 { "glGetProgramPipelineInfoLog", 43, -1 },
773 { "glGetFloati_v", 43, -1 },
774 { "glGetDoublei_v", 43, -1 },
775 // { "glCreateSyncFromCLeventARB", 43, -1 }, // XXX: Add to xml
776 { "glGetGraphicsResetStatusARB", 43, -1 },
777 { "glGetnMapdvARB", 43, -1 },
778 { "glGetnMapfvARB", 43, -1 },
779 { "glGetnMapivARB", 43, -1 },
780 { "glGetnPixelMapfvARB", 43, -1 },
781 { "glGetnPixelMapuivARB", 43, -1 },
782 { "glGetnPixelMapusvARB", 43, -1 },
783 { "glGetnPolygonStippleARB", 43, -1 },
784 { "glGetnColorTableARB", 43, -1 },
785 { "glGetnConvolutionFilterARB", 43, -1 },
786 { "glGetnSeparableFilterARB", 43, -1 },
787 { "glGetnHistogramARB", 43, -1 },
788 { "glGetnMinmaxARB", 43, -1 },
789 { "glGetnTexImageARB", 43, -1 },
790 { "glReadnPixelsARB", 43, -1 },
791 { "glGetnCompressedTexImageARB", 43, -1 },
792 { "glGetnUniformfvARB", 43, -1 },
793 { "glGetnUniformivARB", 43, -1 },
794 { "glGetnUniformuivARB", 43, -1 },
795 { "glGetnUniformdvARB", 43, -1 },
796 { "glDrawArraysInstancedBaseInstance", 43, -1 },
797 { "glDrawElementsInstancedBaseInstance", 43, -1 },
798 { "glDrawElementsInstancedBaseVertexBaseInstance", 43, -1 },
799 { "glDrawTransformFeedbackInstanced", 43, -1 },
800 { "glDrawTransformFeedbackStreamInstanced", 43, -1 },
801 // { "glGetInternalformativ", 43, -1 }, // XXX: Add to xml
802 { "glGetActiveAtomicCounterBufferiv", 43, -1 },
803 { "glBindImageTexture", 43, -1 },
804 { "glMemoryBarrier", 43, -1 },
805 { "glTexStorage1D", 43, -1 },
806 { "glTexStorage2D", 43, -1 },
807 { "glTexStorage3D", 43, -1 },
808 { "glTextureStorage1DEXT", 43, -1 },
809 { "glTextureStorage2DEXT", 43, -1 },
810 { "glTextureStorage3DEXT", 43, -1 },
811 { "glClearBufferData", 43, -1 },
812 { "glClearBufferSubData", 43, -1 },
813 // { "glClearNamedBufferDataEXT", 43, -1 }, // XXX: Add to xml
814 // { "glClearNamedBufferSubDataEXT", 43, -1 }, // XXX: Add to xml
815 { "glCopyImageSubData", 43, -1 },
816 { "glTextureView", 43, -1 },
817 { "glBindVertexBuffer", 43, -1 },
818 { "glVertexAttribFormat", 43, -1 },
819 { "glVertexAttribIFormat", 43, -1 },
820 { "glVertexAttribLFormat", 43, -1 },
821 { "glVertexAttribBinding", 43, -1 },
822 { "glVertexBindingDivisor", 43, -1 },
823 // { "glVertexArrayBindVertexBufferEXT", 43, -1 }, // XXX: Add to xml
824 // { "glVertexArrayVertexAttribFormatEXT", 43, -1 }, // XXX: Add to xml
825 // { "glVertexArrayVertexAttribIFormatEXT", 43, -1 }, // XXX: Add to xml
826 // { "glVertexArrayVertexAttribBindingEXT", 43, -1 }, // XXX: Add to xml
827 // { "glVertexArrayVertexBindingDivisorEXT", 43, -1 }, // XXX: Add to xml
828 { "glFramebufferParameteri", 43, -1 },
829 { "glGetFramebufferParameteriv", 43, -1 },
830 // { "glNamedFramebufferParameteriEXT", 43, -1 }, // XXX: Add to xml
831 // { "glGetNamedFramebufferParameterivEXT", 43, -1 }, // XXX: Add to xml
832 // { "glGetInternalformati64v", 43, -1 }, // XXX: Add to xml
833 { "glInvalidateTexSubImage", 43, -1 },
834 { "glInvalidateTexImage", 43, -1 },
835 { "glInvalidateBufferSubData", 43, -1 },
836 { "glInvalidateBufferData", 43, -1 },
837 { "glInvalidateFramebuffer", 43, -1 },
838 { "glInvalidateSubFramebuffer", 43, -1 },
839 { "glMultiDrawArraysIndirect", 43, -1 },
840 { "glMultiDrawElementsIndirect", 43, -1 },
841 { "glGetProgramInterfaceiv", 43, -1 },
842 { "glGetProgramResourceIndex", 43, -1 },
843 { "glGetProgramResourceName", 43, -1 },
844 { "glGetProgramResourceiv", 43, -1 },
845 { "glGetProgramResourceLocation", 43, -1 },
846 { "glGetProgramResourceLocationIndex", 43, -1 },
847 { "glShaderStorageBlockBinding", 43, -1 },
848 // { "glTextureBufferRangeEXT", 43, -1 }, // XXX: Add to xml
849 { "glTexStorage2DMultisample", 43, -1 },
850 { "glTexStorage3DMultisample", 43, -1 },
851 // { "glTextureStorage2DMultisampleEXT", 43, -1 }, // XXX: Add to xml
852 // { "glTextureStorage3DMultisampleEXT", 43, -1 }, // XXX: Add to xml
853
854 /* GL 4.5 */
855 { "glMemoryBarrierByRegion", 45, -1 },
856
857 /* GL_ARB_internalformat_query */
858 { "glGetInternalformativ", 30, -1 },
859
860 /* GL_ARB_multi_bind */
861 { "glBindBuffersBase", 44, -1 },
862 { "glBindBuffersRange", 44, -1 },
863 { "glBindTextures", 44, -1 },
864 { "glBindSamplers", 44, -1 },
865 { "glBindImageTextures", 44, -1 },
866 { "glBindVertexBuffers", 44, -1 },
867
868 /* GL_KHR_debug/GL_ARB_debug_output */
869 { "glPushDebugGroup", 11, -1 },
870 { "glPopDebugGroup", 11, -1 },
871 { "glDebugMessageCallback", 11, -1 },
872 { "glDebugMessageControl", 11, -1 },
873 { "glDebugMessageInsert", 11, -1 },
874 { "glGetDebugMessageLog", 11, -1 },
875 { "glGetObjectLabel", 11, -1 },
876 { "glGetObjectPtrLabel", 11, -1 },
877 { "glObjectLabel", 11, -1 },
878 { "glObjectPtrLabel", 11, -1 },
879 /* aliased versions checked above */
880 //{ "glDebugMessageControlARB", 11, -1 },
881 //{ "glDebugMessageInsertARB", 11, -1 },
882 //{ "glDebugMessageCallbackARB", 11, -1 },
883 //{ "glGetDebugMessageLogARB", 11, -1 },
884
885 /* GL_AMD_performance_monitor */
886 { "glGetPerfMonitorGroupsAMD", 11, -1 },
887 { "glGetPerfMonitorCountersAMD", 11, -1 },
888 { "glGetPerfMonitorGroupStringAMD", 11, -1 },
889 { "glGetPerfMonitorCounterStringAMD", 11, -1 },
890 { "glGetPerfMonitorCounterInfoAMD", 11, -1 },
891 { "glGenPerfMonitorsAMD", 11, -1 },
892 { "glDeletePerfMonitorsAMD", 11, -1 },
893 { "glSelectPerfMonitorCountersAMD", 11, -1 },
894 { "glBeginPerfMonitorAMD", 11, -1 },
895 { "glEndPerfMonitorAMD", 11, -1 },
896 { "glGetPerfMonitorCounterDataAMD", 11, -1 },
897
898 /* GL_INTEL_performance_query */
899 { "glGetFirstPerfQueryIdINTEL", 30, -1 },
900 { "glGetNextPerfQueryIdINTEL", 30, -1 },
901 { "glGetPerfQueryIdByNameINTEL", 30, -1 },
902 { "glGetPerfQueryInfoINTEL", 30, -1 },
903 { "glGetPerfCounterInfoINTEL", 30, -1 },
904 { "glCreatePerfQueryINTEL", 30, -1 },
905 { "glDeletePerfQueryINTEL", 30, -1 },
906 { "glBeginPerfQueryINTEL", 30, -1 },
907 { "glEndPerfQueryINTEL", 30, -1 },
908 { "glGetPerfQueryDataINTEL", 30, -1 },
909
910 /* GL_NV_vdpau_interop */
911 { "glVDPAUInitNV", 11, -1 },
912 { "glVDPAUFiniNV", 11, -1 },
913 { "glVDPAURegisterVideoSurfaceNV", 11, -1 },
914 { "glVDPAURegisterOutputSurfaceNV", 11, -1 },
915 { "glVDPAUIsSurfaceNV", 11, -1 },
916 { "glVDPAUUnregisterSurfaceNV", 11, -1 },
917 { "glVDPAUGetSurfaceivNV", 11, -1 },
918 { "glVDPAUSurfaceAccessNV", 11, -1 },
919 { "glVDPAUMapSurfacesNV", 11, -1 },
920 { "glVDPAUUnmapSurfacesNV", 11, -1 },
921
922 /* GL_ARB_buffer_storage */
923 { "glBufferStorage", 43, -1 },
924
925 /* GL_ARB_clear_texture */
926 { "glClearTexImage", 13, -1 },
927 { "glClearTexSubImage", 13, -1 },
928
929 /* GL_ARB_clip_control */
930 { "glClipControl", 45, -1 },
931
932 /* GL_ARB_compute_shader */
933 { "glDispatchCompute", 43, -1 },
934 { "glDispatchComputeIndirect", 43, -1 },
935
936 /* GL_EXT_polygon_offset_clamp */
937 { "glPolygonOffsetClampEXT", 11, -1 },
938
939 /* GL_ARB_get_texture_sub_image */
940 { "glGetTextureSubImage", 20, -1 },
941 { "glGetCompressedTextureSubImage", 20, -1 },
942
943 { NULL, 0, -1 }
944 };
945
946 const struct function gl_compatibility_functions_possible[] = {
947 { "glBindVertexArrayAPPLE", 10, -1 },
948 { "glGenVertexArraysAPPLE", 10, -1 },
949 { "glBindRenderbufferEXT", 10, -1 },
950 { "glBindFramebufferEXT", 10, -1 },
951 { "glNewList", 10, _gloffset_NewList },
952 { "glEndList", 10, _gloffset_EndList },
953 { "glCallList", 10, _gloffset_CallList },
954 { "glCallLists", 10, _gloffset_CallLists },
955 { "glDeleteLists", 10, _gloffset_DeleteLists },
956 { "glGenLists", 10, _gloffset_GenLists },
957 { "glListBase", 10, _gloffset_ListBase },
958 { "glBegin", 10, _gloffset_Begin },
959 { "glBitmap", 10, _gloffset_Bitmap },
960 { "glColor3b", 10, _gloffset_Color3b },
961 { "glColor3bv", 10, _gloffset_Color3bv },
962 { "glColor3d", 10, _gloffset_Color3d },
963 { "glColor3dv", 10, _gloffset_Color3dv },
964 { "glColor3f", 10, _gloffset_Color3f },
965 { "glColor3fv", 10, _gloffset_Color3fv },
966 { "glColor3i", 10, _gloffset_Color3i },
967 { "glColor3iv", 10, _gloffset_Color3iv },
968 { "glColor3s", 10, _gloffset_Color3s },
969 { "glColor3sv", 10, _gloffset_Color3sv },
970 { "glColor3ub", 10, _gloffset_Color3ub },
971 { "glColor3ubv", 10, _gloffset_Color3ubv },
972 { "glColor3ui", 10, _gloffset_Color3ui },
973 { "glColor3uiv", 10, _gloffset_Color3uiv },
974 { "glColor3us", 10, _gloffset_Color3us },
975 { "glColor3usv", 10, _gloffset_Color3usv },
976 { "glColor4b", 10, _gloffset_Color4b },
977 { "glColor4bv", 10, _gloffset_Color4bv },
978 { "glColor4d", 10, _gloffset_Color4d },
979 { "glColor4dv", 10, _gloffset_Color4dv },
980 { "glColor4f", 10, _gloffset_Color4f },
981 { "glColor4fv", 10, _gloffset_Color4fv },
982 { "glColor4i", 10, _gloffset_Color4i },
983 { "glColor4iv", 10, _gloffset_Color4iv },
984 { "glColor4s", 10, _gloffset_Color4s },
985 { "glColor4sv", 10, _gloffset_Color4sv },
986 { "glColor4ub", 10, _gloffset_Color4ub },
987 { "glColor4ubv", 10, _gloffset_Color4ubv },
988 { "glColor4ui", 10, _gloffset_Color4ui },
989 { "glColor4uiv", 10, _gloffset_Color4uiv },
990 { "glColor4us", 10, _gloffset_Color4us },
991 { "glColor4usv", 10, _gloffset_Color4usv },
992 { "glEdgeFlag", 10, _gloffset_EdgeFlag },
993 { "glEdgeFlagv", 10, _gloffset_EdgeFlagv },
994 { "glEnd", 10, _gloffset_End },
995 { "glIndexd", 10, _gloffset_Indexd },
996 { "glIndexdv", 10, _gloffset_Indexdv },
997 { "glIndexf", 10, _gloffset_Indexf },
998 { "glIndexfv", 10, _gloffset_Indexfv },
999 { "glIndexi", 10, _gloffset_Indexi },
1000 { "glIndexiv", 10, _gloffset_Indexiv },
1001 { "glIndexs", 10, _gloffset_Indexs },
1002 { "glIndexsv", 10, _gloffset_Indexsv },
1003 { "glNormal3b", 10, _gloffset_Normal3b },
1004 { "glNormal3bv", 10, _gloffset_Normal3bv },
1005 { "glNormal3d", 10, _gloffset_Normal3d },
1006 { "glNormal3dv", 10, _gloffset_Normal3dv },
1007 { "glNormal3f", 10, _gloffset_Normal3f },
1008 { "glNormal3fv", 10, _gloffset_Normal3fv },
1009 { "glNormal3i", 10, _gloffset_Normal3i },
1010 { "glNormal3iv", 10, _gloffset_Normal3iv },
1011 { "glNormal3s", 10, _gloffset_Normal3s },
1012 { "glNormal3sv", 10, _gloffset_Normal3sv },
1013 { "glRasterPos2d", 10, _gloffset_RasterPos2d },
1014 { "glRasterPos2dv", 10, _gloffset_RasterPos2dv },
1015 { "glRasterPos2f", 10, _gloffset_RasterPos2f },
1016 { "glRasterPos2fv", 10, _gloffset_RasterPos2fv },
1017 { "glRasterPos2i", 10, _gloffset_RasterPos2i },
1018 { "glRasterPos2iv", 10, _gloffset_RasterPos2iv },
1019 { "glRasterPos2s", 10, _gloffset_RasterPos2s },
1020 { "glRasterPos2sv", 10, _gloffset_RasterPos2sv },
1021 { "glRasterPos3d", 10, _gloffset_RasterPos3d },
1022 { "glRasterPos3dv", 10, _gloffset_RasterPos3dv },
1023 { "glRasterPos3f", 10, _gloffset_RasterPos3f },
1024 { "glRasterPos3fv", 10, _gloffset_RasterPos3fv },
1025 { "glRasterPos3i", 10, _gloffset_RasterPos3i },
1026 { "glRasterPos3iv", 10, _gloffset_RasterPos3iv },
1027 { "glRasterPos3s", 10, _gloffset_RasterPos3s },
1028 { "glRasterPos3sv", 10, _gloffset_RasterPos3sv },
1029 { "glRasterPos4d", 10, _gloffset_RasterPos4d },
1030 { "glRasterPos4dv", 10, _gloffset_RasterPos4dv },
1031 { "glRasterPos4f", 10, _gloffset_RasterPos4f },
1032 { "glRasterPos4fv", 10, _gloffset_RasterPos4fv },
1033 { "glRasterPos4i", 10, _gloffset_RasterPos4i },
1034 { "glRasterPos4iv", 10, _gloffset_RasterPos4iv },
1035 { "glRasterPos4s", 10, _gloffset_RasterPos4s },
1036 { "glRasterPos4sv", 10, _gloffset_RasterPos4sv },
1037 { "glRectd", 10, _gloffset_Rectd },
1038 { "glRectdv", 10, _gloffset_Rectdv },
1039 { "glRectf", 10, _gloffset_Rectf },
1040 { "glRectfv", 10, _gloffset_Rectfv },
1041 { "glRecti", 10, _gloffset_Recti },
1042 { "glRectiv", 10, _gloffset_Rectiv },
1043 { "glRects", 10, _gloffset_Rects },
1044 { "glRectsv", 10, _gloffset_Rectsv },
1045 { "glTexCoord1d", 10, _gloffset_TexCoord1d },
1046 { "glTexCoord1dv", 10, _gloffset_TexCoord1dv },
1047 { "glTexCoord1f", 10, _gloffset_TexCoord1f },
1048 { "glTexCoord1fv", 10, _gloffset_TexCoord1fv },
1049 { "glTexCoord1i", 10, _gloffset_TexCoord1i },
1050 { "glTexCoord1iv", 10, _gloffset_TexCoord1iv },
1051 { "glTexCoord1s", 10, _gloffset_TexCoord1s },
1052 { "glTexCoord1sv", 10, _gloffset_TexCoord1sv },
1053 { "glTexCoord2d", 10, _gloffset_TexCoord2d },
1054 { "glTexCoord2dv", 10, _gloffset_TexCoord2dv },
1055 { "glTexCoord2f", 10, _gloffset_TexCoord2f },
1056 { "glTexCoord2fv", 10, _gloffset_TexCoord2fv },
1057 { "glTexCoord2i", 10, _gloffset_TexCoord2i },
1058 { "glTexCoord2iv", 10, _gloffset_TexCoord2iv },
1059 { "glTexCoord2s", 10, _gloffset_TexCoord2s },
1060 { "glTexCoord2sv", 10, _gloffset_TexCoord2sv },
1061 { "glTexCoord3d", 10, _gloffset_TexCoord3d },
1062 { "glTexCoord3dv", 10, _gloffset_TexCoord3dv },
1063 { "glTexCoord3f", 10, _gloffset_TexCoord3f },
1064 { "glTexCoord3fv", 10, _gloffset_TexCoord3fv },
1065 { "glTexCoord3i", 10, _gloffset_TexCoord3i },
1066 { "glTexCoord3iv", 10, _gloffset_TexCoord3iv },
1067 { "glTexCoord3s", 10, _gloffset_TexCoord3s },
1068 { "glTexCoord3sv", 10, _gloffset_TexCoord3sv },
1069 { "glTexCoord4d", 10, _gloffset_TexCoord4d },
1070 { "glTexCoord4dv", 10, _gloffset_TexCoord4dv },
1071 { "glTexCoord4f", 10, _gloffset_TexCoord4f },
1072 { "glTexCoord4fv", 10, _gloffset_TexCoord4fv },
1073 { "glTexCoord4i", 10, _gloffset_TexCoord4i },
1074 { "glTexCoord4iv", 10, _gloffset_TexCoord4iv },
1075 { "glTexCoord4s", 10, _gloffset_TexCoord4s },
1076 { "glTexCoord4sv", 10, _gloffset_TexCoord4sv },
1077 { "glVertex2d", 10, _gloffset_Vertex2d },
1078 { "glVertex2dv", 10, _gloffset_Vertex2dv },
1079 { "glVertex2f", 10, _gloffset_Vertex2f },
1080 { "glVertex2fv", 10, _gloffset_Vertex2fv },
1081 { "glVertex2i", 10, _gloffset_Vertex2i },
1082 { "glVertex2iv", 10, _gloffset_Vertex2iv },
1083 { "glVertex2s", 10, _gloffset_Vertex2s },
1084 { "glVertex2sv", 10, _gloffset_Vertex2sv },
1085 { "glVertex3d", 10, _gloffset_Vertex3d },
1086 { "glVertex3dv", 10, _gloffset_Vertex3dv },
1087 { "glVertex3f", 10, _gloffset_Vertex3f },
1088 { "glVertex3fv", 10, _gloffset_Vertex3fv },
1089 { "glVertex3i", 10, _gloffset_Vertex3i },
1090 { "glVertex3iv", 10, _gloffset_Vertex3iv },
1091 { "glVertex3s", 10, _gloffset_Vertex3s },
1092 { "glVertex3sv", 10, _gloffset_Vertex3sv },
1093 { "glVertex4d", 10, _gloffset_Vertex4d },
1094 { "glVertex4dv", 10, _gloffset_Vertex4dv },
1095 { "glVertex4f", 10, _gloffset_Vertex4f },
1096 { "glVertex4fv", 10, _gloffset_Vertex4fv },
1097 { "glVertex4i", 10, _gloffset_Vertex4i },
1098 { "glVertex4iv", 10, _gloffset_Vertex4iv },
1099 { "glVertex4s", 10, _gloffset_Vertex4s },
1100 { "glVertex4sv", 10, _gloffset_Vertex4sv },
1101 { "glClipPlane", 10, _gloffset_ClipPlane },
1102 { "glColorMaterial", 10, _gloffset_ColorMaterial },
1103 { "glFogf", 10, _gloffset_Fogf },
1104 { "glFogfv", 10, _gloffset_Fogfv },
1105 { "glFogi", 10, _gloffset_Fogi },
1106 { "glFogiv", 10, _gloffset_Fogiv },
1107 { "glLightf", 10, _gloffset_Lightf },
1108 { "glLightfv", 10, _gloffset_Lightfv },
1109 { "glLighti", 10, _gloffset_Lighti },
1110 { "glLightiv", 10, _gloffset_Lightiv },
1111 { "glLightModelf", 10, _gloffset_LightModelf },
1112 { "glLightModelfv", 10, _gloffset_LightModelfv },
1113 { "glLightModeli", 10, _gloffset_LightModeli },
1114 { "glLightModeliv", 10, _gloffset_LightModeliv },
1115 { "glLineStipple", 10, _gloffset_LineStipple },
1116 { "glMaterialf", 10, _gloffset_Materialf },
1117 { "glMaterialfv", 10, _gloffset_Materialfv },
1118 { "glMateriali", 10, _gloffset_Materiali },
1119 { "glMaterialiv", 10, _gloffset_Materialiv },
1120 { "glPolygonStipple", 10, _gloffset_PolygonStipple },
1121 { "glShadeModel", 10, _gloffset_ShadeModel },
1122 { "glTexEnvf", 10, _gloffset_TexEnvf },
1123 { "glTexEnvfv", 10, _gloffset_TexEnvfv },
1124 { "glTexEnvi", 10, _gloffset_TexEnvi },
1125 { "glTexEnviv", 10, _gloffset_TexEnviv },
1126 { "glTexGend", 10, _gloffset_TexGend },
1127 { "glTexGendv", 10, _gloffset_TexGendv },
1128 { "glTexGenf", 10, _gloffset_TexGenf },
1129 { "glTexGenfv", 10, _gloffset_TexGenfv },
1130 { "glTexGeni", 10, _gloffset_TexGeni },
1131 { "glTexGeniv", 10, _gloffset_TexGeniv },
1132 { "glFeedbackBuffer", 10, _gloffset_FeedbackBuffer },
1133 { "glSelectBuffer", 10, _gloffset_SelectBuffer },
1134 { "glRenderMode", 10, _gloffset_RenderMode },
1135 { "glInitNames", 10, _gloffset_InitNames },
1136 { "glLoadName", 10, _gloffset_LoadName },
1137 { "glPassThrough", 10, _gloffset_PassThrough },
1138 { "glPopName", 10, _gloffset_PopName },
1139 { "glPushName", 10, _gloffset_PushName },
1140 { "glClearAccum", 10, _gloffset_ClearAccum },
1141 { "glClearIndex", 10, _gloffset_ClearIndex },
1142 { "glIndexMask", 10, _gloffset_IndexMask },
1143 { "glAccum", 10, _gloffset_Accum },
1144 { "glPopAttrib", 10, _gloffset_PopAttrib },
1145 { "glPushAttrib", 10, _gloffset_PushAttrib },
1146 { "glMap1d", 10, _gloffset_Map1d },
1147 { "glMap1f", 10, _gloffset_Map1f },
1148 { "glMap2d", 10, _gloffset_Map2d },
1149 { "glMap2f", 10, _gloffset_Map2f },
1150 { "glMapGrid1d", 10, _gloffset_MapGrid1d },
1151 { "glMapGrid1f", 10, _gloffset_MapGrid1f },
1152 { "glMapGrid2d", 10, _gloffset_MapGrid2d },
1153 { "glMapGrid2f", 10, _gloffset_MapGrid2f },
1154 { "glEvalCoord1d", 10, _gloffset_EvalCoord1d },
1155 { "glEvalCoord1dv", 10, _gloffset_EvalCoord1dv },
1156 { "glEvalCoord1f", 10, _gloffset_EvalCoord1f },
1157 { "glEvalCoord1fv", 10, _gloffset_EvalCoord1fv },
1158 { "glEvalCoord2d", 10, _gloffset_EvalCoord2d },
1159 { "glEvalCoord2dv", 10, _gloffset_EvalCoord2dv },
1160 { "glEvalCoord2f", 10, _gloffset_EvalCoord2f },
1161 { "glEvalCoord2fv", 10, _gloffset_EvalCoord2fv },
1162 { "glEvalMesh1", 10, _gloffset_EvalMesh1 },
1163 { "glEvalPoint1", 10, _gloffset_EvalPoint1 },
1164 { "glEvalMesh2", 10, _gloffset_EvalMesh2 },
1165 { "glEvalPoint2", 10, _gloffset_EvalPoint2 },
1166 { "glAlphaFunc", 10, _gloffset_AlphaFunc },
1167 { "glPixelZoom", 10, _gloffset_PixelZoom },
1168 { "glPixelTransferf", 10, _gloffset_PixelTransferf },
1169 { "glPixelTransferi", 10, _gloffset_PixelTransferi },
1170 { "glPixelMapfv", 10, _gloffset_PixelMapfv },
1171 { "glPixelMapuiv", 10, _gloffset_PixelMapuiv },
1172 { "glPixelMapusv", 10, _gloffset_PixelMapusv },
1173 { "glCopyPixels", 10, _gloffset_CopyPixels },
1174 { "glDrawPixels", 10, _gloffset_DrawPixels },
1175 { "glGetClipPlane", 10, _gloffset_GetClipPlane },
1176 { "glGetLightfv", 10, _gloffset_GetLightfv },
1177 { "glGetLightiv", 10, _gloffset_GetLightiv },
1178 { "glGetMapdv", 10, _gloffset_GetMapdv },
1179 { "glGetMapfv", 10, _gloffset_GetMapfv },
1180 { "glGetMapiv", 10, _gloffset_GetMapiv },
1181 { "glGetMaterialfv", 10, _gloffset_GetMaterialfv },
1182 { "glGetMaterialiv", 10, _gloffset_GetMaterialiv },
1183 { "glGetPixelMapfv", 10, _gloffset_GetPixelMapfv },
1184 { "glGetPixelMapuiv", 10, _gloffset_GetPixelMapuiv },
1185 { "glGetPixelMapusv", 10, _gloffset_GetPixelMapusv },
1186 { "glGetPolygonStipple", 10, _gloffset_GetPolygonStipple },
1187 { "glGetTexEnvfv", 10, _gloffset_GetTexEnvfv },
1188 { "glGetTexEnviv", 10, _gloffset_GetTexEnviv },
1189 { "glGetTexGendv", 10, _gloffset_GetTexGendv },
1190 { "glGetTexGenfv", 10, _gloffset_GetTexGenfv },
1191 { "glGetTexGeniv", 10, _gloffset_GetTexGeniv },
1192 { "glIsList", 10, _gloffset_IsList },
1193 { "glFrustum", 10, _gloffset_Frustum },
1194 { "glLoadIdentity", 10, _gloffset_LoadIdentity },
1195 { "glLoadMatrixf", 10, _gloffset_LoadMatrixf },
1196 { "glLoadMatrixd", 10, _gloffset_LoadMatrixd },
1197 { "glMatrixMode", 10, _gloffset_MatrixMode },
1198 { "glMultMatrixf", 10, _gloffset_MultMatrixf },
1199 { "glMultMatrixd", 10, _gloffset_MultMatrixd },
1200 { "glOrtho", 10, _gloffset_Ortho },
1201 { "glPopMatrix", 10, _gloffset_PopMatrix },
1202 { "glPushMatrix", 10, _gloffset_PushMatrix },
1203 { "glRotated", 10, _gloffset_Rotated },
1204 { "glRotatef", 10, _gloffset_Rotatef },
1205 { "glScaled", 10, _gloffset_Scaled },
1206 { "glScalef", 10, _gloffset_Scalef },
1207 { "glTranslated", 10, _gloffset_Translated },
1208 { "glTranslatef", 10, _gloffset_Translatef },
1209 { "glArrayElement", 10, _gloffset_ArrayElement },
1210 { "glColorPointer", 10, _gloffset_ColorPointer },
1211 { "glDisableClientState", 10, _gloffset_DisableClientState },
1212 { "glEdgeFlagPointer", 10, _gloffset_EdgeFlagPointer },
1213 { "glEnableClientState", 10, _gloffset_EnableClientState },
1214 { "glIndexPointer", 10, _gloffset_IndexPointer },
1215 { "glInterleavedArrays", 10, _gloffset_InterleavedArrays },
1216 { "glNormalPointer", 10, _gloffset_NormalPointer },
1217 { "glTexCoordPointer", 10, _gloffset_TexCoordPointer },
1218 { "glVertexPointer", 10, _gloffset_VertexPointer },
1219 { "glAreTexturesResident", 10, _gloffset_AreTexturesResident },
1220 { "glPrioritizeTextures", 10, _gloffset_PrioritizeTextures },
1221 { "glIndexub", 10, _gloffset_Indexub },
1222 { "glIndexubv", 10, _gloffset_Indexubv },
1223 { "glPopClientAttrib", 10, _gloffset_PopClientAttrib },
1224 { "glPushClientAttrib", 10, _gloffset_PushClientAttrib },
1225 { "glColorTable", 10, _gloffset_ColorTable },
1226 { "glColorTableParameterfv", 10, _gloffset_ColorTableParameterfv },
1227 { "glColorTableParameteriv", 10, _gloffset_ColorTableParameteriv },
1228 { "glCopyColorTable", 10, _gloffset_CopyColorTable },
1229 { "glGetColorTable", 10, _gloffset_GetColorTable },
1230 { "glGetColorTableParameterfv", 10, _gloffset_GetColorTableParameterfv },
1231 { "glGetColorTableParameteriv", 10, _gloffset_GetColorTableParameteriv },
1232 { "glColorSubTable", 10, _gloffset_ColorSubTable },
1233 { "glCopyColorSubTable", 10, _gloffset_CopyColorSubTable },
1234 { "glConvolutionFilter1D", 10, _gloffset_ConvolutionFilter1D },
1235 { "glConvolutionFilter2D", 10, _gloffset_ConvolutionFilter2D },
1236 { "glConvolutionParameterf", 10, _gloffset_ConvolutionParameterf },
1237 { "glConvolutionParameterfv", 10, _gloffset_ConvolutionParameterfv },
1238 { "glConvolutionParameteri", 10, _gloffset_ConvolutionParameteri },
1239 { "glConvolutionParameteriv", 10, _gloffset_ConvolutionParameteriv },
1240 { "glCopyConvolutionFilter1D", 10, _gloffset_CopyConvolutionFilter1D },
1241 { "glCopyConvolutionFilter2D", 10, _gloffset_CopyConvolutionFilter2D },
1242 { "glGetConvolutionFilter", 10, _gloffset_GetConvolutionFilter },
1243 { "glGetConvolutionParameterfv", 10, _gloffset_GetConvolutionParameterfv },
1244 { "glGetConvolutionParameteriv", 10, _gloffset_GetConvolutionParameteriv },
1245 { "glGetSeparableFilter", 10, _gloffset_GetSeparableFilter },
1246 { "glSeparableFilter2D", 10, _gloffset_SeparableFilter2D },
1247 { "glGetHistogram", 10, _gloffset_GetHistogram },
1248 { "glGetHistogramParameterfv", 10, _gloffset_GetHistogramParameterfv },
1249 { "glGetHistogramParameteriv", 10, _gloffset_GetHistogramParameteriv },
1250 { "glGetMinmax", 10, _gloffset_GetMinmax },
1251 { "glGetMinmaxParameterfv", 10, _gloffset_GetMinmaxParameterfv },
1252 { "glGetMinmaxParameteriv", 10, _gloffset_GetMinmaxParameteriv },
1253 { "glHistogram", 10, _gloffset_Histogram },
1254 { "glMinmax", 10, _gloffset_Minmax },
1255 { "glResetHistogram", 10, _gloffset_ResetHistogram },
1256 { "glResetMinmax", 10, _gloffset_ResetMinmax },
1257 { "glClientActiveTexture", 10, _gloffset_ClientActiveTexture },
1258 { "glMultiTexCoord1d", 10, _gloffset_MultiTexCoord1d },
1259 { "glMultiTexCoord1dv", 10, _gloffset_MultiTexCoord1dv },
1260 { "glMultiTexCoord1f", 10, _gloffset_MultiTexCoord1fARB },
1261 { "glMultiTexCoord1fv", 10, _gloffset_MultiTexCoord1fvARB },
1262 { "glMultiTexCoord1i", 10, _gloffset_MultiTexCoord1i },
1263 { "glMultiTexCoord1iv", 10, _gloffset_MultiTexCoord1iv },
1264 { "glMultiTexCoord1s", 10, _gloffset_MultiTexCoord1s },
1265 { "glMultiTexCoord1sv", 10, _gloffset_MultiTexCoord1sv },
1266 { "glMultiTexCoord2d", 10, _gloffset_MultiTexCoord2d },
1267 { "glMultiTexCoord2dv", 10, _gloffset_MultiTexCoord2dv },
1268 { "glMultiTexCoord2f", 10, _gloffset_MultiTexCoord2fARB },
1269 { "glMultiTexCoord2fv", 10, _gloffset_MultiTexCoord2fvARB },
1270 { "glMultiTexCoord2i", 10, _gloffset_MultiTexCoord2i },
1271 { "glMultiTexCoord2iv", 10, _gloffset_MultiTexCoord2iv },
1272 { "glMultiTexCoord2s", 10, _gloffset_MultiTexCoord2s },
1273 { "glMultiTexCoord2sv", 10, _gloffset_MultiTexCoord2sv },
1274 { "glMultiTexCoord3d", 10, _gloffset_MultiTexCoord3d },
1275 { "glMultiTexCoord3dv", 10, _gloffset_MultiTexCoord3dv },
1276 { "glMultiTexCoord3f", 10, _gloffset_MultiTexCoord3fARB },
1277 { "glMultiTexCoord3fv", 10, _gloffset_MultiTexCoord3fvARB },
1278 { "glMultiTexCoord3i", 10, _gloffset_MultiTexCoord3i },
1279 { "glMultiTexCoord3iv", 10, _gloffset_MultiTexCoord3iv },
1280 { "glMultiTexCoord3s", 10, _gloffset_MultiTexCoord3s },
1281 { "glMultiTexCoord3sv", 10, _gloffset_MultiTexCoord3sv },
1282 { "glMultiTexCoord4d", 10, _gloffset_MultiTexCoord4d },
1283 { "glMultiTexCoord4dv", 10, _gloffset_MultiTexCoord4dv },
1284 { "glMultiTexCoord4f", 10, _gloffset_MultiTexCoord4fARB },
1285 { "glMultiTexCoord4fv", 10, _gloffset_MultiTexCoord4fvARB },
1286 { "glMultiTexCoord4i", 10, _gloffset_MultiTexCoord4i },
1287 { "glMultiTexCoord4iv", 10, _gloffset_MultiTexCoord4iv },
1288 { "glMultiTexCoord4s", 10, _gloffset_MultiTexCoord4s },
1289 { "glMultiTexCoord4sv", 10, _gloffset_MultiTexCoord4sv },
1290 { "glLoadTransposeMatrixf", 10, -1 },
1291 { "glLoadTransposeMatrixd", 10, -1 },
1292 { "glMultTransposeMatrixf", 10, -1 },
1293 { "glMultTransposeMatrixd", 10, -1 },
1294 { "glFogCoordf", 10, -1 },
1295 { "glFogCoordfv", 10, -1 },
1296 { "glFogCoordd", 10, -1 },
1297 { "glFogCoorddv", 10, -1 },
1298 { "glFogCoordPointer", 10, -1 },
1299 { "glSecondaryColor3b", 10, -1 },
1300 { "glSecondaryColor3bv", 10, -1 },
1301 { "glSecondaryColor3d", 10, -1 },
1302 { "glSecondaryColor3dv", 10, -1 },
1303 { "glSecondaryColor3f", 10, -1 },
1304 { "glSecondaryColor3fv", 10, -1 },
1305 { "glSecondaryColor3i", 10, -1 },
1306 { "glSecondaryColor3iv", 10, -1 },
1307 { "glSecondaryColor3s", 10, -1 },
1308 { "glSecondaryColor3sv", 10, -1 },
1309 { "glSecondaryColor3ub", 10, -1 },
1310 { "glSecondaryColor3ubv", 10, -1 },
1311 { "glSecondaryColor3ui", 10, -1 },
1312 { "glSecondaryColor3uiv", 10, -1 },
1313 { "glSecondaryColor3us", 10, -1 },
1314 { "glSecondaryColor3usv", 10, -1 },
1315 { "glSecondaryColorPointer", 10, -1 },
1316 { "glWindowPos2d", 10, -1 },
1317 { "glWindowPos2dv", 10, -1 },
1318 { "glWindowPos2f", 10, -1 },
1319 { "glWindowPos2fv", 10, -1 },
1320 { "glWindowPos2i", 10, -1 },
1321 { "glWindowPos2iv", 10, -1 },
1322 { "glWindowPos2s", 10, -1 },
1323 { "glWindowPos2sv", 10, -1 },
1324 { "glWindowPos3d", 10, -1 },
1325 { "glWindowPos3dv", 10, -1 },
1326 { "glWindowPos3f", 10, -1 },
1327 { "glWindowPos3fv", 10, -1 },
1328 { "glWindowPos3i", 10, -1 },
1329 { "glWindowPos3iv", 10, -1 },
1330 { "glWindowPos3s", 10, -1 },
1331 { "glWindowPos3sv", 10, -1 },
1332 { "glProgramStringARB", 10, -1 },
1333 { "glProgramEnvParameter4dARB", 10, -1 },
1334 { "glProgramEnvParameter4dvARB", 10, -1 },
1335 { "glProgramEnvParameter4fARB", 10, -1 },
1336 { "glProgramEnvParameter4fvARB", 10, -1 },
1337 { "glProgramLocalParameter4dARB", 10, -1 },
1338 { "glProgramLocalParameter4dvARB", 10, -1 },
1339 { "glProgramLocalParameter4fARB", 10, -1 },
1340 { "glProgramLocalParameter4fvARB", 10, -1 },
1341 { "glGetProgramEnvParameterdvARB", 10, -1 },
1342 { "glGetProgramEnvParameterfvARB", 10, -1 },
1343 { "glGetProgramLocalParameterdvARB", 10, -1 },
1344 { "glGetProgramLocalParameterfvARB", 10, -1 },
1345 { "glGetProgramivARB", 10, -1 },
1346 { "glGetProgramStringARB", 10, -1 },
1347 { "glPolygonOffsetEXT", 10, -1 },
1348 { "glColorPointerEXT", 10, -1 },
1349 { "glEdgeFlagPointerEXT", 10, -1 },
1350 { "glIndexPointerEXT", 10, -1 },
1351 { "glNormalPointerEXT", 10, -1 },
1352 { "glTexCoordPointerEXT", 10, -1 },
1353 { "glVertexPointerEXT", 10, -1 },
1354 { "glLockArraysEXT", 10, -1 },
1355 { "glUnlockArraysEXT", 10, -1 },
1356 { "glWindowPos4dMESA", 10, -1 },
1357 { "glWindowPos4dvMESA", 10, -1 },
1358 { "glWindowPos4fMESA", 10, -1 },
1359 { "glWindowPos4fvMESA", 10, -1 },
1360 { "glWindowPos4iMESA", 10, -1 },
1361 { "glWindowPos4ivMESA", 10, -1 },
1362 { "glWindowPos4sMESA", 10, -1 },
1363 { "glWindowPos4svMESA", 10, -1 },
1364 { "glBindProgramNV", 10, -1 },
1365 { "glDeleteProgramsNV", 10, -1 },
1366 { "glGenProgramsNV", 10, -1 },
1367 { "glIsProgramNV", 10, -1 },
1368 { "glVertexAttrib1sNV", 10, -1 },
1369 { "glVertexAttrib1svNV", 10, -1 },
1370 { "glVertexAttrib2sNV", 10, -1 },
1371 { "glVertexAttrib2svNV", 10, -1 },
1372 { "glVertexAttrib3sNV", 10, -1 },
1373 { "glVertexAttrib3svNV", 10, -1 },
1374 { "glVertexAttrib4sNV", 10, -1 },
1375 { "glVertexAttrib4svNV", 10, -1 },
1376 { "glVertexAttrib1fNV", 10, -1 },
1377 { "glVertexAttrib1fvNV", 10, -1 },
1378 { "glVertexAttrib2fNV", 10, -1 },
1379 { "glVertexAttrib2fvNV", 10, -1 },
1380 { "glVertexAttrib3fNV", 10, -1 },
1381 { "glVertexAttrib3fvNV", 10, -1 },
1382 { "glVertexAttrib4fNV", 10, -1 },
1383 { "glVertexAttrib4fvNV", 10, -1 },
1384 { "glVertexAttrib1dNV", 10, -1 },
1385 { "glVertexAttrib1dvNV", 10, -1 },
1386 { "glVertexAttrib2dNV", 10, -1 },
1387 { "glVertexAttrib2dvNV", 10, -1 },
1388 { "glVertexAttrib3dNV", 10, -1 },
1389 { "glVertexAttrib3dvNV", 10, -1 },
1390 { "glVertexAttrib4dNV", 10, -1 },
1391 { "glVertexAttrib4dvNV", 10, -1 },
1392 { "glVertexAttrib4ubNV", 10, -1 },
1393 { "glVertexAttrib4ubvNV", 10, -1 },
1394 { "glVertexAttribs1svNV", 10, -1 },
1395 { "glVertexAttribs2svNV", 10, -1 },
1396 { "glVertexAttribs3svNV", 10, -1 },
1397 { "glVertexAttribs4svNV", 10, -1 },
1398 { "glVertexAttribs1fvNV", 10, -1 },
1399 { "glVertexAttribs2fvNV", 10, -1 },
1400 { "glVertexAttribs3fvNV", 10, -1 },
1401 { "glVertexAttribs4fvNV", 10, -1 },
1402 { "glVertexAttribs1dvNV", 10, -1 },
1403 { "glVertexAttribs2dvNV", 10, -1 },
1404 { "glVertexAttribs3dvNV", 10, -1 },
1405 { "glVertexAttribs4dvNV", 10, -1 },
1406 { "glVertexAttribs4ubvNV", 10, -1 },
1407 { "glGenFragmentShadersATI", 10, -1 },
1408 { "glBindFragmentShaderATI", 10, -1 },
1409 { "glDeleteFragmentShaderATI", 10, -1 },
1410 { "glBeginFragmentShaderATI", 10, -1 },
1411 { "glEndFragmentShaderATI", 10, -1 },
1412 { "glPassTexCoordATI", 10, -1 },
1413 { "glSampleMapATI", 10, -1 },
1414 { "glColorFragmentOp1ATI", 10, -1 },
1415 { "glColorFragmentOp2ATI", 10, -1 },
1416 { "glColorFragmentOp3ATI", 10, -1 },
1417 { "glAlphaFragmentOp1ATI", 10, -1 },
1418 { "glAlphaFragmentOp2ATI", 10, -1 },
1419 { "glAlphaFragmentOp3ATI", 10, -1 },
1420 { "glSetFragmentShaderConstantATI", 10, -1 },
1421 { "glActiveStencilFaceEXT", 10, -1 },
1422 { "glStencilFuncSeparateATI", 10, -1 },
1423 { "glProgramEnvParameters4fvEXT", 10, -1 },
1424 { "glProgramLocalParameters4fvEXT", 10, -1 },
1425 { "glPrimitiveRestartNV", 10, -1 },
1426
1427 { NULL, 0, -1 }
1428 };
1429
1430 const struct function gl_core_functions_possible[] = {
1431 /* GL 3.1 */
1432 { "glTexBuffer", 31, -1 },
1433
1434 /* GL 3.2 */
1435 { "glFramebufferTexture", 32, -1 },
1436
1437 /* GL 4.0 */
1438 { "glGetSubroutineUniformLocation", 40, -1 },
1439 { "glGetSubroutineIndex", 40, -1 },
1440 { "glGetActiveSubroutineUniformiv", 40, -1 },
1441 { "glGetActiveSubroutineUniformName", 40, -1 },
1442 { "glGetActiveSubroutineName", 40, -1 },
1443 { "glUniformSubroutinesuiv", 40, -1 },
1444 { "glGetUniformSubroutineuiv", 40, -1 },
1445 { "glGetProgramStageiv", 40, -1 },
1446
1447 /* GL 4.3 */
1448 { "glIsRenderbuffer", 43, -1 },
1449 { "glBindRenderbuffer", 43, -1 },
1450 { "glDeleteRenderbuffers", 43, -1 },
1451 { "glGenRenderbuffers", 43, -1 },
1452 { "glRenderbufferStorage", 43, -1 },
1453 { "glGetRenderbufferParameteriv", 43, -1 },
1454 { "glIsFramebuffer", 43, -1 },
1455 { "glBindFramebuffer", 43, -1 },
1456 { "glDeleteFramebuffers", 43, -1 },
1457 { "glGenFramebuffers", 43, -1 },
1458 { "glCheckFramebufferStatus", 43, -1 },
1459 { "glFramebufferTexture1D", 43, -1 },
1460 { "glFramebufferTexture2D", 43, -1 },
1461 { "glFramebufferTexture3D", 43, -1 },
1462 { "glFramebufferRenderbuffer", 43, -1 },
1463 { "glGetFramebufferAttachmentParameteriv", 43, -1 },
1464 { "glGenerateMipmap", 43, -1 },
1465 { "glBlitFramebuffer", 43, -1 },
1466 { "glRenderbufferStorageMultisample", 43, -1 },
1467 { "glFramebufferTextureLayer", 43, -1 },
1468 { "glMapBufferRange", 43, -1 },
1469 { "glFlushMappedBufferRange", 43, -1 },
1470 { "glBindVertexArray", 43, -1 },
1471 { "glDeleteVertexArrays", 43, -1 },
1472 { "glGenVertexArrays", 43, -1 },
1473 { "glIsVertexArray", 43, -1 },
1474 { "glGetUniformIndices", 43, -1 },
1475 { "glGetActiveUniformsiv", 43, -1 },
1476 { "glGetActiveUniformName", 43, -1 },
1477 { "glGetUniformBlockIndex", 43, -1 },
1478 { "glGetActiveUniformBlockiv", 43, -1 },
1479 { "glGetActiveUniformBlockName", 43, -1 },
1480 { "glUniformBlockBinding", 43, -1 },
1481 { "glCopyBufferSubData", 43, -1 },
1482 { "glDrawElementsBaseVertex", 43, -1 },
1483 { "glDrawRangeElementsBaseVertex", 43, -1 },
1484 { "glDrawElementsInstancedBaseVertex", 43, -1 },
1485 { "glMultiDrawElementsBaseVertex", 43, -1 },
1486 { "glProvokingVertex", 43, -1 },
1487 { "glFenceSync", 43, -1 },
1488 { "glIsSync", 43, -1 },
1489 { "glDeleteSync", 43, -1 },
1490 { "glClientWaitSync", 43, -1 },
1491 { "glWaitSync", 43, -1 },
1492 { "glGetInteger64v", 43, -1 },
1493 { "glGetSynciv", 43, -1 },
1494 { "glTexImage2DMultisample", 43, -1 },
1495 { "glTexImage3DMultisample", 43, -1 },
1496 { "glGetMultisamplefv", 43, -1 },
1497 { "glSampleMaski", 43, -1 },
1498 { "glBlendEquationiARB", 43, -1 },
1499 { "glBlendEquationSeparateiARB", 43, -1 },
1500 { "glBlendFunciARB", 43, -1 },
1501 { "glBlendFuncSeparateiARB", 43, -1 },
1502 { "glMinSampleShadingARB", 43, -1 }, // XXX: Add to xml
1503 // { "glNamedStringARB", 43, -1 }, // XXX: Add to xml
1504 // { "glDeleteNamedStringARB", 43, -1 }, // XXX: Add to xml
1505 // { "glCompileShaderIncludeARB", 43, -1 }, // XXX: Add to xml
1506 // { "glIsNamedStringARB", 43, -1 }, // XXX: Add to xml
1507 // { "glGetNamedStringARB", 43, -1 }, // XXX: Add to xml
1508 // { "glGetNamedStringivARB", 43, -1 }, // XXX: Add to xml
1509 { "glBindFragDataLocationIndexed", 43, -1 },
1510 { "glGetFragDataIndex", 43, -1 },
1511 { "glGenSamplers", 43, -1 },
1512 { "glDeleteSamplers", 43, -1 },
1513 { "glIsSampler", 43, -1 },
1514 { "glBindSampler", 43, -1 },
1515 { "glSamplerParameteri", 43, -1 },
1516 { "glSamplerParameteriv", 43, -1 },
1517 { "glSamplerParameterf", 43, -1 },
1518 { "glSamplerParameterfv", 43, -1 },
1519 { "glSamplerParameterIiv", 43, -1 },
1520 { "glSamplerParameterIuiv", 43, -1 },
1521 { "glGetSamplerParameteriv", 43, -1 },
1522 { "glGetSamplerParameterIiv", 43, -1 },
1523 { "glGetSamplerParameterfv", 43, -1 },
1524 { "glGetSamplerParameterIuiv", 43, -1 },
1525 { "glQueryCounter", 43, -1 },
1526 { "glGetQueryObjecti64v", 43, -1 },
1527 { "glGetQueryObjectui64v", 43, -1 },
1528 { "glVertexP2ui", 43, -1 },
1529 { "glVertexP2uiv", 43, -1 },
1530 { "glVertexP3ui", 43, -1 },
1531 { "glVertexP3uiv", 43, -1 },
1532 { "glVertexP4ui", 43, -1 },
1533 { "glVertexP4uiv", 43, -1 },
1534 { "glTexCoordP1ui", 43, -1 },
1535 { "glTexCoordP1uiv", 43, -1 },
1536 { "glTexCoordP2ui", 43, -1 },
1537 { "glTexCoordP2uiv", 43, -1 },
1538 { "glTexCoordP3ui", 43, -1 },
1539 { "glTexCoordP3uiv", 43, -1 },
1540 { "glTexCoordP4ui", 43, -1 },
1541 { "glTexCoordP4uiv", 43, -1 },
1542 { "glMultiTexCoordP1ui", 43, -1 },
1543 { "glMultiTexCoordP1uiv", 43, -1 },
1544 { "glMultiTexCoordP2ui", 43, -1 },
1545 { "glMultiTexCoordP2uiv", 43, -1 },
1546 { "glMultiTexCoordP3ui", 43, -1 },
1547 { "glMultiTexCoordP3uiv", 43, -1 },
1548 { "glMultiTexCoordP4ui", 43, -1 },
1549 { "glMultiTexCoordP4uiv", 43, -1 },
1550 { "glNormalP3ui", 43, -1 },
1551 { "glNormalP3uiv", 43, -1 },
1552 { "glColorP3ui", 43, -1 },
1553 { "glColorP3uiv", 43, -1 },
1554 { "glColorP4ui", 43, -1 },
1555 { "glColorP4uiv", 43, -1 },
1556 { "glVertexAttribP1ui", 43, -1 },
1557 { "glVertexAttribP1uiv", 43, -1 },
1558 { "glVertexAttribP2ui", 43, -1 },
1559 { "glVertexAttribP2uiv", 43, -1 },
1560 { "glVertexAttribP3ui", 43, -1 },
1561 { "glVertexAttribP3uiv", 43, -1 },
1562 { "glVertexAttribP4ui", 43, -1 },
1563 { "glVertexAttribP4uiv", 43, -1 },
1564 { "glDrawArraysIndirect", 43, -1 },
1565 { "glDrawElementsIndirect", 43, -1 },
1566
1567 { "glUniform1d", 40, -1 },
1568 { "glUniform2d", 40, -1 },
1569 { "glUniform3d", 40, -1 },
1570 { "glUniform4d", 40, -1 },
1571 { "glUniform1dv", 40, -1 },
1572 { "glUniform2dv", 40, -1 },
1573 { "glUniform3dv", 40, -1 },
1574 { "glUniform4dv", 40, -1 },
1575 { "glUniformMatrix2dv", 40, -1 },
1576 { "glUniformMatrix3dv", 40, -1 },
1577 { "glUniformMatrix4dv", 40, -1 },
1578 { "glUniformMatrix2x3dv", 40, -1 },
1579 { "glUniformMatrix2x4dv", 40, -1 },
1580 { "glUniformMatrix3x2dv", 40, -1 },
1581 { "glUniformMatrix3x4dv", 40, -1 },
1582 { "glUniformMatrix4x2dv", 40, -1 },
1583 { "glUniformMatrix4x3dv", 40, -1 },
1584 { "glGetUniformdv", 43, -1 },
1585
1586 { "glBindTransformFeedback", 43, -1 },
1587 { "glDeleteTransformFeedbacks", 43, -1 },
1588 { "glGenTransformFeedbacks", 43, -1 },
1589 { "glIsTransformFeedback", 43, -1 },
1590 { "glPauseTransformFeedback", 43, -1 },
1591 { "glResumeTransformFeedback", 43, -1 },
1592 { "glDrawTransformFeedback", 43, -1 },
1593 { "glDrawTransformFeedbackStream", 43, -1 },
1594 { "glBeginQueryIndexed", 43, -1 },
1595 { "glEndQueryIndexed", 43, -1 },
1596 { "glGetQueryIndexediv", 43, -1 },
1597 { "glReleaseShaderCompiler", 43, -1 },
1598 { "glShaderBinary", 43, -1 },
1599 { "glGetShaderPrecisionFormat", 43, -1 },
1600 { "glDepthRangef", 43, -1 },
1601 { "glClearDepthf", 43, -1 },
1602 { "glGetProgramBinary", 43, -1 },
1603 { "glProgramBinary", 43, -1 },
1604 { "glProgramParameteri", 43, -1 },
1605 { "glUseProgramStages", 43, -1 },
1606 { "glActiveShaderProgram", 43, -1 },
1607 { "glCreateShaderProgramv", 43, -1 },
1608 { "glBindProgramPipeline", 43, -1 },
1609 { "glDeleteProgramPipelines", 43, -1 },
1610 { "glGenProgramPipelines", 43, -1 },
1611 { "glIsProgramPipeline", 43, -1 },
1612 { "glGetProgramPipelineiv", 43, -1 },
1613 { "glProgramUniform1i", 43, -1 },
1614 { "glProgramUniform1iv", 43, -1 },
1615 { "glProgramUniform1f", 43, -1 },
1616 { "glProgramUniform1fv", 43, -1 },
1617 { "glProgramUniform1d", 40, -1 },
1618 { "glProgramUniform1dv", 40, -1 },
1619 { "glProgramUniform1ui", 43, -1 },
1620 { "glProgramUniform1uiv", 43, -1 },
1621 { "glProgramUniform2i", 43, -1 },
1622 { "glProgramUniform2iv", 43, -1 },
1623 { "glProgramUniform2f", 43, -1 },
1624 { "glProgramUniform2fv", 43, -1 },
1625 { "glProgramUniform2d", 40, -1 },
1626 { "glProgramUniform2dv", 40, -1 },
1627 { "glProgramUniform2ui", 43, -1 },
1628 { "glProgramUniform2uiv", 43, -1 },
1629 { "glProgramUniform3i", 43, -1 },
1630 { "glProgramUniform3iv", 43, -1 },
1631 { "glProgramUniform3f", 43, -1 },
1632 { "glProgramUniform3fv", 43, -1 },
1633 { "glProgramUniform3d", 40, -1 },
1634 { "glProgramUniform3dv", 40, -1 },
1635 { "glProgramUniform3ui", 43, -1 },
1636 { "glProgramUniform3uiv", 43, -1 },
1637 { "glProgramUniform4i", 43, -1 },
1638 { "glProgramUniform4iv", 43, -1 },
1639 { "glProgramUniform4f", 43, -1 },
1640 { "glProgramUniform4fv", 43, -1 },
1641 { "glProgramUniform4d", 40, -1 },
1642 { "glProgramUniform4dv", 40, -1 },
1643 { "glProgramUniform4ui", 43, -1 },
1644 { "glProgramUniform4uiv", 43, -1 },
1645 { "glProgramUniformMatrix2fv", 43, -1 },
1646 { "glProgramUniformMatrix3fv", 43, -1 },
1647 { "glProgramUniformMatrix4fv", 43, -1 },
1648 { "glProgramUniformMatrix2dv", 40, -1 },
1649 { "glProgramUniformMatrix3dv", 40, -1 },
1650 { "glProgramUniformMatrix4dv", 40, -1 },
1651 { "glProgramUniformMatrix2x3fv", 43, -1 },
1652 { "glProgramUniformMatrix3x2fv", 43, -1 },
1653 { "glProgramUniformMatrix2x4fv", 43, -1 },
1654 { "glProgramUniformMatrix4x2fv", 43, -1 },
1655 { "glProgramUniformMatrix3x4fv", 43, -1 },
1656 { "glProgramUniformMatrix4x3fv", 43, -1 },
1657 { "glProgramUniformMatrix2x3dv", 40, -1 },
1658 { "glProgramUniformMatrix3x2dv", 40, -1 },
1659 { "glProgramUniformMatrix2x4dv", 40, -1 },
1660 { "glProgramUniformMatrix4x2dv", 40, -1 },
1661 { "glProgramUniformMatrix3x4dv", 40, -1 },
1662 { "glProgramUniformMatrix4x3dv", 40, -1 },
1663 { "glValidateProgramPipeline", 43, -1 },
1664 { "glGetProgramPipelineInfoLog", 43, -1 },
1665
1666 { "glVertexAttribL1d", 41, -1 },
1667 { "glVertexAttribL2d", 41, -1 },
1668 { "glVertexAttribL3d", 41, -1 },
1669 { "glVertexAttribL4d", 41, -1 },
1670 { "glVertexAttribL1dv", 41, -1 },
1671 { "glVertexAttribL2dv", 41, -1 },
1672 { "glVertexAttribL3dv", 41, -1 },
1673 { "glVertexAttribL4dv", 41, -1 },
1674 { "glVertexAttribLPointer", 41, -1 },
1675 { "glGetVertexAttribLdv", 41, -1 },
1676 { "glViewportArrayv", 43, -1 },
1677 { "glViewportIndexedf", 43, -1 },
1678 { "glViewportIndexedfv", 43, -1 },
1679 { "glScissorArrayv", 43, -1 },
1680 { "glScissorIndexed", 43, -1 },
1681 { "glScissorIndexedv", 43, -1 },
1682 { "glDepthRangeArrayv", 43, -1 },
1683 { "glDepthRangeIndexed", 43, -1 },
1684
1685 // { "glCreateSyncFromCLeventARB", 43, -1 }, // XXX: Add to xml
1686
1687 { "glDrawArraysInstancedBaseInstance", 43, -1 },
1688 { "glDrawElementsInstancedBaseInstance", 43, -1 },
1689 { "glDrawElementsInstancedBaseVertexBaseInstance", 43, -1 },
1690 { "glDrawTransformFeedbackInstanced", 43, -1 },
1691 { "glDrawTransformFeedbackStreamInstanced", 43, -1 },
1692 { "glGetActiveAtomicCounterBufferiv", 43, -1 },
1693 { "glBindImageTexture", 43, -1 },
1694 { "glMemoryBarrier", 43, -1 },
1695 { "glTexStorage1D", 43, -1 },
1696 { "glTexStorage2D", 43, -1 },
1697 { "glTexStorage3D", 43, -1 },
1698 { "glTextureStorage1DEXT", 43, -1 },
1699 { "glTextureStorage2DEXT", 43, -1 },
1700 { "glTextureStorage3DEXT", 43, -1 },
1701 { "glClearBufferData", 43, -1 },
1702 { "glClearBufferSubData", 43, -1 },
1703 // { "glClearNamedBufferDataEXT", 43, -1 }, // XXX: Add to xml
1704 // { "glClearNamedBufferSubDataEXT", 43, -1 }, // XXX: Add to xml
1705 { "glCopyImageSubData", 43, -1 },
1706 { "glTextureView", 43, -1 },
1707 { "glBindVertexBuffer", 43, -1 },
1708 { "glVertexAttribFormat", 43, -1 },
1709 { "glVertexAttribIFormat", 43, -1 },
1710 { "glVertexAttribBinding", 43, -1 },
1711 { "glVertexBindingDivisor", 43, -1 },
1712 // { "glVertexArrayBindVertexBufferEXT", 43, -1 }, // XXX: Add to xml
1713 // { "glVertexArrayVertexAttribFormatEXT", 43, -1 }, // XXX: Add to xml
1714 // { "glVertexArrayVertexAttribIFormatEXT", 43, -1 }, // XXX: Add to xml
1715 // { "glVertexArrayVertexAttribLFormatEXT", 43, -1 }, // XXX: Add to xml
1716 // { "glVertexArrayVertexAttribBindingEXT", 43, -1 }, // XXX: Add to xml
1717 // { "glVertexArrayVertexBindingDivisorEXT", 43, -1 }, // XXX: Add to xml
1718 // { "glFramebufferParameteri", 43, -1 }, // XXX: Add to xml
1719 // { "glGetFramebufferParameteriv", 43, -1 }, // XXX: Add to xml
1720 // { "glNamedFramebufferParameteriEXT", 43, -1 }, // XXX: Add to xml
1721 // { "glGetNamedFramebufferParameterivEXT", 43, -1 }, // XXX: Add to xml
1722 // { "glGetInternalformati64v", 43, -1 }, // XXX: Add to xml
1723 { "glInvalidateTexSubImage", 43, -1 },
1724 { "glInvalidateTexImage", 43, -1 },
1725 { "glInvalidateBufferSubData", 43, -1 },
1726 { "glInvalidateBufferData", 43, -1 },
1727 { "glInvalidateFramebuffer", 43, -1 },
1728 { "glInvalidateSubFramebuffer", 43, -1 },
1729 { "glMultiDrawArraysIndirect", 43, -1 },
1730 { "glMultiDrawElementsIndirect", 43, -1 },
1731 { "glGetProgramInterfaceiv", 43, -1 },
1732 { "glGetProgramResourceIndex", 43, -1 },
1733 { "glGetProgramResourceName", 43, -1 },
1734 { "glGetProgramResourceiv", 43, -1 },
1735 { "glGetProgramResourceLocation", 43, -1 },
1736 { "glGetProgramResourceLocationIndex", 43, -1 },
1737 // { "glShaderStorageBlockBinding", 43, -1 }, // XXX: Add to xml
1738 { "glTexBufferRange", 43, -1 },
1739 // { "glTextureBufferRangeEXT", 43, -1 }, // XXX: Add to xml
1740 { "glTexStorage2DMultisample", 43, -1 },
1741 { "glTexStorage3DMultisample", 43, -1 },
1742 // { "glTextureStorage2DMultisampleEXT", 43, -1 }, // XXX: Add to xml
1743 // { "glTextureStorage3DMultisampleEXT", 43, -1 }, // XXX: Add to xml
1744
1745 /* GL 4.5 */
1746 { "glMemoryBarrierByRegion", 45, -1 },
1747
1748 /* GL_ARB_direct_state_access */
1749 { "glCreateTransformFeedbacks", 45, -1 },
1750 { "glTransformFeedbackBufferBase", 45, -1 },
1751 { "glTransformFeedbackBufferRange", 45, -1 },
1752 { "glGetTransformFeedbackiv", 45, -1 },
1753 { "glGetTransformFeedbacki_v", 45, -1 },
1754 { "glGetTransformFeedbacki64_v", 45, -1 },
1755 { "glCreateBuffers", 45, -1 },
1756 { "glNamedBufferStorage", 45, -1 },
1757 { "glNamedBufferData", 45, -1 },
1758 { "glNamedBufferSubData", 45, -1 },
1759 { "glCopyNamedBufferSubData", 45, -1 },
1760 { "glClearNamedBufferData", 45, -1 },
1761 { "glClearNamedBufferSubData", 45, -1 },
1762 { "glMapNamedBuffer", 45, -1 },
1763 { "glMapNamedBufferRange", 45, -1 },
1764 { "glUnmapNamedBuffer", 45, -1 },
1765 { "glFlushMappedNamedBufferRange", 45, -1 },
1766 { "glGetNamedBufferParameteriv", 45, -1 },
1767 { "glGetNamedBufferParameteri64v", 45, -1 },
1768 { "glGetNamedBufferPointerv", 45, -1 },
1769 { "glGetNamedBufferSubData", 45, -1 },
1770 { "glCreateFramebuffers", 45, -1 },
1771 { "glNamedFramebufferRenderbuffer", 45, -1 },
1772 { "glNamedFramebufferParameteri", 45, -1 },
1773 { "glNamedFramebufferTexture", 45, -1 },
1774 { "glNamedFramebufferTextureLayer", 45, -1 },
1775 { "glNamedFramebufferDrawBuffer", 45, -1 },
1776 { "glNamedFramebufferDrawBuffers", 45, -1 },
1777 { "glNamedFramebufferReadBuffer", 45, -1 },
1778 { "glInvalidateNamedFramebufferSubData", 45, -1 },
1779 { "glInvalidateNamedFramebufferData", 45, -1 },
1780 { "glClearNamedFramebufferiv", 45, -1 },
1781 { "glClearNamedFramebufferuiv", 45, -1 },
1782 { "glClearNamedFramebufferfv", 45, -1 },
1783 { "glClearNamedFramebufferfi", 45, -1 },
1784 { "glBlitNamedFramebuffer", 45, -1 },
1785 { "glCheckNamedFramebufferStatus", 45, -1 },
1786 { "glGetNamedFramebufferParameteriv", 45, -1 },
1787 { "glGetNamedFramebufferAttachmentParameteriv", 45, -1 },
1788 { "glCreateRenderbuffers", 45, -1 },
1789 { "glNamedRenderbufferStorage", 45, -1 },
1790 { "glNamedRenderbufferStorageMultisample", 45, -1 },
1791 { "glGetNamedRenderbufferParameteriv", 45, -1 },
1792 { "glCreateTextures", 45, -1 },
1793 { "glTextureStorage1D", 45, -1 },
1794 { "glTextureStorage2D", 45, -1 },
1795 { "glTextureStorage3D", 45, -1 },
1796 { "glTextureSubImage1D", 45, -1 },
1797 { "glTextureSubImage2D", 45, -1 },
1798 { "glTextureSubImage3D", 45, -1 },
1799 { "glBindTextureUnit", 45, -1 },
1800 { "glTextureParameterf", 45, -1 },
1801 { "glTextureParameterfv", 45, -1 },
1802 { "glTextureParameteri", 45, -1 },
1803 { "glTextureParameterIiv", 45, -1 },
1804 { "glTextureParameterIuiv", 45, -1 },
1805 { "glTextureParameteriv", 45, -1 },
1806 { "glGetTextureLevelParameterfv", 45, -1 },
1807 { "glGetTextureLevelParameteriv", 45, -1 },
1808 { "glGetTextureParameterfv", 45, -1 },
1809 { "glGetTextureParameterIiv", 45, -1 },
1810 { "glGetTextureParameterIuiv", 45, -1 },
1811 { "glGetTextureParameteriv", 45, -1 },
1812 { "glCopyTextureSubImage1D", 45, -1 },
1813 { "glCopyTextureSubImage2D", 45, -1 },
1814 { "glCopyTextureSubImage3D", 45, -1 },
1815 { "glGetTextureImage", 45, -1 },
1816 { "glGetCompressedTextureImage", 45, -1 },
1817 { "glCompressedTextureSubImage1D", 45, -1 },
1818 { "glCompressedTextureSubImage2D", 45, -1 },
1819 { "glCompressedTextureSubImage3D", 45, -1 },
1820 { "glGenerateTextureMipmap", 45, -1 },
1821 { "glTextureStorage2DMultisample", 45, -1 },
1822 { "glTextureStorage3DMultisample", 45, -1 },
1823 { "glTextureBuffer", 45, -1 },
1824 { "glTextureBufferRange", 45, -1 },
1825 { "glCreateVertexArrays", 45, -1 },
1826 { "glDisableVertexArrayAttrib", 45, -1 },
1827 { "glEnableVertexArrayAttrib", 45, -1 },
1828 { "glVertexArrayElementBuffer", 45, -1 },
1829 { "glVertexArrayVertexBuffer", 45, -1 },
1830 { "glVertexArrayVertexBuffers", 45, -1 },
1831 { "glVertexArrayAttribFormat", 45, -1 },
1832 { "glVertexArrayAttribIFormat", 45, -1 },
1833 { "glVertexArrayAttribLFormat", 45, -1 },
1834 { "glVertexArrayAttribBinding", 45, -1 },
1835 { "glVertexArrayBindingDivisor", 45, -1 },
1836 { "glGetVertexArrayiv", 45, -1 },
1837 { "glGetVertexArrayIndexediv", 45, -1 },
1838 { "glGetVertexArrayIndexed64iv", 45, -1 },
1839 { "glCreateSamplers", 45, -1 },
1840 { "glCreateProgramPipelines", 45, -1 },
1841 { "glCreateQueries", 45, -1 },
1842 { "glGetQueryBufferObjectiv", 45, -1 },
1843 { "glGetQueryBufferObjectuiv", 45, -1 },
1844 { "glGetQueryBufferObjecti64v", 45, -1 },
1845 { "glGetQueryBufferObjectui64v", 45, -1 },
1846
1847 { NULL, 0, -1 }
1848 };
1849
1850 const struct function gles11_functions_possible[] = {
1851 { "glActiveTexture", 11, _gloffset_ActiveTexture },
1852 { "glAlphaFunc", 11, _gloffset_AlphaFunc },
1853 { "glAlphaFuncx", 11, -1 },
1854 { "glBindBuffer", 11, -1 },
1855 { "glBindFramebufferOES", 11, -1 },
1856 { "glBindRenderbufferOES", 11, -1 },
1857 { "glBindTexture", 11, _gloffset_BindTexture },
1858 { "glBlendEquationOES", 11, _gloffset_BlendEquation },
1859 { "glBlendEquationSeparateOES", 11, -1 },
1860 { "glBlendFunc", 11, _gloffset_BlendFunc },
1861 { "glBlendFuncSeparateOES", 11, -1 },
1862 { "glBufferData", 11, -1 },
1863 { "glBufferSubData", 11, -1 },
1864 { "glCheckFramebufferStatusOES", 11, -1 },
1865 { "glClear", 11, _gloffset_Clear },
1866 { "glClearColor", 11, _gloffset_ClearColor },
1867 { "glClearColorx", 11, -1 },
1868 { "glClearDepthf", 11, -1 },
1869 { "glClearDepthx", 11, -1 },
1870 { "glClearStencil", 11, _gloffset_ClearStencil },
1871 { "glClientActiveTexture", 11, _gloffset_ClientActiveTexture },
1872 { "glClipPlanef", 11, -1 },
1873 { "glClipPlanex", 11, -1 },
1874 { "glColor4f", 11, _gloffset_Color4f },
1875 { "glColor4ub", 11, _gloffset_Color4ub },
1876 { "glColor4x", 11, -1 },
1877 { "glColorMask", 11, _gloffset_ColorMask },
1878 { "glColorPointer", 11, _gloffset_ColorPointer },
1879 { "glCompressedTexImage2D", 11, -1 },
1880 { "glCompressedTexSubImage2D", 11, -1 },
1881 { "glCopyTexImage2D", 11, _gloffset_CopyTexImage2D },
1882 { "glCopyTexSubImage2D", 11, _gloffset_CopyTexSubImage2D },
1883 { "glCullFace", 11, _gloffset_CullFace },
1884 { "glDeleteBuffers", 11, -1 },
1885 { "glDeleteFramebuffersOES", 11, -1 },
1886 { "glDeleteRenderbuffersOES", 11, -1 },
1887 { "glDeleteTextures", 11, _gloffset_DeleteTextures },
1888 { "glDepthFunc", 11, _gloffset_DepthFunc },
1889 { "glDepthMask", 11, _gloffset_DepthMask },
1890 { "glDepthRangef", 11, -1 },
1891 { "glDepthRangex", 11, -1 },
1892 { "glDisable", 11, _gloffset_Disable },
1893 { "glDiscardFramebufferEXT", 11, -1 },
1894 { "glDisableClientState", 11, _gloffset_DisableClientState },
1895 { "glDrawArrays", 11, _gloffset_DrawArrays },
1896 { "glDrawElements", 11, _gloffset_DrawElements },
1897 { "glDrawTexfOES", 11, -1 },
1898 { "glDrawTexfvOES", 11, -1 },
1899 { "glDrawTexiOES", 11, -1 },
1900 { "glDrawTexivOES", 11, -1 },
1901 { "glDrawTexsOES", 11, -1 },
1902 { "glDrawTexsvOES", 11, -1 },
1903 { "glDrawTexxOES", 11, -1 },
1904 { "glDrawTexxvOES", 11, -1 },
1905 { "glEGLImageTargetRenderbufferStorageOES", 11, -1 },
1906 { "glEGLImageTargetTexture2DOES", 11, -1 },
1907 { "glEnable", 11, _gloffset_Enable },
1908 { "glEnableClientState", 11, _gloffset_EnableClientState },
1909 { "glFinish", 11, _gloffset_Finish },
1910 { "glFlush", 11, _gloffset_Flush },
1911 { "glFlushMappedBufferRangeEXT", 11, -1 },
1912 { "glFogf", 11, _gloffset_Fogf },
1913 { "glFogfv", 11, _gloffset_Fogfv },
1914 { "glFogx", 11, -1 },
1915 { "glFogxv", 11, -1 },
1916 { "glFramebufferRenderbufferOES", 11, -1 },
1917 { "glFramebufferTexture2DOES", 11, -1 },
1918 { "glFrontFace", 11, _gloffset_FrontFace },
1919 { "glFrustumf", 11, -1 },
1920 { "glFrustumx", 11, -1 },
1921 { "glGenBuffers", 11, -1 },
1922 { "glGenFramebuffersOES", 11, -1 },
1923 { "glGenRenderbuffersOES", 11, -1 },
1924 { "glGenTextures", 11, _gloffset_GenTextures },
1925 { "glGenerateMipmapOES", 11, -1 },
1926 { "glGetBooleanv", 11, _gloffset_GetBooleanv },
1927 { "glGetBufferParameteriv", 11, -1 },
1928 { "glGetBufferPointervOES", 11, -1 },
1929 { "glGetClipPlanef", 11, -1 },
1930 { "glGetClipPlanex", 11, -1 },
1931 { "glGetError", 11, _gloffset_GetError },
1932 { "glGetFixedv", 11, -1 },
1933 { "glGetFloatv", 11, _gloffset_GetFloatv },
1934 { "glGetFramebufferAttachmentParameterivOES", 11, -1 },
1935 { "glGetIntegerv", 11, _gloffset_GetIntegerv },
1936 { "glGetLightfv", 11, _gloffset_GetLightfv },
1937 { "glGetLightxv", 11, -1 },
1938 { "glGetMaterialfv", 11, _gloffset_GetMaterialfv },
1939 { "glGetMaterialxv", 11, -1 },
1940 { "glGetPointerv", 11, _gloffset_GetPointerv },
1941 { "glGetRenderbufferParameterivOES", 11, -1 },
1942 { "glGetString", 11, _gloffset_GetString },
1943 { "glGetTexEnvfv", 11, _gloffset_GetTexEnvfv },
1944 { "glGetTexEnviv", 11, _gloffset_GetTexEnviv },
1945 { "glGetTexEnvxv", 11, -1 },
1946 { "glGetTexGenfvOES", 11, _gloffset_GetTexGenfv },
1947 { "glGetTexGenivOES", 11, _gloffset_GetTexGeniv },
1948 { "glGetTexGenxvOES", 11, -1 },
1949 { "glGetTexParameterfv", 11, _gloffset_GetTexParameterfv },
1950 { "glGetTexParameteriv", 11, _gloffset_GetTexParameteriv },
1951 { "glGetTexParameterxv", 11, -1 },
1952 { "glHint", 11, _gloffset_Hint },
1953 { "glIsBuffer", 11, -1 },
1954 { "glIsEnabled", 11, _gloffset_IsEnabled },
1955 { "glIsFramebufferOES", 11, -1 },
1956 { "glIsRenderbufferOES", 11, -1 },
1957 { "glIsTexture", 11, _gloffset_IsTexture },
1958 { "glLightModelf", 11, _gloffset_LightModelf },
1959 { "glLightModelfv", 11, _gloffset_LightModelfv },
1960 { "glLightModelx", 11, -1 },
1961 { "glLightModelxv", 11, -1 },
1962 { "glLightf", 11, _gloffset_Lightf },
1963 { "glLightfv", 11, _gloffset_Lightfv },
1964 { "glLightx", 11, -1 },
1965 { "glLightxv", 11, -1 },
1966 { "glLineWidth", 11, _gloffset_LineWidth },
1967 { "glLineWidthx", 11, -1 },
1968 { "glLoadIdentity", 11, _gloffset_LoadIdentity },
1969 { "glLoadMatrixf", 11, _gloffset_LoadMatrixf },
1970 { "glLoadMatrixx", 11, -1 },
1971 { "glLogicOp", 11, _gloffset_LogicOp },
1972 { "glMapBufferOES", 11, -1 },
1973 { "glMapBufferRangeEXT", 11, -1 },
1974 { "glMaterialf", 11, _gloffset_Materialf },
1975 { "glMaterialfv", 11, _gloffset_Materialfv },
1976 { "glMaterialx", 11, -1 },
1977 { "glMaterialxv", 11, -1 },
1978 { "glMatrixMode", 11, _gloffset_MatrixMode },
1979 { "glMultMatrixf", 11, _gloffset_MultMatrixf },
1980 { "glMultMatrixx", 11, -1 },
1981 { "glMultiDrawArraysEXT", 11, -1 },
1982 { "glMultiDrawElementsEXT", 11, -1 },
1983 { "glMultiTexCoord4f", 11, _gloffset_MultiTexCoord4fARB },
1984 { "glMultiTexCoord4x", 11, -1 },
1985 { "glNormal3f", 11, _gloffset_Normal3f },
1986 { "glNormal3x", 11, -1 },
1987 { "glNormalPointer", 11, _gloffset_NormalPointer },
1988 { "glOrthof", 11, -1 },
1989 { "glOrthox", 11, -1 },
1990 { "glPixelStorei", 11, _gloffset_PixelStorei },
1991 { "glPointParameterf", 11, -1 },
1992 { "glPointParameterfv", 11, -1 },
1993 { "glPointParameterx", 11, -1 },
1994 { "glPointParameterxv", 11, -1 },
1995 { "glPointSize", 11, _gloffset_PointSize },
1996 { "glPointSizePointerOES", 11, -1 },
1997 { "glPointSizex", 11, -1 },
1998 { "glPolygonOffset", 11, _gloffset_PolygonOffset },
1999 { "glPolygonOffsetx", 11, -1 },
2000 { "glPopMatrix", 11, _gloffset_PopMatrix },
2001 { "glPushMatrix", 11, _gloffset_PushMatrix },
2002 { "glQueryMatrixxOES", 11, -1 },
2003 { "glReadPixels", 11, _gloffset_ReadPixels },
2004 { "glRenderbufferStorageOES", 11, -1 },
2005 { "glRotatef", 11, _gloffset_Rotatef },
2006 { "glRotatex", 11, -1 },
2007 { "glSampleCoverage", 11, -1 },
2008 { "glSampleCoveragex", 11, -1 },
2009 { "glScalef", 11, _gloffset_Scalef },
2010 { "glScalex", 11, -1 },
2011 { "glScissor", 11, _gloffset_Scissor },
2012 { "glShadeModel", 11, _gloffset_ShadeModel },
2013 { "glStencilFunc", 11, _gloffset_StencilFunc },
2014 { "glStencilMask", 11, _gloffset_StencilMask },
2015 { "glStencilOp", 11, _gloffset_StencilOp },
2016 { "glTexCoordPointer", 11, _gloffset_TexCoordPointer },
2017 { "glTexEnvf", 11, _gloffset_TexEnvf },
2018 { "glTexEnvfv", 11, _gloffset_TexEnvfv },
2019 { "glTexEnvi", 11, _gloffset_TexEnvi },
2020 { "glTexEnviv", 11, _gloffset_TexEnviv },
2021 { "glTexEnvx", 11, -1 },
2022 { "glTexEnvxv", 11, -1 },
2023 { "glTexGenfOES", 11, _gloffset_TexGenf },
2024 { "glTexGenfvOES", 11, _gloffset_TexGenfv },
2025 { "glTexGeniOES", 11, _gloffset_TexGeni },
2026 { "glTexGenivOES", 11, _gloffset_TexGeniv },
2027 { "glTexGenxOES", 11, -1 },
2028 { "glTexGenxvOES", 11, -1 },
2029 { "glTexImage2D", 11, _gloffset_TexImage2D },
2030 { "glTexParameterf", 11, _gloffset_TexParameterf },
2031 { "glTexParameterfv", 11, _gloffset_TexParameterfv },
2032 { "glTexParameteri", 11, _gloffset_TexParameteri },
2033 { "glTexParameteriv", 11, _gloffset_TexParameteriv },
2034 { "glTexParameterx", 11, -1 },
2035 { "glTexParameterxv", 11, -1 },
2036 { "glTexSubImage2D", 11, _gloffset_TexSubImage2D },
2037 { "glTranslatef", 11, _gloffset_Translatef },
2038 { "glTranslatex", 11, -1 },
2039 { "glUnmapBufferOES", 11, -1 },
2040 { "glVertexPointer", 11, _gloffset_VertexPointer },
2041 { "glViewport", 11, _gloffset_Viewport },
2042 { NULL, 0, -1 }
2043 };
2044
2045 const struct function gles2_functions_possible[] = {
2046 { "glActiveTexture", 20, _gloffset_ActiveTexture },
2047 { "glAttachShader", 20, -1 },
2048 { "glBindAttribLocation", 20, -1 },
2049 { "glBindBuffer", 20, -1 },
2050 { "glBindFramebuffer", 20, -1 },
2051 { "glBindRenderbuffer", 20, -1 },
2052 { "glBindTexture", 20, _gloffset_BindTexture },
2053 { "glBindVertexArrayOES", 20, -1 },
2054 { "glBlendColor", 20, _gloffset_BlendColor },
2055 { "glBlendEquation", 20, _gloffset_BlendEquation },
2056 { "glBlendEquationSeparate", 20, -1 },
2057 { "glBlendFunc", 20, _gloffset_BlendFunc },
2058 { "glBlendFuncSeparate", 20, -1 },
2059 { "glBufferData", 20, -1 },
2060 { "glBufferSubData", 20, -1 },
2061 { "glCheckFramebufferStatus", 20, -1 },
2062 { "glClear", 20, _gloffset_Clear },
2063 { "glClearColor", 20, _gloffset_ClearColor },
2064 { "glClearDepthf", 20, -1 },
2065 { "glClearStencil", 20, _gloffset_ClearStencil },
2066 { "glColorMask", 20, _gloffset_ColorMask },
2067 { "glCompileShader", 20, -1 },
2068 { "glCompressedTexImage2D", 20, -1 },
2069 { "glCompressedTexImage3DOES", 20, -1 },
2070 { "glCompressedTexSubImage2D", 20, -1 },
2071 { "glCompressedTexSubImage3DOES", 20, -1 },
2072 { "glCopyTexImage2D", 20, _gloffset_CopyTexImage2D },
2073 { "glCopyTexSubImage2D", 20, _gloffset_CopyTexSubImage2D },
2074 { "glCopyTexSubImage3DOES", 20, _gloffset_CopyTexSubImage3D },
2075 { "glCreateProgram", 20, -1 },
2076 { "glCreateShader", 20, -1 },
2077 { "glCullFace", 20, _gloffset_CullFace },
2078 { "glDeleteBuffers", 20, -1 },
2079 { "glDeleteFramebuffers", 20, -1 },
2080 { "glDeleteProgram", 20, -1 },
2081 { "glDeleteRenderbuffers", 20, -1 },
2082 { "glDeleteShader", 20, -1 },
2083 { "glDeleteTextures", 20, _gloffset_DeleteTextures },
2084 { "glDeleteVertexArraysOES", 20, -1 },
2085 { "glDepthFunc", 20, _gloffset_DepthFunc },
2086 { "glDepthMask", 20, _gloffset_DepthMask },
2087 { "glDepthRangef", 20, -1 },
2088 { "glDetachShader", 20, -1 },
2089 { "glDisable", 20, _gloffset_Disable },
2090 { "glDiscardFramebufferEXT", 20, -1 },
2091 { "glDisableVertexAttribArray", 20, -1 },
2092 { "glDrawArrays", 20, _gloffset_DrawArrays },
2093 { "glDrawBuffersNV", 20, -1 },
2094 { "glDrawElements", 20, _gloffset_DrawElements },
2095 { "glEGLImageTargetRenderbufferStorageOES", 20, -1 },
2096 { "glEGLImageTargetTexture2DOES", 20, -1 },
2097 { "glEnable", 20, _gloffset_Enable },
2098 { "glEnableVertexAttribArray", 20, -1 },
2099 { "glFinish", 20, _gloffset_Finish },
2100 { "glFlush", 20, _gloffset_Flush },
2101 { "glFlushMappedBufferRangeEXT", 20, -1 },
2102 { "glFramebufferRenderbuffer", 20, -1 },
2103 { "glFramebufferTexture2D", 20, -1 },
2104 { "glFramebufferTexture3DOES", 20, -1 },
2105 { "glFrontFace", 20, _gloffset_FrontFace },
2106 { "glGenBuffers", 20, -1 },
2107 { "glGenFramebuffers", 20, -1 },
2108 { "glGenRenderbuffers", 20, -1 },
2109 { "glGenTextures", 20, _gloffset_GenTextures },
2110 { "glGenVertexArraysOES", 20, -1 },
2111 { "glGenerateMipmap", 20, -1 },
2112 { "glGetActiveAttrib", 20, -1 },
2113 { "glGetActiveUniform", 20, -1 },
2114 { "glGetAttachedShaders", 20, -1 },
2115 { "glGetAttribLocation", 20, -1 },
2116 { "glGetBooleanv", 20, _gloffset_GetBooleanv },
2117 { "glGetBufferParameteriv", 20, -1 },
2118 { "glGetBufferPointervOES", 20, -1 },
2119 { "glGetError", 20, _gloffset_GetError },
2120 { "glGetFloatv", 20, _gloffset_GetFloatv },
2121 { "glGetFramebufferAttachmentParameteriv", 20, -1 },
2122 { "glGetIntegerv", 20, _gloffset_GetIntegerv },
2123 { "glGetProgramInfoLog", 20, -1 },
2124 { "glGetProgramiv", 20, -1 },
2125 { "glGetRenderbufferParameteriv", 20, -1 },
2126 { "glGetShaderInfoLog", 20, -1 },
2127 { "glGetShaderPrecisionFormat", 20, -1 },
2128 { "glGetShaderSource", 20, -1 },
2129 { "glGetShaderiv", 20, -1 },
2130 { "glGetString", 20, _gloffset_GetString },
2131 { "glGetTexParameterfv", 20, _gloffset_GetTexParameterfv },
2132 { "glGetTexParameteriv", 20, _gloffset_GetTexParameteriv },
2133 { "glGetUniformLocation", 20, -1 },
2134 { "glGetUniformfv", 20, -1 },
2135 { "glGetUniformiv", 20, -1 },
2136 { "glGetVertexAttribPointerv", 20, -1 },
2137 { "glGetVertexAttribfv", 20, -1 },
2138 { "glGetVertexAttribiv", 20, -1 },
2139 { "glHint", 20, _gloffset_Hint },
2140 { "glIsBuffer", 20, -1 },
2141 { "glIsEnabled", 20, _gloffset_IsEnabled },
2142 { "glIsFramebuffer", 20, -1 },
2143 { "glIsProgram", 20, -1 },
2144 { "glIsRenderbuffer", 20, -1 },
2145 { "glIsShader", 20, -1 },
2146 { "glIsTexture", 20, _gloffset_IsTexture },
2147 { "glIsVertexArrayOES", 20, -1 },
2148 { "glLineWidth", 20, _gloffset_LineWidth },
2149 { "glLinkProgram", 20, -1 },
2150 { "glMapBufferOES", 20, -1 },
2151 { "glMapBufferRangeEXT", 20, -1 },
2152 { "glMultiDrawArraysEXT", 20, -1 },
2153 { "glMultiDrawElementsEXT", 20, -1 },
2154 { "glPixelStorei", 20, _gloffset_PixelStorei },
2155 { "glPolygonOffset", 20, _gloffset_PolygonOffset },
2156 { "glReadBufferNV", 20, _gloffset_ReadBuffer },
2157 { "glReadPixels", 20, _gloffset_ReadPixels },
2158 { "glReleaseShaderCompiler", 20, -1 },
2159 { "glRenderbufferStorage", 20, -1 },
2160 { "glSampleCoverage", 20, -1 },
2161 { "glScissor", 20, _gloffset_Scissor },
2162 { "glShaderBinary", 20, -1 },
2163 { "glShaderSource", 20, -1 },
2164 { "glStencilFunc", 20, _gloffset_StencilFunc },
2165 { "glStencilFuncSeparate", 20, -1 },
2166 { "glStencilMask", 20, _gloffset_StencilMask },
2167 { "glStencilMaskSeparate", 20, -1 },
2168 { "glStencilOp", 20, _gloffset_StencilOp },
2169 { "glStencilOpSeparate", 20, -1 },
2170 { "glTexImage2D", 20, _gloffset_TexImage2D },
2171 { "glTexImage3DOES", 20, _gloffset_TexImage3D },
2172 { "glTexParameterf", 20, _gloffset_TexParameterf },
2173 { "glTexParameterfv", 20, _gloffset_TexParameterfv },
2174 { "glTexParameteri", 20, _gloffset_TexParameteri },
2175 { "glTexParameteriv", 20, _gloffset_TexParameteriv },
2176 { "glTexSubImage2D", 20, _gloffset_TexSubImage2D },
2177 { "glTexSubImage3DOES", 20, _gloffset_TexSubImage3D },
2178 { "glUniform1f", 20, -1 },
2179 { "glUniform1fv", 20, -1 },
2180 { "glUniform1i", 20, -1 },
2181 { "glUniform1iv", 20, -1 },
2182 { "glUniform2f", 20, -1 },
2183 { "glUniform2fv", 20, -1 },
2184 { "glUniform2i", 20, -1 },
2185 { "glUniform2iv", 20, -1 },
2186 { "glUniform3f", 20, -1 },
2187 { "glUniform3fv", 20, -1 },
2188 { "glUniform3i", 20, -1 },
2189 { "glUniform3iv", 20, -1 },
2190 { "glUniform4f", 20, -1 },
2191 { "glUniform4fv", 20, -1 },
2192 { "glUniform4i", 20, -1 },
2193 { "glUniform4iv", 20, -1 },
2194 { "glUniformMatrix2fv", 20, -1 },
2195 { "glUniformMatrix3fv", 20, -1 },
2196 { "glUniformMatrix4fv", 20, -1 },
2197 { "glUnmapBufferOES", 20, -1 },
2198 { "glUseProgram", 20, -1 },
2199 { "glValidateProgram", 20, -1 },
2200 { "glVertexAttrib1f", 20, -1 },
2201 { "glVertexAttrib1fv", 20, -1 },
2202 { "glVertexAttrib2f", 20, -1 },
2203 { "glVertexAttrib2fv", 20, -1 },
2204 { "glVertexAttrib3f", 20, -1 },
2205 { "glVertexAttrib3fv", 20, -1 },
2206 { "glVertexAttrib4f", 20, -1 },
2207 { "glVertexAttrib4fv", 20, -1 },
2208 { "glVertexAttribPointer", 20, -1 },
2209 { "glViewport", 20, _gloffset_Viewport },
2210
2211 /* GL_OES_get_program_binary - Also part of OpenGL ES 3.0. */
2212 { "glGetProgramBinaryOES", 20, -1 },
2213 { "glProgramBinaryOES", 20, -1 },
2214
2215 /* GL_EXT_separate_shader_objects - Also part of OpenGL ES 3.1. */
2216 { "glProgramParameteriEXT", 20, -1 },
2217 { "glUseProgramStagesEXT", 20, -1 },
2218 { "glActiveShaderProgramEXT", 20, -1 },
2219 { "glCreateShaderProgramvEXT", 20, -1 },
2220 { "glBindProgramPipelineEXT", 20, -1 },
2221 { "glDeleteProgramPipelinesEXT", 20, -1 },
2222 { "glGenProgramPipelinesEXT", 20, -1 },
2223 { "glIsProgramPipelineEXT", 20, -1 },
2224 { "glGetProgramPipelineivEXT", 20, -1 },
2225 { "glProgramUniform1iEXT", 20, -1 },
2226 { "glProgramUniform1ivEXT", 20, -1 },
2227 { "glProgramUniform1fEXT", 20, -1 },
2228 { "glProgramUniform1fvEXT", 20, -1 },
2229 { "glProgramUniform2iEXT", 20, -1 },
2230 { "glProgramUniform2ivEXT", 20, -1 },
2231 { "glProgramUniform2fEXT", 20, -1 },
2232 { "glProgramUniform2fvEXT", 20, -1 },
2233 { "glProgramUniform3iEXT", 20, -1 },
2234 { "glProgramUniform3ivEXT", 20, -1 },
2235 { "glProgramUniform3fEXT", 20, -1 },
2236 { "glProgramUniform3fvEXT", 20, -1 },
2237 { "glProgramUniform4iEXT", 20, -1 },
2238 { "glProgramUniform4ivEXT", 20, -1 },
2239 { "glProgramUniform4fEXT", 20, -1 },
2240 { "glProgramUniform4fvEXT", 20, -1 },
2241 { "glProgramUniformMatrix2fvEXT", 20, -1 },
2242 { "glProgramUniformMatrix3fvEXT", 20, -1 },
2243 { "glProgramUniformMatrix4fvEXT", 20, -1 },
2244 { "glProgramUniformMatrix2x3fvEXT", 20, -1 },
2245 { "glProgramUniformMatrix3x2fvEXT", 20, -1 },
2246 { "glProgramUniformMatrix2x4fvEXT", 20, -1 },
2247 { "glProgramUniformMatrix4x2fvEXT", 20, -1 },
2248 { "glProgramUniformMatrix3x4fvEXT", 20, -1 },
2249 { "glProgramUniformMatrix4x3fvEXT", 20, -1 },
2250 { "glValidateProgramPipelineEXT", 20, -1 },
2251 { "glGetProgramPipelineInfoLogEXT", 20, -1 },
2252
2253 /* GL_INTEL_performance_query */
2254 { "glGetFirstPerfQueryIdINTEL", 20, -1 },
2255 { "glGetNextPerfQueryIdINTEL", 20, -1 },
2256 { "glGetPerfQueryIdByNameINTEL", 20, -1 },
2257 { "glGetPerfQueryInfoINTEL", 20, -1 },
2258 { "glGetPerfCounterInfoINTEL", 20, -1 },
2259 { "glCreatePerfQueryINTEL", 20, -1 },
2260 { "glDeletePerfQueryINTEL", 20, -1 },
2261 { "glBeginPerfQueryINTEL", 20, -1 },
2262 { "glEndPerfQueryINTEL", 20, -1 },
2263 { "glGetPerfQueryDataINTEL", 20, -1 },
2264
2265 { NULL, 0, -1 }
2266 };
2267
2268 const struct function gles3_functions_possible[] = {
2269 { "glBeginQuery", 30, -1 },
2270 { "glBeginTransformFeedback", 30, -1 },
2271 { "glBindBufferBase", 30, -1 },
2272 { "glBindBufferRange", 30, -1 },
2273 { "glBindSampler", 30, -1 },
2274 { "glBindTransformFeedback", 30, -1 },
2275 // We check for the aliased -OES version in GLES 2
2276 // { "glBindVertexArray", 30, -1 },
2277 { "glBlitFramebuffer", 30, -1 },
2278 { "glClearBufferfi", 30, -1 },
2279 { "glClearBufferfv", 30, -1 },
2280 { "glClearBufferiv", 30, -1 },
2281 { "glClearBufferuiv", 30, -1 },
2282 { "glClientWaitSync", 30, -1 },
2283 // We check for the aliased -OES version in GLES 2
2284 // { "glCompressedTexImage3D", 30, -1 },
2285 // We check for the aliased -OES version in GLES 2
2286 // { "glCompressedTexSubImage3D", 30, -1 },
2287 { "glCopyBufferSubData", 30, -1 },
2288 // We check for the aliased -OES version in GLES 2
2289 // { "glCopyTexSubImage3D", 30, -1 },
2290 { "glDeleteQueries", 30, -1 },
2291 { "glDeleteSamplers", 30, -1 },
2292 { "glDeleteSync", 30, -1 },
2293 { "glDeleteTransformFeedbacks", 30, -1 },
2294 // We check for the aliased -OES version in GLES 2
2295 // { "glDeleteVertexArrays", 30, -1 },
2296 { "glDrawArraysInstanced", 30, -1 },
2297 // We check for the aliased -NV version in GLES 2
2298 // { "glDrawBuffers", 30, -1 },
2299 { "glDrawElementsInstanced", 30, -1 },
2300 { "glDrawRangeElements", 30, -1 },
2301 { "glEndQuery", 30, -1 },
2302 { "glEndTransformFeedback", 30, -1 },
2303 { "glFenceSync", 30, -1 },
2304 // We check for the aliased -EXT version in GLES 2
2305 // { "glFlushMappedBufferRange", 30, -1 },
2306 { "glFramebufferTextureLayer", 30, -1 },
2307 { "glGenQueries", 30, -1 },
2308 { "glGenSamplers", 30, -1 },
2309 { "glGenTransformFeedbacks", 30, -1 },
2310 // We check for the aliased -OES version in GLES 2
2311 // { "glGenVertexArrays", 30, -1 },
2312 { "glGetActiveUniformBlockiv", 30, -1 },
2313 { "glGetActiveUniformBlockName", 30, -1 },
2314 { "glGetActiveUniformsiv", 30, -1 },
2315 { "glGetBufferParameteri64v", 30, -1 },
2316 // We check for the aliased -OES version in GLES 2
2317 // { "glGetBufferPointerv", 30, -1 },
2318 { "glGetFragDataLocation", 30, -1 },
2319 { "glGetInteger64i_v", 30, -1 },
2320 { "glGetInteger64v", 30, -1 },
2321 { "glGetIntegeri_v", 30, -1 },
2322 { "glGetInternalformativ", 30, -1 },
2323 // glGetProgramBinary aliases glGetProgramBinaryOES in GLES 2
2324 { "glGetQueryiv", 30, -1 },
2325 { "glGetQueryObjectuiv", 30, -1 },
2326 { "glGetSamplerParameterfv", 30, -1 },
2327 { "glGetSamplerParameteriv", 30, -1 },
2328 { "glGetStringi", 30, -1 },
2329 { "glGetSynciv", 30, -1 },
2330 { "glGetTransformFeedbackVarying", 30, -1 },
2331 { "glGetUniformBlockIndex", 30, -1 },
2332 { "glGetUniformIndices", 30, -1 },
2333 { "glGetUniformuiv", 30, -1 },
2334 { "glGetVertexAttribIiv", 30, -1 },
2335 { "glGetVertexAttribIuiv", 30, -1 },
2336 { "glInvalidateFramebuffer", 30, -1 },
2337 { "glInvalidateSubFramebuffer", 30, -1 },
2338 { "glIsQuery", 30, -1 },
2339 { "glIsSampler", 30, -1 },
2340 { "glIsSync", 30, -1 },
2341 { "glIsTransformFeedback", 30, -1 },
2342 // We check for the aliased -OES version in GLES 2
2343 // { "glIsVertexArray", 30, -1 },
2344 // We check for the aliased -EXT version in GLES 2
2345 // { "glMapBufferRange", 30, -1 },
2346 { "glPauseTransformFeedback", 30, -1 },
2347 // glProgramBinary aliases glProgramBinaryOES in GLES 2
2348 // glProgramParameteri aliases glProgramParameteriEXT in GLES 2
2349 // We check for the aliased -NV version in GLES 2
2350 // { "glReadBuffer", 30, -1 },
2351 { "glRenderbufferStorageMultisample", 30, -1 },
2352 { "glResumeTransformFeedback", 30, -1 },
2353 { "glSamplerParameterf", 30, -1 },
2354 { "glSamplerParameterfv", 30, -1 },
2355 { "glSamplerParameteri", 30, -1 },
2356 { "glSamplerParameteriv", 30, -1 },
2357 // We check for the aliased -OES version in GLES 2
2358 // { "glTexImage3D", 30, -1 },
2359 { "glTexStorage2D", 30, -1 },
2360 { "glTexStorage3D", 30, -1 },
2361 // We check for the aliased -OES version in GLES 2
2362 // { "glTexSubImage3D", 30, -1 },
2363 { "glTransformFeedbackVaryings", 30, -1 },
2364 { "glUniform1ui", 30, -1 },
2365 { "glUniform1uiv", 30, -1 },
2366 { "glUniform2ui", 30, -1 },
2367 { "glUniform2uiv", 30, -1 },
2368 { "glUniform3ui", 30, -1 },
2369 { "glUniform3uiv", 30, -1 },
2370 { "glUniform4ui", 30, -1 },
2371 { "glUniform4uiv", 30, -1 },
2372 { "glUniformBlockBinding", 30, -1 },
2373 { "glUniformMatrix2x3fv", 30, -1 },
2374 { "glUniformMatrix2x4fv", 30, -1 },
2375 { "glUniformMatrix3x2fv", 30, -1 },
2376 { "glUniformMatrix3x4fv", 30, -1 },
2377 { "glUniformMatrix4x2fv", 30, -1 },
2378 { "glUniformMatrix4x3fv", 30, -1 },
2379 // We check for the aliased -OES version in GLES 2
2380 // { "glUnmapBuffer", 30, -1 },
2381 { "glVertexAttribDivisor", 30, -1 },
2382 { "glVertexAttribI4i", 30, -1 },
2383 { "glVertexAttribI4iv", 30, -1 },
2384 { "glVertexAttribI4ui", 30, -1 },
2385 { "glVertexAttribI4uiv", 30, -1 },
2386 { "glVertexAttribIPointer", 30, -1 },
2387 { "glWaitSync", 30, -1 },
2388
2389 /* GL_EXT_separate_shader_objects - Also part of OpenGL ES 3.1. */
2390 { "glProgramUniform1uiEXT", 30, -1 },
2391 { "glProgramUniform1uivEXT", 30, -1 },
2392 { "glProgramUniform2uiEXT", 30, -1 },
2393 { "glProgramUniform2uivEXT", 30, -1 },
2394 { "glProgramUniform3uiEXT", 30, -1 },
2395 { "glProgramUniform3uivEXT", 30, -1 },
2396 { "glProgramUniform4uiEXT", 30, -1 },
2397 { "glProgramUniform4uivEXT", 30, -1 },
2398
2399 { NULL, 0, -1 }
2400 };
2401
2402 const struct function gles31_functions_possible[] = {
2403 { "glDispatchCompute", 31, -1 },
2404 { "glDispatchComputeIndirect", 31, -1 },
2405 { "glDrawArraysIndirect", 31, -1 },
2406 { "glDrawElementsIndirect", 31, -1 },
2407
2408 { "glFramebufferParameteri", 31, -1 },
2409 { "glGetFramebufferParameteriv", 31, -1 },
2410
2411 { "glGetProgramInterfaceiv", 31, -1 },
2412 { "glGetProgramResourceIndex", 31, -1 },
2413 { "glGetProgramResourceName", 31, -1 },
2414 { "glGetProgramResourceiv", 31, -1 },
2415 { "glGetProgramResourceLocation", 31, -1 },
2416
2417 // We check for the aliased EXT versions in GLES 2
2418 // { "glUseProgramStages", 31, -1 },
2419 // { "glActiveShaderProgram", 31, -1 },
2420 // { "glCreateShaderProgramv", 31, -1 },
2421 // { "glBindProgramPipeline", 31, -1 },
2422 // { "glDeleteProgramPipelines", 31, -1 },
2423 // { "glGenProgramPipelines", 31, -1 },
2424 // { "glIsProgramPipeline", 31, -1 },
2425 // { "glGetProgramPipelineiv", 31, -1 },
2426 // { "glProgramUniform1i", 31, -1 },
2427 // { "glProgramUniform2i", 31, -1 },
2428 // { "glProgramUniform3i", 31, -1 },
2429 // { "glProgramUniform4i", 31, -1 },
2430 // { "glProgramUniform1f", 31, -1 },
2431 // { "glProgramUniform2f", 31, -1 },
2432 // { "glProgramUniform3f", 31, -1 },
2433 // { "glProgramUniform4f", 31, -1 },
2434 // { "glProgramUniform1iv", 31, -1 },
2435 // { "glProgramUniform2iv", 31, -1 },
2436 // { "glProgramUniform3iv", 31, -1 },
2437 // { "glProgramUniform4iv", 31, -1 },
2438 // { "glProgramUniform1fv", 31, -1 },
2439 // { "glProgramUniform2fv", 31, -1 },
2440 // { "glProgramUniform3fv", 31, -1 },
2441 // { "glProgramUniform4fv", 31, -1 },
2442 // { "glProgramUniformMatrix2fv", 31, -1 },
2443 // { "glProgramUniformMatrix3fv", 31, -1 },
2444 // { "glProgramUniformMatrix4fv", 31, -1 },
2445 // { "glProgramUniformMatrix2x3fv", 31, -1 },
2446 // { "glProgramUniformMatrix3x2fv", 31, -1 },
2447 // { "glProgramUniformMatrix2x4fv", 31, -1 },
2448 // { "glProgramUniformMatrix4x2fv", 31, -1 },
2449 // { "glProgramUniformMatrix3x4fv", 31, -1 },
2450 // { "glProgramUniformMatrix4x3fv", 31, -1 },
2451 // { "glValidateProgramPipeline", 31, -1 },
2452 // { "glGetProgramPipelineInfoLog", 31, -1 },
2453
2454 // We check for the aliased EXT versions in GLES 3
2455 // { "glProgramUniform1ui", 31, -1 },
2456 // { "glProgramUniform2ui", 31, -1 },
2457 // { "glProgramUniform3ui", 31, -1 },
2458 // { "glProgramUniform4ui", 31, -1 },
2459 // { "glProgramUniform1uiv", 31, -1 },
2460 // { "glProgramUniform2uiv", 31, -1 },
2461 // { "glProgramUniform3uiv", 31, -1 },
2462 // { "glProgramUniform4uiv", 31, -1 },
2463
2464 { "glBindImageTexture", 31, -1 },
2465 { "glGetBooleani_v", 31, -1 },
2466 { "glMemoryBarrier", 31, -1 },
2467
2468 { "glMemoryBarrierByRegion", 31, -1 },
2469
2470 { "glTexStorage2DMultisample", 31, -1 },
2471 { "glGetMultisamplefv", 31, -1 },
2472 { "glSampleMaski", 31, -1 },
2473 { "glGetTexLevelParameteriv", 31, -1 },
2474 { "glGetTexLevelParameterfv", 31, -1 },
2475 { "glBindVertexBuffer", 31, -1 },
2476 { "glVertexAttribFormat", 31, -1 },
2477 { "glVertexAttribIFormat", 31, -1 },
2478 { "glVertexAttribBinding", 31, -1 },
2479 { "glVertexBindingDivisor", 31, -1 },
2480
2481 /* GL_OES_texture_storage_multisample_2d_array */
2482 { "glTexStorage3DMultisampleOES", 31, -1 },
2483
2484 { NULL, 0, -1 },
2485 };