• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_gl_dispatch_table.py using data from gl_bindings_data.json and gl.xml.
3 //
4 // Copyright 2020 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // DispatchTableGL_autogen.cpp:
9 //   Initialize the native bindings for ANGLE's OpenGL back-end.
10 
11 #include "libANGLE/renderer/gl/DispatchTableGL_autogen.h"
12 
13 #include "libANGLE/Version.h"
14 #include "libANGLE/renderer/gl/FunctionsGL.h"
15 
16 #if defined(ANGLE_ENABLE_OPENGL_NULL)
17 #    include "libANGLE/renderer/gl/null_functions.h"
18 #endif  // defined(ANGLE_ENABLE_OPENGL_NULL)
19 
20 // Check for nullptr so extensions do not overwrite core imports.
21 #define ASSIGN(NAME, FP) \
22     if (!FP)             \
23     FP = reinterpret_cast<decltype(FP)>(loadProcAddress(NAME))
24 
25 namespace rx
26 {
27 DispatchTableGL::DispatchTableGL() = default;
28 
initProcsDesktopGL(const gl::Version & version,const std::set<std::string> & extensions)29 void DispatchTableGL::initProcsDesktopGL(const gl::Version &version,
30                                          const std::set<std::string> &extensions)
31 {
32     if (version >= gl::Version(1, 0))
33     {
34         ASSIGN("glBlendFunc", blendFunc);
35         ASSIGN("glClear", clear);
36         ASSIGN("glClearColor", clearColor);
37         ASSIGN("glClearDepth", clearDepth);
38         ASSIGN("glClearStencil", clearStencil);
39         ASSIGN("glColorMask", colorMask);
40         ASSIGN("glCullFace", cullFace);
41         ASSIGN("glDepthFunc", depthFunc);
42         ASSIGN("glDepthMask", depthMask);
43         ASSIGN("glDepthRange", depthRange);
44         ASSIGN("glDisable", disable);
45         ASSIGN("glDrawBuffer", drawBuffer);
46         ASSIGN("glEnable", enable);
47         ASSIGN("glFinish", finish);
48         ASSIGN("glFlush", flush);
49         ASSIGN("glFrontFace", frontFace);
50         ASSIGN("glGetBooleanv", getBooleanv);
51         ASSIGN("glGetDoublev", getDoublev);
52         ASSIGN("glGetError", getError);
53         ASSIGN("glGetFloatv", getFloatv);
54         ASSIGN("glGetIntegerv", getIntegerv);
55         ASSIGN("glGetString", getString);
56         ASSIGN("glGetTexImage", getTexImage);
57         ASSIGN("glGetTexLevelParameterfv", getTexLevelParameterfv);
58         ASSIGN("glGetTexLevelParameteriv", getTexLevelParameteriv);
59         ASSIGN("glGetTexParameterfv", getTexParameterfv);
60         ASSIGN("glGetTexParameteriv", getTexParameteriv);
61         ASSIGN("glHint", hint);
62         ASSIGN("glIsEnabled", isEnabled);
63         ASSIGN("glLineWidth", lineWidth);
64         ASSIGN("glLogicOp", logicOp);
65         ASSIGN("glPixelStoref", pixelStoref);
66         ASSIGN("glPixelStorei", pixelStorei);
67         ASSIGN("glPointSize", pointSize);
68         ASSIGN("glPolygonMode", polygonMode);
69         ASSIGN("glReadBuffer", readBuffer);
70         ASSIGN("glReadPixels", readPixels);
71         ASSIGN("glScissor", scissor);
72         ASSIGN("glStencilFunc", stencilFunc);
73         ASSIGN("glStencilMask", stencilMask);
74         ASSIGN("glStencilOp", stencilOp);
75         ASSIGN("glTexImage1D", texImage1D);
76         ASSIGN("glTexImage2D", texImage2D);
77         ASSIGN("glTexParameterf", texParameterf);
78         ASSIGN("glTexParameterfv", texParameterfv);
79         ASSIGN("glTexParameteri", texParameteri);
80         ASSIGN("glTexParameteriv", texParameteriv);
81         ASSIGN("glViewport", viewport);
82     }
83 
84     if (version >= gl::Version(1, 1))
85     {
86         ASSIGN("glBindTexture", bindTexture);
87         ASSIGN("glCopyTexImage1D", copyTexImage1D);
88         ASSIGN("glCopyTexImage2D", copyTexImage2D);
89         ASSIGN("glCopyTexSubImage1D", copyTexSubImage1D);
90         ASSIGN("glCopyTexSubImage2D", copyTexSubImage2D);
91         ASSIGN("glDeleteTextures", deleteTextures);
92         ASSIGN("glDrawArrays", drawArrays);
93         ASSIGN("glDrawElements", drawElements);
94         ASSIGN("glGenTextures", genTextures);
95         ASSIGN("glIsTexture", isTexture);
96         ASSIGN("glPolygonOffset", polygonOffset);
97         ASSIGN("glTexSubImage1D", texSubImage1D);
98         ASSIGN("glTexSubImage2D", texSubImage2D);
99     }
100 
101     if (version >= gl::Version(1, 2))
102     {
103         ASSIGN("glCopyTexSubImage3D", copyTexSubImage3D);
104         ASSIGN("glDrawRangeElements", drawRangeElements);
105         ASSIGN("glTexImage3D", texImage3D);
106         ASSIGN("glTexSubImage3D", texSubImage3D);
107     }
108 
109     if (version >= gl::Version(1, 3))
110     {
111         ASSIGN("glActiveTexture", activeTexture);
112         ASSIGN("glCompressedTexImage1D", compressedTexImage1D);
113         ASSIGN("glCompressedTexImage2D", compressedTexImage2D);
114         ASSIGN("glCompressedTexImage3D", compressedTexImage3D);
115         ASSIGN("glCompressedTexSubImage1D", compressedTexSubImage1D);
116         ASSIGN("glCompressedTexSubImage2D", compressedTexSubImage2D);
117         ASSIGN("glCompressedTexSubImage3D", compressedTexSubImage3D);
118         ASSIGN("glGetCompressedTexImage", getCompressedTexImage);
119         ASSIGN("glSampleCoverage", sampleCoverage);
120     }
121 
122     if (version >= gl::Version(1, 4))
123     {
124         ASSIGN("glBlendColor", blendColor);
125         ASSIGN("glBlendEquation", blendEquation);
126         ASSIGN("glBlendFuncSeparate", blendFuncSeparate);
127         ASSIGN("glMultiDrawArrays", multiDrawArrays);
128         ASSIGN("glMultiDrawElements", multiDrawElements);
129         ASSIGN("glPointParameterf", pointParameterf);
130         ASSIGN("glPointParameterfv", pointParameterfv);
131         ASSIGN("glPointParameteri", pointParameteri);
132         ASSIGN("glPointParameteriv", pointParameteriv);
133     }
134 
135     if (version >= gl::Version(1, 5))
136     {
137         ASSIGN("glBeginQuery", beginQuery);
138         ASSIGN("glBindBuffer", bindBuffer);
139         ASSIGN("glBufferData", bufferData);
140         ASSIGN("glBufferSubData", bufferSubData);
141         ASSIGN("glDeleteBuffers", deleteBuffers);
142         ASSIGN("glDeleteQueries", deleteQueries);
143         ASSIGN("glEndQuery", endQuery);
144         ASSIGN("glGenBuffers", genBuffers);
145         ASSIGN("glGenQueries", genQueries);
146         ASSIGN("glGetBufferParameteriv", getBufferParameteriv);
147         ASSIGN("glGetBufferPointerv", getBufferPointerv);
148         ASSIGN("glGetBufferSubData", getBufferSubData);
149         ASSIGN("glGetQueryObjectiv", getQueryObjectiv);
150         ASSIGN("glGetQueryObjectuiv", getQueryObjectuiv);
151         ASSIGN("glGetQueryiv", getQueryiv);
152         ASSIGN("glIsBuffer", isBuffer);
153         ASSIGN("glIsQuery", isQuery);
154         ASSIGN("glMapBuffer", mapBuffer);
155         ASSIGN("glUnmapBuffer", unmapBuffer);
156     }
157 
158     if (version >= gl::Version(2, 0))
159     {
160         ASSIGN("glAttachShader", attachShader);
161         ASSIGN("glBindAttribLocation", bindAttribLocation);
162         ASSIGN("glBlendEquationSeparate", blendEquationSeparate);
163         ASSIGN("glCompileShader", compileShader);
164         ASSIGN("glCreateProgram", createProgram);
165         ASSIGN("glCreateShader", createShader);
166         ASSIGN("glDeleteProgram", deleteProgram);
167         ASSIGN("glDeleteShader", deleteShader);
168         ASSIGN("glDetachShader", detachShader);
169         ASSIGN("glDisableVertexAttribArray", disableVertexAttribArray);
170         ASSIGN("glDrawBuffers", drawBuffers);
171         ASSIGN("glEnableVertexAttribArray", enableVertexAttribArray);
172         ASSIGN("glGetActiveAttrib", getActiveAttrib);
173         ASSIGN("glGetActiveUniform", getActiveUniform);
174         ASSIGN("glGetAttachedShaders", getAttachedShaders);
175         ASSIGN("glGetAttribLocation", getAttribLocation);
176         ASSIGN("glGetProgramInfoLog", getProgramInfoLog);
177         ASSIGN("glGetProgramiv", getProgramiv);
178         ASSIGN("glGetShaderInfoLog", getShaderInfoLog);
179         ASSIGN("glGetShaderSource", getShaderSource);
180         ASSIGN("glGetShaderiv", getShaderiv);
181         ASSIGN("glGetUniformLocation", getUniformLocation);
182         ASSIGN("glGetUniformfv", getUniformfv);
183         ASSIGN("glGetUniformiv", getUniformiv);
184         ASSIGN("glGetVertexAttribPointerv", getVertexAttribPointerv);
185         ASSIGN("glGetVertexAttribdv", getVertexAttribdv);
186         ASSIGN("glGetVertexAttribfv", getVertexAttribfv);
187         ASSIGN("glGetVertexAttribiv", getVertexAttribiv);
188         ASSIGN("glIsProgram", isProgram);
189         ASSIGN("glIsShader", isShader);
190         ASSIGN("glLinkProgram", linkProgram);
191         ASSIGN("glShaderSource", shaderSource);
192         ASSIGN("glStencilFuncSeparate", stencilFuncSeparate);
193         ASSIGN("glStencilMaskSeparate", stencilMaskSeparate);
194         ASSIGN("glStencilOpSeparate", stencilOpSeparate);
195         ASSIGN("glUniform1f", uniform1f);
196         ASSIGN("glUniform1fv", uniform1fv);
197         ASSIGN("glUniform1i", uniform1i);
198         ASSIGN("glUniform1iv", uniform1iv);
199         ASSIGN("glUniform2f", uniform2f);
200         ASSIGN("glUniform2fv", uniform2fv);
201         ASSIGN("glUniform2i", uniform2i);
202         ASSIGN("glUniform2iv", uniform2iv);
203         ASSIGN("glUniform3f", uniform3f);
204         ASSIGN("glUniform3fv", uniform3fv);
205         ASSIGN("glUniform3i", uniform3i);
206         ASSIGN("glUniform3iv", uniform3iv);
207         ASSIGN("glUniform4f", uniform4f);
208         ASSIGN("glUniform4fv", uniform4fv);
209         ASSIGN("glUniform4i", uniform4i);
210         ASSIGN("glUniform4iv", uniform4iv);
211         ASSIGN("glUniformMatrix2fv", uniformMatrix2fv);
212         ASSIGN("glUniformMatrix3fv", uniformMatrix3fv);
213         ASSIGN("glUniformMatrix4fv", uniformMatrix4fv);
214         ASSIGN("glUseProgram", useProgram);
215         ASSIGN("glValidateProgram", validateProgram);
216         ASSIGN("glVertexAttrib1d", vertexAttrib1d);
217         ASSIGN("glVertexAttrib1dv", vertexAttrib1dv);
218         ASSIGN("glVertexAttrib1f", vertexAttrib1f);
219         ASSIGN("glVertexAttrib1fv", vertexAttrib1fv);
220         ASSIGN("glVertexAttrib1s", vertexAttrib1s);
221         ASSIGN("glVertexAttrib1sv", vertexAttrib1sv);
222         ASSIGN("glVertexAttrib2d", vertexAttrib2d);
223         ASSIGN("glVertexAttrib2dv", vertexAttrib2dv);
224         ASSIGN("glVertexAttrib2f", vertexAttrib2f);
225         ASSIGN("glVertexAttrib2fv", vertexAttrib2fv);
226         ASSIGN("glVertexAttrib2s", vertexAttrib2s);
227         ASSIGN("glVertexAttrib2sv", vertexAttrib2sv);
228         ASSIGN("glVertexAttrib3d", vertexAttrib3d);
229         ASSIGN("glVertexAttrib3dv", vertexAttrib3dv);
230         ASSIGN("glVertexAttrib3f", vertexAttrib3f);
231         ASSIGN("glVertexAttrib3fv", vertexAttrib3fv);
232         ASSIGN("glVertexAttrib3s", vertexAttrib3s);
233         ASSIGN("glVertexAttrib3sv", vertexAttrib3sv);
234         ASSIGN("glVertexAttrib4Nbv", vertexAttrib4Nbv);
235         ASSIGN("glVertexAttrib4Niv", vertexAttrib4Niv);
236         ASSIGN("glVertexAttrib4Nsv", vertexAttrib4Nsv);
237         ASSIGN("glVertexAttrib4Nub", vertexAttrib4Nub);
238         ASSIGN("glVertexAttrib4Nubv", vertexAttrib4Nubv);
239         ASSIGN("glVertexAttrib4Nuiv", vertexAttrib4Nuiv);
240         ASSIGN("glVertexAttrib4Nusv", vertexAttrib4Nusv);
241         ASSIGN("glVertexAttrib4bv", vertexAttrib4bv);
242         ASSIGN("glVertexAttrib4d", vertexAttrib4d);
243         ASSIGN("glVertexAttrib4dv", vertexAttrib4dv);
244         ASSIGN("glVertexAttrib4f", vertexAttrib4f);
245         ASSIGN("glVertexAttrib4fv", vertexAttrib4fv);
246         ASSIGN("glVertexAttrib4iv", vertexAttrib4iv);
247         ASSIGN("glVertexAttrib4s", vertexAttrib4s);
248         ASSIGN("glVertexAttrib4sv", vertexAttrib4sv);
249         ASSIGN("glVertexAttrib4ubv", vertexAttrib4ubv);
250         ASSIGN("glVertexAttrib4uiv", vertexAttrib4uiv);
251         ASSIGN("glVertexAttrib4usv", vertexAttrib4usv);
252         ASSIGN("glVertexAttribPointer", vertexAttribPointer);
253     }
254 
255     if (version >= gl::Version(2, 1))
256     {
257         ASSIGN("glUniformMatrix2x3fv", uniformMatrix2x3fv);
258         ASSIGN("glUniformMatrix2x4fv", uniformMatrix2x4fv);
259         ASSIGN("glUniformMatrix3x2fv", uniformMatrix3x2fv);
260         ASSIGN("glUniformMatrix3x4fv", uniformMatrix3x4fv);
261         ASSIGN("glUniformMatrix4x2fv", uniformMatrix4x2fv);
262         ASSIGN("glUniformMatrix4x3fv", uniformMatrix4x3fv);
263     }
264 
265     if (version >= gl::Version(3, 0))
266     {
267         ASSIGN("glBeginConditionalRender", beginConditionalRender);
268         ASSIGN("glBeginTransformFeedback", beginTransformFeedback);
269         ASSIGN("glBindBufferBase", bindBufferBase);
270         ASSIGN("glBindBufferRange", bindBufferRange);
271         ASSIGN("glBindFragDataLocation", bindFragDataLocation);
272         ASSIGN("glBindFramebuffer", bindFramebuffer);
273         ASSIGN("glBindRenderbuffer", bindRenderbuffer);
274         ASSIGN("glBindVertexArray", bindVertexArray);
275         ASSIGN("glBlitFramebuffer", blitFramebuffer);
276         ASSIGN("glCheckFramebufferStatus", checkFramebufferStatus);
277         ASSIGN("glClampColor", clampColor);
278         ASSIGN("glClearBufferfi", clearBufferfi);
279         ASSIGN("glClearBufferfv", clearBufferfv);
280         ASSIGN("glClearBufferiv", clearBufferiv);
281         ASSIGN("glClearBufferuiv", clearBufferuiv);
282         ASSIGN("glColorMaski", colorMaski);
283         ASSIGN("glDeleteFramebuffers", deleteFramebuffers);
284         ASSIGN("glDeleteRenderbuffers", deleteRenderbuffers);
285         ASSIGN("glDeleteVertexArrays", deleteVertexArrays);
286         ASSIGN("glDisablei", disablei);
287         ASSIGN("glEnablei", enablei);
288         ASSIGN("glEndConditionalRender", endConditionalRender);
289         ASSIGN("glEndTransformFeedback", endTransformFeedback);
290         ASSIGN("glFlushMappedBufferRange", flushMappedBufferRange);
291         ASSIGN("glFramebufferRenderbuffer", framebufferRenderbuffer);
292         ASSIGN("glFramebufferTexture1D", framebufferTexture1D);
293         ASSIGN("glFramebufferTexture2D", framebufferTexture2D);
294         ASSIGN("glFramebufferTexture3D", framebufferTexture3D);
295         ASSIGN("glFramebufferTextureLayer", framebufferTextureLayer);
296         ASSIGN("glGenFramebuffers", genFramebuffers);
297         ASSIGN("glGenRenderbuffers", genRenderbuffers);
298         ASSIGN("glGenVertexArrays", genVertexArrays);
299         ASSIGN("glGenerateMipmap", generateMipmap);
300         ASSIGN("glGetBooleani_v", getBooleani_v);
301         ASSIGN("glGetFragDataLocation", getFragDataLocation);
302         ASSIGN("glGetFramebufferAttachmentParameteriv", getFramebufferAttachmentParameteriv);
303         ASSIGN("glGetIntegeri_v", getIntegeri_v);
304         ASSIGN("glGetRenderbufferParameteriv", getRenderbufferParameteriv);
305         ASSIGN("glGetStringi", getStringi);
306         ASSIGN("glGetTexParameterIiv", getTexParameterIiv);
307         ASSIGN("glGetTexParameterIuiv", getTexParameterIuiv);
308         ASSIGN("glGetTransformFeedbackVarying", getTransformFeedbackVarying);
309         ASSIGN("glGetUniformuiv", getUniformuiv);
310         ASSIGN("glGetVertexAttribIiv", getVertexAttribIiv);
311         ASSIGN("glGetVertexAttribIuiv", getVertexAttribIuiv);
312         ASSIGN("glIsEnabledi", isEnabledi);
313         ASSIGN("glIsFramebuffer", isFramebuffer);
314         ASSIGN("glIsRenderbuffer", isRenderbuffer);
315         ASSIGN("glIsVertexArray", isVertexArray);
316         ASSIGN("glMapBufferRange", mapBufferRange);
317         ASSIGN("glRenderbufferStorage", renderbufferStorage);
318         ASSIGN("glRenderbufferStorageMultisample", renderbufferStorageMultisample);
319         ASSIGN("glTexParameterIiv", texParameterIiv);
320         ASSIGN("glTexParameterIuiv", texParameterIuiv);
321         ASSIGN("glTransformFeedbackVaryings", transformFeedbackVaryings);
322         ASSIGN("glUniform1ui", uniform1ui);
323         ASSIGN("glUniform1uiv", uniform1uiv);
324         ASSIGN("glUniform2ui", uniform2ui);
325         ASSIGN("glUniform2uiv", uniform2uiv);
326         ASSIGN("glUniform3ui", uniform3ui);
327         ASSIGN("glUniform3uiv", uniform3uiv);
328         ASSIGN("glUniform4ui", uniform4ui);
329         ASSIGN("glUniform4uiv", uniform4uiv);
330         ASSIGN("glVertexAttribI1i", vertexAttribI1i);
331         ASSIGN("glVertexAttribI1iv", vertexAttribI1iv);
332         ASSIGN("glVertexAttribI1ui", vertexAttribI1ui);
333         ASSIGN("glVertexAttribI1uiv", vertexAttribI1uiv);
334         ASSIGN("glVertexAttribI2i", vertexAttribI2i);
335         ASSIGN("glVertexAttribI2iv", vertexAttribI2iv);
336         ASSIGN("glVertexAttribI2ui", vertexAttribI2ui);
337         ASSIGN("glVertexAttribI2uiv", vertexAttribI2uiv);
338         ASSIGN("glVertexAttribI3i", vertexAttribI3i);
339         ASSIGN("glVertexAttribI3iv", vertexAttribI3iv);
340         ASSIGN("glVertexAttribI3ui", vertexAttribI3ui);
341         ASSIGN("glVertexAttribI3uiv", vertexAttribI3uiv);
342         ASSIGN("glVertexAttribI4bv", vertexAttribI4bv);
343         ASSIGN("glVertexAttribI4i", vertexAttribI4i);
344         ASSIGN("glVertexAttribI4iv", vertexAttribI4iv);
345         ASSIGN("glVertexAttribI4sv", vertexAttribI4sv);
346         ASSIGN("glVertexAttribI4ubv", vertexAttribI4ubv);
347         ASSIGN("glVertexAttribI4ui", vertexAttribI4ui);
348         ASSIGN("glVertexAttribI4uiv", vertexAttribI4uiv);
349         ASSIGN("glVertexAttribI4usv", vertexAttribI4usv);
350         ASSIGN("glVertexAttribIPointer", vertexAttribIPointer);
351     }
352 
353     if (version >= gl::Version(3, 1))
354     {
355         ASSIGN("glCopyBufferSubData", copyBufferSubData);
356         ASSIGN("glDrawArraysInstanced", drawArraysInstanced);
357         ASSIGN("glDrawElementsInstanced", drawElementsInstanced);
358         ASSIGN("glGetActiveUniformBlockName", getActiveUniformBlockName);
359         ASSIGN("glGetActiveUniformBlockiv", getActiveUniformBlockiv);
360         ASSIGN("glGetActiveUniformName", getActiveUniformName);
361         ASSIGN("glGetActiveUniformsiv", getActiveUniformsiv);
362         ASSIGN("glGetUniformBlockIndex", getUniformBlockIndex);
363         ASSIGN("glGetUniformIndices", getUniformIndices);
364         ASSIGN("glPrimitiveRestartIndex", primitiveRestartIndex);
365         ASSIGN("glTexBuffer", texBuffer);
366         ASSIGN("glUniformBlockBinding", uniformBlockBinding);
367     }
368 
369     if (version >= gl::Version(3, 2))
370     {
371         ASSIGN("glClientWaitSync", clientWaitSync);
372         ASSIGN("glDeleteSync", deleteSync);
373         ASSIGN("glDrawElementsBaseVertex", drawElementsBaseVertex);
374         ASSIGN("glDrawElementsInstancedBaseVertex", drawElementsInstancedBaseVertex);
375         ASSIGN("glDrawRangeElementsBaseVertex", drawRangeElementsBaseVertex);
376         ASSIGN("glFenceSync", fenceSync);
377         ASSIGN("glFramebufferTexture", framebufferTexture);
378         ASSIGN("glGetBufferParameteri64v", getBufferParameteri64v);
379         ASSIGN("glGetInteger64i_v", getInteger64i_v);
380         ASSIGN("glGetInteger64v", getInteger64v);
381         ASSIGN("glGetMultisamplefv", getMultisamplefv);
382         ASSIGN("glGetSynciv", getSynciv);
383         ASSIGN("glIsSync", isSync);
384         ASSIGN("glMultiDrawElementsBaseVertex", multiDrawElementsBaseVertex);
385         ASSIGN("glProvokingVertex", provokingVertex);
386         ASSIGN("glSampleMaski", sampleMaski);
387         ASSIGN("glTexImage2DMultisample", texImage2DMultisample);
388         ASSIGN("glTexImage3DMultisample", texImage3DMultisample);
389         ASSIGN("glWaitSync", waitSync);
390     }
391 
392     if (version >= gl::Version(3, 3))
393     {
394         ASSIGN("glBindFragDataLocationIndexed", bindFragDataLocationIndexed);
395         ASSIGN("glBindSampler", bindSampler);
396         ASSIGN("glDeleteSamplers", deleteSamplers);
397         ASSIGN("glGenSamplers", genSamplers);
398         ASSIGN("glGetFragDataIndex", getFragDataIndex);
399         ASSIGN("glGetQueryObjecti64v", getQueryObjecti64v);
400         ASSIGN("glGetQueryObjectui64v", getQueryObjectui64v);
401         ASSIGN("glGetSamplerParameterIiv", getSamplerParameterIiv);
402         ASSIGN("glGetSamplerParameterIuiv", getSamplerParameterIuiv);
403         ASSIGN("glGetSamplerParameterfv", getSamplerParameterfv);
404         ASSIGN("glGetSamplerParameteriv", getSamplerParameteriv);
405         ASSIGN("glIsSampler", isSampler);
406         ASSIGN("glQueryCounter", queryCounter);
407         ASSIGN("glSamplerParameterIiv", samplerParameterIiv);
408         ASSIGN("glSamplerParameterIuiv", samplerParameterIuiv);
409         ASSIGN("glSamplerParameterf", samplerParameterf);
410         ASSIGN("glSamplerParameterfv", samplerParameterfv);
411         ASSIGN("glSamplerParameteri", samplerParameteri);
412         ASSIGN("glSamplerParameteriv", samplerParameteriv);
413         ASSIGN("glVertexAttribDivisor", vertexAttribDivisor);
414         ASSIGN("glVertexAttribP1ui", vertexAttribP1ui);
415         ASSIGN("glVertexAttribP1uiv", vertexAttribP1uiv);
416         ASSIGN("glVertexAttribP2ui", vertexAttribP2ui);
417         ASSIGN("glVertexAttribP2uiv", vertexAttribP2uiv);
418         ASSIGN("glVertexAttribP3ui", vertexAttribP3ui);
419         ASSIGN("glVertexAttribP3uiv", vertexAttribP3uiv);
420         ASSIGN("glVertexAttribP4ui", vertexAttribP4ui);
421         ASSIGN("glVertexAttribP4uiv", vertexAttribP4uiv);
422     }
423 
424     if (version >= gl::Version(4, 0))
425     {
426         ASSIGN("glBeginQueryIndexed", beginQueryIndexed);
427         ASSIGN("glBindTransformFeedback", bindTransformFeedback);
428         ASSIGN("glBlendEquationSeparatei", blendEquationSeparatei);
429         ASSIGN("glBlendEquationi", blendEquationi);
430         ASSIGN("glBlendFuncSeparatei", blendFuncSeparatei);
431         ASSIGN("glBlendFunci", blendFunci);
432         ASSIGN("glDeleteTransformFeedbacks", deleteTransformFeedbacks);
433         ASSIGN("glDrawArraysIndirect", drawArraysIndirect);
434         ASSIGN("glDrawElementsIndirect", drawElementsIndirect);
435         ASSIGN("glDrawTransformFeedback", drawTransformFeedback);
436         ASSIGN("glDrawTransformFeedbackStream", drawTransformFeedbackStream);
437         ASSIGN("glEndQueryIndexed", endQueryIndexed);
438         ASSIGN("glGenTransformFeedbacks", genTransformFeedbacks);
439         ASSIGN("glGetActiveSubroutineName", getActiveSubroutineName);
440         ASSIGN("glGetActiveSubroutineUniformName", getActiveSubroutineUniformName);
441         ASSIGN("glGetActiveSubroutineUniformiv", getActiveSubroutineUniformiv);
442         ASSIGN("glGetProgramStageiv", getProgramStageiv);
443         ASSIGN("glGetQueryIndexediv", getQueryIndexediv);
444         ASSIGN("glGetSubroutineIndex", getSubroutineIndex);
445         ASSIGN("glGetSubroutineUniformLocation", getSubroutineUniformLocation);
446         ASSIGN("glGetUniformSubroutineuiv", getUniformSubroutineuiv);
447         ASSIGN("glGetUniformdv", getUniformdv);
448         ASSIGN("glIsTransformFeedback", isTransformFeedback);
449         ASSIGN("glMinSampleShading", minSampleShading);
450         ASSIGN("glPatchParameterfv", patchParameterfv);
451         ASSIGN("glPatchParameteri", patchParameteri);
452         ASSIGN("glPauseTransformFeedback", pauseTransformFeedback);
453         ASSIGN("glResumeTransformFeedback", resumeTransformFeedback);
454         ASSIGN("glUniform1d", uniform1d);
455         ASSIGN("glUniform1dv", uniform1dv);
456         ASSIGN("glUniform2d", uniform2d);
457         ASSIGN("glUniform2dv", uniform2dv);
458         ASSIGN("glUniform3d", uniform3d);
459         ASSIGN("glUniform3dv", uniform3dv);
460         ASSIGN("glUniform4d", uniform4d);
461         ASSIGN("glUniform4dv", uniform4dv);
462         ASSIGN("glUniformMatrix2dv", uniformMatrix2dv);
463         ASSIGN("glUniformMatrix2x3dv", uniformMatrix2x3dv);
464         ASSIGN("glUniformMatrix2x4dv", uniformMatrix2x4dv);
465         ASSIGN("glUniformMatrix3dv", uniformMatrix3dv);
466         ASSIGN("glUniformMatrix3x2dv", uniformMatrix3x2dv);
467         ASSIGN("glUniformMatrix3x4dv", uniformMatrix3x4dv);
468         ASSIGN("glUniformMatrix4dv", uniformMatrix4dv);
469         ASSIGN("glUniformMatrix4x2dv", uniformMatrix4x2dv);
470         ASSIGN("glUniformMatrix4x3dv", uniformMatrix4x3dv);
471         ASSIGN("glUniformSubroutinesuiv", uniformSubroutinesuiv);
472     }
473 
474     if (version >= gl::Version(4, 1))
475     {
476         ASSIGN("glActiveShaderProgram", activeShaderProgram);
477         ASSIGN("glBindProgramPipeline", bindProgramPipeline);
478         ASSIGN("glClearDepthf", clearDepthf);
479         ASSIGN("glCreateShaderProgramv", createShaderProgramv);
480         ASSIGN("glDeleteProgramPipelines", deleteProgramPipelines);
481         ASSIGN("glDepthRangeArrayv", depthRangeArrayv);
482         ASSIGN("glDepthRangeIndexed", depthRangeIndexed);
483         ASSIGN("glDepthRangef", depthRangef);
484         ASSIGN("glGenProgramPipelines", genProgramPipelines);
485         ASSIGN("glGetDoublei_v", getDoublei_v);
486         ASSIGN("glGetFloati_v", getFloati_v);
487         ASSIGN("glGetProgramBinary", getProgramBinary);
488         ASSIGN("glGetProgramPipelineInfoLog", getProgramPipelineInfoLog);
489         ASSIGN("glGetProgramPipelineiv", getProgramPipelineiv);
490         ASSIGN("glGetShaderPrecisionFormat", getShaderPrecisionFormat);
491         ASSIGN("glGetVertexAttribLdv", getVertexAttribLdv);
492         ASSIGN("glIsProgramPipeline", isProgramPipeline);
493         ASSIGN("glProgramBinary", programBinary);
494         ASSIGN("glProgramParameteri", programParameteri);
495         ASSIGN("glProgramUniform1d", programUniform1d);
496         ASSIGN("glProgramUniform1dv", programUniform1dv);
497         ASSIGN("glProgramUniform1f", programUniform1f);
498         ASSIGN("glProgramUniform1fv", programUniform1fv);
499         ASSIGN("glProgramUniform1i", programUniform1i);
500         ASSIGN("glProgramUniform1iv", programUniform1iv);
501         ASSIGN("glProgramUniform1ui", programUniform1ui);
502         ASSIGN("glProgramUniform1uiv", programUniform1uiv);
503         ASSIGN("glProgramUniform2d", programUniform2d);
504         ASSIGN("glProgramUniform2dv", programUniform2dv);
505         ASSIGN("glProgramUniform2f", programUniform2f);
506         ASSIGN("glProgramUniform2fv", programUniform2fv);
507         ASSIGN("glProgramUniform2i", programUniform2i);
508         ASSIGN("glProgramUniform2iv", programUniform2iv);
509         ASSIGN("glProgramUniform2ui", programUniform2ui);
510         ASSIGN("glProgramUniform2uiv", programUniform2uiv);
511         ASSIGN("glProgramUniform3d", programUniform3d);
512         ASSIGN("glProgramUniform3dv", programUniform3dv);
513         ASSIGN("glProgramUniform3f", programUniform3f);
514         ASSIGN("glProgramUniform3fv", programUniform3fv);
515         ASSIGN("glProgramUniform3i", programUniform3i);
516         ASSIGN("glProgramUniform3iv", programUniform3iv);
517         ASSIGN("glProgramUniform3ui", programUniform3ui);
518         ASSIGN("glProgramUniform3uiv", programUniform3uiv);
519         ASSIGN("glProgramUniform4d", programUniform4d);
520         ASSIGN("glProgramUniform4dv", programUniform4dv);
521         ASSIGN("glProgramUniform4f", programUniform4f);
522         ASSIGN("glProgramUniform4fv", programUniform4fv);
523         ASSIGN("glProgramUniform4i", programUniform4i);
524         ASSIGN("glProgramUniform4iv", programUniform4iv);
525         ASSIGN("glProgramUniform4ui", programUniform4ui);
526         ASSIGN("glProgramUniform4uiv", programUniform4uiv);
527         ASSIGN("glProgramUniformMatrix2dv", programUniformMatrix2dv);
528         ASSIGN("glProgramUniformMatrix2fv", programUniformMatrix2fv);
529         ASSIGN("glProgramUniformMatrix2x3dv", programUniformMatrix2x3dv);
530         ASSIGN("glProgramUniformMatrix2x3fv", programUniformMatrix2x3fv);
531         ASSIGN("glProgramUniformMatrix2x4dv", programUniformMatrix2x4dv);
532         ASSIGN("glProgramUniformMatrix2x4fv", programUniformMatrix2x4fv);
533         ASSIGN("glProgramUniformMatrix3dv", programUniformMatrix3dv);
534         ASSIGN("glProgramUniformMatrix3fv", programUniformMatrix3fv);
535         ASSIGN("glProgramUniformMatrix3x2dv", programUniformMatrix3x2dv);
536         ASSIGN("glProgramUniformMatrix3x2fv", programUniformMatrix3x2fv);
537         ASSIGN("glProgramUniformMatrix3x4dv", programUniformMatrix3x4dv);
538         ASSIGN("glProgramUniformMatrix3x4fv", programUniformMatrix3x4fv);
539         ASSIGN("glProgramUniformMatrix4dv", programUniformMatrix4dv);
540         ASSIGN("glProgramUniformMatrix4fv", programUniformMatrix4fv);
541         ASSIGN("glProgramUniformMatrix4x2dv", programUniformMatrix4x2dv);
542         ASSIGN("glProgramUniformMatrix4x2fv", programUniformMatrix4x2fv);
543         ASSIGN("glProgramUniformMatrix4x3dv", programUniformMatrix4x3dv);
544         ASSIGN("glProgramUniformMatrix4x3fv", programUniformMatrix4x3fv);
545         ASSIGN("glReleaseShaderCompiler", releaseShaderCompiler);
546         ASSIGN("glScissorArrayv", scissorArrayv);
547         ASSIGN("glScissorIndexed", scissorIndexed);
548         ASSIGN("glScissorIndexedv", scissorIndexedv);
549         ASSIGN("glShaderBinary", shaderBinary);
550         ASSIGN("glUseProgramStages", useProgramStages);
551         ASSIGN("glValidateProgramPipeline", validateProgramPipeline);
552         ASSIGN("glVertexAttribL1d", vertexAttribL1d);
553         ASSIGN("glVertexAttribL1dv", vertexAttribL1dv);
554         ASSIGN("glVertexAttribL2d", vertexAttribL2d);
555         ASSIGN("glVertexAttribL2dv", vertexAttribL2dv);
556         ASSIGN("glVertexAttribL3d", vertexAttribL3d);
557         ASSIGN("glVertexAttribL3dv", vertexAttribL3dv);
558         ASSIGN("glVertexAttribL4d", vertexAttribL4d);
559         ASSIGN("glVertexAttribL4dv", vertexAttribL4dv);
560         ASSIGN("glVertexAttribLPointer", vertexAttribLPointer);
561         ASSIGN("glViewportArrayv", viewportArrayv);
562         ASSIGN("glViewportIndexedf", viewportIndexedf);
563         ASSIGN("glViewportIndexedfv", viewportIndexedfv);
564     }
565 
566     if (version >= gl::Version(4, 2))
567     {
568         ASSIGN("glBindImageTexture", bindImageTexture);
569         ASSIGN("glDrawArraysInstancedBaseInstance", drawArraysInstancedBaseInstance);
570         ASSIGN("glDrawElementsInstancedBaseInstance", drawElementsInstancedBaseInstance);
571         ASSIGN("glDrawElementsInstancedBaseVertexBaseInstance",
572                drawElementsInstancedBaseVertexBaseInstance);
573         ASSIGN("glDrawTransformFeedbackInstanced", drawTransformFeedbackInstanced);
574         ASSIGN("glDrawTransformFeedbackStreamInstanced", drawTransformFeedbackStreamInstanced);
575         ASSIGN("glGetActiveAtomicCounterBufferiv", getActiveAtomicCounterBufferiv);
576         ASSIGN("glGetInternalformativ", getInternalformativ);
577         ASSIGN("glMemoryBarrier", memoryBarrier);
578         ASSIGN("glTexStorage1D", texStorage1D);
579         ASSIGN("glTexStorage2D", texStorage2D);
580         ASSIGN("glTexStorage3D", texStorage3D);
581     }
582 
583     if (version >= gl::Version(4, 3))
584     {
585         ASSIGN("glBindVertexBuffer", bindVertexBuffer);
586         ASSIGN("glClearBufferData", clearBufferData);
587         ASSIGN("glClearBufferSubData", clearBufferSubData);
588         ASSIGN("glCopyImageSubData", copyImageSubData);
589         ASSIGN("glDebugMessageCallback", debugMessageCallback);
590         ASSIGN("glDebugMessageControl", debugMessageControl);
591         ASSIGN("glDebugMessageInsert", debugMessageInsert);
592         ASSIGN("glDispatchCompute", dispatchCompute);
593         ASSIGN("glDispatchComputeIndirect", dispatchComputeIndirect);
594         ASSIGN("glFramebufferParameteri", framebufferParameteri);
595         ASSIGN("glGetDebugMessageLog", getDebugMessageLog);
596         ASSIGN("glGetFramebufferParameteriv", getFramebufferParameteriv);
597         ASSIGN("glGetInternalformati64v", getInternalformati64v);
598         ASSIGN("glGetObjectLabel", getObjectLabel);
599         ASSIGN("glGetObjectPtrLabel", getObjectPtrLabel);
600         ASSIGN("glGetPointerv", getPointerv);
601         ASSIGN("glGetProgramInterfaceiv", getProgramInterfaceiv);
602         ASSIGN("glGetProgramResourceIndex", getProgramResourceIndex);
603         ASSIGN("glGetProgramResourceLocation", getProgramResourceLocation);
604         ASSIGN("glGetProgramResourceLocationIndex", getProgramResourceLocationIndex);
605         ASSIGN("glGetProgramResourceName", getProgramResourceName);
606         ASSIGN("glGetProgramResourceiv", getProgramResourceiv);
607         ASSIGN("glInvalidateBufferData", invalidateBufferData);
608         ASSIGN("glInvalidateBufferSubData", invalidateBufferSubData);
609         ASSIGN("glInvalidateFramebuffer", invalidateFramebuffer);
610         ASSIGN("glInvalidateSubFramebuffer", invalidateSubFramebuffer);
611         ASSIGN("glInvalidateTexImage", invalidateTexImage);
612         ASSIGN("glInvalidateTexSubImage", invalidateTexSubImage);
613         ASSIGN("glMultiDrawArraysIndirect", multiDrawArraysIndirect);
614         ASSIGN("glMultiDrawElementsIndirect", multiDrawElementsIndirect);
615         ASSIGN("glObjectLabel", objectLabel);
616         ASSIGN("glObjectPtrLabel", objectPtrLabel);
617         ASSIGN("glPopDebugGroup", popDebugGroup);
618         ASSIGN("glPushDebugGroup", pushDebugGroup);
619         ASSIGN("glShaderStorageBlockBinding", shaderStorageBlockBinding);
620         ASSIGN("glTexBufferRange", texBufferRange);
621         ASSIGN("glTexStorage2DMultisample", texStorage2DMultisample);
622         ASSIGN("glTexStorage3DMultisample", texStorage3DMultisample);
623         ASSIGN("glTextureView", textureView);
624         ASSIGN("glVertexAttribBinding", vertexAttribBinding);
625         ASSIGN("glVertexAttribFormat", vertexAttribFormat);
626         ASSIGN("glVertexAttribIFormat", vertexAttribIFormat);
627         ASSIGN("glVertexAttribLFormat", vertexAttribLFormat);
628         ASSIGN("glVertexBindingDivisor", vertexBindingDivisor);
629     }
630 
631     if (version >= gl::Version(4, 4))
632     {
633         ASSIGN("glBindBuffersBase", bindBuffersBase);
634         ASSIGN("glBindBuffersRange", bindBuffersRange);
635         ASSIGN("glBindImageTextures", bindImageTextures);
636         ASSIGN("glBindSamplers", bindSamplers);
637         ASSIGN("glBindTextures", bindTextures);
638         ASSIGN("glBindVertexBuffers", bindVertexBuffers);
639         ASSIGN("glBufferStorage", bufferStorage);
640         ASSIGN("glClearTexImage", clearTexImage);
641         ASSIGN("glClearTexSubImage", clearTexSubImage);
642     }
643 
644     if (version >= gl::Version(4, 5))
645     {
646         ASSIGN("glBindTextureUnit", bindTextureUnit);
647         ASSIGN("glBlitNamedFramebuffer", blitNamedFramebuffer);
648         ASSIGN("glCheckNamedFramebufferStatus", checkNamedFramebufferStatus);
649         ASSIGN("glClearNamedBufferData", clearNamedBufferData);
650         ASSIGN("glClearNamedBufferSubData", clearNamedBufferSubData);
651         ASSIGN("glClearNamedFramebufferfi", clearNamedFramebufferfi);
652         ASSIGN("glClearNamedFramebufferfv", clearNamedFramebufferfv);
653         ASSIGN("glClearNamedFramebufferiv", clearNamedFramebufferiv);
654         ASSIGN("glClearNamedFramebufferuiv", clearNamedFramebufferuiv);
655         ASSIGN("glClipControl", clipControl);
656         ASSIGN("glCompressedTextureSubImage1D", compressedTextureSubImage1D);
657         ASSIGN("glCompressedTextureSubImage2D", compressedTextureSubImage2D);
658         ASSIGN("glCompressedTextureSubImage3D", compressedTextureSubImage3D);
659         ASSIGN("glCopyNamedBufferSubData", copyNamedBufferSubData);
660         ASSIGN("glCopyTextureSubImage1D", copyTextureSubImage1D);
661         ASSIGN("glCopyTextureSubImage2D", copyTextureSubImage2D);
662         ASSIGN("glCopyTextureSubImage3D", copyTextureSubImage3D);
663         ASSIGN("glCreateBuffers", createBuffers);
664         ASSIGN("glCreateFramebuffers", createFramebuffers);
665         ASSIGN("glCreateProgramPipelines", createProgramPipelines);
666         ASSIGN("glCreateQueries", createQueries);
667         ASSIGN("glCreateRenderbuffers", createRenderbuffers);
668         ASSIGN("glCreateSamplers", createSamplers);
669         ASSIGN("glCreateTextures", createTextures);
670         ASSIGN("glCreateTransformFeedbacks", createTransformFeedbacks);
671         ASSIGN("glCreateVertexArrays", createVertexArrays);
672         ASSIGN("glDisableVertexArrayAttrib", disableVertexArrayAttrib);
673         ASSIGN("glEnableVertexArrayAttrib", enableVertexArrayAttrib);
674         ASSIGN("glFlushMappedNamedBufferRange", flushMappedNamedBufferRange);
675         ASSIGN("glGenerateTextureMipmap", generateTextureMipmap);
676         ASSIGN("glGetCompressedTextureImage", getCompressedTextureImage);
677         ASSIGN("glGetCompressedTextureSubImage", getCompressedTextureSubImage);
678         ASSIGN("glGetGraphicsResetStatus", getGraphicsResetStatus);
679         ASSIGN("glGetNamedBufferParameteri64v", getNamedBufferParameteri64v);
680         ASSIGN("glGetNamedBufferParameteriv", getNamedBufferParameteriv);
681         ASSIGN("glGetNamedBufferPointerv", getNamedBufferPointerv);
682         ASSIGN("glGetNamedBufferSubData", getNamedBufferSubData);
683         ASSIGN("glGetNamedFramebufferAttachmentParameteriv",
684                getNamedFramebufferAttachmentParameteriv);
685         ASSIGN("glGetNamedFramebufferParameteriv", getNamedFramebufferParameteriv);
686         ASSIGN("glGetNamedRenderbufferParameteriv", getNamedRenderbufferParameteriv);
687         ASSIGN("glGetQueryBufferObjecti64v", getQueryBufferObjecti64v);
688         ASSIGN("glGetQueryBufferObjectiv", getQueryBufferObjectiv);
689         ASSIGN("glGetQueryBufferObjectui64v", getQueryBufferObjectui64v);
690         ASSIGN("glGetQueryBufferObjectuiv", getQueryBufferObjectuiv);
691         ASSIGN("glGetTextureImage", getTextureImage);
692         ASSIGN("glGetTextureLevelParameterfv", getTextureLevelParameterfv);
693         ASSIGN("glGetTextureLevelParameteriv", getTextureLevelParameteriv);
694         ASSIGN("glGetTextureParameterIiv", getTextureParameterIiv);
695         ASSIGN("glGetTextureParameterIuiv", getTextureParameterIuiv);
696         ASSIGN("glGetTextureParameterfv", getTextureParameterfv);
697         ASSIGN("glGetTextureParameteriv", getTextureParameteriv);
698         ASSIGN("glGetTextureSubImage", getTextureSubImage);
699         ASSIGN("glGetTransformFeedbacki64_v", getTransformFeedbacki64_v);
700         ASSIGN("glGetTransformFeedbacki_v", getTransformFeedbacki_v);
701         ASSIGN("glGetTransformFeedbackiv", getTransformFeedbackiv);
702         ASSIGN("glGetVertexArrayIndexed64iv", getVertexArrayIndexed64iv);
703         ASSIGN("glGetVertexArrayIndexediv", getVertexArrayIndexediv);
704         ASSIGN("glGetVertexArrayiv", getVertexArrayiv);
705         ASSIGN("glGetnCompressedTexImage", getnCompressedTexImage);
706         ASSIGN("glGetnTexImage", getnTexImage);
707         ASSIGN("glGetnUniformdv", getnUniformdv);
708         ASSIGN("glGetnUniformfv", getnUniformfv);
709         ASSIGN("glGetnUniformiv", getnUniformiv);
710         ASSIGN("glGetnUniformuiv", getnUniformuiv);
711         ASSIGN("glInvalidateNamedFramebufferData", invalidateNamedFramebufferData);
712         ASSIGN("glInvalidateNamedFramebufferSubData", invalidateNamedFramebufferSubData);
713         ASSIGN("glMapNamedBuffer", mapNamedBuffer);
714         ASSIGN("glMapNamedBufferRange", mapNamedBufferRange);
715         ASSIGN("glMemoryBarrierByRegion", memoryBarrierByRegion);
716         ASSIGN("glNamedBufferData", namedBufferData);
717         ASSIGN("glNamedBufferStorage", namedBufferStorage);
718         ASSIGN("glNamedBufferSubData", namedBufferSubData);
719         ASSIGN("glNamedFramebufferDrawBuffer", namedFramebufferDrawBuffer);
720         ASSIGN("glNamedFramebufferDrawBuffers", namedFramebufferDrawBuffers);
721         ASSIGN("glNamedFramebufferParameteri", namedFramebufferParameteri);
722         ASSIGN("glNamedFramebufferReadBuffer", namedFramebufferReadBuffer);
723         ASSIGN("glNamedFramebufferRenderbuffer", namedFramebufferRenderbuffer);
724         ASSIGN("glNamedFramebufferTexture", namedFramebufferTexture);
725         ASSIGN("glNamedFramebufferTextureLayer", namedFramebufferTextureLayer);
726         ASSIGN("glNamedRenderbufferStorage", namedRenderbufferStorage);
727         ASSIGN("glNamedRenderbufferStorageMultisample", namedRenderbufferStorageMultisample);
728         ASSIGN("glReadnPixels", readnPixels);
729         ASSIGN("glTextureBarrier", textureBarrier);
730         ASSIGN("glTextureBuffer", textureBuffer);
731         ASSIGN("glTextureBufferRange", textureBufferRange);
732         ASSIGN("glTextureParameterIiv", textureParameterIiv);
733         ASSIGN("glTextureParameterIuiv", textureParameterIuiv);
734         ASSIGN("glTextureParameterf", textureParameterf);
735         ASSIGN("glTextureParameterfv", textureParameterfv);
736         ASSIGN("glTextureParameteri", textureParameteri);
737         ASSIGN("glTextureParameteriv", textureParameteriv);
738         ASSIGN("glTextureStorage1D", textureStorage1D);
739         ASSIGN("glTextureStorage2D", textureStorage2D);
740         ASSIGN("glTextureStorage2DMultisample", textureStorage2DMultisample);
741         ASSIGN("glTextureStorage3D", textureStorage3D);
742         ASSIGN("glTextureStorage3DMultisample", textureStorage3DMultisample);
743         ASSIGN("glTextureSubImage1D", textureSubImage1D);
744         ASSIGN("glTextureSubImage2D", textureSubImage2D);
745         ASSIGN("glTextureSubImage3D", textureSubImage3D);
746         ASSIGN("glTransformFeedbackBufferBase", transformFeedbackBufferBase);
747         ASSIGN("glTransformFeedbackBufferRange", transformFeedbackBufferRange);
748         ASSIGN("glUnmapNamedBuffer", unmapNamedBuffer);
749         ASSIGN("glVertexArrayAttribBinding", vertexArrayAttribBinding);
750         ASSIGN("glVertexArrayAttribFormat", vertexArrayAttribFormat);
751         ASSIGN("glVertexArrayAttribIFormat", vertexArrayAttribIFormat);
752         ASSIGN("glVertexArrayAttribLFormat", vertexArrayAttribLFormat);
753         ASSIGN("glVertexArrayBindingDivisor", vertexArrayBindingDivisor);
754         ASSIGN("glVertexArrayElementBuffer", vertexArrayElementBuffer);
755         ASSIGN("glVertexArrayVertexBuffer", vertexArrayVertexBuffer);
756         ASSIGN("glVertexArrayVertexBuffers", vertexArrayVertexBuffers);
757     }
758 
759     if (extensions.count("GL_ARB_ES2_compatibility") != 0)
760     {
761         ASSIGN("glClearDepthf", clearDepthf);
762         ASSIGN("glDepthRangef", depthRangef);
763         ASSIGN("glGetShaderPrecisionFormat", getShaderPrecisionFormat);
764         ASSIGN("glReleaseShaderCompiler", releaseShaderCompiler);
765         ASSIGN("glShaderBinary", shaderBinary);
766     }
767 
768     if (extensions.count("GL_ARB_ES3_1_compatibility") != 0)
769     {
770         ASSIGN("glMemoryBarrierByRegion", memoryBarrierByRegion);
771     }
772 
773     if (extensions.count("GL_ARB_ES3_2_compatibility") != 0)
774     {
775         ASSIGN("glPrimitiveBoundingBoxARB", primitiveBoundingBox);
776     }
777 
778     if (extensions.count("GL_ARB_base_instance") != 0)
779     {
780         ASSIGN("glDrawArraysInstancedBaseInstance", drawArraysInstancedBaseInstance);
781         ASSIGN("glDrawElementsInstancedBaseInstance", drawElementsInstancedBaseInstance);
782         ASSIGN("glDrawElementsInstancedBaseVertexBaseInstance",
783                drawElementsInstancedBaseVertexBaseInstance);
784     }
785 
786     if (extensions.count("GL_ARB_blend_func_extended") != 0)
787     {
788         ASSIGN("glBindFragDataLocationIndexed", bindFragDataLocationIndexed);
789         ASSIGN("glGetFragDataIndex", getFragDataIndex);
790     }
791 
792     if (extensions.count("GL_ARB_buffer_storage") != 0)
793     {
794         ASSIGN("glBufferStorage", bufferStorage);
795     }
796 
797     if (extensions.count("GL_ARB_clear_buffer_object") != 0)
798     {
799         ASSIGN("glClearBufferData", clearBufferData);
800         ASSIGN("glClearBufferSubData", clearBufferSubData);
801     }
802 
803     if (extensions.count("GL_ARB_clear_texture") != 0)
804     {
805         ASSIGN("glClearTexImage", clearTexImage);
806         ASSIGN("glClearTexSubImage", clearTexSubImage);
807     }
808 
809     if (extensions.count("GL_ARB_clip_control") != 0)
810     {
811         ASSIGN("glClipControl", clipControl);
812     }
813 
814     if (extensions.count("GL_ARB_color_buffer_float") != 0)
815     {
816         ASSIGN("glClampColorARB", clampColor);
817     }
818 
819     if (extensions.count("GL_ARB_compute_shader") != 0)
820     {
821         ASSIGN("glDispatchCompute", dispatchCompute);
822         ASSIGN("glDispatchComputeIndirect", dispatchComputeIndirect);
823     }
824 
825     if (extensions.count("GL_ARB_copy_buffer") != 0)
826     {
827         ASSIGN("glCopyBufferSubData", copyBufferSubData);
828     }
829 
830     if (extensions.count("GL_ARB_copy_image") != 0)
831     {
832         ASSIGN("glCopyImageSubData", copyImageSubData);
833     }
834 
835     if (extensions.count("GL_ARB_debug_output") != 0)
836     {
837         ASSIGN("glDebugMessageCallbackARB", debugMessageCallback);
838         ASSIGN("glDebugMessageControlARB", debugMessageControl);
839         ASSIGN("glDebugMessageInsertARB", debugMessageInsert);
840         ASSIGN("glGetDebugMessageLogARB", getDebugMessageLog);
841     }
842 
843     if (extensions.count("GL_ARB_direct_state_access") != 0)
844     {
845         ASSIGN("glBindTextureUnit", bindTextureUnit);
846         ASSIGN("glBlitNamedFramebuffer", blitNamedFramebuffer);
847         ASSIGN("glCheckNamedFramebufferStatus", checkNamedFramebufferStatus);
848         ASSIGN("glClearNamedBufferData", clearNamedBufferData);
849         ASSIGN("glClearNamedBufferSubData", clearNamedBufferSubData);
850         ASSIGN("glClearNamedFramebufferfi", clearNamedFramebufferfi);
851         ASSIGN("glClearNamedFramebufferfv", clearNamedFramebufferfv);
852         ASSIGN("glClearNamedFramebufferiv", clearNamedFramebufferiv);
853         ASSIGN("glClearNamedFramebufferuiv", clearNamedFramebufferuiv);
854         ASSIGN("glCompressedTextureSubImage1D", compressedTextureSubImage1D);
855         ASSIGN("glCompressedTextureSubImage2D", compressedTextureSubImage2D);
856         ASSIGN("glCompressedTextureSubImage3D", compressedTextureSubImage3D);
857         ASSIGN("glCopyNamedBufferSubData", copyNamedBufferSubData);
858         ASSIGN("glCopyTextureSubImage1D", copyTextureSubImage1D);
859         ASSIGN("glCopyTextureSubImage2D", copyTextureSubImage2D);
860         ASSIGN("glCopyTextureSubImage3D", copyTextureSubImage3D);
861         ASSIGN("glCreateBuffers", createBuffers);
862         ASSIGN("glCreateFramebuffers", createFramebuffers);
863         ASSIGN("glCreateProgramPipelines", createProgramPipelines);
864         ASSIGN("glCreateQueries", createQueries);
865         ASSIGN("glCreateRenderbuffers", createRenderbuffers);
866         ASSIGN("glCreateSamplers", createSamplers);
867         ASSIGN("glCreateTextures", createTextures);
868         ASSIGN("glCreateTransformFeedbacks", createTransformFeedbacks);
869         ASSIGN("glCreateVertexArrays", createVertexArrays);
870         ASSIGN("glDisableVertexArrayAttrib", disableVertexArrayAttrib);
871         ASSIGN("glEnableVertexArrayAttrib", enableVertexArrayAttrib);
872         ASSIGN("glFlushMappedNamedBufferRange", flushMappedNamedBufferRange);
873         ASSIGN("glGenerateTextureMipmap", generateTextureMipmap);
874         ASSIGN("glGetCompressedTextureImage", getCompressedTextureImage);
875         ASSIGN("glGetNamedBufferParameteri64v", getNamedBufferParameteri64v);
876         ASSIGN("glGetNamedBufferParameteriv", getNamedBufferParameteriv);
877         ASSIGN("glGetNamedBufferPointerv", getNamedBufferPointerv);
878         ASSIGN("glGetNamedBufferSubData", getNamedBufferSubData);
879         ASSIGN("glGetNamedFramebufferAttachmentParameteriv",
880                getNamedFramebufferAttachmentParameteriv);
881         ASSIGN("glGetNamedFramebufferParameteriv", getNamedFramebufferParameteriv);
882         ASSIGN("glGetNamedRenderbufferParameteriv", getNamedRenderbufferParameteriv);
883         ASSIGN("glGetQueryBufferObjecti64v", getQueryBufferObjecti64v);
884         ASSIGN("glGetQueryBufferObjectiv", getQueryBufferObjectiv);
885         ASSIGN("glGetQueryBufferObjectui64v", getQueryBufferObjectui64v);
886         ASSIGN("glGetQueryBufferObjectuiv", getQueryBufferObjectuiv);
887         ASSIGN("glGetTextureImage", getTextureImage);
888         ASSIGN("glGetTextureLevelParameterfv", getTextureLevelParameterfv);
889         ASSIGN("glGetTextureLevelParameteriv", getTextureLevelParameteriv);
890         ASSIGN("glGetTextureParameterIiv", getTextureParameterIiv);
891         ASSIGN("glGetTextureParameterIuiv", getTextureParameterIuiv);
892         ASSIGN("glGetTextureParameterfv", getTextureParameterfv);
893         ASSIGN("glGetTextureParameteriv", getTextureParameteriv);
894         ASSIGN("glGetTransformFeedbacki64_v", getTransformFeedbacki64_v);
895         ASSIGN("glGetTransformFeedbacki_v", getTransformFeedbacki_v);
896         ASSIGN("glGetTransformFeedbackiv", getTransformFeedbackiv);
897         ASSIGN("glGetVertexArrayIndexed64iv", getVertexArrayIndexed64iv);
898         ASSIGN("glGetVertexArrayIndexediv", getVertexArrayIndexediv);
899         ASSIGN("glGetVertexArrayiv", getVertexArrayiv);
900         ASSIGN("glInvalidateNamedFramebufferData", invalidateNamedFramebufferData);
901         ASSIGN("glInvalidateNamedFramebufferSubData", invalidateNamedFramebufferSubData);
902         ASSIGN("glMapNamedBuffer", mapNamedBuffer);
903         ASSIGN("glMapNamedBufferRange", mapNamedBufferRange);
904         ASSIGN("glNamedBufferData", namedBufferData);
905         ASSIGN("glNamedBufferStorage", namedBufferStorage);
906         ASSIGN("glNamedBufferSubData", namedBufferSubData);
907         ASSIGN("glNamedFramebufferDrawBuffer", namedFramebufferDrawBuffer);
908         ASSIGN("glNamedFramebufferDrawBuffers", namedFramebufferDrawBuffers);
909         ASSIGN("glNamedFramebufferParameteri", namedFramebufferParameteri);
910         ASSIGN("glNamedFramebufferReadBuffer", namedFramebufferReadBuffer);
911         ASSIGN("glNamedFramebufferRenderbuffer", namedFramebufferRenderbuffer);
912         ASSIGN("glNamedFramebufferTexture", namedFramebufferTexture);
913         ASSIGN("glNamedFramebufferTextureLayer", namedFramebufferTextureLayer);
914         ASSIGN("glNamedRenderbufferStorage", namedRenderbufferStorage);
915         ASSIGN("glNamedRenderbufferStorageMultisample", namedRenderbufferStorageMultisample);
916         ASSIGN("glTextureBuffer", textureBuffer);
917         ASSIGN("glTextureBufferRange", textureBufferRange);
918         ASSIGN("glTextureParameterIiv", textureParameterIiv);
919         ASSIGN("glTextureParameterIuiv", textureParameterIuiv);
920         ASSIGN("glTextureParameterf", textureParameterf);
921         ASSIGN("glTextureParameterfv", textureParameterfv);
922         ASSIGN("glTextureParameteri", textureParameteri);
923         ASSIGN("glTextureParameteriv", textureParameteriv);
924         ASSIGN("glTextureStorage1D", textureStorage1D);
925         ASSIGN("glTextureStorage2D", textureStorage2D);
926         ASSIGN("glTextureStorage2DMultisample", textureStorage2DMultisample);
927         ASSIGN("glTextureStorage3D", textureStorage3D);
928         ASSIGN("glTextureStorage3DMultisample", textureStorage3DMultisample);
929         ASSIGN("glTextureSubImage1D", textureSubImage1D);
930         ASSIGN("glTextureSubImage2D", textureSubImage2D);
931         ASSIGN("glTextureSubImage3D", textureSubImage3D);
932         ASSIGN("glTransformFeedbackBufferBase", transformFeedbackBufferBase);
933         ASSIGN("glTransformFeedbackBufferRange", transformFeedbackBufferRange);
934         ASSIGN("glUnmapNamedBuffer", unmapNamedBuffer);
935         ASSIGN("glVertexArrayAttribBinding", vertexArrayAttribBinding);
936         ASSIGN("glVertexArrayAttribFormat", vertexArrayAttribFormat);
937         ASSIGN("glVertexArrayAttribIFormat", vertexArrayAttribIFormat);
938         ASSIGN("glVertexArrayAttribLFormat", vertexArrayAttribLFormat);
939         ASSIGN("glVertexArrayBindingDivisor", vertexArrayBindingDivisor);
940         ASSIGN("glVertexArrayElementBuffer", vertexArrayElementBuffer);
941         ASSIGN("glVertexArrayVertexBuffer", vertexArrayVertexBuffer);
942         ASSIGN("glVertexArrayVertexBuffers", vertexArrayVertexBuffers);
943     }
944 
945     if (extensions.count("GL_ARB_draw_buffers") != 0)
946     {
947         ASSIGN("glDrawBuffersARB", drawBuffers);
948     }
949 
950     if (extensions.count("GL_ARB_draw_buffers_blend") != 0)
951     {
952         ASSIGN("glBlendEquationSeparateiARB", blendEquationSeparatei);
953         ASSIGN("glBlendEquationiARB", blendEquationi);
954         ASSIGN("glBlendFuncSeparateiARB", blendFuncSeparatei);
955         ASSIGN("glBlendFunciARB", blendFunci);
956     }
957 
958     if (extensions.count("GL_ARB_draw_elements_base_vertex") != 0)
959     {
960         ASSIGN("glDrawElementsBaseVertex", drawElementsBaseVertex);
961         ASSIGN("glDrawElementsInstancedBaseVertex", drawElementsInstancedBaseVertex);
962         ASSIGN("glDrawRangeElementsBaseVertex", drawRangeElementsBaseVertex);
963         ASSIGN("glMultiDrawElementsBaseVertex", multiDrawElementsBaseVertex);
964     }
965 
966     if (extensions.count("GL_ARB_draw_indirect") != 0)
967     {
968         ASSIGN("glDrawArraysIndirect", drawArraysIndirect);
969         ASSIGN("glDrawElementsIndirect", drawElementsIndirect);
970     }
971 
972     if (extensions.count("GL_ARB_draw_instanced") != 0)
973     {
974         ASSIGN("glDrawArraysInstancedARB", drawArraysInstanced);
975         ASSIGN("glDrawElementsInstancedARB", drawElementsInstanced);
976     }
977 
978     if (extensions.count("GL_ARB_fragment_program") != 0)
979     {
980         ASSIGN("glGetProgramivARB", getProgramiv);
981         ASSIGN("glIsProgramARB", isProgram);
982     }
983 
984     if (extensions.count("GL_ARB_framebuffer_no_attachments") != 0)
985     {
986         ASSIGN("glFramebufferParameteri", framebufferParameteri);
987         ASSIGN("glGetFramebufferParameteriv", getFramebufferParameteriv);
988     }
989 
990     if (extensions.count("GL_ARB_framebuffer_object") != 0)
991     {
992         ASSIGN("glBindFramebuffer", bindFramebuffer);
993         ASSIGN("glBindRenderbuffer", bindRenderbuffer);
994         ASSIGN("glBlitFramebuffer", blitFramebuffer);
995         ASSIGN("glCheckFramebufferStatus", checkFramebufferStatus);
996         ASSIGN("glDeleteFramebuffers", deleteFramebuffers);
997         ASSIGN("glDeleteRenderbuffers", deleteRenderbuffers);
998         ASSIGN("glFramebufferRenderbuffer", framebufferRenderbuffer);
999         ASSIGN("glFramebufferTexture1D", framebufferTexture1D);
1000         ASSIGN("glFramebufferTexture2D", framebufferTexture2D);
1001         ASSIGN("glFramebufferTexture3D", framebufferTexture3D);
1002         ASSIGN("glFramebufferTextureLayer", framebufferTextureLayer);
1003         ASSIGN("glGenFramebuffers", genFramebuffers);
1004         ASSIGN("glGenRenderbuffers", genRenderbuffers);
1005         ASSIGN("glGenerateMipmap", generateMipmap);
1006         ASSIGN("glGetFramebufferAttachmentParameteriv", getFramebufferAttachmentParameteriv);
1007         ASSIGN("glGetRenderbufferParameteriv", getRenderbufferParameteriv);
1008         ASSIGN("glIsFramebuffer", isFramebuffer);
1009         ASSIGN("glIsRenderbuffer", isRenderbuffer);
1010         ASSIGN("glRenderbufferStorage", renderbufferStorage);
1011         ASSIGN("glRenderbufferStorageMultisample", renderbufferStorageMultisample);
1012     }
1013 
1014     if (extensions.count("GL_ARB_geometry_shader4") != 0)
1015     {
1016         ASSIGN("glFramebufferTextureARB", framebufferTexture);
1017         ASSIGN("glFramebufferTextureLayerARB", framebufferTextureLayer);
1018         ASSIGN("glProgramParameteriARB", programParameteri);
1019     }
1020 
1021     if (extensions.count("GL_ARB_get_program_binary") != 0)
1022     {
1023         ASSIGN("glGetProgramBinary", getProgramBinary);
1024         ASSIGN("glProgramBinary", programBinary);
1025         ASSIGN("glProgramParameteri", programParameteri);
1026     }
1027 
1028     if (extensions.count("GL_ARB_get_texture_sub_image") != 0)
1029     {
1030         ASSIGN("glGetCompressedTextureSubImage", getCompressedTextureSubImage);
1031         ASSIGN("glGetTextureSubImage", getTextureSubImage);
1032     }
1033 
1034     if (extensions.count("GL_ARB_gpu_shader_fp64") != 0)
1035     {
1036         ASSIGN("glGetUniformdv", getUniformdv);
1037         ASSIGN("glUniform1d", uniform1d);
1038         ASSIGN("glUniform1dv", uniform1dv);
1039         ASSIGN("glUniform2d", uniform2d);
1040         ASSIGN("glUniform2dv", uniform2dv);
1041         ASSIGN("glUniform3d", uniform3d);
1042         ASSIGN("glUniform3dv", uniform3dv);
1043         ASSIGN("glUniform4d", uniform4d);
1044         ASSIGN("glUniform4dv", uniform4dv);
1045         ASSIGN("glUniformMatrix2dv", uniformMatrix2dv);
1046         ASSIGN("glUniformMatrix2x3dv", uniformMatrix2x3dv);
1047         ASSIGN("glUniformMatrix2x4dv", uniformMatrix2x4dv);
1048         ASSIGN("glUniformMatrix3dv", uniformMatrix3dv);
1049         ASSIGN("glUniformMatrix3x2dv", uniformMatrix3x2dv);
1050         ASSIGN("glUniformMatrix3x4dv", uniformMatrix3x4dv);
1051         ASSIGN("glUniformMatrix4dv", uniformMatrix4dv);
1052         ASSIGN("glUniformMatrix4x2dv", uniformMatrix4x2dv);
1053         ASSIGN("glUniformMatrix4x3dv", uniformMatrix4x3dv);
1054     }
1055 
1056     if (extensions.count("GL_ARB_imaging") != 0)
1057     {
1058         ASSIGN("glBlendColor", blendColor);
1059         ASSIGN("glBlendEquation", blendEquation);
1060     }
1061 
1062     if (extensions.count("GL_ARB_instanced_arrays") != 0)
1063     {
1064         ASSIGN("glVertexAttribDivisorARB", vertexAttribDivisor);
1065     }
1066 
1067     if (extensions.count("GL_ARB_internalformat_query") != 0)
1068     {
1069         ASSIGN("glGetInternalformativ", getInternalformativ);
1070     }
1071 
1072     if (extensions.count("GL_ARB_internalformat_query2") != 0)
1073     {
1074         ASSIGN("glGetInternalformati64v", getInternalformati64v);
1075     }
1076 
1077     if (extensions.count("GL_ARB_invalidate_subdata") != 0)
1078     {
1079         ASSIGN("glInvalidateBufferData", invalidateBufferData);
1080         ASSIGN("glInvalidateBufferSubData", invalidateBufferSubData);
1081         ASSIGN("glInvalidateFramebuffer", invalidateFramebuffer);
1082         ASSIGN("glInvalidateSubFramebuffer", invalidateSubFramebuffer);
1083         ASSIGN("glInvalidateTexImage", invalidateTexImage);
1084         ASSIGN("glInvalidateTexSubImage", invalidateTexSubImage);
1085     }
1086 
1087     if (extensions.count("GL_ARB_map_buffer_range") != 0)
1088     {
1089         ASSIGN("glFlushMappedBufferRange", flushMappedBufferRange);
1090         ASSIGN("glMapBufferRange", mapBufferRange);
1091     }
1092 
1093     if (extensions.count("GL_ARB_multi_bind") != 0)
1094     {
1095         ASSIGN("glBindBuffersBase", bindBuffersBase);
1096         ASSIGN("glBindBuffersRange", bindBuffersRange);
1097         ASSIGN("glBindImageTextures", bindImageTextures);
1098         ASSIGN("glBindSamplers", bindSamplers);
1099         ASSIGN("glBindTextures", bindTextures);
1100         ASSIGN("glBindVertexBuffers", bindVertexBuffers);
1101     }
1102 
1103     if (extensions.count("GL_ARB_multi_draw_indirect") != 0)
1104     {
1105         ASSIGN("glMultiDrawArraysIndirect", multiDrawArraysIndirect);
1106         ASSIGN("glMultiDrawElementsIndirect", multiDrawElementsIndirect);
1107     }
1108 
1109     if (extensions.count("GL_ARB_multisample") != 0)
1110     {
1111         ASSIGN("glSampleCoverageARB", sampleCoverage);
1112     }
1113 
1114     if (extensions.count("GL_ARB_multitexture") != 0)
1115     {
1116         ASSIGN("glActiveTextureARB", activeTexture);
1117     }
1118 
1119     if (extensions.count("GL_ARB_occlusion_query") != 0)
1120     {
1121         ASSIGN("glBeginQueryARB", beginQuery);
1122         ASSIGN("glDeleteQueriesARB", deleteQueries);
1123         ASSIGN("glEndQueryARB", endQuery);
1124         ASSIGN("glGenQueriesARB", genQueries);
1125         ASSIGN("glGetQueryObjectivARB", getQueryObjectiv);
1126         ASSIGN("glGetQueryObjectuivARB", getQueryObjectuiv);
1127         ASSIGN("glGetQueryivARB", getQueryiv);
1128         ASSIGN("glIsQueryARB", isQuery);
1129     }
1130 
1131     if (extensions.count("GL_ARB_parallel_shader_compile") != 0)
1132     {
1133         ASSIGN("glMaxShaderCompilerThreadsARB", maxShaderCompilerThreadsARB);
1134     }
1135 
1136     if (extensions.count("GL_ARB_point_parameters") != 0)
1137     {
1138         ASSIGN("glPointParameterfARB", pointParameterf);
1139         ASSIGN("glPointParameterfvARB", pointParameterfv);
1140     }
1141 
1142     if (extensions.count("GL_ARB_program_interface_query") != 0)
1143     {
1144         ASSIGN("glGetProgramInterfaceiv", getProgramInterfaceiv);
1145         ASSIGN("glGetProgramResourceIndex", getProgramResourceIndex);
1146         ASSIGN("glGetProgramResourceLocation", getProgramResourceLocation);
1147         ASSIGN("glGetProgramResourceLocationIndex", getProgramResourceLocationIndex);
1148         ASSIGN("glGetProgramResourceName", getProgramResourceName);
1149         ASSIGN("glGetProgramResourceiv", getProgramResourceiv);
1150     }
1151 
1152     if (extensions.count("GL_ARB_provoking_vertex") != 0)
1153     {
1154         ASSIGN("glProvokingVertex", provokingVertex);
1155     }
1156 
1157     if (extensions.count("GL_ARB_robustness") != 0)
1158     {
1159         ASSIGN("glGetGraphicsResetStatusARB", getGraphicsResetStatus);
1160         ASSIGN("glGetnCompressedTexImageARB", getnCompressedTexImage);
1161         ASSIGN("glGetnTexImageARB", getnTexImage);
1162         ASSIGN("glGetnUniformdvARB", getnUniformdv);
1163         ASSIGN("glGetnUniformfvARB", getnUniformfv);
1164         ASSIGN("glGetnUniformivARB", getnUniformiv);
1165         ASSIGN("glGetnUniformuivARB", getnUniformuiv);
1166         ASSIGN("glReadnPixelsARB", readnPixels);
1167     }
1168 
1169     if (extensions.count("GL_ARB_sample_shading") != 0)
1170     {
1171         ASSIGN("glMinSampleShadingARB", minSampleShading);
1172     }
1173 
1174     if (extensions.count("GL_ARB_sampler_objects") != 0)
1175     {
1176         ASSIGN("glBindSampler", bindSampler);
1177         ASSIGN("glDeleteSamplers", deleteSamplers);
1178         ASSIGN("glGenSamplers", genSamplers);
1179         ASSIGN("glGetSamplerParameterIiv", getSamplerParameterIiv);
1180         ASSIGN("glGetSamplerParameterIuiv", getSamplerParameterIuiv);
1181         ASSIGN("glGetSamplerParameterfv", getSamplerParameterfv);
1182         ASSIGN("glGetSamplerParameteriv", getSamplerParameteriv);
1183         ASSIGN("glIsSampler", isSampler);
1184         ASSIGN("glSamplerParameterIiv", samplerParameterIiv);
1185         ASSIGN("glSamplerParameterIuiv", samplerParameterIuiv);
1186         ASSIGN("glSamplerParameterf", samplerParameterf);
1187         ASSIGN("glSamplerParameterfv", samplerParameterfv);
1188         ASSIGN("glSamplerParameteri", samplerParameteri);
1189         ASSIGN("glSamplerParameteriv", samplerParameteriv);
1190     }
1191 
1192     if (extensions.count("GL_ARB_separate_shader_objects") != 0)
1193     {
1194         ASSIGN("glActiveShaderProgram", activeShaderProgram);
1195         ASSIGN("glBindProgramPipeline", bindProgramPipeline);
1196         ASSIGN("glCreateShaderProgramv", createShaderProgramv);
1197         ASSIGN("glDeleteProgramPipelines", deleteProgramPipelines);
1198         ASSIGN("glGenProgramPipelines", genProgramPipelines);
1199         ASSIGN("glGetProgramPipelineInfoLog", getProgramPipelineInfoLog);
1200         ASSIGN("glGetProgramPipelineiv", getProgramPipelineiv);
1201         ASSIGN("glIsProgramPipeline", isProgramPipeline);
1202         ASSIGN("glProgramParameteri", programParameteri);
1203         ASSIGN("glProgramUniform1d", programUniform1d);
1204         ASSIGN("glProgramUniform1dv", programUniform1dv);
1205         ASSIGN("glProgramUniform1f", programUniform1f);
1206         ASSIGN("glProgramUniform1fv", programUniform1fv);
1207         ASSIGN("glProgramUniform1i", programUniform1i);
1208         ASSIGN("glProgramUniform1iv", programUniform1iv);
1209         ASSIGN("glProgramUniform1ui", programUniform1ui);
1210         ASSIGN("glProgramUniform1uiv", programUniform1uiv);
1211         ASSIGN("glProgramUniform2d", programUniform2d);
1212         ASSIGN("glProgramUniform2dv", programUniform2dv);
1213         ASSIGN("glProgramUniform2f", programUniform2f);
1214         ASSIGN("glProgramUniform2fv", programUniform2fv);
1215         ASSIGN("glProgramUniform2i", programUniform2i);
1216         ASSIGN("glProgramUniform2iv", programUniform2iv);
1217         ASSIGN("glProgramUniform2ui", programUniform2ui);
1218         ASSIGN("glProgramUniform2uiv", programUniform2uiv);
1219         ASSIGN("glProgramUniform3d", programUniform3d);
1220         ASSIGN("glProgramUniform3dv", programUniform3dv);
1221         ASSIGN("glProgramUniform3f", programUniform3f);
1222         ASSIGN("glProgramUniform3fv", programUniform3fv);
1223         ASSIGN("glProgramUniform3i", programUniform3i);
1224         ASSIGN("glProgramUniform3iv", programUniform3iv);
1225         ASSIGN("glProgramUniform3ui", programUniform3ui);
1226         ASSIGN("glProgramUniform3uiv", programUniform3uiv);
1227         ASSIGN("glProgramUniform4d", programUniform4d);
1228         ASSIGN("glProgramUniform4dv", programUniform4dv);
1229         ASSIGN("glProgramUniform4f", programUniform4f);
1230         ASSIGN("glProgramUniform4fv", programUniform4fv);
1231         ASSIGN("glProgramUniform4i", programUniform4i);
1232         ASSIGN("glProgramUniform4iv", programUniform4iv);
1233         ASSIGN("glProgramUniform4ui", programUniform4ui);
1234         ASSIGN("glProgramUniform4uiv", programUniform4uiv);
1235         ASSIGN("glProgramUniformMatrix2dv", programUniformMatrix2dv);
1236         ASSIGN("glProgramUniformMatrix2fv", programUniformMatrix2fv);
1237         ASSIGN("glProgramUniformMatrix2x3dv", programUniformMatrix2x3dv);
1238         ASSIGN("glProgramUniformMatrix2x3fv", programUniformMatrix2x3fv);
1239         ASSIGN("glProgramUniformMatrix2x4dv", programUniformMatrix2x4dv);
1240         ASSIGN("glProgramUniformMatrix2x4fv", programUniformMatrix2x4fv);
1241         ASSIGN("glProgramUniformMatrix3dv", programUniformMatrix3dv);
1242         ASSIGN("glProgramUniformMatrix3fv", programUniformMatrix3fv);
1243         ASSIGN("glProgramUniformMatrix3x2dv", programUniformMatrix3x2dv);
1244         ASSIGN("glProgramUniformMatrix3x2fv", programUniformMatrix3x2fv);
1245         ASSIGN("glProgramUniformMatrix3x4dv", programUniformMatrix3x4dv);
1246         ASSIGN("glProgramUniformMatrix3x4fv", programUniformMatrix3x4fv);
1247         ASSIGN("glProgramUniformMatrix4dv", programUniformMatrix4dv);
1248         ASSIGN("glProgramUniformMatrix4fv", programUniformMatrix4fv);
1249         ASSIGN("glProgramUniformMatrix4x2dv", programUniformMatrix4x2dv);
1250         ASSIGN("glProgramUniformMatrix4x2fv", programUniformMatrix4x2fv);
1251         ASSIGN("glProgramUniformMatrix4x3dv", programUniformMatrix4x3dv);
1252         ASSIGN("glProgramUniformMatrix4x3fv", programUniformMatrix4x3fv);
1253         ASSIGN("glUseProgramStages", useProgramStages);
1254         ASSIGN("glValidateProgramPipeline", validateProgramPipeline);
1255     }
1256 
1257     if (extensions.count("GL_ARB_shader_atomic_counters") != 0)
1258     {
1259         ASSIGN("glGetActiveAtomicCounterBufferiv", getActiveAtomicCounterBufferiv);
1260     }
1261 
1262     if (extensions.count("GL_ARB_shader_image_load_store") != 0)
1263     {
1264         ASSIGN("glBindImageTexture", bindImageTexture);
1265         ASSIGN("glMemoryBarrier", memoryBarrier);
1266     }
1267 
1268     if (extensions.count("GL_ARB_shader_objects") != 0)
1269     {
1270         ASSIGN("glCompileShaderARB", compileShader);
1271         ASSIGN("glGetActiveUniformARB", getActiveUniform);
1272         ASSIGN("glGetShaderSourceARB", getShaderSource);
1273         ASSIGN("glGetUniformLocationARB", getUniformLocation);
1274         ASSIGN("glGetUniformfvARB", getUniformfv);
1275         ASSIGN("glGetUniformivARB", getUniformiv);
1276         ASSIGN("glLinkProgramARB", linkProgram);
1277         ASSIGN("glShaderSourceARB", shaderSource);
1278         ASSIGN("glUniform1fARB", uniform1f);
1279         ASSIGN("glUniform1fvARB", uniform1fv);
1280         ASSIGN("glUniform1iARB", uniform1i);
1281         ASSIGN("glUniform1ivARB", uniform1iv);
1282         ASSIGN("glUniform2fARB", uniform2f);
1283         ASSIGN("glUniform2fvARB", uniform2fv);
1284         ASSIGN("glUniform2iARB", uniform2i);
1285         ASSIGN("glUniform2ivARB", uniform2iv);
1286         ASSIGN("glUniform3fARB", uniform3f);
1287         ASSIGN("glUniform3fvARB", uniform3fv);
1288         ASSIGN("glUniform3iARB", uniform3i);
1289         ASSIGN("glUniform3ivARB", uniform3iv);
1290         ASSIGN("glUniform4fARB", uniform4f);
1291         ASSIGN("glUniform4fvARB", uniform4fv);
1292         ASSIGN("glUniform4iARB", uniform4i);
1293         ASSIGN("glUniform4ivARB", uniform4iv);
1294         ASSIGN("glUniformMatrix2fvARB", uniformMatrix2fv);
1295         ASSIGN("glUniformMatrix3fvARB", uniformMatrix3fv);
1296         ASSIGN("glUniformMatrix4fvARB", uniformMatrix4fv);
1297         ASSIGN("glValidateProgramARB", validateProgram);
1298     }
1299 
1300     if (extensions.count("GL_ARB_shader_storage_buffer_object") != 0)
1301     {
1302         ASSIGN("glShaderStorageBlockBinding", shaderStorageBlockBinding);
1303     }
1304 
1305     if (extensions.count("GL_ARB_shader_subroutine") != 0)
1306     {
1307         ASSIGN("glGetActiveSubroutineName", getActiveSubroutineName);
1308         ASSIGN("glGetActiveSubroutineUniformName", getActiveSubroutineUniformName);
1309         ASSIGN("glGetActiveSubroutineUniformiv", getActiveSubroutineUniformiv);
1310         ASSIGN("glGetProgramStageiv", getProgramStageiv);
1311         ASSIGN("glGetSubroutineIndex", getSubroutineIndex);
1312         ASSIGN("glGetSubroutineUniformLocation", getSubroutineUniformLocation);
1313         ASSIGN("glGetUniformSubroutineuiv", getUniformSubroutineuiv);
1314         ASSIGN("glUniformSubroutinesuiv", uniformSubroutinesuiv);
1315     }
1316 
1317     if (extensions.count("GL_ARB_sync") != 0)
1318     {
1319         ASSIGN("glClientWaitSync", clientWaitSync);
1320         ASSIGN("glDeleteSync", deleteSync);
1321         ASSIGN("glFenceSync", fenceSync);
1322         ASSIGN("glGetInteger64v", getInteger64v);
1323         ASSIGN("glGetSynciv", getSynciv);
1324         ASSIGN("glIsSync", isSync);
1325         ASSIGN("glWaitSync", waitSync);
1326     }
1327 
1328     if (extensions.count("GL_ARB_tessellation_shader") != 0)
1329     {
1330         ASSIGN("glPatchParameterfv", patchParameterfv);
1331         ASSIGN("glPatchParameteri", patchParameteri);
1332     }
1333 
1334     if (extensions.count("GL_ARB_texture_barrier") != 0)
1335     {
1336         ASSIGN("glTextureBarrier", textureBarrier);
1337     }
1338 
1339     if (extensions.count("GL_ARB_texture_buffer_object") != 0)
1340     {
1341         ASSIGN("glTexBufferARB", texBuffer);
1342     }
1343 
1344     if (extensions.count("GL_ARB_texture_buffer_range") != 0)
1345     {
1346         ASSIGN("glTexBufferRange", texBufferRange);
1347     }
1348 
1349     if (extensions.count("GL_ARB_texture_compression") != 0)
1350     {
1351         ASSIGN("glCompressedTexImage1DARB", compressedTexImage1D);
1352         ASSIGN("glCompressedTexImage2DARB", compressedTexImage2D);
1353         ASSIGN("glCompressedTexImage3DARB", compressedTexImage3D);
1354         ASSIGN("glCompressedTexSubImage1DARB", compressedTexSubImage1D);
1355         ASSIGN("glCompressedTexSubImage2DARB", compressedTexSubImage2D);
1356         ASSIGN("glCompressedTexSubImage3DARB", compressedTexSubImage3D);
1357         ASSIGN("glGetCompressedTexImageARB", getCompressedTexImage);
1358     }
1359 
1360     if (extensions.count("GL_ARB_texture_multisample") != 0)
1361     {
1362         ASSIGN("glGetMultisamplefv", getMultisamplefv);
1363         ASSIGN("glSampleMaski", sampleMaski);
1364         ASSIGN("glTexImage2DMultisample", texImage2DMultisample);
1365         ASSIGN("glTexImage3DMultisample", texImage3DMultisample);
1366     }
1367 
1368     if (extensions.count("GL_ARB_texture_storage") != 0)
1369     {
1370         ASSIGN("glTexStorage1D", texStorage1D);
1371         ASSIGN("glTexStorage2D", texStorage2D);
1372         ASSIGN("glTexStorage3D", texStorage3D);
1373     }
1374 
1375     if (extensions.count("GL_ARB_texture_storage_multisample") != 0)
1376     {
1377         ASSIGN("glTexStorage2DMultisample", texStorage2DMultisample);
1378         ASSIGN("glTexStorage3DMultisample", texStorage3DMultisample);
1379     }
1380 
1381     if (extensions.count("GL_ARB_texture_view") != 0)
1382     {
1383         ASSIGN("glTextureView", textureView);
1384     }
1385 
1386     if (extensions.count("GL_ARB_timer_query") != 0)
1387     {
1388         ASSIGN("glGetQueryObjecti64v", getQueryObjecti64v);
1389         ASSIGN("glGetQueryObjectui64v", getQueryObjectui64v);
1390         ASSIGN("glQueryCounter", queryCounter);
1391     }
1392 
1393     if (extensions.count("GL_ARB_transform_feedback2") != 0)
1394     {
1395         ASSIGN("glBindTransformFeedback", bindTransformFeedback);
1396         ASSIGN("glDeleteTransformFeedbacks", deleteTransformFeedbacks);
1397         ASSIGN("glDrawTransformFeedback", drawTransformFeedback);
1398         ASSIGN("glGenTransformFeedbacks", genTransformFeedbacks);
1399         ASSIGN("glIsTransformFeedback", isTransformFeedback);
1400         ASSIGN("glPauseTransformFeedback", pauseTransformFeedback);
1401         ASSIGN("glResumeTransformFeedback", resumeTransformFeedback);
1402     }
1403 
1404     if (extensions.count("GL_ARB_transform_feedback3") != 0)
1405     {
1406         ASSIGN("glBeginQueryIndexed", beginQueryIndexed);
1407         ASSIGN("glDrawTransformFeedbackStream", drawTransformFeedbackStream);
1408         ASSIGN("glEndQueryIndexed", endQueryIndexed);
1409         ASSIGN("glGetQueryIndexediv", getQueryIndexediv);
1410     }
1411 
1412     if (extensions.count("GL_ARB_transform_feedback_instanced") != 0)
1413     {
1414         ASSIGN("glDrawTransformFeedbackInstanced", drawTransformFeedbackInstanced);
1415         ASSIGN("glDrawTransformFeedbackStreamInstanced", drawTransformFeedbackStreamInstanced);
1416     }
1417 
1418     if (extensions.count("GL_ARB_uniform_buffer_object") != 0)
1419     {
1420         ASSIGN("glBindBufferBase", bindBufferBase);
1421         ASSIGN("glBindBufferRange", bindBufferRange);
1422         ASSIGN("glGetActiveUniformBlockName", getActiveUniformBlockName);
1423         ASSIGN("glGetActiveUniformBlockiv", getActiveUniformBlockiv);
1424         ASSIGN("glGetActiveUniformName", getActiveUniformName);
1425         ASSIGN("glGetActiveUniformsiv", getActiveUniformsiv);
1426         ASSIGN("glGetIntegeri_v", getIntegeri_v);
1427         ASSIGN("glGetUniformBlockIndex", getUniformBlockIndex);
1428         ASSIGN("glGetUniformIndices", getUniformIndices);
1429         ASSIGN("glUniformBlockBinding", uniformBlockBinding);
1430     }
1431 
1432     if (extensions.count("GL_ARB_vertex_array_object") != 0)
1433     {
1434         ASSIGN("glBindVertexArray", bindVertexArray);
1435         ASSIGN("glDeleteVertexArrays", deleteVertexArrays);
1436         ASSIGN("glGenVertexArrays", genVertexArrays);
1437         ASSIGN("glIsVertexArray", isVertexArray);
1438     }
1439 
1440     if (extensions.count("GL_ARB_vertex_attrib_64bit") != 0)
1441     {
1442         ASSIGN("glGetVertexAttribLdv", getVertexAttribLdv);
1443         ASSIGN("glVertexAttribL1d", vertexAttribL1d);
1444         ASSIGN("glVertexAttribL1dv", vertexAttribL1dv);
1445         ASSIGN("glVertexAttribL2d", vertexAttribL2d);
1446         ASSIGN("glVertexAttribL2dv", vertexAttribL2dv);
1447         ASSIGN("glVertexAttribL3d", vertexAttribL3d);
1448         ASSIGN("glVertexAttribL3dv", vertexAttribL3dv);
1449         ASSIGN("glVertexAttribL4d", vertexAttribL4d);
1450         ASSIGN("glVertexAttribL4dv", vertexAttribL4dv);
1451         ASSIGN("glVertexAttribLPointer", vertexAttribLPointer);
1452     }
1453 
1454     if (extensions.count("GL_ARB_vertex_attrib_binding") != 0)
1455     {
1456         ASSIGN("glBindVertexBuffer", bindVertexBuffer);
1457         ASSIGN("glVertexAttribBinding", vertexAttribBinding);
1458         ASSIGN("glVertexAttribFormat", vertexAttribFormat);
1459         ASSIGN("glVertexAttribIFormat", vertexAttribIFormat);
1460         ASSIGN("glVertexAttribLFormat", vertexAttribLFormat);
1461         ASSIGN("glVertexBindingDivisor", vertexBindingDivisor);
1462     }
1463 
1464     if (extensions.count("GL_ARB_vertex_buffer_object") != 0)
1465     {
1466         ASSIGN("glBindBufferARB", bindBuffer);
1467         ASSIGN("glBufferDataARB", bufferData);
1468         ASSIGN("glBufferSubDataARB", bufferSubData);
1469         ASSIGN("glDeleteBuffersARB", deleteBuffers);
1470         ASSIGN("glGenBuffersARB", genBuffers);
1471         ASSIGN("glGetBufferParameterivARB", getBufferParameteriv);
1472         ASSIGN("glGetBufferPointervARB", getBufferPointerv);
1473         ASSIGN("glGetBufferSubDataARB", getBufferSubData);
1474         ASSIGN("glIsBufferARB", isBuffer);
1475         ASSIGN("glMapBufferARB", mapBuffer);
1476         ASSIGN("glUnmapBufferARB", unmapBuffer);
1477     }
1478 
1479     if (extensions.count("GL_ARB_vertex_program") != 0)
1480     {
1481         ASSIGN("glDisableVertexAttribArrayARB", disableVertexAttribArray);
1482         ASSIGN("glEnableVertexAttribArrayARB", enableVertexAttribArray);
1483         ASSIGN("glGetProgramivARB", getProgramiv);
1484         ASSIGN("glGetVertexAttribPointervARB", getVertexAttribPointerv);
1485         ASSIGN("glGetVertexAttribdvARB", getVertexAttribdv);
1486         ASSIGN("glGetVertexAttribfvARB", getVertexAttribfv);
1487         ASSIGN("glGetVertexAttribivARB", getVertexAttribiv);
1488         ASSIGN("glIsProgramARB", isProgram);
1489         ASSIGN("glVertexAttrib1dARB", vertexAttrib1d);
1490         ASSIGN("glVertexAttrib1dvARB", vertexAttrib1dv);
1491         ASSIGN("glVertexAttrib1fARB", vertexAttrib1f);
1492         ASSIGN("glVertexAttrib1fvARB", vertexAttrib1fv);
1493         ASSIGN("glVertexAttrib1sARB", vertexAttrib1s);
1494         ASSIGN("glVertexAttrib1svARB", vertexAttrib1sv);
1495         ASSIGN("glVertexAttrib2dARB", vertexAttrib2d);
1496         ASSIGN("glVertexAttrib2dvARB", vertexAttrib2dv);
1497         ASSIGN("glVertexAttrib2fARB", vertexAttrib2f);
1498         ASSIGN("glVertexAttrib2fvARB", vertexAttrib2fv);
1499         ASSIGN("glVertexAttrib2sARB", vertexAttrib2s);
1500         ASSIGN("glVertexAttrib2svARB", vertexAttrib2sv);
1501         ASSIGN("glVertexAttrib3dARB", vertexAttrib3d);
1502         ASSIGN("glVertexAttrib3dvARB", vertexAttrib3dv);
1503         ASSIGN("glVertexAttrib3fARB", vertexAttrib3f);
1504         ASSIGN("glVertexAttrib3fvARB", vertexAttrib3fv);
1505         ASSIGN("glVertexAttrib3sARB", vertexAttrib3s);
1506         ASSIGN("glVertexAttrib3svARB", vertexAttrib3sv);
1507         ASSIGN("glVertexAttrib4NbvARB", vertexAttrib4Nbv);
1508         ASSIGN("glVertexAttrib4NivARB", vertexAttrib4Niv);
1509         ASSIGN("glVertexAttrib4NsvARB", vertexAttrib4Nsv);
1510         ASSIGN("glVertexAttrib4NubARB", vertexAttrib4Nub);
1511         ASSIGN("glVertexAttrib4NubvARB", vertexAttrib4Nubv);
1512         ASSIGN("glVertexAttrib4NuivARB", vertexAttrib4Nuiv);
1513         ASSIGN("glVertexAttrib4NusvARB", vertexAttrib4Nusv);
1514         ASSIGN("glVertexAttrib4bvARB", vertexAttrib4bv);
1515         ASSIGN("glVertexAttrib4dARB", vertexAttrib4d);
1516         ASSIGN("glVertexAttrib4dvARB", vertexAttrib4dv);
1517         ASSIGN("glVertexAttrib4fARB", vertexAttrib4f);
1518         ASSIGN("glVertexAttrib4fvARB", vertexAttrib4fv);
1519         ASSIGN("glVertexAttrib4ivARB", vertexAttrib4iv);
1520         ASSIGN("glVertexAttrib4sARB", vertexAttrib4s);
1521         ASSIGN("glVertexAttrib4svARB", vertexAttrib4sv);
1522         ASSIGN("glVertexAttrib4ubvARB", vertexAttrib4ubv);
1523         ASSIGN("glVertexAttrib4uivARB", vertexAttrib4uiv);
1524         ASSIGN("glVertexAttrib4usvARB", vertexAttrib4usv);
1525         ASSIGN("glVertexAttribPointerARB", vertexAttribPointer);
1526     }
1527 
1528     if (extensions.count("GL_ARB_vertex_shader") != 0)
1529     {
1530         ASSIGN("glBindAttribLocationARB", bindAttribLocation);
1531         ASSIGN("glDisableVertexAttribArrayARB", disableVertexAttribArray);
1532         ASSIGN("glEnableVertexAttribArrayARB", enableVertexAttribArray);
1533         ASSIGN("glGetActiveAttribARB", getActiveAttrib);
1534         ASSIGN("glGetAttribLocationARB", getAttribLocation);
1535         ASSIGN("glGetVertexAttribPointervARB", getVertexAttribPointerv);
1536         ASSIGN("glGetVertexAttribdvARB", getVertexAttribdv);
1537         ASSIGN("glGetVertexAttribfvARB", getVertexAttribfv);
1538         ASSIGN("glGetVertexAttribivARB", getVertexAttribiv);
1539         ASSIGN("glVertexAttrib1dARB", vertexAttrib1d);
1540         ASSIGN("glVertexAttrib1dvARB", vertexAttrib1dv);
1541         ASSIGN("glVertexAttrib1fARB", vertexAttrib1f);
1542         ASSIGN("glVertexAttrib1fvARB", vertexAttrib1fv);
1543         ASSIGN("glVertexAttrib1sARB", vertexAttrib1s);
1544         ASSIGN("glVertexAttrib1svARB", vertexAttrib1sv);
1545         ASSIGN("glVertexAttrib2dARB", vertexAttrib2d);
1546         ASSIGN("glVertexAttrib2dvARB", vertexAttrib2dv);
1547         ASSIGN("glVertexAttrib2fARB", vertexAttrib2f);
1548         ASSIGN("glVertexAttrib2fvARB", vertexAttrib2fv);
1549         ASSIGN("glVertexAttrib2sARB", vertexAttrib2s);
1550         ASSIGN("glVertexAttrib2svARB", vertexAttrib2sv);
1551         ASSIGN("glVertexAttrib3dARB", vertexAttrib3d);
1552         ASSIGN("glVertexAttrib3dvARB", vertexAttrib3dv);
1553         ASSIGN("glVertexAttrib3fARB", vertexAttrib3f);
1554         ASSIGN("glVertexAttrib3fvARB", vertexAttrib3fv);
1555         ASSIGN("glVertexAttrib3sARB", vertexAttrib3s);
1556         ASSIGN("glVertexAttrib3svARB", vertexAttrib3sv);
1557         ASSIGN("glVertexAttrib4NbvARB", vertexAttrib4Nbv);
1558         ASSIGN("glVertexAttrib4NivARB", vertexAttrib4Niv);
1559         ASSIGN("glVertexAttrib4NsvARB", vertexAttrib4Nsv);
1560         ASSIGN("glVertexAttrib4NubARB", vertexAttrib4Nub);
1561         ASSIGN("glVertexAttrib4NubvARB", vertexAttrib4Nubv);
1562         ASSIGN("glVertexAttrib4NuivARB", vertexAttrib4Nuiv);
1563         ASSIGN("glVertexAttrib4NusvARB", vertexAttrib4Nusv);
1564         ASSIGN("glVertexAttrib4bvARB", vertexAttrib4bv);
1565         ASSIGN("glVertexAttrib4dARB", vertexAttrib4d);
1566         ASSIGN("glVertexAttrib4dvARB", vertexAttrib4dv);
1567         ASSIGN("glVertexAttrib4fARB", vertexAttrib4f);
1568         ASSIGN("glVertexAttrib4fvARB", vertexAttrib4fv);
1569         ASSIGN("glVertexAttrib4ivARB", vertexAttrib4iv);
1570         ASSIGN("glVertexAttrib4sARB", vertexAttrib4s);
1571         ASSIGN("glVertexAttrib4svARB", vertexAttrib4sv);
1572         ASSIGN("glVertexAttrib4ubvARB", vertexAttrib4ubv);
1573         ASSIGN("glVertexAttrib4uivARB", vertexAttrib4uiv);
1574         ASSIGN("glVertexAttrib4usvARB", vertexAttrib4usv);
1575         ASSIGN("glVertexAttribPointerARB", vertexAttribPointer);
1576     }
1577 
1578     if (extensions.count("GL_ARB_vertex_type_2_10_10_10_rev") != 0)
1579     {
1580         ASSIGN("glVertexAttribP1ui", vertexAttribP1ui);
1581         ASSIGN("glVertexAttribP1uiv", vertexAttribP1uiv);
1582         ASSIGN("glVertexAttribP2ui", vertexAttribP2ui);
1583         ASSIGN("glVertexAttribP2uiv", vertexAttribP2uiv);
1584         ASSIGN("glVertexAttribP3ui", vertexAttribP3ui);
1585         ASSIGN("glVertexAttribP3uiv", vertexAttribP3uiv);
1586         ASSIGN("glVertexAttribP4ui", vertexAttribP4ui);
1587         ASSIGN("glVertexAttribP4uiv", vertexAttribP4uiv);
1588     }
1589 
1590     if (extensions.count("GL_ARB_viewport_array") != 0)
1591     {
1592         ASSIGN("glDepthRangeArrayv", depthRangeArrayv);
1593         ASSIGN("glDepthRangeIndexed", depthRangeIndexed);
1594         ASSIGN("glGetDoublei_v", getDoublei_v);
1595         ASSIGN("glGetFloati_v", getFloati_v);
1596         ASSIGN("glScissorArrayv", scissorArrayv);
1597         ASSIGN("glScissorIndexed", scissorIndexed);
1598         ASSIGN("glScissorIndexedv", scissorIndexedv);
1599         ASSIGN("glViewportArrayv", viewportArrayv);
1600         ASSIGN("glViewportIndexedf", viewportIndexedf);
1601         ASSIGN("glViewportIndexedfv", viewportIndexedfv);
1602     }
1603 
1604     if (extensions.count("GL_EXT_blend_color") != 0)
1605     {
1606         ASSIGN("glBlendColorEXT", blendColor);
1607     }
1608 
1609     if (extensions.count("GL_EXT_blend_equation_separate") != 0)
1610     {
1611         ASSIGN("glBlendEquationSeparateEXT", blendEquationSeparate);
1612     }
1613 
1614     if (extensions.count("GL_EXT_blend_func_separate") != 0)
1615     {
1616         ASSIGN("glBlendFuncSeparateEXT", blendFuncSeparate);
1617     }
1618 
1619     if (extensions.count("GL_EXT_copy_texture") != 0)
1620     {
1621         ASSIGN("glCopyTexImage1DEXT", copyTexImage1D);
1622         ASSIGN("glCopyTexImage2DEXT", copyTexImage2D);
1623         ASSIGN("glCopyTexSubImage1DEXT", copyTexSubImage1D);
1624         ASSIGN("glCopyTexSubImage2DEXT", copyTexSubImage2D);
1625         ASSIGN("glCopyTexSubImage3DEXT", copyTexSubImage3D);
1626     }
1627 
1628     if (extensions.count("GL_EXT_direct_state_access") != 0)
1629     {
1630         ASSIGN("glCheckNamedFramebufferStatusEXT", checkNamedFramebufferStatus);
1631         ASSIGN("glClearNamedBufferDataEXT", clearNamedBufferData);
1632         ASSIGN("glClearNamedBufferSubDataEXT", clearNamedBufferSubData);
1633         ASSIGN("glCompressedTextureSubImage1DEXT", compressedTextureSubImage1D);
1634         ASSIGN("glCompressedTextureSubImage2DEXT", compressedTextureSubImage2D);
1635         ASSIGN("glCompressedTextureSubImage3DEXT", compressedTextureSubImage3D);
1636         ASSIGN("glCopyTextureSubImage1DEXT", copyTextureSubImage1D);
1637         ASSIGN("glCopyTextureSubImage2DEXT", copyTextureSubImage2D);
1638         ASSIGN("glCopyTextureSubImage3DEXT", copyTextureSubImage3D);
1639         ASSIGN("glDisableVertexArrayAttribEXT", disableVertexArrayAttrib);
1640         ASSIGN("glEnableVertexArrayAttribEXT", enableVertexArrayAttrib);
1641         ASSIGN("glFlushMappedNamedBufferRangeEXT", flushMappedNamedBufferRange);
1642         ASSIGN("glGenerateTextureMipmapEXT", generateTextureMipmap);
1643         ASSIGN("glGetCompressedTextureImageEXT", getCompressedTextureImage);
1644         ASSIGN("glGetDoublei_vEXT", getDoublei_v);
1645         ASSIGN("glGetFloati_vEXT", getFloati_v);
1646         ASSIGN("glGetFramebufferParameterivEXT", getFramebufferParameteriv);
1647         ASSIGN("glGetNamedBufferParameterivEXT", getNamedBufferParameteriv);
1648         ASSIGN("glGetNamedBufferPointervEXT", getNamedBufferPointerv);
1649         ASSIGN("glGetNamedBufferSubDataEXT", getNamedBufferSubData);
1650         ASSIGN("glGetNamedFramebufferAttachmentParameterivEXT",
1651                getNamedFramebufferAttachmentParameteriv);
1652         ASSIGN("glGetNamedFramebufferParameterivEXT", getNamedFramebufferParameteriv);
1653         ASSIGN("glGetNamedRenderbufferParameterivEXT", getNamedRenderbufferParameteriv);
1654         ASSIGN("glGetTextureImageEXT", getTextureImage);
1655         ASSIGN("glGetTextureLevelParameterfvEXT", getTextureLevelParameterfv);
1656         ASSIGN("glGetTextureLevelParameterivEXT", getTextureLevelParameteriv);
1657         ASSIGN("glGetTextureParameterIivEXT", getTextureParameterIiv);
1658         ASSIGN("glGetTextureParameterIuivEXT", getTextureParameterIuiv);
1659         ASSIGN("glGetTextureParameterfvEXT", getTextureParameterfv);
1660         ASSIGN("glGetTextureParameterivEXT", getTextureParameteriv);
1661         ASSIGN("glMapNamedBufferEXT", mapNamedBuffer);
1662         ASSIGN("glMapNamedBufferRangeEXT", mapNamedBufferRange);
1663         ASSIGN("glNamedBufferDataEXT", namedBufferData);
1664         ASSIGN("glNamedBufferStorageEXT", namedBufferStorage);
1665         ASSIGN("glNamedBufferSubDataEXT", namedBufferSubData);
1666         ASSIGN("glNamedFramebufferParameteriEXT", namedFramebufferParameteri);
1667         ASSIGN("glNamedFramebufferRenderbufferEXT", namedFramebufferRenderbuffer);
1668         ASSIGN("glNamedFramebufferTextureEXT", namedFramebufferTexture);
1669         ASSIGN("glNamedFramebufferTextureLayerEXT", namedFramebufferTextureLayer);
1670         ASSIGN("glNamedRenderbufferStorageEXT", namedRenderbufferStorage);
1671         ASSIGN("glNamedRenderbufferStorageMultisampleEXT", namedRenderbufferStorageMultisample);
1672         ASSIGN("glProgramUniform1dEXT", programUniform1d);
1673         ASSIGN("glProgramUniform1dvEXT", programUniform1dv);
1674         ASSIGN("glProgramUniform2dEXT", programUniform2d);
1675         ASSIGN("glProgramUniform2dvEXT", programUniform2dv);
1676         ASSIGN("glProgramUniform3dEXT", programUniform3d);
1677         ASSIGN("glProgramUniform3dvEXT", programUniform3dv);
1678         ASSIGN("glProgramUniform4dEXT", programUniform4d);
1679         ASSIGN("glProgramUniform4dvEXT", programUniform4dv);
1680         ASSIGN("glProgramUniformMatrix2dvEXT", programUniformMatrix2dv);
1681         ASSIGN("glProgramUniformMatrix2x3dvEXT", programUniformMatrix2x3dv);
1682         ASSIGN("glProgramUniformMatrix2x4dvEXT", programUniformMatrix2x4dv);
1683         ASSIGN("glProgramUniformMatrix3dvEXT", programUniformMatrix3dv);
1684         ASSIGN("glProgramUniformMatrix3x2dvEXT", programUniformMatrix3x2dv);
1685         ASSIGN("glProgramUniformMatrix3x4dvEXT", programUniformMatrix3x4dv);
1686         ASSIGN("glProgramUniformMatrix4dvEXT", programUniformMatrix4dv);
1687         ASSIGN("glProgramUniformMatrix4x2dvEXT", programUniformMatrix4x2dv);
1688         ASSIGN("glProgramUniformMatrix4x3dvEXT", programUniformMatrix4x3dv);
1689         ASSIGN("glTextureBufferEXT", textureBuffer);
1690         ASSIGN("glTextureBufferRangeEXT", textureBufferRange);
1691         ASSIGN("glTextureParameterIivEXT", textureParameterIiv);
1692         ASSIGN("glTextureParameterIuivEXT", textureParameterIuiv);
1693         ASSIGN("glTextureParameterfEXT", textureParameterf);
1694         ASSIGN("glTextureParameterfvEXT", textureParameterfv);
1695         ASSIGN("glTextureParameteriEXT", textureParameteri);
1696         ASSIGN("glTextureParameterivEXT", textureParameteriv);
1697         ASSIGN("glTextureStorage1DEXT", textureStorage1D);
1698         ASSIGN("glTextureStorage2DEXT", textureStorage2D);
1699         ASSIGN("glTextureStorage2DMultisampleEXT", textureStorage2DMultisample);
1700         ASSIGN("glTextureStorage3DEXT", textureStorage3D);
1701         ASSIGN("glTextureStorage3DMultisampleEXT", textureStorage3DMultisample);
1702         ASSIGN("glTextureSubImage1DEXT", textureSubImage1D);
1703         ASSIGN("glTextureSubImage2DEXT", textureSubImage2D);
1704         ASSIGN("glTextureSubImage3DEXT", textureSubImage3D);
1705         ASSIGN("glUnmapNamedBufferEXT", unmapNamedBuffer);
1706     }
1707 
1708     if (extensions.count("GL_EXT_draw_range_elements") != 0)
1709     {
1710         ASSIGN("glDrawRangeElementsEXT", drawRangeElements);
1711     }
1712 
1713     if (extensions.count("GL_EXT_framebuffer_blit") != 0)
1714     {
1715         ASSIGN("glBlitFramebufferEXT", blitFramebuffer);
1716     }
1717 
1718     if (extensions.count("GL_EXT_framebuffer_multisample") != 0)
1719     {
1720         ASSIGN("glRenderbufferStorageMultisampleEXT", renderbufferStorageMultisample);
1721     }
1722 
1723     if (extensions.count("GL_EXT_framebuffer_object") != 0)
1724     {
1725         ASSIGN("glBindFramebufferEXT", bindFramebuffer);
1726         ASSIGN("glBindRenderbufferEXT", bindRenderbuffer);
1727         ASSIGN("glCheckFramebufferStatusEXT", checkFramebufferStatus);
1728         ASSIGN("glDeleteFramebuffersEXT", deleteFramebuffers);
1729         ASSIGN("glDeleteRenderbuffersEXT", deleteRenderbuffers);
1730         ASSIGN("glFramebufferRenderbufferEXT", framebufferRenderbuffer);
1731         ASSIGN("glFramebufferTexture1DEXT", framebufferTexture1D);
1732         ASSIGN("glFramebufferTexture2DEXT", framebufferTexture2D);
1733         ASSIGN("glFramebufferTexture3DEXT", framebufferTexture3D);
1734         ASSIGN("glGenFramebuffersEXT", genFramebuffers);
1735         ASSIGN("glGenRenderbuffersEXT", genRenderbuffers);
1736         ASSIGN("glGenerateMipmapEXT", generateMipmap);
1737         ASSIGN("glGetFramebufferAttachmentParameterivEXT", getFramebufferAttachmentParameteriv);
1738         ASSIGN("glGetRenderbufferParameterivEXT", getRenderbufferParameteriv);
1739         ASSIGN("glIsFramebufferEXT", isFramebuffer);
1740         ASSIGN("glIsRenderbufferEXT", isRenderbuffer);
1741         ASSIGN("glRenderbufferStorageEXT", renderbufferStorage);
1742     }
1743 
1744     if (extensions.count("GL_EXT_gpu_shader4") != 0)
1745     {
1746         ASSIGN("glBindFragDataLocationEXT", bindFragDataLocation);
1747         ASSIGN("glGetFragDataLocationEXT", getFragDataLocation);
1748         ASSIGN("glGetUniformuivEXT", getUniformuiv);
1749         ASSIGN("glUniform1uiEXT", uniform1ui);
1750         ASSIGN("glUniform1uivEXT", uniform1uiv);
1751         ASSIGN("glUniform2uiEXT", uniform2ui);
1752         ASSIGN("glUniform2uivEXT", uniform2uiv);
1753         ASSIGN("glUniform3uiEXT", uniform3ui);
1754         ASSIGN("glUniform3uivEXT", uniform3uiv);
1755         ASSIGN("glUniform4uiEXT", uniform4ui);
1756         ASSIGN("glUniform4uivEXT", uniform4uiv);
1757     }
1758 
1759     if (extensions.count("GL_EXT_point_parameters") != 0)
1760     {
1761         ASSIGN("glPointParameterfEXT", pointParameterf);
1762         ASSIGN("glPointParameterfvEXT", pointParameterfv);
1763     }
1764 
1765     if (extensions.count("GL_EXT_polygon_offset") != 0)
1766     {
1767         ASSIGN("glPolygonOffsetEXT", polygonOffset);
1768     }
1769 
1770     if (extensions.count("GL_EXT_provoking_vertex") != 0)
1771     {
1772         ASSIGN("glProvokingVertexEXT", provokingVertex);
1773     }
1774 
1775     if (extensions.count("GL_EXT_shader_image_load_store") != 0)
1776     {
1777         ASSIGN("glBindImageTextureEXT", bindImageTexture);
1778         ASSIGN("glMemoryBarrierEXT", memoryBarrier);
1779     }
1780 
1781     if (extensions.count("GL_EXT_subtexture") != 0)
1782     {
1783         ASSIGN("glTexSubImage1DEXT", texSubImage1D);
1784         ASSIGN("glTexSubImage2DEXT", texSubImage2D);
1785     }
1786 
1787     if (extensions.count("GL_EXT_texture3D") != 0)
1788     {
1789         ASSIGN("glTexImage3DEXT", texImage3D);
1790         ASSIGN("glTexSubImage3DEXT", texSubImage3D);
1791     }
1792 
1793     if (extensions.count("GL_EXT_texture_array") != 0)
1794     {
1795         ASSIGN("glFramebufferTextureLayerEXT", framebufferTextureLayer);
1796     }
1797 
1798     if (extensions.count("GL_EXT_texture_buffer_object") != 0)
1799     {
1800         ASSIGN("glTexBufferEXT", texBuffer);
1801     }
1802 
1803     if (extensions.count("GL_EXT_texture_integer") != 0)
1804     {
1805         ASSIGN("glGetTexParameterIivEXT", getTexParameterIiv);
1806         ASSIGN("glGetTexParameterIuivEXT", getTexParameterIuiv);
1807         ASSIGN("glTexParameterIivEXT", texParameterIiv);
1808         ASSIGN("glTexParameterIuivEXT", texParameterIuiv);
1809     }
1810 
1811     if (extensions.count("GL_EXT_texture_object") != 0)
1812     {
1813         ASSIGN("glBindTextureEXT", bindTexture);
1814         ASSIGN("glDeleteTexturesEXT", deleteTextures);
1815         ASSIGN("glGenTexturesEXT", genTextures);
1816         ASSIGN("glIsTextureEXT", isTexture);
1817     }
1818 
1819     if (extensions.count("GL_EXT_timer_query") != 0)
1820     {
1821         ASSIGN("glGetQueryObjecti64vEXT", getQueryObjecti64v);
1822         ASSIGN("glGetQueryObjectui64vEXT", getQueryObjectui64v);
1823     }
1824 
1825     if (extensions.count("GL_EXT_transform_feedback") != 0)
1826     {
1827         ASSIGN("glBeginTransformFeedbackEXT", beginTransformFeedback);
1828         ASSIGN("glBindBufferBaseEXT", bindBufferBase);
1829         ASSIGN("glBindBufferRangeEXT", bindBufferRange);
1830         ASSIGN("glEndTransformFeedbackEXT", endTransformFeedback);
1831         ASSIGN("glGetTransformFeedbackVaryingEXT", getTransformFeedbackVarying);
1832         ASSIGN("glTransformFeedbackVaryingsEXT", transformFeedbackVaryings);
1833     }
1834 
1835     if (extensions.count("GL_EXT_vertex_array") != 0)
1836     {
1837         ASSIGN("glDrawArraysEXT", drawArrays);
1838         ASSIGN("glGetPointervEXT", getPointerv);
1839     }
1840 
1841     if (extensions.count("GL_EXT_vertex_attrib_64bit") != 0)
1842     {
1843         ASSIGN("glGetVertexAttribLdvEXT", getVertexAttribLdv);
1844         ASSIGN("glVertexAttribL1dEXT", vertexAttribL1d);
1845         ASSIGN("glVertexAttribL1dvEXT", vertexAttribL1dv);
1846         ASSIGN("glVertexAttribL2dEXT", vertexAttribL2d);
1847         ASSIGN("glVertexAttribL2dvEXT", vertexAttribL2dv);
1848         ASSIGN("glVertexAttribL3dEXT", vertexAttribL3d);
1849         ASSIGN("glVertexAttribL3dvEXT", vertexAttribL3dv);
1850         ASSIGN("glVertexAttribL4dEXT", vertexAttribL4d);
1851         ASSIGN("glVertexAttribL4dvEXT", vertexAttribL4dv);
1852         ASSIGN("glVertexAttribLPointerEXT", vertexAttribLPointer);
1853     }
1854 
1855     if (extensions.count("GL_KHR_debug") != 0)
1856     {
1857         ASSIGN("glDebugMessageCallback", debugMessageCallback);
1858         ASSIGN("glDebugMessageControl", debugMessageControl);
1859         ASSIGN("glDebugMessageInsert", debugMessageInsert);
1860         ASSIGN("glGetDebugMessageLog", getDebugMessageLog);
1861         ASSIGN("glGetObjectLabel", getObjectLabel);
1862         ASSIGN("glGetObjectPtrLabel", getObjectPtrLabel);
1863         ASSIGN("glGetPointerv", getPointerv);
1864         ASSIGN("glObjectLabel", objectLabel);
1865         ASSIGN("glObjectPtrLabel", objectPtrLabel);
1866         ASSIGN("glPopDebugGroup", popDebugGroup);
1867         ASSIGN("glPushDebugGroup", pushDebugGroup);
1868     }
1869 
1870     if (extensions.count("GL_KHR_robustness") != 0)
1871     {
1872         ASSIGN("glGetGraphicsResetStatus", getGraphicsResetStatus);
1873         ASSIGN("glGetnUniformfv", getnUniformfv);
1874         ASSIGN("glGetnUniformiv", getnUniformiv);
1875         ASSIGN("glGetnUniformuiv", getnUniformuiv);
1876         ASSIGN("glReadnPixels", readnPixels);
1877     }
1878 
1879     if (extensions.count("GL_NV_geometry_program4") != 0)
1880     {
1881         ASSIGN("glFramebufferTextureEXT", framebufferTexture);
1882         ASSIGN("glFramebufferTextureLayerEXT", framebufferTextureLayer);
1883     }
1884 
1885     if (extensions.count("GL_NV_vertex_program4") != 0)
1886     {
1887         ASSIGN("glGetVertexAttribIivEXT", getVertexAttribIiv);
1888         ASSIGN("glGetVertexAttribIuivEXT", getVertexAttribIuiv);
1889         ASSIGN("glVertexAttribI1iEXT", vertexAttribI1i);
1890         ASSIGN("glVertexAttribI1ivEXT", vertexAttribI1iv);
1891         ASSIGN("glVertexAttribI1uiEXT", vertexAttribI1ui);
1892         ASSIGN("glVertexAttribI1uivEXT", vertexAttribI1uiv);
1893         ASSIGN("glVertexAttribI2iEXT", vertexAttribI2i);
1894         ASSIGN("glVertexAttribI2ivEXT", vertexAttribI2iv);
1895         ASSIGN("glVertexAttribI2uiEXT", vertexAttribI2ui);
1896         ASSIGN("glVertexAttribI2uivEXT", vertexAttribI2uiv);
1897         ASSIGN("glVertexAttribI3iEXT", vertexAttribI3i);
1898         ASSIGN("glVertexAttribI3ivEXT", vertexAttribI3iv);
1899         ASSIGN("glVertexAttribI3uiEXT", vertexAttribI3ui);
1900         ASSIGN("glVertexAttribI3uivEXT", vertexAttribI3uiv);
1901         ASSIGN("glVertexAttribI4bvEXT", vertexAttribI4bv);
1902         ASSIGN("glVertexAttribI4iEXT", vertexAttribI4i);
1903         ASSIGN("glVertexAttribI4ivEXT", vertexAttribI4iv);
1904         ASSIGN("glVertexAttribI4svEXT", vertexAttribI4sv);
1905         ASSIGN("glVertexAttribI4ubvEXT", vertexAttribI4ubv);
1906         ASSIGN("glVertexAttribI4uiEXT", vertexAttribI4ui);
1907         ASSIGN("glVertexAttribI4uivEXT", vertexAttribI4uiv);
1908         ASSIGN("glVertexAttribI4usvEXT", vertexAttribI4usv);
1909         ASSIGN("glVertexAttribIPointerEXT", vertexAttribIPointer);
1910     }
1911 
1912     if (extensions.count("GL_OES_single_precision") != 0)
1913     {
1914         ASSIGN("glClearDepthfOES", clearDepthf);
1915         ASSIGN("glDepthRangefOES", depthRangef);
1916     }
1917 }
1918 
initProcsGLES(const gl::Version & version,const std::set<std::string> & extensions)1919 void DispatchTableGL::initProcsGLES(const gl::Version &version,
1920                                     const std::set<std::string> &extensions)
1921 {
1922     if (version >= gl::Version(2, 0))
1923     {
1924         ASSIGN("glActiveTexture", activeTexture);
1925         ASSIGN("glAttachShader", attachShader);
1926         ASSIGN("glBindAttribLocation", bindAttribLocation);
1927         ASSIGN("glBindBuffer", bindBuffer);
1928         ASSIGN("glBindFramebuffer", bindFramebuffer);
1929         ASSIGN("glBindRenderbuffer", bindRenderbuffer);
1930         ASSIGN("glBindTexture", bindTexture);
1931         ASSIGN("glBlendColor", blendColor);
1932         ASSIGN("glBlendEquation", blendEquation);
1933         ASSIGN("glBlendEquationSeparate", blendEquationSeparate);
1934         ASSIGN("glBlendFunc", blendFunc);
1935         ASSIGN("glBlendFuncSeparate", blendFuncSeparate);
1936         ASSIGN("glBufferData", bufferData);
1937         ASSIGN("glBufferSubData", bufferSubData);
1938         ASSIGN("glCheckFramebufferStatus", checkFramebufferStatus);
1939         ASSIGN("glClear", clear);
1940         ASSIGN("glClearColor", clearColor);
1941         ASSIGN("glClearDepthf", clearDepthf);
1942         ASSIGN("glClearStencil", clearStencil);
1943         ASSIGN("glColorMask", colorMask);
1944         ASSIGN("glCompileShader", compileShader);
1945         ASSIGN("glCompressedTexImage2D", compressedTexImage2D);
1946         ASSIGN("glCompressedTexSubImage2D", compressedTexSubImage2D);
1947         ASSIGN("glCopyTexImage2D", copyTexImage2D);
1948         ASSIGN("glCopyTexSubImage2D", copyTexSubImage2D);
1949         ASSIGN("glCreateProgram", createProgram);
1950         ASSIGN("glCreateShader", createShader);
1951         ASSIGN("glCullFace", cullFace);
1952         ASSIGN("glDeleteBuffers", deleteBuffers);
1953         ASSIGN("glDeleteFramebuffers", deleteFramebuffers);
1954         ASSIGN("glDeleteProgram", deleteProgram);
1955         ASSIGN("glDeleteRenderbuffers", deleteRenderbuffers);
1956         ASSIGN("glDeleteShader", deleteShader);
1957         ASSIGN("glDeleteTextures", deleteTextures);
1958         ASSIGN("glDepthFunc", depthFunc);
1959         ASSIGN("glDepthMask", depthMask);
1960         ASSIGN("glDepthRangef", depthRangef);
1961         ASSIGN("glDetachShader", detachShader);
1962         ASSIGN("glDisable", disable);
1963         ASSIGN("glDisableVertexAttribArray", disableVertexAttribArray);
1964         ASSIGN("glDrawArrays", drawArrays);
1965         ASSIGN("glDrawElements", drawElements);
1966         ASSIGN("glEnable", enable);
1967         ASSIGN("glEnableVertexAttribArray", enableVertexAttribArray);
1968         ASSIGN("glFinish", finish);
1969         ASSIGN("glFlush", flush);
1970         ASSIGN("glFramebufferRenderbuffer", framebufferRenderbuffer);
1971         ASSIGN("glFramebufferTexture2D", framebufferTexture2D);
1972         ASSIGN("glFrontFace", frontFace);
1973         ASSIGN("glGenBuffers", genBuffers);
1974         ASSIGN("glGenFramebuffers", genFramebuffers);
1975         ASSIGN("glGenRenderbuffers", genRenderbuffers);
1976         ASSIGN("glGenTextures", genTextures);
1977         ASSIGN("glGenerateMipmap", generateMipmap);
1978         ASSIGN("glGetActiveAttrib", getActiveAttrib);
1979         ASSIGN("glGetActiveUniform", getActiveUniform);
1980         ASSIGN("glGetAttachedShaders", getAttachedShaders);
1981         ASSIGN("glGetAttribLocation", getAttribLocation);
1982         ASSIGN("glGetBooleanv", getBooleanv);
1983         ASSIGN("glGetBufferParameteriv", getBufferParameteriv);
1984         ASSIGN("glGetError", getError);
1985         ASSIGN("glGetFloatv", getFloatv);
1986         ASSIGN("glGetFramebufferAttachmentParameteriv", getFramebufferAttachmentParameteriv);
1987         ASSIGN("glGetIntegerv", getIntegerv);
1988         ASSIGN("glGetProgramInfoLog", getProgramInfoLog);
1989         ASSIGN("glGetProgramiv", getProgramiv);
1990         ASSIGN("glGetRenderbufferParameteriv", getRenderbufferParameteriv);
1991         ASSIGN("glGetShaderInfoLog", getShaderInfoLog);
1992         ASSIGN("glGetShaderPrecisionFormat", getShaderPrecisionFormat);
1993         ASSIGN("glGetShaderSource", getShaderSource);
1994         ASSIGN("glGetShaderiv", getShaderiv);
1995         ASSIGN("glGetString", getString);
1996         ASSIGN("glGetTexParameterfv", getTexParameterfv);
1997         ASSIGN("glGetTexParameteriv", getTexParameteriv);
1998         ASSIGN("glGetUniformLocation", getUniformLocation);
1999         ASSIGN("glGetUniformfv", getUniformfv);
2000         ASSIGN("glGetUniformiv", getUniformiv);
2001         ASSIGN("glGetVertexAttribPointerv", getVertexAttribPointerv);
2002         ASSIGN("glGetVertexAttribfv", getVertexAttribfv);
2003         ASSIGN("glGetVertexAttribiv", getVertexAttribiv);
2004         ASSIGN("glHint", hint);
2005         ASSIGN("glIsBuffer", isBuffer);
2006         ASSIGN("glIsEnabled", isEnabled);
2007         ASSIGN("glIsFramebuffer", isFramebuffer);
2008         ASSIGN("glIsProgram", isProgram);
2009         ASSIGN("glIsRenderbuffer", isRenderbuffer);
2010         ASSIGN("glIsShader", isShader);
2011         ASSIGN("glIsTexture", isTexture);
2012         ASSIGN("glLineWidth", lineWidth);
2013         ASSIGN("glLinkProgram", linkProgram);
2014         ASSIGN("glPixelStorei", pixelStorei);
2015         ASSIGN("glPolygonOffset", polygonOffset);
2016         ASSIGN("glReadPixels", readPixels);
2017         ASSIGN("glReleaseShaderCompiler", releaseShaderCompiler);
2018         ASSIGN("glRenderbufferStorage", renderbufferStorage);
2019         ASSIGN("glSampleCoverage", sampleCoverage);
2020         ASSIGN("glScissor", scissor);
2021         ASSIGN("glShaderBinary", shaderBinary);
2022         ASSIGN("glShaderSource", shaderSource);
2023         ASSIGN("glStencilFunc", stencilFunc);
2024         ASSIGN("glStencilFuncSeparate", stencilFuncSeparate);
2025         ASSIGN("glStencilMask", stencilMask);
2026         ASSIGN("glStencilMaskSeparate", stencilMaskSeparate);
2027         ASSIGN("glStencilOp", stencilOp);
2028         ASSIGN("glStencilOpSeparate", stencilOpSeparate);
2029         ASSIGN("glTexImage2D", texImage2D);
2030         ASSIGN("glTexParameterf", texParameterf);
2031         ASSIGN("glTexParameterfv", texParameterfv);
2032         ASSIGN("glTexParameteri", texParameteri);
2033         ASSIGN("glTexParameteriv", texParameteriv);
2034         ASSIGN("glTexSubImage2D", texSubImage2D);
2035         ASSIGN("glUniform1f", uniform1f);
2036         ASSIGN("glUniform1fv", uniform1fv);
2037         ASSIGN("glUniform1i", uniform1i);
2038         ASSIGN("glUniform1iv", uniform1iv);
2039         ASSIGN("glUniform2f", uniform2f);
2040         ASSIGN("glUniform2fv", uniform2fv);
2041         ASSIGN("glUniform2i", uniform2i);
2042         ASSIGN("glUniform2iv", uniform2iv);
2043         ASSIGN("glUniform3f", uniform3f);
2044         ASSIGN("glUniform3fv", uniform3fv);
2045         ASSIGN("glUniform3i", uniform3i);
2046         ASSIGN("glUniform3iv", uniform3iv);
2047         ASSIGN("glUniform4f", uniform4f);
2048         ASSIGN("glUniform4fv", uniform4fv);
2049         ASSIGN("glUniform4i", uniform4i);
2050         ASSIGN("glUniform4iv", uniform4iv);
2051         ASSIGN("glUniformMatrix2fv", uniformMatrix2fv);
2052         ASSIGN("glUniformMatrix3fv", uniformMatrix3fv);
2053         ASSIGN("glUniformMatrix4fv", uniformMatrix4fv);
2054         ASSIGN("glUseProgram", useProgram);
2055         ASSIGN("glValidateProgram", validateProgram);
2056         ASSIGN("glVertexAttrib1f", vertexAttrib1f);
2057         ASSIGN("glVertexAttrib1fv", vertexAttrib1fv);
2058         ASSIGN("glVertexAttrib2f", vertexAttrib2f);
2059         ASSIGN("glVertexAttrib2fv", vertexAttrib2fv);
2060         ASSIGN("glVertexAttrib3f", vertexAttrib3f);
2061         ASSIGN("glVertexAttrib3fv", vertexAttrib3fv);
2062         ASSIGN("glVertexAttrib4f", vertexAttrib4f);
2063         ASSIGN("glVertexAttrib4fv", vertexAttrib4fv);
2064         ASSIGN("glVertexAttribPointer", vertexAttribPointer);
2065         ASSIGN("glViewport", viewport);
2066     }
2067 
2068     if (version >= gl::Version(3, 0))
2069     {
2070         ASSIGN("glBeginQuery", beginQuery);
2071         ASSIGN("glBeginTransformFeedback", beginTransformFeedback);
2072         ASSIGN("glBindBufferBase", bindBufferBase);
2073         ASSIGN("glBindBufferRange", bindBufferRange);
2074         ASSIGN("glBindSampler", bindSampler);
2075         ASSIGN("glBindTransformFeedback", bindTransformFeedback);
2076         ASSIGN("glBindVertexArray", bindVertexArray);
2077         ASSIGN("glBlitFramebuffer", blitFramebuffer);
2078         ASSIGN("glClearBufferfi", clearBufferfi);
2079         ASSIGN("glClearBufferfv", clearBufferfv);
2080         ASSIGN("glClearBufferiv", clearBufferiv);
2081         ASSIGN("glClearBufferuiv", clearBufferuiv);
2082         ASSIGN("glClientWaitSync", clientWaitSync);
2083         ASSIGN("glCompressedTexImage3D", compressedTexImage3D);
2084         ASSIGN("glCompressedTexSubImage3D", compressedTexSubImage3D);
2085         ASSIGN("glCopyBufferSubData", copyBufferSubData);
2086         ASSIGN("glCopyTexSubImage3D", copyTexSubImage3D);
2087         ASSIGN("glDeleteQueries", deleteQueries);
2088         ASSIGN("glDeleteSamplers", deleteSamplers);
2089         ASSIGN("glDeleteSync", deleteSync);
2090         ASSIGN("glDeleteTransformFeedbacks", deleteTransformFeedbacks);
2091         ASSIGN("glDeleteVertexArrays", deleteVertexArrays);
2092         ASSIGN("glDrawArraysInstanced", drawArraysInstanced);
2093         ASSIGN("glDrawBuffers", drawBuffers);
2094         ASSIGN("glDrawElementsInstanced", drawElementsInstanced);
2095         ASSIGN("glDrawRangeElements", drawRangeElements);
2096         ASSIGN("glEndQuery", endQuery);
2097         ASSIGN("glEndTransformFeedback", endTransformFeedback);
2098         ASSIGN("glFenceSync", fenceSync);
2099         ASSIGN("glFlushMappedBufferRange", flushMappedBufferRange);
2100         ASSIGN("glFramebufferTextureLayer", framebufferTextureLayer);
2101         ASSIGN("glGenQueries", genQueries);
2102         ASSIGN("glGenSamplers", genSamplers);
2103         ASSIGN("glGenTransformFeedbacks", genTransformFeedbacks);
2104         ASSIGN("glGenVertexArrays", genVertexArrays);
2105         ASSIGN("glGetActiveUniformBlockName", getActiveUniformBlockName);
2106         ASSIGN("glGetActiveUniformBlockiv", getActiveUniformBlockiv);
2107         ASSIGN("glGetActiveUniformsiv", getActiveUniformsiv);
2108         ASSIGN("glGetBufferParameteri64v", getBufferParameteri64v);
2109         ASSIGN("glGetBufferPointerv", getBufferPointerv);
2110         ASSIGN("glGetFragDataLocation", getFragDataLocation);
2111         ASSIGN("glGetInteger64i_v", getInteger64i_v);
2112         ASSIGN("glGetInteger64v", getInteger64v);
2113         ASSIGN("glGetIntegeri_v", getIntegeri_v);
2114         ASSIGN("glGetInternalformativ", getInternalformativ);
2115         ASSIGN("glGetProgramBinary", getProgramBinary);
2116         ASSIGN("glGetQueryObjectuiv", getQueryObjectuiv);
2117         ASSIGN("glGetQueryiv", getQueryiv);
2118         ASSIGN("glGetSamplerParameterfv", getSamplerParameterfv);
2119         ASSIGN("glGetSamplerParameteriv", getSamplerParameteriv);
2120         ASSIGN("glGetStringi", getStringi);
2121         ASSIGN("glGetSynciv", getSynciv);
2122         ASSIGN("glGetTransformFeedbackVarying", getTransformFeedbackVarying);
2123         ASSIGN("glGetUniformBlockIndex", getUniformBlockIndex);
2124         ASSIGN("glGetUniformIndices", getUniformIndices);
2125         ASSIGN("glGetUniformuiv", getUniformuiv);
2126         ASSIGN("glGetVertexAttribIiv", getVertexAttribIiv);
2127         ASSIGN("glGetVertexAttribIuiv", getVertexAttribIuiv);
2128         ASSIGN("glInvalidateFramebuffer", invalidateFramebuffer);
2129         ASSIGN("glInvalidateSubFramebuffer", invalidateSubFramebuffer);
2130         ASSIGN("glIsQuery", isQuery);
2131         ASSIGN("glIsSampler", isSampler);
2132         ASSIGN("glIsSync", isSync);
2133         ASSIGN("glIsTransformFeedback", isTransformFeedback);
2134         ASSIGN("glIsVertexArray", isVertexArray);
2135         ASSIGN("glMapBufferRange", mapBufferRange);
2136         ASSIGN("glPauseTransformFeedback", pauseTransformFeedback);
2137         ASSIGN("glProgramBinary", programBinary);
2138         ASSIGN("glProgramParameteri", programParameteri);
2139         ASSIGN("glReadBuffer", readBuffer);
2140         ASSIGN("glRenderbufferStorageMultisample", renderbufferStorageMultisample);
2141         ASSIGN("glResumeTransformFeedback", resumeTransformFeedback);
2142         ASSIGN("glSamplerParameterf", samplerParameterf);
2143         ASSIGN("glSamplerParameterfv", samplerParameterfv);
2144         ASSIGN("glSamplerParameteri", samplerParameteri);
2145         ASSIGN("glSamplerParameteriv", samplerParameteriv);
2146         ASSIGN("glTexImage3D", texImage3D);
2147         ASSIGN("glTexStorage2D", texStorage2D);
2148         ASSIGN("glTexStorage3D", texStorage3D);
2149         ASSIGN("glTexSubImage3D", texSubImage3D);
2150         ASSIGN("glTransformFeedbackVaryings", transformFeedbackVaryings);
2151         ASSIGN("glUniform1ui", uniform1ui);
2152         ASSIGN("glUniform1uiv", uniform1uiv);
2153         ASSIGN("glUniform2ui", uniform2ui);
2154         ASSIGN("glUniform2uiv", uniform2uiv);
2155         ASSIGN("glUniform3ui", uniform3ui);
2156         ASSIGN("glUniform3uiv", uniform3uiv);
2157         ASSIGN("glUniform4ui", uniform4ui);
2158         ASSIGN("glUniform4uiv", uniform4uiv);
2159         ASSIGN("glUniformBlockBinding", uniformBlockBinding);
2160         ASSIGN("glUniformMatrix2x3fv", uniformMatrix2x3fv);
2161         ASSIGN("glUniformMatrix2x4fv", uniformMatrix2x4fv);
2162         ASSIGN("glUniformMatrix3x2fv", uniformMatrix3x2fv);
2163         ASSIGN("glUniformMatrix3x4fv", uniformMatrix3x4fv);
2164         ASSIGN("glUniformMatrix4x2fv", uniformMatrix4x2fv);
2165         ASSIGN("glUniformMatrix4x3fv", uniformMatrix4x3fv);
2166         ASSIGN("glUnmapBuffer", unmapBuffer);
2167         ASSIGN("glVertexAttribDivisor", vertexAttribDivisor);
2168         ASSIGN("glVertexAttribI4i", vertexAttribI4i);
2169         ASSIGN("glVertexAttribI4iv", vertexAttribI4iv);
2170         ASSIGN("glVertexAttribI4ui", vertexAttribI4ui);
2171         ASSIGN("glVertexAttribI4uiv", vertexAttribI4uiv);
2172         ASSIGN("glVertexAttribIPointer", vertexAttribIPointer);
2173         ASSIGN("glWaitSync", waitSync);
2174     }
2175 
2176     if (version >= gl::Version(3, 1))
2177     {
2178         ASSIGN("glActiveShaderProgram", activeShaderProgram);
2179         ASSIGN("glBindImageTexture", bindImageTexture);
2180         ASSIGN("glBindProgramPipeline", bindProgramPipeline);
2181         ASSIGN("glBindVertexBuffer", bindVertexBuffer);
2182         ASSIGN("glCreateShaderProgramv", createShaderProgramv);
2183         ASSIGN("glDeleteProgramPipelines", deleteProgramPipelines);
2184         ASSIGN("glDispatchCompute", dispatchCompute);
2185         ASSIGN("glDispatchComputeIndirect", dispatchComputeIndirect);
2186         ASSIGN("glDrawArraysIndirect", drawArraysIndirect);
2187         ASSIGN("glDrawElementsIndirect", drawElementsIndirect);
2188         ASSIGN("glFramebufferParameteri", framebufferParameteri);
2189         ASSIGN("glGenProgramPipelines", genProgramPipelines);
2190         ASSIGN("glGetBooleani_v", getBooleani_v);
2191         ASSIGN("glGetFramebufferParameteriv", getFramebufferParameteriv);
2192         ASSIGN("glGetMultisamplefv", getMultisamplefv);
2193         ASSIGN("glGetProgramInterfaceiv", getProgramInterfaceiv);
2194         ASSIGN("glGetProgramPipelineInfoLog", getProgramPipelineInfoLog);
2195         ASSIGN("glGetProgramPipelineiv", getProgramPipelineiv);
2196         ASSIGN("glGetProgramResourceIndex", getProgramResourceIndex);
2197         ASSIGN("glGetProgramResourceLocation", getProgramResourceLocation);
2198         ASSIGN("glGetProgramResourceName", getProgramResourceName);
2199         ASSIGN("glGetProgramResourceiv", getProgramResourceiv);
2200         ASSIGN("glGetTexLevelParameterfv", getTexLevelParameterfv);
2201         ASSIGN("glGetTexLevelParameteriv", getTexLevelParameteriv);
2202         ASSIGN("glIsProgramPipeline", isProgramPipeline);
2203         ASSIGN("glMemoryBarrier", memoryBarrier);
2204         ASSIGN("glMemoryBarrierByRegion", memoryBarrierByRegion);
2205         ASSIGN("glProgramUniform1f", programUniform1f);
2206         ASSIGN("glProgramUniform1fv", programUniform1fv);
2207         ASSIGN("glProgramUniform1i", programUniform1i);
2208         ASSIGN("glProgramUniform1iv", programUniform1iv);
2209         ASSIGN("glProgramUniform1ui", programUniform1ui);
2210         ASSIGN("glProgramUniform1uiv", programUniform1uiv);
2211         ASSIGN("glProgramUniform2f", programUniform2f);
2212         ASSIGN("glProgramUniform2fv", programUniform2fv);
2213         ASSIGN("glProgramUniform2i", programUniform2i);
2214         ASSIGN("glProgramUniform2iv", programUniform2iv);
2215         ASSIGN("glProgramUniform2ui", programUniform2ui);
2216         ASSIGN("glProgramUniform2uiv", programUniform2uiv);
2217         ASSIGN("glProgramUniform3f", programUniform3f);
2218         ASSIGN("glProgramUniform3fv", programUniform3fv);
2219         ASSIGN("glProgramUniform3i", programUniform3i);
2220         ASSIGN("glProgramUniform3iv", programUniform3iv);
2221         ASSIGN("glProgramUniform3ui", programUniform3ui);
2222         ASSIGN("glProgramUniform3uiv", programUniform3uiv);
2223         ASSIGN("glProgramUniform4f", programUniform4f);
2224         ASSIGN("glProgramUniform4fv", programUniform4fv);
2225         ASSIGN("glProgramUniform4i", programUniform4i);
2226         ASSIGN("glProgramUniform4iv", programUniform4iv);
2227         ASSIGN("glProgramUniform4ui", programUniform4ui);
2228         ASSIGN("glProgramUniform4uiv", programUniform4uiv);
2229         ASSIGN("glProgramUniformMatrix2fv", programUniformMatrix2fv);
2230         ASSIGN("glProgramUniformMatrix2x3fv", programUniformMatrix2x3fv);
2231         ASSIGN("glProgramUniformMatrix2x4fv", programUniformMatrix2x4fv);
2232         ASSIGN("glProgramUniformMatrix3fv", programUniformMatrix3fv);
2233         ASSIGN("glProgramUniformMatrix3x2fv", programUniformMatrix3x2fv);
2234         ASSIGN("glProgramUniformMatrix3x4fv", programUniformMatrix3x4fv);
2235         ASSIGN("glProgramUniformMatrix4fv", programUniformMatrix4fv);
2236         ASSIGN("glProgramUniformMatrix4x2fv", programUniformMatrix4x2fv);
2237         ASSIGN("glProgramUniformMatrix4x3fv", programUniformMatrix4x3fv);
2238         ASSIGN("glSampleMaski", sampleMaski);
2239         ASSIGN("glTexStorage2DMultisample", texStorage2DMultisample);
2240         ASSIGN("glUseProgramStages", useProgramStages);
2241         ASSIGN("glValidateProgramPipeline", validateProgramPipeline);
2242         ASSIGN("glVertexAttribBinding", vertexAttribBinding);
2243         ASSIGN("glVertexAttribFormat", vertexAttribFormat);
2244         ASSIGN("glVertexAttribIFormat", vertexAttribIFormat);
2245         ASSIGN("glVertexBindingDivisor", vertexBindingDivisor);
2246     }
2247 
2248     if (version >= gl::Version(3, 2))
2249     {
2250         ASSIGN("glBlendBarrier", blendBarrier);
2251         ASSIGN("glBlendEquationSeparatei", blendEquationSeparatei);
2252         ASSIGN("glBlendEquationi", blendEquationi);
2253         ASSIGN("glBlendFuncSeparatei", blendFuncSeparatei);
2254         ASSIGN("glBlendFunci", blendFunci);
2255         ASSIGN("glColorMaski", colorMaski);
2256         ASSIGN("glCopyImageSubData", copyImageSubData);
2257         ASSIGN("glDebugMessageCallback", debugMessageCallback);
2258         ASSIGN("glDebugMessageControl", debugMessageControl);
2259         ASSIGN("glDebugMessageInsert", debugMessageInsert);
2260         ASSIGN("glDisablei", disablei);
2261         ASSIGN("glDrawElementsBaseVertex", drawElementsBaseVertex);
2262         ASSIGN("glDrawElementsInstancedBaseVertex", drawElementsInstancedBaseVertex);
2263         ASSIGN("glDrawRangeElementsBaseVertex", drawRangeElementsBaseVertex);
2264         ASSIGN("glEnablei", enablei);
2265         ASSIGN("glFramebufferTexture", framebufferTexture);
2266         ASSIGN("glGetDebugMessageLog", getDebugMessageLog);
2267         ASSIGN("glGetGraphicsResetStatus", getGraphicsResetStatus);
2268         ASSIGN("glGetObjectLabel", getObjectLabel);
2269         ASSIGN("glGetObjectPtrLabel", getObjectPtrLabel);
2270         ASSIGN("glGetPointerv", getPointerv);
2271         ASSIGN("glGetSamplerParameterIiv", getSamplerParameterIiv);
2272         ASSIGN("glGetSamplerParameterIuiv", getSamplerParameterIuiv);
2273         ASSIGN("glGetTexParameterIiv", getTexParameterIiv);
2274         ASSIGN("glGetTexParameterIuiv", getTexParameterIuiv);
2275         ASSIGN("glGetnUniformfv", getnUniformfv);
2276         ASSIGN("glGetnUniformiv", getnUniformiv);
2277         ASSIGN("glGetnUniformuiv", getnUniformuiv);
2278         ASSIGN("glIsEnabledi", isEnabledi);
2279         ASSIGN("glMinSampleShading", minSampleShading);
2280         ASSIGN("glObjectLabel", objectLabel);
2281         ASSIGN("glObjectPtrLabel", objectPtrLabel);
2282         ASSIGN("glPatchParameteri", patchParameteri);
2283         ASSIGN("glPopDebugGroup", popDebugGroup);
2284         ASSIGN("glPrimitiveBoundingBox", primitiveBoundingBox);
2285         ASSIGN("glPushDebugGroup", pushDebugGroup);
2286         ASSIGN("glReadnPixels", readnPixels);
2287         ASSIGN("glSamplerParameterIiv", samplerParameterIiv);
2288         ASSIGN("glSamplerParameterIuiv", samplerParameterIuiv);
2289         ASSIGN("glTexBuffer", texBuffer);
2290         ASSIGN("glTexBufferRange", texBufferRange);
2291         ASSIGN("glTexParameterIiv", texParameterIiv);
2292         ASSIGN("glTexParameterIuiv", texParameterIuiv);
2293         ASSIGN("glTexStorage3DMultisample", texStorage3DMultisample);
2294     }
2295 
2296     if (extensions.count("GL_EXT_base_instance") != 0)
2297     {
2298         ASSIGN("glDrawArraysInstancedBaseInstanceEXT", drawArraysInstancedBaseInstance);
2299         ASSIGN("glDrawElementsInstancedBaseInstanceEXT", drawElementsInstancedBaseInstance);
2300         ASSIGN("glDrawElementsInstancedBaseVertexBaseInstanceEXT",
2301                drawElementsInstancedBaseVertexBaseInstance);
2302     }
2303 
2304     if (extensions.count("GL_EXT_blend_func_extended") != 0)
2305     {
2306         ASSIGN("glBindFragDataLocationEXT", bindFragDataLocation);
2307         ASSIGN("glBindFragDataLocationIndexedEXT", bindFragDataLocationIndexed);
2308         ASSIGN("glGetFragDataIndexEXT", getFragDataIndex);
2309         ASSIGN("glGetProgramResourceLocationIndexEXT", getProgramResourceLocationIndex);
2310     }
2311 
2312     if (extensions.count("GL_EXT_buffer_storage") != 0)
2313     {
2314         ASSIGN("glBufferStorageEXT", bufferStorage);
2315     }
2316 
2317     if (extensions.count("GL_EXT_clear_texture") != 0)
2318     {
2319         ASSIGN("glClearTexImageEXT", clearTexImage);
2320         ASSIGN("glClearTexSubImageEXT", clearTexSubImage);
2321     }
2322 
2323     if (extensions.count("GL_EXT_clip_control") != 0)
2324     {
2325         ASSIGN("glClipControlEXT", clipControl);
2326     }
2327 
2328     if (extensions.count("GL_EXT_copy_image") != 0)
2329     {
2330         ASSIGN("glCopyImageSubDataEXT", copyImageSubData);
2331     }
2332 
2333     if (extensions.count("GL_EXT_discard_framebuffer") != 0)
2334     {
2335         ASSIGN("glDiscardFramebufferEXT", discardFramebufferEXT);
2336     }
2337 
2338     if (extensions.count("GL_EXT_disjoint_timer_query") != 0)
2339     {
2340         ASSIGN("glBeginQueryEXT", beginQuery);
2341         ASSIGN("glDeleteQueriesEXT", deleteQueries);
2342         ASSIGN("glEndQueryEXT", endQuery);
2343         ASSIGN("glGenQueriesEXT", genQueries);
2344         ASSIGN("glGetInteger64vEXT", getInteger64v);
2345         ASSIGN("glGetQueryObjecti64vEXT", getQueryObjecti64v);
2346         ASSIGN("glGetQueryObjectivEXT", getQueryObjectiv);
2347         ASSIGN("glGetQueryObjectui64vEXT", getQueryObjectui64v);
2348         ASSIGN("glGetQueryObjectuivEXT", getQueryObjectuiv);
2349         ASSIGN("glGetQueryivEXT", getQueryiv);
2350         ASSIGN("glIsQueryEXT", isQuery);
2351         ASSIGN("glQueryCounterEXT", queryCounter);
2352     }
2353 
2354     if (extensions.count("GL_EXT_draw_buffers") != 0)
2355     {
2356         ASSIGN("glDrawBuffersEXT", drawBuffers);
2357     }
2358 
2359     if (extensions.count("GL_EXT_draw_buffers_indexed") != 0)
2360     {
2361         ASSIGN("glBlendEquationSeparateiEXT", blendEquationSeparatei);
2362         ASSIGN("glBlendEquationiEXT", blendEquationi);
2363         ASSIGN("glBlendFuncSeparateiEXT", blendFuncSeparatei);
2364         ASSIGN("glBlendFunciEXT", blendFunci);
2365         ASSIGN("glColorMaskiEXT", colorMaski);
2366         ASSIGN("glDisableiEXT", disablei);
2367         ASSIGN("glEnableiEXT", enablei);
2368         ASSIGN("glIsEnablediEXT", isEnabledi);
2369     }
2370 
2371     if (extensions.count("GL_EXT_draw_elements_base_vertex") != 0)
2372     {
2373         ASSIGN("glDrawElementsBaseVertexEXT", drawElementsBaseVertex);
2374         ASSIGN("glDrawElementsInstancedBaseVertexEXT", drawElementsInstancedBaseVertex);
2375         ASSIGN("glDrawRangeElementsBaseVertexEXT", drawRangeElementsBaseVertex);
2376         ASSIGN("glMultiDrawElementsBaseVertexEXT", multiDrawElementsBaseVertex);
2377     }
2378 
2379     if (extensions.count("GL_EXT_draw_transform_feedback") != 0)
2380     {
2381         ASSIGN("glDrawTransformFeedbackEXT", drawTransformFeedback);
2382         ASSIGN("glDrawTransformFeedbackInstancedEXT", drawTransformFeedbackInstanced);
2383     }
2384 
2385     if (extensions.count("GL_EXT_geometry_shader") != 0)
2386     {
2387         ASSIGN("glFramebufferTextureEXT", framebufferTexture);
2388     }
2389 
2390     if (extensions.count("GL_EXT_instanced_arrays") != 0)
2391     {
2392         ASSIGN("glVertexAttribDivisorEXT", vertexAttribDivisor);
2393     }
2394 
2395     if (extensions.count("GL_EXT_map_buffer_range") != 0)
2396     {
2397         ASSIGN("glFlushMappedBufferRangeEXT", flushMappedBufferRange);
2398         ASSIGN("glMapBufferRangeEXT", mapBufferRange);
2399     }
2400 
2401     if (extensions.count("GL_EXT_multi_draw_indirect") != 0)
2402     {
2403         ASSIGN("glMultiDrawArraysIndirectEXT", multiDrawArraysIndirect);
2404         ASSIGN("glMultiDrawElementsIndirectEXT", multiDrawElementsIndirect);
2405     }
2406 
2407     if (extensions.count("GL_EXT_multisampled_render_to_texture") != 0)
2408     {
2409         ASSIGN("glRenderbufferStorageMultisampleEXT", renderbufferStorageMultisample);
2410     }
2411 
2412     if (extensions.count("GL_EXT_multiview_draw_buffers") != 0)
2413     {
2414         ASSIGN("glGetIntegeri_vEXT", getIntegeri_v);
2415     }
2416 
2417     if (extensions.count("GL_EXT_occlusion_query_boolean") != 0)
2418     {
2419         ASSIGN("glBeginQueryEXT", beginQuery);
2420         ASSIGN("glDeleteQueriesEXT", deleteQueries);
2421         ASSIGN("glEndQueryEXT", endQuery);
2422         ASSIGN("glGenQueriesEXT", genQueries);
2423         ASSIGN("glGetQueryObjectuivEXT", getQueryObjectuiv);
2424         ASSIGN("glGetQueryivEXT", getQueryiv);
2425         ASSIGN("glIsQueryEXT", isQuery);
2426     }
2427 
2428     if (extensions.count("GL_EXT_primitive_bounding_box") != 0)
2429     {
2430         ASSIGN("glPrimitiveBoundingBoxEXT", primitiveBoundingBox);
2431     }
2432 
2433     if (extensions.count("GL_EXT_robustness") != 0)
2434     {
2435         ASSIGN("glGetGraphicsResetStatusEXT", getGraphicsResetStatus);
2436         ASSIGN("glGetnUniformfvEXT", getnUniformfv);
2437         ASSIGN("glGetnUniformivEXT", getnUniformiv);
2438         ASSIGN("glReadnPixelsEXT", readnPixels);
2439     }
2440 
2441     if (extensions.count("GL_EXT_tessellation_shader") != 0)
2442     {
2443         ASSIGN("glPatchParameteriEXT", patchParameteri);
2444     }
2445 
2446     if (extensions.count("GL_EXT_texture_border_clamp") != 0)
2447     {
2448         ASSIGN("glGetSamplerParameterIivEXT", getSamplerParameterIiv);
2449         ASSIGN("glGetSamplerParameterIuivEXT", getSamplerParameterIuiv);
2450         ASSIGN("glGetTexParameterIivEXT", getTexParameterIiv);
2451         ASSIGN("glGetTexParameterIuivEXT", getTexParameterIuiv);
2452         ASSIGN("glSamplerParameterIivEXT", samplerParameterIiv);
2453         ASSIGN("glSamplerParameterIuivEXT", samplerParameterIuiv);
2454         ASSIGN("glTexParameterIivEXT", texParameterIiv);
2455         ASSIGN("glTexParameterIuivEXT", texParameterIuiv);
2456     }
2457 
2458     if (extensions.count("GL_EXT_texture_buffer") != 0)
2459     {
2460         ASSIGN("glTexBufferEXT", texBuffer);
2461         ASSIGN("glTexBufferRangeEXT", texBufferRange);
2462     }
2463 
2464     if (extensions.count("GL_EXT_texture_storage") != 0)
2465     {
2466         ASSIGN("glTexStorage1DEXT", texStorage1D);
2467         ASSIGN("glTexStorage2DEXT", texStorage2D);
2468         ASSIGN("glTexStorage3DEXT", texStorage3D);
2469         ASSIGN("glTextureStorage1DEXT", textureStorage1D);
2470         ASSIGN("glTextureStorage2DEXT", textureStorage2D);
2471         ASSIGN("glTextureStorage3DEXT", textureStorage3D);
2472     }
2473 
2474     if (extensions.count("GL_EXT_texture_view") != 0)
2475     {
2476         ASSIGN("glTextureViewEXT", textureView);
2477     }
2478 
2479     if (extensions.count("GL_KHR_debug") != 0)
2480     {
2481         ASSIGN("glDebugMessageCallbackKHR", debugMessageCallback);
2482         ASSIGN("glDebugMessageControlKHR", debugMessageControl);
2483         ASSIGN("glDebugMessageInsertKHR", debugMessageInsert);
2484         ASSIGN("glGetDebugMessageLogKHR", getDebugMessageLog);
2485         ASSIGN("glGetObjectLabelKHR", getObjectLabel);
2486         ASSIGN("glGetObjectPtrLabelKHR", getObjectPtrLabel);
2487         ASSIGN("glGetPointervKHR", getPointerv);
2488         ASSIGN("glObjectLabelKHR", objectLabel);
2489         ASSIGN("glObjectPtrLabelKHR", objectPtrLabel);
2490         ASSIGN("glPopDebugGroupKHR", popDebugGroup);
2491         ASSIGN("glPushDebugGroupKHR", pushDebugGroup);
2492     }
2493 
2494     if (extensions.count("GL_KHR_robustness") != 0)
2495     {
2496         ASSIGN("glGetGraphicsResetStatusKHR", getGraphicsResetStatus);
2497         ASSIGN("glGetnUniformfvKHR", getnUniformfv);
2498         ASSIGN("glGetnUniformivKHR", getnUniformiv);
2499         ASSIGN("glGetnUniformuivKHR", getnUniformuiv);
2500         ASSIGN("glReadnPixelsKHR", readnPixels);
2501     }
2502 
2503     if (extensions.count("GL_OES_EGL_image") != 0)
2504     {
2505         ASSIGN("glEGLImageTargetRenderbufferStorageOES", eGLImageTargetRenderbufferStorageOES);
2506         ASSIGN("glEGLImageTargetTexture2DOES", eGLImageTargetTexture2DOES);
2507     }
2508 
2509     if (extensions.count("GL_OES_copy_image") != 0)
2510     {
2511         ASSIGN("glCopyImageSubDataOES", copyImageSubData);
2512     }
2513 
2514     if (extensions.count("GL_OES_draw_buffers_indexed") != 0)
2515     {
2516         ASSIGN("glBlendEquationSeparateiOES", blendEquationSeparatei);
2517         ASSIGN("glBlendEquationiOES", blendEquationi);
2518         ASSIGN("glBlendFuncSeparateiOES", blendFuncSeparatei);
2519         ASSIGN("glBlendFunciOES", blendFunci);
2520         ASSIGN("glColorMaskiOES", colorMaski);
2521         ASSIGN("glDisableiOES", disablei);
2522         ASSIGN("glEnableiOES", enablei);
2523         ASSIGN("glIsEnablediOES", isEnabledi);
2524     }
2525 
2526     if (extensions.count("GL_OES_draw_elements_base_vertex") != 0)
2527     {
2528         ASSIGN("glDrawElementsBaseVertexOES", drawElementsBaseVertex);
2529         ASSIGN("glDrawElementsInstancedBaseVertexOES", drawElementsInstancedBaseVertex);
2530         ASSIGN("glDrawRangeElementsBaseVertexOES", drawRangeElementsBaseVertex);
2531         ASSIGN("glMultiDrawElementsBaseVertexEXT", multiDrawElementsBaseVertex);
2532     }
2533 
2534     if (extensions.count("GL_OES_geometry_shader") != 0)
2535     {
2536         ASSIGN("glFramebufferTextureOES", framebufferTexture);
2537     }
2538 
2539     if (extensions.count("GL_OES_get_program_binary") != 0)
2540     {
2541         ASSIGN("glGetProgramBinaryOES", getProgramBinary);
2542         ASSIGN("glProgramBinaryOES", programBinary);
2543     }
2544 
2545     if (extensions.count("GL_OES_mapbuffer") != 0)
2546     {
2547         ASSIGN("glGetBufferPointervOES", getBufferPointerv);
2548         ASSIGN("glMapBufferOES", mapBuffer);
2549         ASSIGN("glUnmapBufferOES", unmapBuffer);
2550     }
2551 
2552     if (extensions.count("GL_OES_primitive_bounding_box") != 0)
2553     {
2554         ASSIGN("glPrimitiveBoundingBoxOES", primitiveBoundingBox);
2555     }
2556 
2557     if (extensions.count("GL_OES_sample_shading") != 0)
2558     {
2559         ASSIGN("glMinSampleShadingOES", minSampleShading);
2560     }
2561 
2562     if (extensions.count("GL_OES_tessellation_shader") != 0)
2563     {
2564         ASSIGN("glPatchParameteriOES", patchParameteri);
2565     }
2566 
2567     if (extensions.count("GL_OES_texture_3D") != 0)
2568     {
2569         ASSIGN("glCompressedTexImage3DOES", compressedTexImage3D);
2570         ASSIGN("glCompressedTexSubImage3DOES", compressedTexSubImage3D);
2571         ASSIGN("glCopyTexSubImage3DOES", copyTexSubImage3D);
2572         ASSIGN("glFramebufferTexture3DOES", framebufferTexture3D);
2573         ASSIGN("glTexImage3DOES", texImage3D);
2574         ASSIGN("glTexSubImage3DOES", texSubImage3D);
2575     }
2576 
2577     if (extensions.count("GL_OES_texture_border_clamp") != 0)
2578     {
2579         ASSIGN("glGetSamplerParameterIivOES", getSamplerParameterIiv);
2580         ASSIGN("glGetSamplerParameterIuivOES", getSamplerParameterIuiv);
2581         ASSIGN("glGetTexParameterIivOES", getTexParameterIiv);
2582         ASSIGN("glGetTexParameterIuivOES", getTexParameterIuiv);
2583         ASSIGN("glSamplerParameterIivOES", samplerParameterIiv);
2584         ASSIGN("glSamplerParameterIuivOES", samplerParameterIuiv);
2585         ASSIGN("glTexParameterIivOES", texParameterIiv);
2586         ASSIGN("glTexParameterIuivOES", texParameterIuiv);
2587     }
2588 
2589     if (extensions.count("GL_OES_texture_buffer") != 0)
2590     {
2591         ASSIGN("glTexBufferOES", texBuffer);
2592         ASSIGN("glTexBufferRangeOES", texBufferRange);
2593     }
2594 
2595     if (extensions.count("GL_OES_texture_storage_multisample_2d_array") != 0)
2596     {
2597         ASSIGN("glTexStorage3DMultisampleOES", texStorage3DMultisample);
2598     }
2599 
2600     if (extensions.count("GL_OES_texture_view") != 0)
2601     {
2602         ASSIGN("glTextureViewOES", textureView);
2603     }
2604 
2605     if (extensions.count("GL_OES_vertex_array_object") != 0)
2606     {
2607         ASSIGN("glBindVertexArrayOES", bindVertexArray);
2608         ASSIGN("glDeleteVertexArraysOES", deleteVertexArrays);
2609         ASSIGN("glGenVertexArraysOES", genVertexArrays);
2610         ASSIGN("glIsVertexArrayOES", isVertexArray);
2611     }
2612 
2613     if (extensions.count("GL_OES_viewport_array") != 0)
2614     {
2615         ASSIGN("glDisableiOES", disablei);
2616         ASSIGN("glEnableiOES", enablei);
2617         ASSIGN("glGetFloati_vOES", getFloati_v);
2618         ASSIGN("glIsEnablediOES", isEnabledi);
2619         ASSIGN("glScissorArrayvOES", scissorArrayv);
2620         ASSIGN("glScissorIndexedOES", scissorIndexed);
2621         ASSIGN("glScissorIndexedvOES", scissorIndexedv);
2622         ASSIGN("glViewportArrayvOES", viewportArrayv);
2623         ASSIGN("glViewportIndexedfOES", viewportIndexedf);
2624         ASSIGN("glViewportIndexedfvOES", viewportIndexedfv);
2625     }
2626 }
2627 
initProcsSharedExtensions(const std::set<std::string> & extensions)2628 void DispatchTableGL::initProcsSharedExtensions(const std::set<std::string> &extensions)
2629 {
2630     if (extensions.count("GL_EXT_blend_minmax") != 0)
2631     {
2632         ASSIGN("glBlendEquationEXT", blendEquation);
2633     }
2634 
2635     if (extensions.count("GL_EXT_debug_label") != 0)
2636     {
2637         ASSIGN("glGetObjectLabelEXT", getObjectLabel);
2638     }
2639 
2640     if (extensions.count("GL_EXT_debug_marker") != 0)
2641     {
2642         ASSIGN("glInsertEventMarkerEXT", insertEventMarkerEXT);
2643         ASSIGN("glPopGroupMarkerEXT", popGroupMarkerEXT);
2644         ASSIGN("glPushGroupMarkerEXT", pushGroupMarkerEXT);
2645     }
2646 
2647     if (extensions.count("GL_EXT_draw_instanced") != 0)
2648     {
2649         ASSIGN("glDrawArraysInstancedEXT", drawArraysInstanced);
2650         ASSIGN("glDrawElementsInstancedEXT", drawElementsInstanced);
2651     }
2652 
2653     if (extensions.count("GL_EXT_memory_object") != 0)
2654     {
2655         ASSIGN("glBufferStorageMemEXT", bufferStorageMemEXT);
2656         ASSIGN("glCreateMemoryObjectsEXT", createMemoryObjectsEXT);
2657         ASSIGN("glDeleteMemoryObjectsEXT", deleteMemoryObjectsEXT);
2658         ASSIGN("glGetMemoryObjectParameterivEXT", getMemoryObjectParameterivEXT);
2659         ASSIGN("glGetUnsignedBytei_vEXT", getUnsignedBytei_vEXT);
2660         ASSIGN("glGetUnsignedBytevEXT", getUnsignedBytevEXT);
2661         ASSIGN("glIsMemoryObjectEXT", isMemoryObjectEXT);
2662         ASSIGN("glMemoryObjectParameterivEXT", memoryObjectParameterivEXT);
2663         ASSIGN("glNamedBufferStorageMemEXT", namedBufferStorageMemEXT);
2664         ASSIGN("glTexStorageMem2DEXT", texStorageMem2DEXT);
2665         ASSIGN("glTexStorageMem2DMultisampleEXT", texStorageMem2DMultisampleEXT);
2666         ASSIGN("glTexStorageMem3DEXT", texStorageMem3DEXT);
2667         ASSIGN("glTexStorageMem3DMultisampleEXT", texStorageMem3DMultisampleEXT);
2668         ASSIGN("glTextureStorageMem2DEXT", textureStorageMem2DEXT);
2669         ASSIGN("glTextureStorageMem2DMultisampleEXT", textureStorageMem2DMultisampleEXT);
2670         ASSIGN("glTextureStorageMem3DEXT", textureStorageMem3DEXT);
2671         ASSIGN("glTextureStorageMem3DMultisampleEXT", textureStorageMem3DMultisampleEXT);
2672     }
2673 
2674     if (extensions.count("GL_EXT_memory_object_fd") != 0)
2675     {
2676         ASSIGN("glImportMemoryFdEXT", importMemoryFdEXT);
2677     }
2678 
2679     if (extensions.count("GL_EXT_memory_object_win32") != 0)
2680     {
2681         ASSIGN("glImportMemoryWin32HandleEXT", importMemoryWin32HandleEXT);
2682         ASSIGN("glImportMemoryWin32NameEXT", importMemoryWin32NameEXT);
2683     }
2684 
2685     if (extensions.count("GL_EXT_multi_draw_arrays") != 0)
2686     {
2687         ASSIGN("glMultiDrawArraysEXT", multiDrawArrays);
2688         ASSIGN("glMultiDrawElementsEXT", multiDrawElements);
2689     }
2690 
2691     if (extensions.count("GL_EXT_semaphore") != 0)
2692     {
2693         ASSIGN("glDeleteSemaphoresEXT", deleteSemaphoresEXT);
2694         ASSIGN("glGenSemaphoresEXT", genSemaphoresEXT);
2695         ASSIGN("glGetSemaphoreParameterui64vEXT", getSemaphoreParameterui64vEXT);
2696         ASSIGN("glGetUnsignedBytei_vEXT", getUnsignedBytei_vEXT);
2697         ASSIGN("glGetUnsignedBytevEXT", getUnsignedBytevEXT);
2698         ASSIGN("glIsSemaphoreEXT", isSemaphoreEXT);
2699         ASSIGN("glSemaphoreParameterui64vEXT", semaphoreParameterui64vEXT);
2700         ASSIGN("glSignalSemaphoreEXT", signalSemaphoreEXT);
2701         ASSIGN("glWaitSemaphoreEXT", waitSemaphoreEXT);
2702     }
2703 
2704     if (extensions.count("GL_EXT_semaphore_fd") != 0)
2705     {
2706         ASSIGN("glImportSemaphoreFdEXT", importSemaphoreFdEXT);
2707     }
2708 
2709     if (extensions.count("GL_EXT_semaphore_win32") != 0)
2710     {
2711         ASSIGN("glImportSemaphoreWin32HandleEXT", importSemaphoreWin32HandleEXT);
2712         ASSIGN("glImportSemaphoreWin32NameEXT", importSemaphoreWin32NameEXT);
2713     }
2714 
2715     if (extensions.count("GL_EXT_separate_shader_objects") != 0)
2716     {
2717         ASSIGN("glActiveShaderProgramEXT", activeShaderProgram);
2718         ASSIGN("glBindProgramPipelineEXT", bindProgramPipeline);
2719         ASSIGN("glCreateShaderProgramvEXT", createShaderProgramv);
2720         ASSIGN("glDeleteProgramPipelinesEXT", deleteProgramPipelines);
2721         ASSIGN("glGenProgramPipelinesEXT", genProgramPipelines);
2722         ASSIGN("glGetProgramPipelineInfoLogEXT", getProgramPipelineInfoLog);
2723         ASSIGN("glGetProgramPipelineivEXT", getProgramPipelineiv);
2724         ASSIGN("glIsProgramPipelineEXT", isProgramPipeline);
2725         ASSIGN("glProgramParameteriEXT", programParameteri);
2726         ASSIGN("glProgramUniform1fEXT", programUniform1f);
2727         ASSIGN("glProgramUniform1fvEXT", programUniform1fv);
2728         ASSIGN("glProgramUniform1iEXT", programUniform1i);
2729         ASSIGN("glProgramUniform1ivEXT", programUniform1iv);
2730         ASSIGN("glProgramUniform1uiEXT", programUniform1ui);
2731         ASSIGN("glProgramUniform1uivEXT", programUniform1uiv);
2732         ASSIGN("glProgramUniform2fEXT", programUniform2f);
2733         ASSIGN("glProgramUniform2fvEXT", programUniform2fv);
2734         ASSIGN("glProgramUniform2iEXT", programUniform2i);
2735         ASSIGN("glProgramUniform2ivEXT", programUniform2iv);
2736         ASSIGN("glProgramUniform2uiEXT", programUniform2ui);
2737         ASSIGN("glProgramUniform2uivEXT", programUniform2uiv);
2738         ASSIGN("glProgramUniform3fEXT", programUniform3f);
2739         ASSIGN("glProgramUniform3fvEXT", programUniform3fv);
2740         ASSIGN("glProgramUniform3iEXT", programUniform3i);
2741         ASSIGN("glProgramUniform3ivEXT", programUniform3iv);
2742         ASSIGN("glProgramUniform3uiEXT", programUniform3ui);
2743         ASSIGN("glProgramUniform3uivEXT", programUniform3uiv);
2744         ASSIGN("glProgramUniform4fEXT", programUniform4f);
2745         ASSIGN("glProgramUniform4fvEXT", programUniform4fv);
2746         ASSIGN("glProgramUniform4iEXT", programUniform4i);
2747         ASSIGN("glProgramUniform4ivEXT", programUniform4iv);
2748         ASSIGN("glProgramUniform4uiEXT", programUniform4ui);
2749         ASSIGN("glProgramUniform4uivEXT", programUniform4uiv);
2750         ASSIGN("glProgramUniformMatrix2fvEXT", programUniformMatrix2fv);
2751         ASSIGN("glProgramUniformMatrix2x3fvEXT", programUniformMatrix2x3fv);
2752         ASSIGN("glProgramUniformMatrix2x4fvEXT", programUniformMatrix2x4fv);
2753         ASSIGN("glProgramUniformMatrix3fvEXT", programUniformMatrix3fv);
2754         ASSIGN("glProgramUniformMatrix3x2fvEXT", programUniformMatrix3x2fv);
2755         ASSIGN("glProgramUniformMatrix3x4fvEXT", programUniformMatrix3x4fv);
2756         ASSIGN("glProgramUniformMatrix4fvEXT", programUniformMatrix4fv);
2757         ASSIGN("glProgramUniformMatrix4fvEXT", programUniformMatrix4fv);
2758         ASSIGN("glProgramUniformMatrix4x2fvEXT", programUniformMatrix4x2fv);
2759         ASSIGN("glProgramUniformMatrix4x3fvEXT", programUniformMatrix4x3fv);
2760         ASSIGN("glUseProgramStagesEXT", useProgramStages);
2761         ASSIGN("glValidateProgramPipelineEXT", validateProgramPipeline);
2762     }
2763 
2764     if (extensions.count("GL_KHR_parallel_shader_compile") != 0)
2765     {
2766         ASSIGN("glMaxShaderCompilerThreadsKHR", maxShaderCompilerThreadsKHR);
2767     }
2768 
2769     if (extensions.count("GL_NV_fence") != 0)
2770     {
2771         ASSIGN("glDeleteFencesNV", deleteFencesNV);
2772         ASSIGN("glFinishFenceNV", finishFenceNV);
2773         ASSIGN("glGenFencesNV", genFencesNV);
2774         ASSIGN("glGetFenceivNV", getFenceivNV);
2775         ASSIGN("glIsFenceNV", isFenceNV);
2776         ASSIGN("glSetFenceNV", setFenceNV);
2777         ASSIGN("glTestFenceNV", testFenceNV);
2778     }
2779 
2780     if (extensions.count("GL_NV_framebuffer_mixed_samples") != 0)
2781     {
2782         ASSIGN("glCoverageModulationNV", coverageModulationNV);
2783     }
2784 
2785     if (extensions.count("GL_NV_internalformat_sample_query") != 0)
2786     {
2787         ASSIGN("glGetInternalformatSampleivNV", getInternalformatSampleivNV);
2788     }
2789 
2790     if (extensions.count("GL_OVR_multiview") != 0)
2791     {
2792         ASSIGN("glFramebufferTextureMultiviewOVR", framebufferTextureMultiviewOVR);
2793     }
2794 }
2795 
2796 #if defined(ANGLE_ENABLE_OPENGL_NULL)
initProcsDesktopGLNULL(const gl::Version & version,const std::set<std::string> & extensions)2797 void DispatchTableGL::initProcsDesktopGLNULL(const gl::Version &version,
2798                                              const std::set<std::string> &extensions)
2799 {
2800     if (version >= gl::Version(1, 0))
2801     {
2802         blendFunc              = &glBlendFuncNULL;
2803         clear                  = &glClearNULL;
2804         clearColor             = &glClearColorNULL;
2805         clearDepth             = &glClearDepthNULL;
2806         clearStencil           = &glClearStencilNULL;
2807         colorMask              = &glColorMaskNULL;
2808         cullFace               = &glCullFaceNULL;
2809         depthFunc              = &glDepthFuncNULL;
2810         depthMask              = &glDepthMaskNULL;
2811         depthRange             = &glDepthRangeNULL;
2812         disable                = &glDisableNULL;
2813         drawBuffer             = &glDrawBufferNULL;
2814         enable                 = &glEnableNULL;
2815         finish                 = &glFinishNULL;
2816         flush                  = &glFlushNULL;
2817         frontFace              = &glFrontFaceNULL;
2818         getBooleanv            = &glGetBooleanvNULL;
2819         getDoublev             = &glGetDoublevNULL;
2820         getError               = &glGetErrorNULL;
2821         getFloatv              = &glGetFloatvNULL;
2822         getIntegerv            = &glGetIntegervNULL;
2823         getString              = &glGetStringNULL;
2824         getTexImage            = &glGetTexImageNULL;
2825         getTexLevelParameterfv = &glGetTexLevelParameterfvNULL;
2826         getTexLevelParameteriv = &glGetTexLevelParameterivNULL;
2827         getTexParameterfv      = &glGetTexParameterfvNULL;
2828         getTexParameteriv      = &glGetTexParameterivNULL;
2829         hint                   = &glHintNULL;
2830         isEnabled              = &glIsEnabledNULL;
2831         lineWidth              = &glLineWidthNULL;
2832         logicOp                = &glLogicOpNULL;
2833         pixelStoref            = &glPixelStorefNULL;
2834         pixelStorei            = &glPixelStoreiNULL;
2835         pointSize              = &glPointSizeNULL;
2836         polygonMode            = &glPolygonModeNULL;
2837         readBuffer             = &glReadBufferNULL;
2838         readPixels             = &glReadPixelsNULL;
2839         scissor                = &glScissorNULL;
2840         stencilFunc            = &glStencilFuncNULL;
2841         stencilMask            = &glStencilMaskNULL;
2842         stencilOp              = &glStencilOpNULL;
2843         texImage1D             = &glTexImage1DNULL;
2844         texImage2D             = &glTexImage2DNULL;
2845         texParameterf          = &glTexParameterfNULL;
2846         texParameterfv         = &glTexParameterfvNULL;
2847         texParameteri          = &glTexParameteriNULL;
2848         texParameteriv         = &glTexParameterivNULL;
2849         viewport               = &glViewportNULL;
2850     }
2851 
2852     if (version >= gl::Version(1, 1))
2853     {
2854         bindTexture       = &glBindTextureNULL;
2855         copyTexImage1D    = &glCopyTexImage1DNULL;
2856         copyTexImage2D    = &glCopyTexImage2DNULL;
2857         copyTexSubImage1D = &glCopyTexSubImage1DNULL;
2858         copyTexSubImage2D = &glCopyTexSubImage2DNULL;
2859         deleteTextures    = &glDeleteTexturesNULL;
2860         drawArrays        = &glDrawArraysNULL;
2861         drawElements      = &glDrawElementsNULL;
2862         genTextures       = &glGenTexturesNULL;
2863         isTexture         = &glIsTextureNULL;
2864         polygonOffset     = &glPolygonOffsetNULL;
2865         texSubImage1D     = &glTexSubImage1DNULL;
2866         texSubImage2D     = &glTexSubImage2DNULL;
2867     }
2868 
2869     if (version >= gl::Version(1, 2))
2870     {
2871         copyTexSubImage3D = &glCopyTexSubImage3DNULL;
2872         drawRangeElements = &glDrawRangeElementsNULL;
2873         texImage3D        = &glTexImage3DNULL;
2874         texSubImage3D     = &glTexSubImage3DNULL;
2875     }
2876 
2877     if (version >= gl::Version(1, 3))
2878     {
2879         activeTexture           = &glActiveTextureNULL;
2880         compressedTexImage1D    = &glCompressedTexImage1DNULL;
2881         compressedTexImage2D    = &glCompressedTexImage2DNULL;
2882         compressedTexImage3D    = &glCompressedTexImage3DNULL;
2883         compressedTexSubImage1D = &glCompressedTexSubImage1DNULL;
2884         compressedTexSubImage2D = &glCompressedTexSubImage2DNULL;
2885         compressedTexSubImage3D = &glCompressedTexSubImage3DNULL;
2886         getCompressedTexImage   = &glGetCompressedTexImageNULL;
2887         sampleCoverage          = &glSampleCoverageNULL;
2888     }
2889 
2890     if (version >= gl::Version(1, 4))
2891     {
2892         blendColor        = &glBlendColorNULL;
2893         blendEquation     = &glBlendEquationNULL;
2894         blendFuncSeparate = &glBlendFuncSeparateNULL;
2895         multiDrawArrays   = &glMultiDrawArraysNULL;
2896         multiDrawElements = &glMultiDrawElementsNULL;
2897         pointParameterf   = &glPointParameterfNULL;
2898         pointParameterfv  = &glPointParameterfvNULL;
2899         pointParameteri   = &glPointParameteriNULL;
2900         pointParameteriv  = &glPointParameterivNULL;
2901     }
2902 
2903     if (version >= gl::Version(1, 5))
2904     {
2905         beginQuery           = &glBeginQueryNULL;
2906         bindBuffer           = &glBindBufferNULL;
2907         bufferData           = &glBufferDataNULL;
2908         bufferSubData        = &glBufferSubDataNULL;
2909         deleteBuffers        = &glDeleteBuffersNULL;
2910         deleteQueries        = &glDeleteQueriesNULL;
2911         endQuery             = &glEndQueryNULL;
2912         genBuffers           = &glGenBuffersNULL;
2913         genQueries           = &glGenQueriesNULL;
2914         getBufferParameteriv = &glGetBufferParameterivNULL;
2915         getBufferPointerv    = &glGetBufferPointervNULL;
2916         getBufferSubData     = &glGetBufferSubDataNULL;
2917         getQueryObjectiv     = &glGetQueryObjectivNULL;
2918         getQueryObjectuiv    = &glGetQueryObjectuivNULL;
2919         getQueryiv           = &glGetQueryivNULL;
2920         isBuffer             = &glIsBufferNULL;
2921         isQuery              = &glIsQueryNULL;
2922         mapBuffer            = &glMapBufferNULL;
2923         unmapBuffer          = &glUnmapBufferNULL;
2924     }
2925 
2926     if (version >= gl::Version(2, 0))
2927     {
2928         attachShader             = &glAttachShaderNULL;
2929         bindAttribLocation       = &glBindAttribLocationNULL;
2930         blendEquationSeparate    = &glBlendEquationSeparateNULL;
2931         compileShader            = &glCompileShaderNULL;
2932         createProgram            = &glCreateProgramNULL;
2933         createShader             = &glCreateShaderNULL;
2934         deleteProgram            = &glDeleteProgramNULL;
2935         deleteShader             = &glDeleteShaderNULL;
2936         detachShader             = &glDetachShaderNULL;
2937         disableVertexAttribArray = &glDisableVertexAttribArrayNULL;
2938         drawBuffers              = &glDrawBuffersNULL;
2939         enableVertexAttribArray  = &glEnableVertexAttribArrayNULL;
2940         getActiveAttrib          = &glGetActiveAttribNULL;
2941         getActiveUniform         = &glGetActiveUniformNULL;
2942         getAttachedShaders       = &glGetAttachedShadersNULL;
2943         getAttribLocation        = &glGetAttribLocationNULL;
2944         getProgramInfoLog        = &glGetProgramInfoLogNULL;
2945         getProgramiv             = &glGetProgramivNULL;
2946         getShaderInfoLog         = &glGetShaderInfoLogNULL;
2947         getShaderSource          = &glGetShaderSourceNULL;
2948         getShaderiv              = &glGetShaderivNULL;
2949         getUniformLocation       = &glGetUniformLocationNULL;
2950         getUniformfv             = &glGetUniformfvNULL;
2951         getUniformiv             = &glGetUniformivNULL;
2952         getVertexAttribPointerv  = &glGetVertexAttribPointervNULL;
2953         getVertexAttribdv        = &glGetVertexAttribdvNULL;
2954         getVertexAttribfv        = &glGetVertexAttribfvNULL;
2955         getVertexAttribiv        = &glGetVertexAttribivNULL;
2956         isProgram                = &glIsProgramNULL;
2957         isShader                 = &glIsShaderNULL;
2958         linkProgram              = &glLinkProgramNULL;
2959         shaderSource             = &glShaderSourceNULL;
2960         stencilFuncSeparate      = &glStencilFuncSeparateNULL;
2961         stencilMaskSeparate      = &glStencilMaskSeparateNULL;
2962         stencilOpSeparate        = &glStencilOpSeparateNULL;
2963         uniform1f                = &glUniform1fNULL;
2964         uniform1fv               = &glUniform1fvNULL;
2965         uniform1i                = &glUniform1iNULL;
2966         uniform1iv               = &glUniform1ivNULL;
2967         uniform2f                = &glUniform2fNULL;
2968         uniform2fv               = &glUniform2fvNULL;
2969         uniform2i                = &glUniform2iNULL;
2970         uniform2iv               = &glUniform2ivNULL;
2971         uniform3f                = &glUniform3fNULL;
2972         uniform3fv               = &glUniform3fvNULL;
2973         uniform3i                = &glUniform3iNULL;
2974         uniform3iv               = &glUniform3ivNULL;
2975         uniform4f                = &glUniform4fNULL;
2976         uniform4fv               = &glUniform4fvNULL;
2977         uniform4i                = &glUniform4iNULL;
2978         uniform4iv               = &glUniform4ivNULL;
2979         uniformMatrix2fv         = &glUniformMatrix2fvNULL;
2980         uniformMatrix3fv         = &glUniformMatrix3fvNULL;
2981         uniformMatrix4fv         = &glUniformMatrix4fvNULL;
2982         useProgram               = &glUseProgramNULL;
2983         validateProgram          = &glValidateProgramNULL;
2984         vertexAttrib1d           = &glVertexAttrib1dNULL;
2985         vertexAttrib1dv          = &glVertexAttrib1dvNULL;
2986         vertexAttrib1f           = &glVertexAttrib1fNULL;
2987         vertexAttrib1fv          = &glVertexAttrib1fvNULL;
2988         vertexAttrib1s           = &glVertexAttrib1sNULL;
2989         vertexAttrib1sv          = &glVertexAttrib1svNULL;
2990         vertexAttrib2d           = &glVertexAttrib2dNULL;
2991         vertexAttrib2dv          = &glVertexAttrib2dvNULL;
2992         vertexAttrib2f           = &glVertexAttrib2fNULL;
2993         vertexAttrib2fv          = &glVertexAttrib2fvNULL;
2994         vertexAttrib2s           = &glVertexAttrib2sNULL;
2995         vertexAttrib2sv          = &glVertexAttrib2svNULL;
2996         vertexAttrib3d           = &glVertexAttrib3dNULL;
2997         vertexAttrib3dv          = &glVertexAttrib3dvNULL;
2998         vertexAttrib3f           = &glVertexAttrib3fNULL;
2999         vertexAttrib3fv          = &glVertexAttrib3fvNULL;
3000         vertexAttrib3s           = &glVertexAttrib3sNULL;
3001         vertexAttrib3sv          = &glVertexAttrib3svNULL;
3002         vertexAttrib4Nbv         = &glVertexAttrib4NbvNULL;
3003         vertexAttrib4Niv         = &glVertexAttrib4NivNULL;
3004         vertexAttrib4Nsv         = &glVertexAttrib4NsvNULL;
3005         vertexAttrib4Nub         = &glVertexAttrib4NubNULL;
3006         vertexAttrib4Nubv        = &glVertexAttrib4NubvNULL;
3007         vertexAttrib4Nuiv        = &glVertexAttrib4NuivNULL;
3008         vertexAttrib4Nusv        = &glVertexAttrib4NusvNULL;
3009         vertexAttrib4bv          = &glVertexAttrib4bvNULL;
3010         vertexAttrib4d           = &glVertexAttrib4dNULL;
3011         vertexAttrib4dv          = &glVertexAttrib4dvNULL;
3012         vertexAttrib4f           = &glVertexAttrib4fNULL;
3013         vertexAttrib4fv          = &glVertexAttrib4fvNULL;
3014         vertexAttrib4iv          = &glVertexAttrib4ivNULL;
3015         vertexAttrib4s           = &glVertexAttrib4sNULL;
3016         vertexAttrib4sv          = &glVertexAttrib4svNULL;
3017         vertexAttrib4ubv         = &glVertexAttrib4ubvNULL;
3018         vertexAttrib4uiv         = &glVertexAttrib4uivNULL;
3019         vertexAttrib4usv         = &glVertexAttrib4usvNULL;
3020         vertexAttribPointer      = &glVertexAttribPointerNULL;
3021     }
3022 
3023     if (version >= gl::Version(2, 1))
3024     {
3025         uniformMatrix2x3fv = &glUniformMatrix2x3fvNULL;
3026         uniformMatrix2x4fv = &glUniformMatrix2x4fvNULL;
3027         uniformMatrix3x2fv = &glUniformMatrix3x2fvNULL;
3028         uniformMatrix3x4fv = &glUniformMatrix3x4fvNULL;
3029         uniformMatrix4x2fv = &glUniformMatrix4x2fvNULL;
3030         uniformMatrix4x3fv = &glUniformMatrix4x3fvNULL;
3031     }
3032 
3033     if (version >= gl::Version(3, 0))
3034     {
3035         beginConditionalRender              = &glBeginConditionalRenderNULL;
3036         beginTransformFeedback              = &glBeginTransformFeedbackNULL;
3037         bindBufferBase                      = &glBindBufferBaseNULL;
3038         bindBufferRange                     = &glBindBufferRangeNULL;
3039         bindFragDataLocation                = &glBindFragDataLocationNULL;
3040         bindFramebuffer                     = &glBindFramebufferNULL;
3041         bindRenderbuffer                    = &glBindRenderbufferNULL;
3042         bindVertexArray                     = &glBindVertexArrayNULL;
3043         blitFramebuffer                     = &glBlitFramebufferNULL;
3044         checkFramebufferStatus              = &glCheckFramebufferStatusNULL;
3045         clampColor                          = &glClampColorNULL;
3046         clearBufferfi                       = &glClearBufferfiNULL;
3047         clearBufferfv                       = &glClearBufferfvNULL;
3048         clearBufferiv                       = &glClearBufferivNULL;
3049         clearBufferuiv                      = &glClearBufferuivNULL;
3050         colorMaski                          = &glColorMaskiNULL;
3051         deleteFramebuffers                  = &glDeleteFramebuffersNULL;
3052         deleteRenderbuffers                 = &glDeleteRenderbuffersNULL;
3053         deleteVertexArrays                  = &glDeleteVertexArraysNULL;
3054         disablei                            = &glDisableiNULL;
3055         enablei                             = &glEnableiNULL;
3056         endConditionalRender                = &glEndConditionalRenderNULL;
3057         endTransformFeedback                = &glEndTransformFeedbackNULL;
3058         flushMappedBufferRange              = &glFlushMappedBufferRangeNULL;
3059         framebufferRenderbuffer             = &glFramebufferRenderbufferNULL;
3060         framebufferTexture1D                = &glFramebufferTexture1DNULL;
3061         framebufferTexture2D                = &glFramebufferTexture2DNULL;
3062         framebufferTexture3D                = &glFramebufferTexture3DNULL;
3063         framebufferTextureLayer             = &glFramebufferTextureLayerNULL;
3064         genFramebuffers                     = &glGenFramebuffersNULL;
3065         genRenderbuffers                    = &glGenRenderbuffersNULL;
3066         genVertexArrays                     = &glGenVertexArraysNULL;
3067         generateMipmap                      = &glGenerateMipmapNULL;
3068         getBooleani_v                       = &glGetBooleani_vNULL;
3069         getFragDataLocation                 = &glGetFragDataLocationNULL;
3070         getFramebufferAttachmentParameteriv = &glGetFramebufferAttachmentParameterivNULL;
3071         getIntegeri_v                       = &glGetIntegeri_vNULL;
3072         getRenderbufferParameteriv          = &glGetRenderbufferParameterivNULL;
3073         getStringi                          = &glGetStringiNULL;
3074         getTexParameterIiv                  = &glGetTexParameterIivNULL;
3075         getTexParameterIuiv                 = &glGetTexParameterIuivNULL;
3076         getTransformFeedbackVarying         = &glGetTransformFeedbackVaryingNULL;
3077         getUniformuiv                       = &glGetUniformuivNULL;
3078         getVertexAttribIiv                  = &glGetVertexAttribIivNULL;
3079         getVertexAttribIuiv                 = &glGetVertexAttribIuivNULL;
3080         isEnabledi                          = &glIsEnablediNULL;
3081         isFramebuffer                       = &glIsFramebufferNULL;
3082         isRenderbuffer                      = &glIsRenderbufferNULL;
3083         isVertexArray                       = &glIsVertexArrayNULL;
3084         mapBufferRange                      = &glMapBufferRangeNULL;
3085         renderbufferStorage                 = &glRenderbufferStorageNULL;
3086         renderbufferStorageMultisample      = &glRenderbufferStorageMultisampleNULL;
3087         texParameterIiv                     = &glTexParameterIivNULL;
3088         texParameterIuiv                    = &glTexParameterIuivNULL;
3089         transformFeedbackVaryings           = &glTransformFeedbackVaryingsNULL;
3090         uniform1ui                          = &glUniform1uiNULL;
3091         uniform1uiv                         = &glUniform1uivNULL;
3092         uniform2ui                          = &glUniform2uiNULL;
3093         uniform2uiv                         = &glUniform2uivNULL;
3094         uniform3ui                          = &glUniform3uiNULL;
3095         uniform3uiv                         = &glUniform3uivNULL;
3096         uniform4ui                          = &glUniform4uiNULL;
3097         uniform4uiv                         = &glUniform4uivNULL;
3098         vertexAttribI1i                     = &glVertexAttribI1iNULL;
3099         vertexAttribI1iv                    = &glVertexAttribI1ivNULL;
3100         vertexAttribI1ui                    = &glVertexAttribI1uiNULL;
3101         vertexAttribI1uiv                   = &glVertexAttribI1uivNULL;
3102         vertexAttribI2i                     = &glVertexAttribI2iNULL;
3103         vertexAttribI2iv                    = &glVertexAttribI2ivNULL;
3104         vertexAttribI2ui                    = &glVertexAttribI2uiNULL;
3105         vertexAttribI2uiv                   = &glVertexAttribI2uivNULL;
3106         vertexAttribI3i                     = &glVertexAttribI3iNULL;
3107         vertexAttribI3iv                    = &glVertexAttribI3ivNULL;
3108         vertexAttribI3ui                    = &glVertexAttribI3uiNULL;
3109         vertexAttribI3uiv                   = &glVertexAttribI3uivNULL;
3110         vertexAttribI4bv                    = &glVertexAttribI4bvNULL;
3111         vertexAttribI4i                     = &glVertexAttribI4iNULL;
3112         vertexAttribI4iv                    = &glVertexAttribI4ivNULL;
3113         vertexAttribI4sv                    = &glVertexAttribI4svNULL;
3114         vertexAttribI4ubv                   = &glVertexAttribI4ubvNULL;
3115         vertexAttribI4ui                    = &glVertexAttribI4uiNULL;
3116         vertexAttribI4uiv                   = &glVertexAttribI4uivNULL;
3117         vertexAttribI4usv                   = &glVertexAttribI4usvNULL;
3118         vertexAttribIPointer                = &glVertexAttribIPointerNULL;
3119     }
3120 
3121     if (version >= gl::Version(3, 1))
3122     {
3123         copyBufferSubData         = &glCopyBufferSubDataNULL;
3124         drawArraysInstanced       = &glDrawArraysInstancedNULL;
3125         drawElementsInstanced     = &glDrawElementsInstancedNULL;
3126         getActiveUniformBlockName = &glGetActiveUniformBlockNameNULL;
3127         getActiveUniformBlockiv   = &glGetActiveUniformBlockivNULL;
3128         getActiveUniformName      = &glGetActiveUniformNameNULL;
3129         getActiveUniformsiv       = &glGetActiveUniformsivNULL;
3130         getUniformBlockIndex      = &glGetUniformBlockIndexNULL;
3131         getUniformIndices         = &glGetUniformIndicesNULL;
3132         primitiveRestartIndex     = &glPrimitiveRestartIndexNULL;
3133         texBuffer                 = &glTexBufferNULL;
3134         uniformBlockBinding       = &glUniformBlockBindingNULL;
3135     }
3136 
3137     if (version >= gl::Version(3, 2))
3138     {
3139         clientWaitSync                  = &glClientWaitSyncNULL;
3140         deleteSync                      = &glDeleteSyncNULL;
3141         drawElementsBaseVertex          = &glDrawElementsBaseVertexNULL;
3142         drawElementsInstancedBaseVertex = &glDrawElementsInstancedBaseVertexNULL;
3143         drawRangeElementsBaseVertex     = &glDrawRangeElementsBaseVertexNULL;
3144         fenceSync                       = &glFenceSyncNULL;
3145         framebufferTexture              = &glFramebufferTextureNULL;
3146         getBufferParameteri64v          = &glGetBufferParameteri64vNULL;
3147         getInteger64i_v                 = &glGetInteger64i_vNULL;
3148         getInteger64v                   = &glGetInteger64vNULL;
3149         getMultisamplefv                = &glGetMultisamplefvNULL;
3150         getSynciv                       = &glGetSyncivNULL;
3151         isSync                          = &glIsSyncNULL;
3152         multiDrawElementsBaseVertex     = &glMultiDrawElementsBaseVertexNULL;
3153         provokingVertex                 = &glProvokingVertexNULL;
3154         sampleMaski                     = &glSampleMaskiNULL;
3155         texImage2DMultisample           = &glTexImage2DMultisampleNULL;
3156         texImage3DMultisample           = &glTexImage3DMultisampleNULL;
3157         waitSync                        = &glWaitSyncNULL;
3158     }
3159 
3160     if (version >= gl::Version(3, 3))
3161     {
3162         bindFragDataLocationIndexed = &glBindFragDataLocationIndexedNULL;
3163         bindSampler                 = &glBindSamplerNULL;
3164         deleteSamplers              = &glDeleteSamplersNULL;
3165         genSamplers                 = &glGenSamplersNULL;
3166         getFragDataIndex            = &glGetFragDataIndexNULL;
3167         getQueryObjecti64v          = &glGetQueryObjecti64vNULL;
3168         getQueryObjectui64v         = &glGetQueryObjectui64vNULL;
3169         getSamplerParameterIiv      = &glGetSamplerParameterIivNULL;
3170         getSamplerParameterIuiv     = &glGetSamplerParameterIuivNULL;
3171         getSamplerParameterfv       = &glGetSamplerParameterfvNULL;
3172         getSamplerParameteriv       = &glGetSamplerParameterivNULL;
3173         isSampler                   = &glIsSamplerNULL;
3174         queryCounter                = &glQueryCounterNULL;
3175         samplerParameterIiv         = &glSamplerParameterIivNULL;
3176         samplerParameterIuiv        = &glSamplerParameterIuivNULL;
3177         samplerParameterf           = &glSamplerParameterfNULL;
3178         samplerParameterfv          = &glSamplerParameterfvNULL;
3179         samplerParameteri           = &glSamplerParameteriNULL;
3180         samplerParameteriv          = &glSamplerParameterivNULL;
3181         vertexAttribDivisor         = &glVertexAttribDivisorNULL;
3182         vertexAttribP1ui            = &glVertexAttribP1uiNULL;
3183         vertexAttribP1uiv           = &glVertexAttribP1uivNULL;
3184         vertexAttribP2ui            = &glVertexAttribP2uiNULL;
3185         vertexAttribP2uiv           = &glVertexAttribP2uivNULL;
3186         vertexAttribP3ui            = &glVertexAttribP3uiNULL;
3187         vertexAttribP3uiv           = &glVertexAttribP3uivNULL;
3188         vertexAttribP4ui            = &glVertexAttribP4uiNULL;
3189         vertexAttribP4uiv           = &glVertexAttribP4uivNULL;
3190     }
3191 
3192     if (version >= gl::Version(4, 0))
3193     {
3194         beginQueryIndexed              = &glBeginQueryIndexedNULL;
3195         bindTransformFeedback          = &glBindTransformFeedbackNULL;
3196         blendEquationSeparatei         = &glBlendEquationSeparateiNULL;
3197         blendEquationi                 = &glBlendEquationiNULL;
3198         blendFuncSeparatei             = &glBlendFuncSeparateiNULL;
3199         blendFunci                     = &glBlendFunciNULL;
3200         deleteTransformFeedbacks       = &glDeleteTransformFeedbacksNULL;
3201         drawArraysIndirect             = &glDrawArraysIndirectNULL;
3202         drawElementsIndirect           = &glDrawElementsIndirectNULL;
3203         drawTransformFeedback          = &glDrawTransformFeedbackNULL;
3204         drawTransformFeedbackStream    = &glDrawTransformFeedbackStreamNULL;
3205         endQueryIndexed                = &glEndQueryIndexedNULL;
3206         genTransformFeedbacks          = &glGenTransformFeedbacksNULL;
3207         getActiveSubroutineName        = &glGetActiveSubroutineNameNULL;
3208         getActiveSubroutineUniformName = &glGetActiveSubroutineUniformNameNULL;
3209         getActiveSubroutineUniformiv   = &glGetActiveSubroutineUniformivNULL;
3210         getProgramStageiv              = &glGetProgramStageivNULL;
3211         getQueryIndexediv              = &glGetQueryIndexedivNULL;
3212         getSubroutineIndex             = &glGetSubroutineIndexNULL;
3213         getSubroutineUniformLocation   = &glGetSubroutineUniformLocationNULL;
3214         getUniformSubroutineuiv        = &glGetUniformSubroutineuivNULL;
3215         getUniformdv                   = &glGetUniformdvNULL;
3216         isTransformFeedback            = &glIsTransformFeedbackNULL;
3217         minSampleShading               = &glMinSampleShadingNULL;
3218         patchParameterfv               = &glPatchParameterfvNULL;
3219         patchParameteri                = &glPatchParameteriNULL;
3220         pauseTransformFeedback         = &glPauseTransformFeedbackNULL;
3221         resumeTransformFeedback        = &glResumeTransformFeedbackNULL;
3222         uniform1d                      = &glUniform1dNULL;
3223         uniform1dv                     = &glUniform1dvNULL;
3224         uniform2d                      = &glUniform2dNULL;
3225         uniform2dv                     = &glUniform2dvNULL;
3226         uniform3d                      = &glUniform3dNULL;
3227         uniform3dv                     = &glUniform3dvNULL;
3228         uniform4d                      = &glUniform4dNULL;
3229         uniform4dv                     = &glUniform4dvNULL;
3230         uniformMatrix2dv               = &glUniformMatrix2dvNULL;
3231         uniformMatrix2x3dv             = &glUniformMatrix2x3dvNULL;
3232         uniformMatrix2x4dv             = &glUniformMatrix2x4dvNULL;
3233         uniformMatrix3dv               = &glUniformMatrix3dvNULL;
3234         uniformMatrix3x2dv             = &glUniformMatrix3x2dvNULL;
3235         uniformMatrix3x4dv             = &glUniformMatrix3x4dvNULL;
3236         uniformMatrix4dv               = &glUniformMatrix4dvNULL;
3237         uniformMatrix4x2dv             = &glUniformMatrix4x2dvNULL;
3238         uniformMatrix4x3dv             = &glUniformMatrix4x3dvNULL;
3239         uniformSubroutinesuiv          = &glUniformSubroutinesuivNULL;
3240     }
3241 
3242     if (version >= gl::Version(4, 1))
3243     {
3244         activeShaderProgram       = &glActiveShaderProgramNULL;
3245         bindProgramPipeline       = &glBindProgramPipelineNULL;
3246         clearDepthf               = &glClearDepthfNULL;
3247         createShaderProgramv      = &glCreateShaderProgramvNULL;
3248         deleteProgramPipelines    = &glDeleteProgramPipelinesNULL;
3249         depthRangeArrayv          = &glDepthRangeArrayvNULL;
3250         depthRangeIndexed         = &glDepthRangeIndexedNULL;
3251         depthRangef               = &glDepthRangefNULL;
3252         genProgramPipelines       = &glGenProgramPipelinesNULL;
3253         getDoublei_v              = &glGetDoublei_vNULL;
3254         getFloati_v               = &glGetFloati_vNULL;
3255         getProgramBinary          = &glGetProgramBinaryNULL;
3256         getProgramPipelineInfoLog = &glGetProgramPipelineInfoLogNULL;
3257         getProgramPipelineiv      = &glGetProgramPipelineivNULL;
3258         getShaderPrecisionFormat  = &glGetShaderPrecisionFormatNULL;
3259         getVertexAttribLdv        = &glGetVertexAttribLdvNULL;
3260         isProgramPipeline         = &glIsProgramPipelineNULL;
3261         programBinary             = &glProgramBinaryNULL;
3262         programParameteri         = &glProgramParameteriNULL;
3263         programUniform1d          = &glProgramUniform1dNULL;
3264         programUniform1dv         = &glProgramUniform1dvNULL;
3265         programUniform1f          = &glProgramUniform1fNULL;
3266         programUniform1fv         = &glProgramUniform1fvNULL;
3267         programUniform1i          = &glProgramUniform1iNULL;
3268         programUniform1iv         = &glProgramUniform1ivNULL;
3269         programUniform1ui         = &glProgramUniform1uiNULL;
3270         programUniform1uiv        = &glProgramUniform1uivNULL;
3271         programUniform2d          = &glProgramUniform2dNULL;
3272         programUniform2dv         = &glProgramUniform2dvNULL;
3273         programUniform2f          = &glProgramUniform2fNULL;
3274         programUniform2fv         = &glProgramUniform2fvNULL;
3275         programUniform2i          = &glProgramUniform2iNULL;
3276         programUniform2iv         = &glProgramUniform2ivNULL;
3277         programUniform2ui         = &glProgramUniform2uiNULL;
3278         programUniform2uiv        = &glProgramUniform2uivNULL;
3279         programUniform3d          = &glProgramUniform3dNULL;
3280         programUniform3dv         = &glProgramUniform3dvNULL;
3281         programUniform3f          = &glProgramUniform3fNULL;
3282         programUniform3fv         = &glProgramUniform3fvNULL;
3283         programUniform3i          = &glProgramUniform3iNULL;
3284         programUniform3iv         = &glProgramUniform3ivNULL;
3285         programUniform3ui         = &glProgramUniform3uiNULL;
3286         programUniform3uiv        = &glProgramUniform3uivNULL;
3287         programUniform4d          = &glProgramUniform4dNULL;
3288         programUniform4dv         = &glProgramUniform4dvNULL;
3289         programUniform4f          = &glProgramUniform4fNULL;
3290         programUniform4fv         = &glProgramUniform4fvNULL;
3291         programUniform4i          = &glProgramUniform4iNULL;
3292         programUniform4iv         = &glProgramUniform4ivNULL;
3293         programUniform4ui         = &glProgramUniform4uiNULL;
3294         programUniform4uiv        = &glProgramUniform4uivNULL;
3295         programUniformMatrix2dv   = &glProgramUniformMatrix2dvNULL;
3296         programUniformMatrix2fv   = &glProgramUniformMatrix2fvNULL;
3297         programUniformMatrix2x3dv = &glProgramUniformMatrix2x3dvNULL;
3298         programUniformMatrix2x3fv = &glProgramUniformMatrix2x3fvNULL;
3299         programUniformMatrix2x4dv = &glProgramUniformMatrix2x4dvNULL;
3300         programUniformMatrix2x4fv = &glProgramUniformMatrix2x4fvNULL;
3301         programUniformMatrix3dv   = &glProgramUniformMatrix3dvNULL;
3302         programUniformMatrix3fv   = &glProgramUniformMatrix3fvNULL;
3303         programUniformMatrix3x2dv = &glProgramUniformMatrix3x2dvNULL;
3304         programUniformMatrix3x2fv = &glProgramUniformMatrix3x2fvNULL;
3305         programUniformMatrix3x4dv = &glProgramUniformMatrix3x4dvNULL;
3306         programUniformMatrix3x4fv = &glProgramUniformMatrix3x4fvNULL;
3307         programUniformMatrix4dv   = &glProgramUniformMatrix4dvNULL;
3308         programUniformMatrix4fv   = &glProgramUniformMatrix4fvNULL;
3309         programUniformMatrix4x2dv = &glProgramUniformMatrix4x2dvNULL;
3310         programUniformMatrix4x2fv = &glProgramUniformMatrix4x2fvNULL;
3311         programUniformMatrix4x3dv = &glProgramUniformMatrix4x3dvNULL;
3312         programUniformMatrix4x3fv = &glProgramUniformMatrix4x3fvNULL;
3313         releaseShaderCompiler     = &glReleaseShaderCompilerNULL;
3314         scissorArrayv             = &glScissorArrayvNULL;
3315         scissorIndexed            = &glScissorIndexedNULL;
3316         scissorIndexedv           = &glScissorIndexedvNULL;
3317         shaderBinary              = &glShaderBinaryNULL;
3318         useProgramStages          = &glUseProgramStagesNULL;
3319         validateProgramPipeline   = &glValidateProgramPipelineNULL;
3320         vertexAttribL1d           = &glVertexAttribL1dNULL;
3321         vertexAttribL1dv          = &glVertexAttribL1dvNULL;
3322         vertexAttribL2d           = &glVertexAttribL2dNULL;
3323         vertexAttribL2dv          = &glVertexAttribL2dvNULL;
3324         vertexAttribL3d           = &glVertexAttribL3dNULL;
3325         vertexAttribL3dv          = &glVertexAttribL3dvNULL;
3326         vertexAttribL4d           = &glVertexAttribL4dNULL;
3327         vertexAttribL4dv          = &glVertexAttribL4dvNULL;
3328         vertexAttribLPointer      = &glVertexAttribLPointerNULL;
3329         viewportArrayv            = &glViewportArrayvNULL;
3330         viewportIndexedf          = &glViewportIndexedfNULL;
3331         viewportIndexedfv         = &glViewportIndexedfvNULL;
3332     }
3333 
3334     if (version >= gl::Version(4, 2))
3335     {
3336         bindImageTexture                  = &glBindImageTextureNULL;
3337         drawArraysInstancedBaseInstance   = &glDrawArraysInstancedBaseInstanceNULL;
3338         drawElementsInstancedBaseInstance = &glDrawElementsInstancedBaseInstanceNULL;
3339         drawElementsInstancedBaseVertexBaseInstance =
3340             &glDrawElementsInstancedBaseVertexBaseInstanceNULL;
3341         drawTransformFeedbackInstanced       = &glDrawTransformFeedbackInstancedNULL;
3342         drawTransformFeedbackStreamInstanced = &glDrawTransformFeedbackStreamInstancedNULL;
3343         getActiveAtomicCounterBufferiv       = &glGetActiveAtomicCounterBufferivNULL;
3344         getInternalformativ                  = &glGetInternalformativNULL;
3345         memoryBarrier                        = &glMemoryBarrierNULL;
3346         texStorage1D                         = &glTexStorage1DNULL;
3347         texStorage2D                         = &glTexStorage2DNULL;
3348         texStorage3D                         = &glTexStorage3DNULL;
3349     }
3350 
3351     if (version >= gl::Version(4, 3))
3352     {
3353         bindVertexBuffer                = &glBindVertexBufferNULL;
3354         clearBufferData                 = &glClearBufferDataNULL;
3355         clearBufferSubData              = &glClearBufferSubDataNULL;
3356         copyImageSubData                = &glCopyImageSubDataNULL;
3357         debugMessageCallback            = &glDebugMessageCallbackNULL;
3358         debugMessageControl             = &glDebugMessageControlNULL;
3359         debugMessageInsert              = &glDebugMessageInsertNULL;
3360         dispatchCompute                 = &glDispatchComputeNULL;
3361         dispatchComputeIndirect         = &glDispatchComputeIndirectNULL;
3362         framebufferParameteri           = &glFramebufferParameteriNULL;
3363         getDebugMessageLog              = &glGetDebugMessageLogNULL;
3364         getFramebufferParameteriv       = &glGetFramebufferParameterivNULL;
3365         getInternalformati64v           = &glGetInternalformati64vNULL;
3366         getObjectLabel                  = &glGetObjectLabelNULL;
3367         getObjectPtrLabel               = &glGetObjectPtrLabelNULL;
3368         getPointerv                     = &glGetPointervNULL;
3369         getProgramInterfaceiv           = &glGetProgramInterfaceivNULL;
3370         getProgramResourceIndex         = &glGetProgramResourceIndexNULL;
3371         getProgramResourceLocation      = &glGetProgramResourceLocationNULL;
3372         getProgramResourceLocationIndex = &glGetProgramResourceLocationIndexNULL;
3373         getProgramResourceName          = &glGetProgramResourceNameNULL;
3374         getProgramResourceiv            = &glGetProgramResourceivNULL;
3375         invalidateBufferData            = &glInvalidateBufferDataNULL;
3376         invalidateBufferSubData         = &glInvalidateBufferSubDataNULL;
3377         invalidateFramebuffer           = &glInvalidateFramebufferNULL;
3378         invalidateSubFramebuffer        = &glInvalidateSubFramebufferNULL;
3379         invalidateTexImage              = &glInvalidateTexImageNULL;
3380         invalidateTexSubImage           = &glInvalidateTexSubImageNULL;
3381         multiDrawArraysIndirect         = &glMultiDrawArraysIndirectNULL;
3382         multiDrawElementsIndirect       = &glMultiDrawElementsIndirectNULL;
3383         objectLabel                     = &glObjectLabelNULL;
3384         objectPtrLabel                  = &glObjectPtrLabelNULL;
3385         popDebugGroup                   = &glPopDebugGroupNULL;
3386         pushDebugGroup                  = &glPushDebugGroupNULL;
3387         shaderStorageBlockBinding       = &glShaderStorageBlockBindingNULL;
3388         texBufferRange                  = &glTexBufferRangeNULL;
3389         texStorage2DMultisample         = &glTexStorage2DMultisampleNULL;
3390         texStorage3DMultisample         = &glTexStorage3DMultisampleNULL;
3391         textureView                     = &glTextureViewNULL;
3392         vertexAttribBinding             = &glVertexAttribBindingNULL;
3393         vertexAttribFormat              = &glVertexAttribFormatNULL;
3394         vertexAttribIFormat             = &glVertexAttribIFormatNULL;
3395         vertexAttribLFormat             = &glVertexAttribLFormatNULL;
3396         vertexBindingDivisor            = &glVertexBindingDivisorNULL;
3397     }
3398 
3399     if (version >= gl::Version(4, 4))
3400     {
3401         bindBuffersBase   = &glBindBuffersBaseNULL;
3402         bindBuffersRange  = &glBindBuffersRangeNULL;
3403         bindImageTextures = &glBindImageTexturesNULL;
3404         bindSamplers      = &glBindSamplersNULL;
3405         bindTextures      = &glBindTexturesNULL;
3406         bindVertexBuffers = &glBindVertexBuffersNULL;
3407         bufferStorage     = &glBufferStorageNULL;
3408         clearTexImage     = &glClearTexImageNULL;
3409         clearTexSubImage  = &glClearTexSubImageNULL;
3410     }
3411 
3412     if (version >= gl::Version(4, 5))
3413     {
3414         bindTextureUnit                          = &glBindTextureUnitNULL;
3415         blitNamedFramebuffer                     = &glBlitNamedFramebufferNULL;
3416         checkNamedFramebufferStatus              = &glCheckNamedFramebufferStatusNULL;
3417         clearNamedBufferData                     = &glClearNamedBufferDataNULL;
3418         clearNamedBufferSubData                  = &glClearNamedBufferSubDataNULL;
3419         clearNamedFramebufferfi                  = &glClearNamedFramebufferfiNULL;
3420         clearNamedFramebufferfv                  = &glClearNamedFramebufferfvNULL;
3421         clearNamedFramebufferiv                  = &glClearNamedFramebufferivNULL;
3422         clearNamedFramebufferuiv                 = &glClearNamedFramebufferuivNULL;
3423         clipControl                              = &glClipControlNULL;
3424         compressedTextureSubImage1D              = &glCompressedTextureSubImage1DNULL;
3425         compressedTextureSubImage2D              = &glCompressedTextureSubImage2DNULL;
3426         compressedTextureSubImage3D              = &glCompressedTextureSubImage3DNULL;
3427         copyNamedBufferSubData                   = &glCopyNamedBufferSubDataNULL;
3428         copyTextureSubImage1D                    = &glCopyTextureSubImage1DNULL;
3429         copyTextureSubImage2D                    = &glCopyTextureSubImage2DNULL;
3430         copyTextureSubImage3D                    = &glCopyTextureSubImage3DNULL;
3431         createBuffers                            = &glCreateBuffersNULL;
3432         createFramebuffers                       = &glCreateFramebuffersNULL;
3433         createProgramPipelines                   = &glCreateProgramPipelinesNULL;
3434         createQueries                            = &glCreateQueriesNULL;
3435         createRenderbuffers                      = &glCreateRenderbuffersNULL;
3436         createSamplers                           = &glCreateSamplersNULL;
3437         createTextures                           = &glCreateTexturesNULL;
3438         createTransformFeedbacks                 = &glCreateTransformFeedbacksNULL;
3439         createVertexArrays                       = &glCreateVertexArraysNULL;
3440         disableVertexArrayAttrib                 = &glDisableVertexArrayAttribNULL;
3441         enableVertexArrayAttrib                  = &glEnableVertexArrayAttribNULL;
3442         flushMappedNamedBufferRange              = &glFlushMappedNamedBufferRangeNULL;
3443         generateTextureMipmap                    = &glGenerateTextureMipmapNULL;
3444         getCompressedTextureImage                = &glGetCompressedTextureImageNULL;
3445         getCompressedTextureSubImage             = &glGetCompressedTextureSubImageNULL;
3446         getGraphicsResetStatus                   = &glGetGraphicsResetStatusNULL;
3447         getNamedBufferParameteri64v              = &glGetNamedBufferParameteri64vNULL;
3448         getNamedBufferParameteriv                = &glGetNamedBufferParameterivNULL;
3449         getNamedBufferPointerv                   = &glGetNamedBufferPointervNULL;
3450         getNamedBufferSubData                    = &glGetNamedBufferSubDataNULL;
3451         getNamedFramebufferAttachmentParameteriv = &glGetNamedFramebufferAttachmentParameterivNULL;
3452         getNamedFramebufferParameteriv           = &glGetNamedFramebufferParameterivNULL;
3453         getNamedRenderbufferParameteriv          = &glGetNamedRenderbufferParameterivNULL;
3454         getQueryBufferObjecti64v                 = &glGetQueryBufferObjecti64vNULL;
3455         getQueryBufferObjectiv                   = &glGetQueryBufferObjectivNULL;
3456         getQueryBufferObjectui64v                = &glGetQueryBufferObjectui64vNULL;
3457         getQueryBufferObjectuiv                  = &glGetQueryBufferObjectuivNULL;
3458         getTextureImage                          = &glGetTextureImageNULL;
3459         getTextureLevelParameterfv               = &glGetTextureLevelParameterfvNULL;
3460         getTextureLevelParameteriv               = &glGetTextureLevelParameterivNULL;
3461         getTextureParameterIiv                   = &glGetTextureParameterIivNULL;
3462         getTextureParameterIuiv                  = &glGetTextureParameterIuivNULL;
3463         getTextureParameterfv                    = &glGetTextureParameterfvNULL;
3464         getTextureParameteriv                    = &glGetTextureParameterivNULL;
3465         getTextureSubImage                       = &glGetTextureSubImageNULL;
3466         getTransformFeedbacki64_v                = &glGetTransformFeedbacki64_vNULL;
3467         getTransformFeedbacki_v                  = &glGetTransformFeedbacki_vNULL;
3468         getTransformFeedbackiv                   = &glGetTransformFeedbackivNULL;
3469         getVertexArrayIndexed64iv                = &glGetVertexArrayIndexed64ivNULL;
3470         getVertexArrayIndexediv                  = &glGetVertexArrayIndexedivNULL;
3471         getVertexArrayiv                         = &glGetVertexArrayivNULL;
3472         getnCompressedTexImage                   = &glGetnCompressedTexImageNULL;
3473         getnTexImage                             = &glGetnTexImageNULL;
3474         getnUniformdv                            = &glGetnUniformdvNULL;
3475         getnUniformfv                            = &glGetnUniformfvNULL;
3476         getnUniformiv                            = &glGetnUniformivNULL;
3477         getnUniformuiv                           = &glGetnUniformuivNULL;
3478         invalidateNamedFramebufferData           = &glInvalidateNamedFramebufferDataNULL;
3479         invalidateNamedFramebufferSubData        = &glInvalidateNamedFramebufferSubDataNULL;
3480         mapNamedBuffer                           = &glMapNamedBufferNULL;
3481         mapNamedBufferRange                      = &glMapNamedBufferRangeNULL;
3482         memoryBarrierByRegion                    = &glMemoryBarrierByRegionNULL;
3483         namedBufferData                          = &glNamedBufferDataNULL;
3484         namedBufferStorage                       = &glNamedBufferStorageNULL;
3485         namedBufferSubData                       = &glNamedBufferSubDataNULL;
3486         namedFramebufferDrawBuffer               = &glNamedFramebufferDrawBufferNULL;
3487         namedFramebufferDrawBuffers              = &glNamedFramebufferDrawBuffersNULL;
3488         namedFramebufferParameteri               = &glNamedFramebufferParameteriNULL;
3489         namedFramebufferReadBuffer               = &glNamedFramebufferReadBufferNULL;
3490         namedFramebufferRenderbuffer             = &glNamedFramebufferRenderbufferNULL;
3491         namedFramebufferTexture                  = &glNamedFramebufferTextureNULL;
3492         namedFramebufferTextureLayer             = &glNamedFramebufferTextureLayerNULL;
3493         namedRenderbufferStorage                 = &glNamedRenderbufferStorageNULL;
3494         namedRenderbufferStorageMultisample      = &glNamedRenderbufferStorageMultisampleNULL;
3495         readnPixels                              = &glReadnPixelsNULL;
3496         textureBarrier                           = &glTextureBarrierNULL;
3497         textureBuffer                            = &glTextureBufferNULL;
3498         textureBufferRange                       = &glTextureBufferRangeNULL;
3499         textureParameterIiv                      = &glTextureParameterIivNULL;
3500         textureParameterIuiv                     = &glTextureParameterIuivNULL;
3501         textureParameterf                        = &glTextureParameterfNULL;
3502         textureParameterfv                       = &glTextureParameterfvNULL;
3503         textureParameteri                        = &glTextureParameteriNULL;
3504         textureParameteriv                       = &glTextureParameterivNULL;
3505         textureStorage1D                         = &glTextureStorage1DNULL;
3506         textureStorage2D                         = &glTextureStorage2DNULL;
3507         textureStorage2DMultisample              = &glTextureStorage2DMultisampleNULL;
3508         textureStorage3D                         = &glTextureStorage3DNULL;
3509         textureStorage3DMultisample              = &glTextureStorage3DMultisampleNULL;
3510         textureSubImage1D                        = &glTextureSubImage1DNULL;
3511         textureSubImage2D                        = &glTextureSubImage2DNULL;
3512         textureSubImage3D                        = &glTextureSubImage3DNULL;
3513         transformFeedbackBufferBase              = &glTransformFeedbackBufferBaseNULL;
3514         transformFeedbackBufferRange             = &glTransformFeedbackBufferRangeNULL;
3515         unmapNamedBuffer                         = &glUnmapNamedBufferNULL;
3516         vertexArrayAttribBinding                 = &glVertexArrayAttribBindingNULL;
3517         vertexArrayAttribFormat                  = &glVertexArrayAttribFormatNULL;
3518         vertexArrayAttribIFormat                 = &glVertexArrayAttribIFormatNULL;
3519         vertexArrayAttribLFormat                 = &glVertexArrayAttribLFormatNULL;
3520         vertexArrayBindingDivisor                = &glVertexArrayBindingDivisorNULL;
3521         vertexArrayElementBuffer                 = &glVertexArrayElementBufferNULL;
3522         vertexArrayVertexBuffer                  = &glVertexArrayVertexBufferNULL;
3523         vertexArrayVertexBuffers                 = &glVertexArrayVertexBuffersNULL;
3524     }
3525 
3526     if (extensions.count("GL_ARB_ES2_compatibility") != 0)
3527     {
3528         clearDepthf              = &glClearDepthfNULL;
3529         depthRangef              = &glDepthRangefNULL;
3530         getShaderPrecisionFormat = &glGetShaderPrecisionFormatNULL;
3531         releaseShaderCompiler    = &glReleaseShaderCompilerNULL;
3532         shaderBinary             = &glShaderBinaryNULL;
3533     }
3534 
3535     if (extensions.count("GL_ARB_ES3_1_compatibility") != 0)
3536     {
3537         memoryBarrierByRegion = &glMemoryBarrierByRegionNULL;
3538     }
3539 
3540     if (extensions.count("GL_ARB_ES3_2_compatibility") != 0)
3541     {
3542         primitiveBoundingBox = &glPrimitiveBoundingBoxNULL;
3543     }
3544 
3545     if (extensions.count("GL_ARB_base_instance") != 0)
3546     {
3547         drawArraysInstancedBaseInstance   = &glDrawArraysInstancedBaseInstanceNULL;
3548         drawElementsInstancedBaseInstance = &glDrawElementsInstancedBaseInstanceNULL;
3549         drawElementsInstancedBaseVertexBaseInstance =
3550             &glDrawElementsInstancedBaseVertexBaseInstanceNULL;
3551     }
3552 
3553     if (extensions.count("GL_ARB_blend_func_extended") != 0)
3554     {
3555         bindFragDataLocationIndexed = &glBindFragDataLocationIndexedNULL;
3556         getFragDataIndex            = &glGetFragDataIndexNULL;
3557     }
3558 
3559     if (extensions.count("GL_ARB_buffer_storage") != 0)
3560     {
3561         bufferStorage = &glBufferStorageNULL;
3562     }
3563 
3564     if (extensions.count("GL_ARB_clear_buffer_object") != 0)
3565     {
3566         clearBufferData    = &glClearBufferDataNULL;
3567         clearBufferSubData = &glClearBufferSubDataNULL;
3568     }
3569 
3570     if (extensions.count("GL_ARB_clear_texture") != 0)
3571     {
3572         clearTexImage    = &glClearTexImageNULL;
3573         clearTexSubImage = &glClearTexSubImageNULL;
3574     }
3575 
3576     if (extensions.count("GL_ARB_clip_control") != 0)
3577     {
3578         clipControl = &glClipControlNULL;
3579     }
3580 
3581     if (extensions.count("GL_ARB_color_buffer_float") != 0)
3582     {
3583         clampColor = &glClampColorNULL;
3584     }
3585 
3586     if (extensions.count("GL_ARB_compute_shader") != 0)
3587     {
3588         dispatchCompute         = &glDispatchComputeNULL;
3589         dispatchComputeIndirect = &glDispatchComputeIndirectNULL;
3590     }
3591 
3592     if (extensions.count("GL_ARB_copy_buffer") != 0)
3593     {
3594         copyBufferSubData = &glCopyBufferSubDataNULL;
3595     }
3596 
3597     if (extensions.count("GL_ARB_copy_image") != 0)
3598     {
3599         copyImageSubData = &glCopyImageSubDataNULL;
3600     }
3601 
3602     if (extensions.count("GL_ARB_debug_output") != 0)
3603     {
3604         debugMessageCallback = &glDebugMessageCallbackNULL;
3605         debugMessageControl  = &glDebugMessageControlNULL;
3606         debugMessageInsert   = &glDebugMessageInsertNULL;
3607         getDebugMessageLog   = &glGetDebugMessageLogNULL;
3608     }
3609 
3610     if (extensions.count("GL_ARB_direct_state_access") != 0)
3611     {
3612         bindTextureUnit                          = &glBindTextureUnitNULL;
3613         blitNamedFramebuffer                     = &glBlitNamedFramebufferNULL;
3614         checkNamedFramebufferStatus              = &glCheckNamedFramebufferStatusNULL;
3615         clearNamedBufferData                     = &glClearNamedBufferDataNULL;
3616         clearNamedBufferSubData                  = &glClearNamedBufferSubDataNULL;
3617         clearNamedFramebufferfi                  = &glClearNamedFramebufferfiNULL;
3618         clearNamedFramebufferfv                  = &glClearNamedFramebufferfvNULL;
3619         clearNamedFramebufferiv                  = &glClearNamedFramebufferivNULL;
3620         clearNamedFramebufferuiv                 = &glClearNamedFramebufferuivNULL;
3621         compressedTextureSubImage1D              = &glCompressedTextureSubImage1DNULL;
3622         compressedTextureSubImage2D              = &glCompressedTextureSubImage2DNULL;
3623         compressedTextureSubImage3D              = &glCompressedTextureSubImage3DNULL;
3624         copyNamedBufferSubData                   = &glCopyNamedBufferSubDataNULL;
3625         copyTextureSubImage1D                    = &glCopyTextureSubImage1DNULL;
3626         copyTextureSubImage2D                    = &glCopyTextureSubImage2DNULL;
3627         copyTextureSubImage3D                    = &glCopyTextureSubImage3DNULL;
3628         createBuffers                            = &glCreateBuffersNULL;
3629         createFramebuffers                       = &glCreateFramebuffersNULL;
3630         createProgramPipelines                   = &glCreateProgramPipelinesNULL;
3631         createQueries                            = &glCreateQueriesNULL;
3632         createRenderbuffers                      = &glCreateRenderbuffersNULL;
3633         createSamplers                           = &glCreateSamplersNULL;
3634         createTextures                           = &glCreateTexturesNULL;
3635         createTransformFeedbacks                 = &glCreateTransformFeedbacksNULL;
3636         createVertexArrays                       = &glCreateVertexArraysNULL;
3637         disableVertexArrayAttrib                 = &glDisableVertexArrayAttribNULL;
3638         enableVertexArrayAttrib                  = &glEnableVertexArrayAttribNULL;
3639         flushMappedNamedBufferRange              = &glFlushMappedNamedBufferRangeNULL;
3640         generateTextureMipmap                    = &glGenerateTextureMipmapNULL;
3641         getCompressedTextureImage                = &glGetCompressedTextureImageNULL;
3642         getNamedBufferParameteri64v              = &glGetNamedBufferParameteri64vNULL;
3643         getNamedBufferParameteriv                = &glGetNamedBufferParameterivNULL;
3644         getNamedBufferPointerv                   = &glGetNamedBufferPointervNULL;
3645         getNamedBufferSubData                    = &glGetNamedBufferSubDataNULL;
3646         getNamedFramebufferAttachmentParameteriv = &glGetNamedFramebufferAttachmentParameterivNULL;
3647         getNamedFramebufferParameteriv           = &glGetNamedFramebufferParameterivNULL;
3648         getNamedRenderbufferParameteriv          = &glGetNamedRenderbufferParameterivNULL;
3649         getQueryBufferObjecti64v                 = &glGetQueryBufferObjecti64vNULL;
3650         getQueryBufferObjectiv                   = &glGetQueryBufferObjectivNULL;
3651         getQueryBufferObjectui64v                = &glGetQueryBufferObjectui64vNULL;
3652         getQueryBufferObjectuiv                  = &glGetQueryBufferObjectuivNULL;
3653         getTextureImage                          = &glGetTextureImageNULL;
3654         getTextureLevelParameterfv               = &glGetTextureLevelParameterfvNULL;
3655         getTextureLevelParameteriv               = &glGetTextureLevelParameterivNULL;
3656         getTextureParameterIiv                   = &glGetTextureParameterIivNULL;
3657         getTextureParameterIuiv                  = &glGetTextureParameterIuivNULL;
3658         getTextureParameterfv                    = &glGetTextureParameterfvNULL;
3659         getTextureParameteriv                    = &glGetTextureParameterivNULL;
3660         getTransformFeedbacki64_v                = &glGetTransformFeedbacki64_vNULL;
3661         getTransformFeedbacki_v                  = &glGetTransformFeedbacki_vNULL;
3662         getTransformFeedbackiv                   = &glGetTransformFeedbackivNULL;
3663         getVertexArrayIndexed64iv                = &glGetVertexArrayIndexed64ivNULL;
3664         getVertexArrayIndexediv                  = &glGetVertexArrayIndexedivNULL;
3665         getVertexArrayiv                         = &glGetVertexArrayivNULL;
3666         invalidateNamedFramebufferData           = &glInvalidateNamedFramebufferDataNULL;
3667         invalidateNamedFramebufferSubData        = &glInvalidateNamedFramebufferSubDataNULL;
3668         mapNamedBuffer                           = &glMapNamedBufferNULL;
3669         mapNamedBufferRange                      = &glMapNamedBufferRangeNULL;
3670         namedBufferData                          = &glNamedBufferDataNULL;
3671         namedBufferStorage                       = &glNamedBufferStorageNULL;
3672         namedBufferSubData                       = &glNamedBufferSubDataNULL;
3673         namedFramebufferDrawBuffer               = &glNamedFramebufferDrawBufferNULL;
3674         namedFramebufferDrawBuffers              = &glNamedFramebufferDrawBuffersNULL;
3675         namedFramebufferParameteri               = &glNamedFramebufferParameteriNULL;
3676         namedFramebufferReadBuffer               = &glNamedFramebufferReadBufferNULL;
3677         namedFramebufferRenderbuffer             = &glNamedFramebufferRenderbufferNULL;
3678         namedFramebufferTexture                  = &glNamedFramebufferTextureNULL;
3679         namedFramebufferTextureLayer             = &glNamedFramebufferTextureLayerNULL;
3680         namedRenderbufferStorage                 = &glNamedRenderbufferStorageNULL;
3681         namedRenderbufferStorageMultisample      = &glNamedRenderbufferStorageMultisampleNULL;
3682         textureBuffer                            = &glTextureBufferNULL;
3683         textureBufferRange                       = &glTextureBufferRangeNULL;
3684         textureParameterIiv                      = &glTextureParameterIivNULL;
3685         textureParameterIuiv                     = &glTextureParameterIuivNULL;
3686         textureParameterf                        = &glTextureParameterfNULL;
3687         textureParameterfv                       = &glTextureParameterfvNULL;
3688         textureParameteri                        = &glTextureParameteriNULL;
3689         textureParameteriv                       = &glTextureParameterivNULL;
3690         textureStorage1D                         = &glTextureStorage1DNULL;
3691         textureStorage2D                         = &glTextureStorage2DNULL;
3692         textureStorage2DMultisample              = &glTextureStorage2DMultisampleNULL;
3693         textureStorage3D                         = &glTextureStorage3DNULL;
3694         textureStorage3DMultisample              = &glTextureStorage3DMultisampleNULL;
3695         textureSubImage1D                        = &glTextureSubImage1DNULL;
3696         textureSubImage2D                        = &glTextureSubImage2DNULL;
3697         textureSubImage3D                        = &glTextureSubImage3DNULL;
3698         transformFeedbackBufferBase              = &glTransformFeedbackBufferBaseNULL;
3699         transformFeedbackBufferRange             = &glTransformFeedbackBufferRangeNULL;
3700         unmapNamedBuffer                         = &glUnmapNamedBufferNULL;
3701         vertexArrayAttribBinding                 = &glVertexArrayAttribBindingNULL;
3702         vertexArrayAttribFormat                  = &glVertexArrayAttribFormatNULL;
3703         vertexArrayAttribIFormat                 = &glVertexArrayAttribIFormatNULL;
3704         vertexArrayAttribLFormat                 = &glVertexArrayAttribLFormatNULL;
3705         vertexArrayBindingDivisor                = &glVertexArrayBindingDivisorNULL;
3706         vertexArrayElementBuffer                 = &glVertexArrayElementBufferNULL;
3707         vertexArrayVertexBuffer                  = &glVertexArrayVertexBufferNULL;
3708         vertexArrayVertexBuffers                 = &glVertexArrayVertexBuffersNULL;
3709     }
3710 
3711     if (extensions.count("GL_ARB_draw_buffers") != 0)
3712     {
3713         drawBuffers = &glDrawBuffersNULL;
3714     }
3715 
3716     if (extensions.count("GL_ARB_draw_buffers_blend") != 0)
3717     {
3718         blendEquationSeparatei = &glBlendEquationSeparateiNULL;
3719         blendEquationi         = &glBlendEquationiNULL;
3720         blendFuncSeparatei     = &glBlendFuncSeparateiNULL;
3721         blendFunci             = &glBlendFunciNULL;
3722     }
3723 
3724     if (extensions.count("GL_ARB_draw_elements_base_vertex") != 0)
3725     {
3726         drawElementsBaseVertex          = &glDrawElementsBaseVertexNULL;
3727         drawElementsInstancedBaseVertex = &glDrawElementsInstancedBaseVertexNULL;
3728         drawRangeElementsBaseVertex     = &glDrawRangeElementsBaseVertexNULL;
3729         multiDrawElementsBaseVertex     = &glMultiDrawElementsBaseVertexNULL;
3730     }
3731 
3732     if (extensions.count("GL_ARB_draw_indirect") != 0)
3733     {
3734         drawArraysIndirect   = &glDrawArraysIndirectNULL;
3735         drawElementsIndirect = &glDrawElementsIndirectNULL;
3736     }
3737 
3738     if (extensions.count("GL_ARB_draw_instanced") != 0)
3739     {
3740         drawArraysInstanced   = &glDrawArraysInstancedNULL;
3741         drawElementsInstanced = &glDrawElementsInstancedNULL;
3742     }
3743 
3744     if (extensions.count("GL_ARB_fragment_program") != 0)
3745     {
3746         getProgramiv = &glGetProgramivNULL;
3747         isProgram    = &glIsProgramNULL;
3748     }
3749 
3750     if (extensions.count("GL_ARB_framebuffer_no_attachments") != 0)
3751     {
3752         framebufferParameteri     = &glFramebufferParameteriNULL;
3753         getFramebufferParameteriv = &glGetFramebufferParameterivNULL;
3754     }
3755 
3756     if (extensions.count("GL_ARB_framebuffer_object") != 0)
3757     {
3758         bindFramebuffer                     = &glBindFramebufferNULL;
3759         bindRenderbuffer                    = &glBindRenderbufferNULL;
3760         blitFramebuffer                     = &glBlitFramebufferNULL;
3761         checkFramebufferStatus              = &glCheckFramebufferStatusNULL;
3762         deleteFramebuffers                  = &glDeleteFramebuffersNULL;
3763         deleteRenderbuffers                 = &glDeleteRenderbuffersNULL;
3764         framebufferRenderbuffer             = &glFramebufferRenderbufferNULL;
3765         framebufferTexture1D                = &glFramebufferTexture1DNULL;
3766         framebufferTexture2D                = &glFramebufferTexture2DNULL;
3767         framebufferTexture3D                = &glFramebufferTexture3DNULL;
3768         framebufferTextureLayer             = &glFramebufferTextureLayerNULL;
3769         genFramebuffers                     = &glGenFramebuffersNULL;
3770         genRenderbuffers                    = &glGenRenderbuffersNULL;
3771         generateMipmap                      = &glGenerateMipmapNULL;
3772         getFramebufferAttachmentParameteriv = &glGetFramebufferAttachmentParameterivNULL;
3773         getRenderbufferParameteriv          = &glGetRenderbufferParameterivNULL;
3774         isFramebuffer                       = &glIsFramebufferNULL;
3775         isRenderbuffer                      = &glIsRenderbufferNULL;
3776         renderbufferStorage                 = &glRenderbufferStorageNULL;
3777         renderbufferStorageMultisample      = &glRenderbufferStorageMultisampleNULL;
3778     }
3779 
3780     if (extensions.count("GL_ARB_geometry_shader4") != 0)
3781     {
3782         framebufferTexture      = &glFramebufferTextureNULL;
3783         framebufferTextureLayer = &glFramebufferTextureLayerNULL;
3784         programParameteri       = &glProgramParameteriNULL;
3785     }
3786 
3787     if (extensions.count("GL_ARB_get_program_binary") != 0)
3788     {
3789         getProgramBinary  = &glGetProgramBinaryNULL;
3790         programBinary     = &glProgramBinaryNULL;
3791         programParameteri = &glProgramParameteriNULL;
3792     }
3793 
3794     if (extensions.count("GL_ARB_get_texture_sub_image") != 0)
3795     {
3796         getCompressedTextureSubImage = &glGetCompressedTextureSubImageNULL;
3797         getTextureSubImage           = &glGetTextureSubImageNULL;
3798     }
3799 
3800     if (extensions.count("GL_ARB_gpu_shader_fp64") != 0)
3801     {
3802         getUniformdv       = &glGetUniformdvNULL;
3803         uniform1d          = &glUniform1dNULL;
3804         uniform1dv         = &glUniform1dvNULL;
3805         uniform2d          = &glUniform2dNULL;
3806         uniform2dv         = &glUniform2dvNULL;
3807         uniform3d          = &glUniform3dNULL;
3808         uniform3dv         = &glUniform3dvNULL;
3809         uniform4d          = &glUniform4dNULL;
3810         uniform4dv         = &glUniform4dvNULL;
3811         uniformMatrix2dv   = &glUniformMatrix2dvNULL;
3812         uniformMatrix2x3dv = &glUniformMatrix2x3dvNULL;
3813         uniformMatrix2x4dv = &glUniformMatrix2x4dvNULL;
3814         uniformMatrix3dv   = &glUniformMatrix3dvNULL;
3815         uniformMatrix3x2dv = &glUniformMatrix3x2dvNULL;
3816         uniformMatrix3x4dv = &glUniformMatrix3x4dvNULL;
3817         uniformMatrix4dv   = &glUniformMatrix4dvNULL;
3818         uniformMatrix4x2dv = &glUniformMatrix4x2dvNULL;
3819         uniformMatrix4x3dv = &glUniformMatrix4x3dvNULL;
3820     }
3821 
3822     if (extensions.count("GL_ARB_imaging") != 0)
3823     {
3824         blendColor    = &glBlendColorNULL;
3825         blendEquation = &glBlendEquationNULL;
3826     }
3827 
3828     if (extensions.count("GL_ARB_instanced_arrays") != 0)
3829     {
3830         vertexAttribDivisor = &glVertexAttribDivisorNULL;
3831     }
3832 
3833     if (extensions.count("GL_ARB_internalformat_query") != 0)
3834     {
3835         getInternalformativ = &glGetInternalformativNULL;
3836     }
3837 
3838     if (extensions.count("GL_ARB_internalformat_query2") != 0)
3839     {
3840         getInternalformati64v = &glGetInternalformati64vNULL;
3841     }
3842 
3843     if (extensions.count("GL_ARB_invalidate_subdata") != 0)
3844     {
3845         invalidateBufferData     = &glInvalidateBufferDataNULL;
3846         invalidateBufferSubData  = &glInvalidateBufferSubDataNULL;
3847         invalidateFramebuffer    = &glInvalidateFramebufferNULL;
3848         invalidateSubFramebuffer = &glInvalidateSubFramebufferNULL;
3849         invalidateTexImage       = &glInvalidateTexImageNULL;
3850         invalidateTexSubImage    = &glInvalidateTexSubImageNULL;
3851     }
3852 
3853     if (extensions.count("GL_ARB_map_buffer_range") != 0)
3854     {
3855         flushMappedBufferRange = &glFlushMappedBufferRangeNULL;
3856         mapBufferRange         = &glMapBufferRangeNULL;
3857     }
3858 
3859     if (extensions.count("GL_ARB_multi_bind") != 0)
3860     {
3861         bindBuffersBase   = &glBindBuffersBaseNULL;
3862         bindBuffersRange  = &glBindBuffersRangeNULL;
3863         bindImageTextures = &glBindImageTexturesNULL;
3864         bindSamplers      = &glBindSamplersNULL;
3865         bindTextures      = &glBindTexturesNULL;
3866         bindVertexBuffers = &glBindVertexBuffersNULL;
3867     }
3868 
3869     if (extensions.count("GL_ARB_multi_draw_indirect") != 0)
3870     {
3871         multiDrawArraysIndirect   = &glMultiDrawArraysIndirectNULL;
3872         multiDrawElementsIndirect = &glMultiDrawElementsIndirectNULL;
3873     }
3874 
3875     if (extensions.count("GL_ARB_multisample") != 0)
3876     {
3877         sampleCoverage = &glSampleCoverageNULL;
3878     }
3879 
3880     if (extensions.count("GL_ARB_multitexture") != 0)
3881     {
3882         activeTexture = &glActiveTextureNULL;
3883     }
3884 
3885     if (extensions.count("GL_ARB_occlusion_query") != 0)
3886     {
3887         beginQuery        = &glBeginQueryNULL;
3888         deleteQueries     = &glDeleteQueriesNULL;
3889         endQuery          = &glEndQueryNULL;
3890         genQueries        = &glGenQueriesNULL;
3891         getQueryObjectiv  = &glGetQueryObjectivNULL;
3892         getQueryObjectuiv = &glGetQueryObjectuivNULL;
3893         getQueryiv        = &glGetQueryivNULL;
3894         isQuery           = &glIsQueryNULL;
3895     }
3896 
3897     if (extensions.count("GL_ARB_parallel_shader_compile") != 0)
3898     {
3899         maxShaderCompilerThreadsARB = &glMaxShaderCompilerThreadsARBNULL;
3900     }
3901 
3902     if (extensions.count("GL_ARB_point_parameters") != 0)
3903     {
3904         pointParameterf  = &glPointParameterfNULL;
3905         pointParameterfv = &glPointParameterfvNULL;
3906     }
3907 
3908     if (extensions.count("GL_ARB_program_interface_query") != 0)
3909     {
3910         getProgramInterfaceiv           = &glGetProgramInterfaceivNULL;
3911         getProgramResourceIndex         = &glGetProgramResourceIndexNULL;
3912         getProgramResourceLocation      = &glGetProgramResourceLocationNULL;
3913         getProgramResourceLocationIndex = &glGetProgramResourceLocationIndexNULL;
3914         getProgramResourceName          = &glGetProgramResourceNameNULL;
3915         getProgramResourceiv            = &glGetProgramResourceivNULL;
3916     }
3917 
3918     if (extensions.count("GL_ARB_provoking_vertex") != 0)
3919     {
3920         provokingVertex = &glProvokingVertexNULL;
3921     }
3922 
3923     if (extensions.count("GL_ARB_robustness") != 0)
3924     {
3925         getGraphicsResetStatus = &glGetGraphicsResetStatusNULL;
3926         getnCompressedTexImage = &glGetnCompressedTexImageNULL;
3927         getnTexImage           = &glGetnTexImageNULL;
3928         getnUniformdv          = &glGetnUniformdvNULL;
3929         getnUniformfv          = &glGetnUniformfvNULL;
3930         getnUniformiv          = &glGetnUniformivNULL;
3931         getnUniformuiv         = &glGetnUniformuivNULL;
3932         readnPixels            = &glReadnPixelsNULL;
3933     }
3934 
3935     if (extensions.count("GL_ARB_sample_shading") != 0)
3936     {
3937         minSampleShading = &glMinSampleShadingNULL;
3938     }
3939 
3940     if (extensions.count("GL_ARB_sampler_objects") != 0)
3941     {
3942         bindSampler             = &glBindSamplerNULL;
3943         deleteSamplers          = &glDeleteSamplersNULL;
3944         genSamplers             = &glGenSamplersNULL;
3945         getSamplerParameterIiv  = &glGetSamplerParameterIivNULL;
3946         getSamplerParameterIuiv = &glGetSamplerParameterIuivNULL;
3947         getSamplerParameterfv   = &glGetSamplerParameterfvNULL;
3948         getSamplerParameteriv   = &glGetSamplerParameterivNULL;
3949         isSampler               = &glIsSamplerNULL;
3950         samplerParameterIiv     = &glSamplerParameterIivNULL;
3951         samplerParameterIuiv    = &glSamplerParameterIuivNULL;
3952         samplerParameterf       = &glSamplerParameterfNULL;
3953         samplerParameterfv      = &glSamplerParameterfvNULL;
3954         samplerParameteri       = &glSamplerParameteriNULL;
3955         samplerParameteriv      = &glSamplerParameterivNULL;
3956     }
3957 
3958     if (extensions.count("GL_ARB_separate_shader_objects") != 0)
3959     {
3960         activeShaderProgram       = &glActiveShaderProgramNULL;
3961         bindProgramPipeline       = &glBindProgramPipelineNULL;
3962         createShaderProgramv      = &glCreateShaderProgramvNULL;
3963         deleteProgramPipelines    = &glDeleteProgramPipelinesNULL;
3964         genProgramPipelines       = &glGenProgramPipelinesNULL;
3965         getProgramPipelineInfoLog = &glGetProgramPipelineInfoLogNULL;
3966         getProgramPipelineiv      = &glGetProgramPipelineivNULL;
3967         isProgramPipeline         = &glIsProgramPipelineNULL;
3968         programParameteri         = &glProgramParameteriNULL;
3969         programUniform1d          = &glProgramUniform1dNULL;
3970         programUniform1dv         = &glProgramUniform1dvNULL;
3971         programUniform1f          = &glProgramUniform1fNULL;
3972         programUniform1fv         = &glProgramUniform1fvNULL;
3973         programUniform1i          = &glProgramUniform1iNULL;
3974         programUniform1iv         = &glProgramUniform1ivNULL;
3975         programUniform1ui         = &glProgramUniform1uiNULL;
3976         programUniform1uiv        = &glProgramUniform1uivNULL;
3977         programUniform2d          = &glProgramUniform2dNULL;
3978         programUniform2dv         = &glProgramUniform2dvNULL;
3979         programUniform2f          = &glProgramUniform2fNULL;
3980         programUniform2fv         = &glProgramUniform2fvNULL;
3981         programUniform2i          = &glProgramUniform2iNULL;
3982         programUniform2iv         = &glProgramUniform2ivNULL;
3983         programUniform2ui         = &glProgramUniform2uiNULL;
3984         programUniform2uiv        = &glProgramUniform2uivNULL;
3985         programUniform3d          = &glProgramUniform3dNULL;
3986         programUniform3dv         = &glProgramUniform3dvNULL;
3987         programUniform3f          = &glProgramUniform3fNULL;
3988         programUniform3fv         = &glProgramUniform3fvNULL;
3989         programUniform3i          = &glProgramUniform3iNULL;
3990         programUniform3iv         = &glProgramUniform3ivNULL;
3991         programUniform3ui         = &glProgramUniform3uiNULL;
3992         programUniform3uiv        = &glProgramUniform3uivNULL;
3993         programUniform4d          = &glProgramUniform4dNULL;
3994         programUniform4dv         = &glProgramUniform4dvNULL;
3995         programUniform4f          = &glProgramUniform4fNULL;
3996         programUniform4fv         = &glProgramUniform4fvNULL;
3997         programUniform4i          = &glProgramUniform4iNULL;
3998         programUniform4iv         = &glProgramUniform4ivNULL;
3999         programUniform4ui         = &glProgramUniform4uiNULL;
4000         programUniform4uiv        = &glProgramUniform4uivNULL;
4001         programUniformMatrix2dv   = &glProgramUniformMatrix2dvNULL;
4002         programUniformMatrix2fv   = &glProgramUniformMatrix2fvNULL;
4003         programUniformMatrix2x3dv = &glProgramUniformMatrix2x3dvNULL;
4004         programUniformMatrix2x3fv = &glProgramUniformMatrix2x3fvNULL;
4005         programUniformMatrix2x4dv = &glProgramUniformMatrix2x4dvNULL;
4006         programUniformMatrix2x4fv = &glProgramUniformMatrix2x4fvNULL;
4007         programUniformMatrix3dv   = &glProgramUniformMatrix3dvNULL;
4008         programUniformMatrix3fv   = &glProgramUniformMatrix3fvNULL;
4009         programUniformMatrix3x2dv = &glProgramUniformMatrix3x2dvNULL;
4010         programUniformMatrix3x2fv = &glProgramUniformMatrix3x2fvNULL;
4011         programUniformMatrix3x4dv = &glProgramUniformMatrix3x4dvNULL;
4012         programUniformMatrix3x4fv = &glProgramUniformMatrix3x4fvNULL;
4013         programUniformMatrix4dv   = &glProgramUniformMatrix4dvNULL;
4014         programUniformMatrix4fv   = &glProgramUniformMatrix4fvNULL;
4015         programUniformMatrix4x2dv = &glProgramUniformMatrix4x2dvNULL;
4016         programUniformMatrix4x2fv = &glProgramUniformMatrix4x2fvNULL;
4017         programUniformMatrix4x3dv = &glProgramUniformMatrix4x3dvNULL;
4018         programUniformMatrix4x3fv = &glProgramUniformMatrix4x3fvNULL;
4019         useProgramStages          = &glUseProgramStagesNULL;
4020         validateProgramPipeline   = &glValidateProgramPipelineNULL;
4021     }
4022 
4023     if (extensions.count("GL_ARB_shader_atomic_counters") != 0)
4024     {
4025         getActiveAtomicCounterBufferiv = &glGetActiveAtomicCounterBufferivNULL;
4026     }
4027 
4028     if (extensions.count("GL_ARB_shader_image_load_store") != 0)
4029     {
4030         bindImageTexture = &glBindImageTextureNULL;
4031         memoryBarrier    = &glMemoryBarrierNULL;
4032     }
4033 
4034     if (extensions.count("GL_ARB_shader_objects") != 0)
4035     {
4036         compileShader      = &glCompileShaderNULL;
4037         getActiveUniform   = &glGetActiveUniformNULL;
4038         getShaderSource    = &glGetShaderSourceNULL;
4039         getUniformLocation = &glGetUniformLocationNULL;
4040         getUniformfv       = &glGetUniformfvNULL;
4041         getUniformiv       = &glGetUniformivNULL;
4042         linkProgram        = &glLinkProgramNULL;
4043         shaderSource       = &glShaderSourceNULL;
4044         uniform1f          = &glUniform1fNULL;
4045         uniform1fv         = &glUniform1fvNULL;
4046         uniform1i          = &glUniform1iNULL;
4047         uniform1iv         = &glUniform1ivNULL;
4048         uniform2f          = &glUniform2fNULL;
4049         uniform2fv         = &glUniform2fvNULL;
4050         uniform2i          = &glUniform2iNULL;
4051         uniform2iv         = &glUniform2ivNULL;
4052         uniform3f          = &glUniform3fNULL;
4053         uniform3fv         = &glUniform3fvNULL;
4054         uniform3i          = &glUniform3iNULL;
4055         uniform3iv         = &glUniform3ivNULL;
4056         uniform4f          = &glUniform4fNULL;
4057         uniform4fv         = &glUniform4fvNULL;
4058         uniform4i          = &glUniform4iNULL;
4059         uniform4iv         = &glUniform4ivNULL;
4060         uniformMatrix2fv   = &glUniformMatrix2fvNULL;
4061         uniformMatrix3fv   = &glUniformMatrix3fvNULL;
4062         uniformMatrix4fv   = &glUniformMatrix4fvNULL;
4063         validateProgram    = &glValidateProgramNULL;
4064     }
4065 
4066     if (extensions.count("GL_ARB_shader_storage_buffer_object") != 0)
4067     {
4068         shaderStorageBlockBinding = &glShaderStorageBlockBindingNULL;
4069     }
4070 
4071     if (extensions.count("GL_ARB_shader_subroutine") != 0)
4072     {
4073         getActiveSubroutineName        = &glGetActiveSubroutineNameNULL;
4074         getActiveSubroutineUniformName = &glGetActiveSubroutineUniformNameNULL;
4075         getActiveSubroutineUniformiv   = &glGetActiveSubroutineUniformivNULL;
4076         getProgramStageiv              = &glGetProgramStageivNULL;
4077         getSubroutineIndex             = &glGetSubroutineIndexNULL;
4078         getSubroutineUniformLocation   = &glGetSubroutineUniformLocationNULL;
4079         getUniformSubroutineuiv        = &glGetUniformSubroutineuivNULL;
4080         uniformSubroutinesuiv          = &glUniformSubroutinesuivNULL;
4081     }
4082 
4083     if (extensions.count("GL_ARB_sync") != 0)
4084     {
4085         clientWaitSync = &glClientWaitSyncNULL;
4086         deleteSync     = &glDeleteSyncNULL;
4087         fenceSync      = &glFenceSyncNULL;
4088         getInteger64v  = &glGetInteger64vNULL;
4089         getSynciv      = &glGetSyncivNULL;
4090         isSync         = &glIsSyncNULL;
4091         waitSync       = &glWaitSyncNULL;
4092     }
4093 
4094     if (extensions.count("GL_ARB_tessellation_shader") != 0)
4095     {
4096         patchParameterfv = &glPatchParameterfvNULL;
4097         patchParameteri  = &glPatchParameteriNULL;
4098     }
4099 
4100     if (extensions.count("GL_ARB_texture_barrier") != 0)
4101     {
4102         textureBarrier = &glTextureBarrierNULL;
4103     }
4104 
4105     if (extensions.count("GL_ARB_texture_buffer_object") != 0)
4106     {
4107         texBuffer = &glTexBufferNULL;
4108     }
4109 
4110     if (extensions.count("GL_ARB_texture_buffer_range") != 0)
4111     {
4112         texBufferRange = &glTexBufferRangeNULL;
4113     }
4114 
4115     if (extensions.count("GL_ARB_texture_compression") != 0)
4116     {
4117         compressedTexImage1D    = &glCompressedTexImage1DNULL;
4118         compressedTexImage2D    = &glCompressedTexImage2DNULL;
4119         compressedTexImage3D    = &glCompressedTexImage3DNULL;
4120         compressedTexSubImage1D = &glCompressedTexSubImage1DNULL;
4121         compressedTexSubImage2D = &glCompressedTexSubImage2DNULL;
4122         compressedTexSubImage3D = &glCompressedTexSubImage3DNULL;
4123         getCompressedTexImage   = &glGetCompressedTexImageNULL;
4124     }
4125 
4126     if (extensions.count("GL_ARB_texture_multisample") != 0)
4127     {
4128         getMultisamplefv      = &glGetMultisamplefvNULL;
4129         sampleMaski           = &glSampleMaskiNULL;
4130         texImage2DMultisample = &glTexImage2DMultisampleNULL;
4131         texImage3DMultisample = &glTexImage3DMultisampleNULL;
4132     }
4133 
4134     if (extensions.count("GL_ARB_texture_storage") != 0)
4135     {
4136         texStorage1D = &glTexStorage1DNULL;
4137         texStorage2D = &glTexStorage2DNULL;
4138         texStorage3D = &glTexStorage3DNULL;
4139     }
4140 
4141     if (extensions.count("GL_ARB_texture_storage_multisample") != 0)
4142     {
4143         texStorage2DMultisample = &glTexStorage2DMultisampleNULL;
4144         texStorage3DMultisample = &glTexStorage3DMultisampleNULL;
4145     }
4146 
4147     if (extensions.count("GL_ARB_texture_view") != 0)
4148     {
4149         textureView = &glTextureViewNULL;
4150     }
4151 
4152     if (extensions.count("GL_ARB_timer_query") != 0)
4153     {
4154         getQueryObjecti64v  = &glGetQueryObjecti64vNULL;
4155         getQueryObjectui64v = &glGetQueryObjectui64vNULL;
4156         queryCounter        = &glQueryCounterNULL;
4157     }
4158 
4159     if (extensions.count("GL_ARB_transform_feedback2") != 0)
4160     {
4161         bindTransformFeedback    = &glBindTransformFeedbackNULL;
4162         deleteTransformFeedbacks = &glDeleteTransformFeedbacksNULL;
4163         drawTransformFeedback    = &glDrawTransformFeedbackNULL;
4164         genTransformFeedbacks    = &glGenTransformFeedbacksNULL;
4165         isTransformFeedback      = &glIsTransformFeedbackNULL;
4166         pauseTransformFeedback   = &glPauseTransformFeedbackNULL;
4167         resumeTransformFeedback  = &glResumeTransformFeedbackNULL;
4168     }
4169 
4170     if (extensions.count("GL_ARB_transform_feedback3") != 0)
4171     {
4172         beginQueryIndexed           = &glBeginQueryIndexedNULL;
4173         drawTransformFeedbackStream = &glDrawTransformFeedbackStreamNULL;
4174         endQueryIndexed             = &glEndQueryIndexedNULL;
4175         getQueryIndexediv           = &glGetQueryIndexedivNULL;
4176     }
4177 
4178     if (extensions.count("GL_ARB_transform_feedback_instanced") != 0)
4179     {
4180         drawTransformFeedbackInstanced       = &glDrawTransformFeedbackInstancedNULL;
4181         drawTransformFeedbackStreamInstanced = &glDrawTransformFeedbackStreamInstancedNULL;
4182     }
4183 
4184     if (extensions.count("GL_ARB_uniform_buffer_object") != 0)
4185     {
4186         bindBufferBase            = &glBindBufferBaseNULL;
4187         bindBufferRange           = &glBindBufferRangeNULL;
4188         getActiveUniformBlockName = &glGetActiveUniformBlockNameNULL;
4189         getActiveUniformBlockiv   = &glGetActiveUniformBlockivNULL;
4190         getActiveUniformName      = &glGetActiveUniformNameNULL;
4191         getActiveUniformsiv       = &glGetActiveUniformsivNULL;
4192         getIntegeri_v             = &glGetIntegeri_vNULL;
4193         getUniformBlockIndex      = &glGetUniformBlockIndexNULL;
4194         getUniformIndices         = &glGetUniformIndicesNULL;
4195         uniformBlockBinding       = &glUniformBlockBindingNULL;
4196     }
4197 
4198     if (extensions.count("GL_ARB_vertex_array_object") != 0)
4199     {
4200         bindVertexArray    = &glBindVertexArrayNULL;
4201         deleteVertexArrays = &glDeleteVertexArraysNULL;
4202         genVertexArrays    = &glGenVertexArraysNULL;
4203         isVertexArray      = &glIsVertexArrayNULL;
4204     }
4205 
4206     if (extensions.count("GL_ARB_vertex_attrib_64bit") != 0)
4207     {
4208         getVertexAttribLdv   = &glGetVertexAttribLdvNULL;
4209         vertexAttribL1d      = &glVertexAttribL1dNULL;
4210         vertexAttribL1dv     = &glVertexAttribL1dvNULL;
4211         vertexAttribL2d      = &glVertexAttribL2dNULL;
4212         vertexAttribL2dv     = &glVertexAttribL2dvNULL;
4213         vertexAttribL3d      = &glVertexAttribL3dNULL;
4214         vertexAttribL3dv     = &glVertexAttribL3dvNULL;
4215         vertexAttribL4d      = &glVertexAttribL4dNULL;
4216         vertexAttribL4dv     = &glVertexAttribL4dvNULL;
4217         vertexAttribLPointer = &glVertexAttribLPointerNULL;
4218     }
4219 
4220     if (extensions.count("GL_ARB_vertex_attrib_binding") != 0)
4221     {
4222         bindVertexBuffer     = &glBindVertexBufferNULL;
4223         vertexAttribBinding  = &glVertexAttribBindingNULL;
4224         vertexAttribFormat   = &glVertexAttribFormatNULL;
4225         vertexAttribIFormat  = &glVertexAttribIFormatNULL;
4226         vertexAttribLFormat  = &glVertexAttribLFormatNULL;
4227         vertexBindingDivisor = &glVertexBindingDivisorNULL;
4228     }
4229 
4230     if (extensions.count("GL_ARB_vertex_buffer_object") != 0)
4231     {
4232         bindBuffer           = &glBindBufferNULL;
4233         bufferData           = &glBufferDataNULL;
4234         bufferSubData        = &glBufferSubDataNULL;
4235         deleteBuffers        = &glDeleteBuffersNULL;
4236         genBuffers           = &glGenBuffersNULL;
4237         getBufferParameteriv = &glGetBufferParameterivNULL;
4238         getBufferPointerv    = &glGetBufferPointervNULL;
4239         getBufferSubData     = &glGetBufferSubDataNULL;
4240         isBuffer             = &glIsBufferNULL;
4241         mapBuffer            = &glMapBufferNULL;
4242         unmapBuffer          = &glUnmapBufferNULL;
4243     }
4244 
4245     if (extensions.count("GL_ARB_vertex_program") != 0)
4246     {
4247         disableVertexAttribArray = &glDisableVertexAttribArrayNULL;
4248         enableVertexAttribArray  = &glEnableVertexAttribArrayNULL;
4249         getProgramiv             = &glGetProgramivNULL;
4250         getVertexAttribPointerv  = &glGetVertexAttribPointervNULL;
4251         getVertexAttribdv        = &glGetVertexAttribdvNULL;
4252         getVertexAttribfv        = &glGetVertexAttribfvNULL;
4253         getVertexAttribiv        = &glGetVertexAttribivNULL;
4254         isProgram                = &glIsProgramNULL;
4255         vertexAttrib1d           = &glVertexAttrib1dNULL;
4256         vertexAttrib1dv          = &glVertexAttrib1dvNULL;
4257         vertexAttrib1f           = &glVertexAttrib1fNULL;
4258         vertexAttrib1fv          = &glVertexAttrib1fvNULL;
4259         vertexAttrib1s           = &glVertexAttrib1sNULL;
4260         vertexAttrib1sv          = &glVertexAttrib1svNULL;
4261         vertexAttrib2d           = &glVertexAttrib2dNULL;
4262         vertexAttrib2dv          = &glVertexAttrib2dvNULL;
4263         vertexAttrib2f           = &glVertexAttrib2fNULL;
4264         vertexAttrib2fv          = &glVertexAttrib2fvNULL;
4265         vertexAttrib2s           = &glVertexAttrib2sNULL;
4266         vertexAttrib2sv          = &glVertexAttrib2svNULL;
4267         vertexAttrib3d           = &glVertexAttrib3dNULL;
4268         vertexAttrib3dv          = &glVertexAttrib3dvNULL;
4269         vertexAttrib3f           = &glVertexAttrib3fNULL;
4270         vertexAttrib3fv          = &glVertexAttrib3fvNULL;
4271         vertexAttrib3s           = &glVertexAttrib3sNULL;
4272         vertexAttrib3sv          = &glVertexAttrib3svNULL;
4273         vertexAttrib4Nbv         = &glVertexAttrib4NbvNULL;
4274         vertexAttrib4Niv         = &glVertexAttrib4NivNULL;
4275         vertexAttrib4Nsv         = &glVertexAttrib4NsvNULL;
4276         vertexAttrib4Nub         = &glVertexAttrib4NubNULL;
4277         vertexAttrib4Nubv        = &glVertexAttrib4NubvNULL;
4278         vertexAttrib4Nuiv        = &glVertexAttrib4NuivNULL;
4279         vertexAttrib4Nusv        = &glVertexAttrib4NusvNULL;
4280         vertexAttrib4bv          = &glVertexAttrib4bvNULL;
4281         vertexAttrib4d           = &glVertexAttrib4dNULL;
4282         vertexAttrib4dv          = &glVertexAttrib4dvNULL;
4283         vertexAttrib4f           = &glVertexAttrib4fNULL;
4284         vertexAttrib4fv          = &glVertexAttrib4fvNULL;
4285         vertexAttrib4iv          = &glVertexAttrib4ivNULL;
4286         vertexAttrib4s           = &glVertexAttrib4sNULL;
4287         vertexAttrib4sv          = &glVertexAttrib4svNULL;
4288         vertexAttrib4ubv         = &glVertexAttrib4ubvNULL;
4289         vertexAttrib4uiv         = &glVertexAttrib4uivNULL;
4290         vertexAttrib4usv         = &glVertexAttrib4usvNULL;
4291         vertexAttribPointer      = &glVertexAttribPointerNULL;
4292     }
4293 
4294     if (extensions.count("GL_ARB_vertex_shader") != 0)
4295     {
4296         bindAttribLocation       = &glBindAttribLocationNULL;
4297         disableVertexAttribArray = &glDisableVertexAttribArrayNULL;
4298         enableVertexAttribArray  = &glEnableVertexAttribArrayNULL;
4299         getActiveAttrib          = &glGetActiveAttribNULL;
4300         getAttribLocation        = &glGetAttribLocationNULL;
4301         getVertexAttribPointerv  = &glGetVertexAttribPointervNULL;
4302         getVertexAttribdv        = &glGetVertexAttribdvNULL;
4303         getVertexAttribfv        = &glGetVertexAttribfvNULL;
4304         getVertexAttribiv        = &glGetVertexAttribivNULL;
4305         vertexAttrib1d           = &glVertexAttrib1dNULL;
4306         vertexAttrib1dv          = &glVertexAttrib1dvNULL;
4307         vertexAttrib1f           = &glVertexAttrib1fNULL;
4308         vertexAttrib1fv          = &glVertexAttrib1fvNULL;
4309         vertexAttrib1s           = &glVertexAttrib1sNULL;
4310         vertexAttrib1sv          = &glVertexAttrib1svNULL;
4311         vertexAttrib2d           = &glVertexAttrib2dNULL;
4312         vertexAttrib2dv          = &glVertexAttrib2dvNULL;
4313         vertexAttrib2f           = &glVertexAttrib2fNULL;
4314         vertexAttrib2fv          = &glVertexAttrib2fvNULL;
4315         vertexAttrib2s           = &glVertexAttrib2sNULL;
4316         vertexAttrib2sv          = &glVertexAttrib2svNULL;
4317         vertexAttrib3d           = &glVertexAttrib3dNULL;
4318         vertexAttrib3dv          = &glVertexAttrib3dvNULL;
4319         vertexAttrib3f           = &glVertexAttrib3fNULL;
4320         vertexAttrib3fv          = &glVertexAttrib3fvNULL;
4321         vertexAttrib3s           = &glVertexAttrib3sNULL;
4322         vertexAttrib3sv          = &glVertexAttrib3svNULL;
4323         vertexAttrib4Nbv         = &glVertexAttrib4NbvNULL;
4324         vertexAttrib4Niv         = &glVertexAttrib4NivNULL;
4325         vertexAttrib4Nsv         = &glVertexAttrib4NsvNULL;
4326         vertexAttrib4Nub         = &glVertexAttrib4NubNULL;
4327         vertexAttrib4Nubv        = &glVertexAttrib4NubvNULL;
4328         vertexAttrib4Nuiv        = &glVertexAttrib4NuivNULL;
4329         vertexAttrib4Nusv        = &glVertexAttrib4NusvNULL;
4330         vertexAttrib4bv          = &glVertexAttrib4bvNULL;
4331         vertexAttrib4d           = &glVertexAttrib4dNULL;
4332         vertexAttrib4dv          = &glVertexAttrib4dvNULL;
4333         vertexAttrib4f           = &glVertexAttrib4fNULL;
4334         vertexAttrib4fv          = &glVertexAttrib4fvNULL;
4335         vertexAttrib4iv          = &glVertexAttrib4ivNULL;
4336         vertexAttrib4s           = &glVertexAttrib4sNULL;
4337         vertexAttrib4sv          = &glVertexAttrib4svNULL;
4338         vertexAttrib4ubv         = &glVertexAttrib4ubvNULL;
4339         vertexAttrib4uiv         = &glVertexAttrib4uivNULL;
4340         vertexAttrib4usv         = &glVertexAttrib4usvNULL;
4341         vertexAttribPointer      = &glVertexAttribPointerNULL;
4342     }
4343 
4344     if (extensions.count("GL_ARB_vertex_type_2_10_10_10_rev") != 0)
4345     {
4346         vertexAttribP1ui  = &glVertexAttribP1uiNULL;
4347         vertexAttribP1uiv = &glVertexAttribP1uivNULL;
4348         vertexAttribP2ui  = &glVertexAttribP2uiNULL;
4349         vertexAttribP2uiv = &glVertexAttribP2uivNULL;
4350         vertexAttribP3ui  = &glVertexAttribP3uiNULL;
4351         vertexAttribP3uiv = &glVertexAttribP3uivNULL;
4352         vertexAttribP4ui  = &glVertexAttribP4uiNULL;
4353         vertexAttribP4uiv = &glVertexAttribP4uivNULL;
4354     }
4355 
4356     if (extensions.count("GL_ARB_viewport_array") != 0)
4357     {
4358         depthRangeArrayv  = &glDepthRangeArrayvNULL;
4359         depthRangeIndexed = &glDepthRangeIndexedNULL;
4360         getDoublei_v      = &glGetDoublei_vNULL;
4361         getFloati_v       = &glGetFloati_vNULL;
4362         scissorArrayv     = &glScissorArrayvNULL;
4363         scissorIndexed    = &glScissorIndexedNULL;
4364         scissorIndexedv   = &glScissorIndexedvNULL;
4365         viewportArrayv    = &glViewportArrayvNULL;
4366         viewportIndexedf  = &glViewportIndexedfNULL;
4367         viewportIndexedfv = &glViewportIndexedfvNULL;
4368     }
4369 
4370     if (extensions.count("GL_EXT_blend_color") != 0)
4371     {
4372         blendColor = &glBlendColorNULL;
4373     }
4374 
4375     if (extensions.count("GL_EXT_blend_equation_separate") != 0)
4376     {
4377         blendEquationSeparate = &glBlendEquationSeparateNULL;
4378     }
4379 
4380     if (extensions.count("GL_EXT_blend_func_separate") != 0)
4381     {
4382         blendFuncSeparate = &glBlendFuncSeparateNULL;
4383     }
4384 
4385     if (extensions.count("GL_EXT_copy_texture") != 0)
4386     {
4387         copyTexImage1D    = &glCopyTexImage1DNULL;
4388         copyTexImage2D    = &glCopyTexImage2DNULL;
4389         copyTexSubImage1D = &glCopyTexSubImage1DNULL;
4390         copyTexSubImage2D = &glCopyTexSubImage2DNULL;
4391         copyTexSubImage3D = &glCopyTexSubImage3DNULL;
4392     }
4393 
4394     if (extensions.count("GL_EXT_direct_state_access") != 0)
4395     {
4396         checkNamedFramebufferStatus              = &glCheckNamedFramebufferStatusNULL;
4397         clearNamedBufferData                     = &glClearNamedBufferDataNULL;
4398         clearNamedBufferSubData                  = &glClearNamedBufferSubDataNULL;
4399         compressedTextureSubImage1D              = &glCompressedTextureSubImage1DNULL;
4400         compressedTextureSubImage2D              = &glCompressedTextureSubImage2DNULL;
4401         compressedTextureSubImage3D              = &glCompressedTextureSubImage3DNULL;
4402         copyTextureSubImage1D                    = &glCopyTextureSubImage1DNULL;
4403         copyTextureSubImage2D                    = &glCopyTextureSubImage2DNULL;
4404         copyTextureSubImage3D                    = &glCopyTextureSubImage3DNULL;
4405         disableVertexArrayAttrib                 = &glDisableVertexArrayAttribNULL;
4406         enableVertexArrayAttrib                  = &glEnableVertexArrayAttribNULL;
4407         flushMappedNamedBufferRange              = &glFlushMappedNamedBufferRangeNULL;
4408         generateTextureMipmap                    = &glGenerateTextureMipmapNULL;
4409         getCompressedTextureImage                = &glGetCompressedTextureImageNULL;
4410         getDoublei_v                             = &glGetDoublei_vNULL;
4411         getFloati_v                              = &glGetFloati_vNULL;
4412         getFramebufferParameteriv                = &glGetFramebufferParameterivNULL;
4413         getNamedBufferParameteriv                = &glGetNamedBufferParameterivNULL;
4414         getNamedBufferPointerv                   = &glGetNamedBufferPointervNULL;
4415         getNamedBufferSubData                    = &glGetNamedBufferSubDataNULL;
4416         getNamedFramebufferAttachmentParameteriv = &glGetNamedFramebufferAttachmentParameterivNULL;
4417         getNamedFramebufferParameteriv           = &glGetNamedFramebufferParameterivNULL;
4418         getNamedRenderbufferParameteriv          = &glGetNamedRenderbufferParameterivNULL;
4419         getTextureImage                          = &glGetTextureImageNULL;
4420         getTextureLevelParameterfv               = &glGetTextureLevelParameterfvNULL;
4421         getTextureLevelParameteriv               = &glGetTextureLevelParameterivNULL;
4422         getTextureParameterIiv                   = &glGetTextureParameterIivNULL;
4423         getTextureParameterIuiv                  = &glGetTextureParameterIuivNULL;
4424         getTextureParameterfv                    = &glGetTextureParameterfvNULL;
4425         getTextureParameteriv                    = &glGetTextureParameterivNULL;
4426         mapNamedBuffer                           = &glMapNamedBufferNULL;
4427         mapNamedBufferRange                      = &glMapNamedBufferRangeNULL;
4428         namedBufferData                          = &glNamedBufferDataNULL;
4429         namedBufferStorage                       = &glNamedBufferStorageNULL;
4430         namedBufferSubData                       = &glNamedBufferSubDataNULL;
4431         namedFramebufferParameteri               = &glNamedFramebufferParameteriNULL;
4432         namedFramebufferRenderbuffer             = &glNamedFramebufferRenderbufferNULL;
4433         namedFramebufferTexture                  = &glNamedFramebufferTextureNULL;
4434         namedFramebufferTextureLayer             = &glNamedFramebufferTextureLayerNULL;
4435         namedRenderbufferStorage                 = &glNamedRenderbufferStorageNULL;
4436         namedRenderbufferStorageMultisample      = &glNamedRenderbufferStorageMultisampleNULL;
4437         programUniform1d                         = &glProgramUniform1dNULL;
4438         programUniform1dv                        = &glProgramUniform1dvNULL;
4439         programUniform2d                         = &glProgramUniform2dNULL;
4440         programUniform2dv                        = &glProgramUniform2dvNULL;
4441         programUniform3d                         = &glProgramUniform3dNULL;
4442         programUniform3dv                        = &glProgramUniform3dvNULL;
4443         programUniform4d                         = &glProgramUniform4dNULL;
4444         programUniform4dv                        = &glProgramUniform4dvNULL;
4445         programUniformMatrix2dv                  = &glProgramUniformMatrix2dvNULL;
4446         programUniformMatrix2x3dv                = &glProgramUniformMatrix2x3dvNULL;
4447         programUniformMatrix2x4dv                = &glProgramUniformMatrix2x4dvNULL;
4448         programUniformMatrix3dv                  = &glProgramUniformMatrix3dvNULL;
4449         programUniformMatrix3x2dv                = &glProgramUniformMatrix3x2dvNULL;
4450         programUniformMatrix3x4dv                = &glProgramUniformMatrix3x4dvNULL;
4451         programUniformMatrix4dv                  = &glProgramUniformMatrix4dvNULL;
4452         programUniformMatrix4x2dv                = &glProgramUniformMatrix4x2dvNULL;
4453         programUniformMatrix4x3dv                = &glProgramUniformMatrix4x3dvNULL;
4454         textureBuffer                            = &glTextureBufferNULL;
4455         textureBufferRange                       = &glTextureBufferRangeNULL;
4456         textureParameterIiv                      = &glTextureParameterIivNULL;
4457         textureParameterIuiv                     = &glTextureParameterIuivNULL;
4458         textureParameterf                        = &glTextureParameterfNULL;
4459         textureParameterfv                       = &glTextureParameterfvNULL;
4460         textureParameteri                        = &glTextureParameteriNULL;
4461         textureParameteriv                       = &glTextureParameterivNULL;
4462         textureStorage1D                         = &glTextureStorage1DNULL;
4463         textureStorage2D                         = &glTextureStorage2DNULL;
4464         textureStorage2DMultisample              = &glTextureStorage2DMultisampleNULL;
4465         textureStorage3D                         = &glTextureStorage3DNULL;
4466         textureStorage3DMultisample              = &glTextureStorage3DMultisampleNULL;
4467         textureSubImage1D                        = &glTextureSubImage1DNULL;
4468         textureSubImage2D                        = &glTextureSubImage2DNULL;
4469         textureSubImage3D                        = &glTextureSubImage3DNULL;
4470         unmapNamedBuffer                         = &glUnmapNamedBufferNULL;
4471     }
4472 
4473     if (extensions.count("GL_EXT_draw_range_elements") != 0)
4474     {
4475         drawRangeElements = &glDrawRangeElementsNULL;
4476     }
4477 
4478     if (extensions.count("GL_EXT_framebuffer_blit") != 0)
4479     {
4480         blitFramebuffer = &glBlitFramebufferNULL;
4481     }
4482 
4483     if (extensions.count("GL_EXT_framebuffer_multisample") != 0)
4484     {
4485         renderbufferStorageMultisample = &glRenderbufferStorageMultisampleNULL;
4486     }
4487 
4488     if (extensions.count("GL_EXT_framebuffer_object") != 0)
4489     {
4490         bindFramebuffer                     = &glBindFramebufferNULL;
4491         bindRenderbuffer                    = &glBindRenderbufferNULL;
4492         checkFramebufferStatus              = &glCheckFramebufferStatusNULL;
4493         deleteFramebuffers                  = &glDeleteFramebuffersNULL;
4494         deleteRenderbuffers                 = &glDeleteRenderbuffersNULL;
4495         framebufferRenderbuffer             = &glFramebufferRenderbufferNULL;
4496         framebufferTexture1D                = &glFramebufferTexture1DNULL;
4497         framebufferTexture2D                = &glFramebufferTexture2DNULL;
4498         framebufferTexture3D                = &glFramebufferTexture3DNULL;
4499         genFramebuffers                     = &glGenFramebuffersNULL;
4500         genRenderbuffers                    = &glGenRenderbuffersNULL;
4501         generateMipmap                      = &glGenerateMipmapNULL;
4502         getFramebufferAttachmentParameteriv = &glGetFramebufferAttachmentParameterivNULL;
4503         getRenderbufferParameteriv          = &glGetRenderbufferParameterivNULL;
4504         isFramebuffer                       = &glIsFramebufferNULL;
4505         isRenderbuffer                      = &glIsRenderbufferNULL;
4506         renderbufferStorage                 = &glRenderbufferStorageNULL;
4507     }
4508 
4509     if (extensions.count("GL_EXT_gpu_shader4") != 0)
4510     {
4511         bindFragDataLocation = &glBindFragDataLocationNULL;
4512         getFragDataLocation  = &glGetFragDataLocationNULL;
4513         getUniformuiv        = &glGetUniformuivNULL;
4514         uniform1ui           = &glUniform1uiNULL;
4515         uniform1uiv          = &glUniform1uivNULL;
4516         uniform2ui           = &glUniform2uiNULL;
4517         uniform2uiv          = &glUniform2uivNULL;
4518         uniform3ui           = &glUniform3uiNULL;
4519         uniform3uiv          = &glUniform3uivNULL;
4520         uniform4ui           = &glUniform4uiNULL;
4521         uniform4uiv          = &glUniform4uivNULL;
4522     }
4523 
4524     if (extensions.count("GL_EXT_point_parameters") != 0)
4525     {
4526         pointParameterf  = &glPointParameterfNULL;
4527         pointParameterfv = &glPointParameterfvNULL;
4528     }
4529 
4530     if (extensions.count("GL_EXT_polygon_offset") != 0)
4531     {
4532         polygonOffset = &glPolygonOffsetNULL;
4533     }
4534 
4535     if (extensions.count("GL_EXT_provoking_vertex") != 0)
4536     {
4537         provokingVertex = &glProvokingVertexNULL;
4538     }
4539 
4540     if (extensions.count("GL_EXT_shader_image_load_store") != 0)
4541     {
4542         bindImageTexture = &glBindImageTextureNULL;
4543         memoryBarrier    = &glMemoryBarrierNULL;
4544     }
4545 
4546     if (extensions.count("GL_EXT_subtexture") != 0)
4547     {
4548         texSubImage1D = &glTexSubImage1DNULL;
4549         texSubImage2D = &glTexSubImage2DNULL;
4550     }
4551 
4552     if (extensions.count("GL_EXT_texture3D") != 0)
4553     {
4554         texImage3D    = &glTexImage3DNULL;
4555         texSubImage3D = &glTexSubImage3DNULL;
4556     }
4557 
4558     if (extensions.count("GL_EXT_texture_array") != 0)
4559     {
4560         framebufferTextureLayer = &glFramebufferTextureLayerNULL;
4561     }
4562 
4563     if (extensions.count("GL_EXT_texture_buffer_object") != 0)
4564     {
4565         texBuffer = &glTexBufferNULL;
4566     }
4567 
4568     if (extensions.count("GL_EXT_texture_integer") != 0)
4569     {
4570         getTexParameterIiv  = &glGetTexParameterIivNULL;
4571         getTexParameterIuiv = &glGetTexParameterIuivNULL;
4572         texParameterIiv     = &glTexParameterIivNULL;
4573         texParameterIuiv    = &glTexParameterIuivNULL;
4574     }
4575 
4576     if (extensions.count("GL_EXT_texture_object") != 0)
4577     {
4578         bindTexture    = &glBindTextureNULL;
4579         deleteTextures = &glDeleteTexturesNULL;
4580         genTextures    = &glGenTexturesNULL;
4581         isTexture      = &glIsTextureNULL;
4582     }
4583 
4584     if (extensions.count("GL_EXT_timer_query") != 0)
4585     {
4586         getQueryObjecti64v  = &glGetQueryObjecti64vNULL;
4587         getQueryObjectui64v = &glGetQueryObjectui64vNULL;
4588     }
4589 
4590     if (extensions.count("GL_EXT_transform_feedback") != 0)
4591     {
4592         beginTransformFeedback      = &glBeginTransformFeedbackNULL;
4593         bindBufferBase              = &glBindBufferBaseNULL;
4594         bindBufferRange             = &glBindBufferRangeNULL;
4595         endTransformFeedback        = &glEndTransformFeedbackNULL;
4596         getTransformFeedbackVarying = &glGetTransformFeedbackVaryingNULL;
4597         transformFeedbackVaryings   = &glTransformFeedbackVaryingsNULL;
4598     }
4599 
4600     if (extensions.count("GL_EXT_vertex_array") != 0)
4601     {
4602         drawArrays  = &glDrawArraysNULL;
4603         getPointerv = &glGetPointervNULL;
4604     }
4605 
4606     if (extensions.count("GL_EXT_vertex_attrib_64bit") != 0)
4607     {
4608         getVertexAttribLdv   = &glGetVertexAttribLdvNULL;
4609         vertexAttribL1d      = &glVertexAttribL1dNULL;
4610         vertexAttribL1dv     = &glVertexAttribL1dvNULL;
4611         vertexAttribL2d      = &glVertexAttribL2dNULL;
4612         vertexAttribL2dv     = &glVertexAttribL2dvNULL;
4613         vertexAttribL3d      = &glVertexAttribL3dNULL;
4614         vertexAttribL3dv     = &glVertexAttribL3dvNULL;
4615         vertexAttribL4d      = &glVertexAttribL4dNULL;
4616         vertexAttribL4dv     = &glVertexAttribL4dvNULL;
4617         vertexAttribLPointer = &glVertexAttribLPointerNULL;
4618     }
4619 
4620     if (extensions.count("GL_KHR_debug") != 0)
4621     {
4622         debugMessageCallback = &glDebugMessageCallbackNULL;
4623         debugMessageControl  = &glDebugMessageControlNULL;
4624         debugMessageInsert   = &glDebugMessageInsertNULL;
4625         getDebugMessageLog   = &glGetDebugMessageLogNULL;
4626         getObjectLabel       = &glGetObjectLabelNULL;
4627         getObjectPtrLabel    = &glGetObjectPtrLabelNULL;
4628         getPointerv          = &glGetPointervNULL;
4629         objectLabel          = &glObjectLabelNULL;
4630         objectPtrLabel       = &glObjectPtrLabelNULL;
4631         popDebugGroup        = &glPopDebugGroupNULL;
4632         pushDebugGroup       = &glPushDebugGroupNULL;
4633     }
4634 
4635     if (extensions.count("GL_KHR_robustness") != 0)
4636     {
4637         getGraphicsResetStatus = &glGetGraphicsResetStatusNULL;
4638         getnUniformfv          = &glGetnUniformfvNULL;
4639         getnUniformiv          = &glGetnUniformivNULL;
4640         getnUniformuiv         = &glGetnUniformuivNULL;
4641         readnPixels            = &glReadnPixelsNULL;
4642     }
4643 
4644     if (extensions.count("GL_NV_geometry_program4") != 0)
4645     {
4646         framebufferTexture      = &glFramebufferTextureNULL;
4647         framebufferTextureLayer = &glFramebufferTextureLayerNULL;
4648     }
4649 
4650     if (extensions.count("GL_NV_vertex_program4") != 0)
4651     {
4652         getVertexAttribIiv   = &glGetVertexAttribIivNULL;
4653         getVertexAttribIuiv  = &glGetVertexAttribIuivNULL;
4654         vertexAttribI1i      = &glVertexAttribI1iNULL;
4655         vertexAttribI1iv     = &glVertexAttribI1ivNULL;
4656         vertexAttribI1ui     = &glVertexAttribI1uiNULL;
4657         vertexAttribI1uiv    = &glVertexAttribI1uivNULL;
4658         vertexAttribI2i      = &glVertexAttribI2iNULL;
4659         vertexAttribI2iv     = &glVertexAttribI2ivNULL;
4660         vertexAttribI2ui     = &glVertexAttribI2uiNULL;
4661         vertexAttribI2uiv    = &glVertexAttribI2uivNULL;
4662         vertexAttribI3i      = &glVertexAttribI3iNULL;
4663         vertexAttribI3iv     = &glVertexAttribI3ivNULL;
4664         vertexAttribI3ui     = &glVertexAttribI3uiNULL;
4665         vertexAttribI3uiv    = &glVertexAttribI3uivNULL;
4666         vertexAttribI4bv     = &glVertexAttribI4bvNULL;
4667         vertexAttribI4i      = &glVertexAttribI4iNULL;
4668         vertexAttribI4iv     = &glVertexAttribI4ivNULL;
4669         vertexAttribI4sv     = &glVertexAttribI4svNULL;
4670         vertexAttribI4ubv    = &glVertexAttribI4ubvNULL;
4671         vertexAttribI4ui     = &glVertexAttribI4uiNULL;
4672         vertexAttribI4uiv    = &glVertexAttribI4uivNULL;
4673         vertexAttribI4usv    = &glVertexAttribI4usvNULL;
4674         vertexAttribIPointer = &glVertexAttribIPointerNULL;
4675     }
4676 
4677     if (extensions.count("GL_OES_single_precision") != 0)
4678     {
4679         clearDepthf = &glClearDepthfNULL;
4680         depthRangef = &glDepthRangefNULL;
4681     }
4682 }
4683 
initProcsGLESNULL(const gl::Version & version,const std::set<std::string> & extensions)4684 void DispatchTableGL::initProcsGLESNULL(const gl::Version &version,
4685                                         const std::set<std::string> &extensions)
4686 {
4687     if (version >= gl::Version(2, 0))
4688     {
4689         activeTexture                       = &glActiveTextureNULL;
4690         attachShader                        = &glAttachShaderNULL;
4691         bindAttribLocation                  = &glBindAttribLocationNULL;
4692         bindBuffer                          = &glBindBufferNULL;
4693         bindFramebuffer                     = &glBindFramebufferNULL;
4694         bindRenderbuffer                    = &glBindRenderbufferNULL;
4695         bindTexture                         = &glBindTextureNULL;
4696         blendColor                          = &glBlendColorNULL;
4697         blendEquation                       = &glBlendEquationNULL;
4698         blendEquationSeparate               = &glBlendEquationSeparateNULL;
4699         blendFunc                           = &glBlendFuncNULL;
4700         blendFuncSeparate                   = &glBlendFuncSeparateNULL;
4701         bufferData                          = &glBufferDataNULL;
4702         bufferSubData                       = &glBufferSubDataNULL;
4703         checkFramebufferStatus              = &glCheckFramebufferStatusNULL;
4704         clear                               = &glClearNULL;
4705         clearColor                          = &glClearColorNULL;
4706         clearDepthf                         = &glClearDepthfNULL;
4707         clearStencil                        = &glClearStencilNULL;
4708         colorMask                           = &glColorMaskNULL;
4709         compileShader                       = &glCompileShaderNULL;
4710         compressedTexImage2D                = &glCompressedTexImage2DNULL;
4711         compressedTexSubImage2D             = &glCompressedTexSubImage2DNULL;
4712         copyTexImage2D                      = &glCopyTexImage2DNULL;
4713         copyTexSubImage2D                   = &glCopyTexSubImage2DNULL;
4714         createProgram                       = &glCreateProgramNULL;
4715         createShader                        = &glCreateShaderNULL;
4716         cullFace                            = &glCullFaceNULL;
4717         deleteBuffers                       = &glDeleteBuffersNULL;
4718         deleteFramebuffers                  = &glDeleteFramebuffersNULL;
4719         deleteProgram                       = &glDeleteProgramNULL;
4720         deleteRenderbuffers                 = &glDeleteRenderbuffersNULL;
4721         deleteShader                        = &glDeleteShaderNULL;
4722         deleteTextures                      = &glDeleteTexturesNULL;
4723         depthFunc                           = &glDepthFuncNULL;
4724         depthMask                           = &glDepthMaskNULL;
4725         depthRangef                         = &glDepthRangefNULL;
4726         detachShader                        = &glDetachShaderNULL;
4727         disable                             = &glDisableNULL;
4728         disableVertexAttribArray            = &glDisableVertexAttribArrayNULL;
4729         drawArrays                          = &glDrawArraysNULL;
4730         drawElements                        = &glDrawElementsNULL;
4731         enable                              = &glEnableNULL;
4732         enableVertexAttribArray             = &glEnableVertexAttribArrayNULL;
4733         finish                              = &glFinishNULL;
4734         flush                               = &glFlushNULL;
4735         framebufferRenderbuffer             = &glFramebufferRenderbufferNULL;
4736         framebufferTexture2D                = &glFramebufferTexture2DNULL;
4737         frontFace                           = &glFrontFaceNULL;
4738         genBuffers                          = &glGenBuffersNULL;
4739         genFramebuffers                     = &glGenFramebuffersNULL;
4740         genRenderbuffers                    = &glGenRenderbuffersNULL;
4741         genTextures                         = &glGenTexturesNULL;
4742         generateMipmap                      = &glGenerateMipmapNULL;
4743         getActiveAttrib                     = &glGetActiveAttribNULL;
4744         getActiveUniform                    = &glGetActiveUniformNULL;
4745         getAttachedShaders                  = &glGetAttachedShadersNULL;
4746         getAttribLocation                   = &glGetAttribLocationNULL;
4747         getBooleanv                         = &glGetBooleanvNULL;
4748         getBufferParameteriv                = &glGetBufferParameterivNULL;
4749         getError                            = &glGetErrorNULL;
4750         getFloatv                           = &glGetFloatvNULL;
4751         getFramebufferAttachmentParameteriv = &glGetFramebufferAttachmentParameterivNULL;
4752         getIntegerv                         = &glGetIntegervNULL;
4753         getProgramInfoLog                   = &glGetProgramInfoLogNULL;
4754         getProgramiv                        = &glGetProgramivNULL;
4755         getRenderbufferParameteriv          = &glGetRenderbufferParameterivNULL;
4756         getShaderInfoLog                    = &glGetShaderInfoLogNULL;
4757         getShaderPrecisionFormat            = &glGetShaderPrecisionFormatNULL;
4758         getShaderSource                     = &glGetShaderSourceNULL;
4759         getShaderiv                         = &glGetShaderivNULL;
4760         getString                           = &glGetStringNULL;
4761         getTexParameterfv                   = &glGetTexParameterfvNULL;
4762         getTexParameteriv                   = &glGetTexParameterivNULL;
4763         getUniformLocation                  = &glGetUniformLocationNULL;
4764         getUniformfv                        = &glGetUniformfvNULL;
4765         getUniformiv                        = &glGetUniformivNULL;
4766         getVertexAttribPointerv             = &glGetVertexAttribPointervNULL;
4767         getVertexAttribfv                   = &glGetVertexAttribfvNULL;
4768         getVertexAttribiv                   = &glGetVertexAttribivNULL;
4769         hint                                = &glHintNULL;
4770         isBuffer                            = &glIsBufferNULL;
4771         isEnabled                           = &glIsEnabledNULL;
4772         isFramebuffer                       = &glIsFramebufferNULL;
4773         isProgram                           = &glIsProgramNULL;
4774         isRenderbuffer                      = &glIsRenderbufferNULL;
4775         isShader                            = &glIsShaderNULL;
4776         isTexture                           = &glIsTextureNULL;
4777         lineWidth                           = &glLineWidthNULL;
4778         linkProgram                         = &glLinkProgramNULL;
4779         pixelStorei                         = &glPixelStoreiNULL;
4780         polygonOffset                       = &glPolygonOffsetNULL;
4781         readPixels                          = &glReadPixelsNULL;
4782         releaseShaderCompiler               = &glReleaseShaderCompilerNULL;
4783         renderbufferStorage                 = &glRenderbufferStorageNULL;
4784         sampleCoverage                      = &glSampleCoverageNULL;
4785         scissor                             = &glScissorNULL;
4786         shaderBinary                        = &glShaderBinaryNULL;
4787         shaderSource                        = &glShaderSourceNULL;
4788         stencilFunc                         = &glStencilFuncNULL;
4789         stencilFuncSeparate                 = &glStencilFuncSeparateNULL;
4790         stencilMask                         = &glStencilMaskNULL;
4791         stencilMaskSeparate                 = &glStencilMaskSeparateNULL;
4792         stencilOp                           = &glStencilOpNULL;
4793         stencilOpSeparate                   = &glStencilOpSeparateNULL;
4794         texImage2D                          = &glTexImage2DNULL;
4795         texParameterf                       = &glTexParameterfNULL;
4796         texParameterfv                      = &glTexParameterfvNULL;
4797         texParameteri                       = &glTexParameteriNULL;
4798         texParameteriv                      = &glTexParameterivNULL;
4799         texSubImage2D                       = &glTexSubImage2DNULL;
4800         uniform1f                           = &glUniform1fNULL;
4801         uniform1fv                          = &glUniform1fvNULL;
4802         uniform1i                           = &glUniform1iNULL;
4803         uniform1iv                          = &glUniform1ivNULL;
4804         uniform2f                           = &glUniform2fNULL;
4805         uniform2fv                          = &glUniform2fvNULL;
4806         uniform2i                           = &glUniform2iNULL;
4807         uniform2iv                          = &glUniform2ivNULL;
4808         uniform3f                           = &glUniform3fNULL;
4809         uniform3fv                          = &glUniform3fvNULL;
4810         uniform3i                           = &glUniform3iNULL;
4811         uniform3iv                          = &glUniform3ivNULL;
4812         uniform4f                           = &glUniform4fNULL;
4813         uniform4fv                          = &glUniform4fvNULL;
4814         uniform4i                           = &glUniform4iNULL;
4815         uniform4iv                          = &glUniform4ivNULL;
4816         uniformMatrix2fv                    = &glUniformMatrix2fvNULL;
4817         uniformMatrix3fv                    = &glUniformMatrix3fvNULL;
4818         uniformMatrix4fv                    = &glUniformMatrix4fvNULL;
4819         useProgram                          = &glUseProgramNULL;
4820         validateProgram                     = &glValidateProgramNULL;
4821         vertexAttrib1f                      = &glVertexAttrib1fNULL;
4822         vertexAttrib1fv                     = &glVertexAttrib1fvNULL;
4823         vertexAttrib2f                      = &glVertexAttrib2fNULL;
4824         vertexAttrib2fv                     = &glVertexAttrib2fvNULL;
4825         vertexAttrib3f                      = &glVertexAttrib3fNULL;
4826         vertexAttrib3fv                     = &glVertexAttrib3fvNULL;
4827         vertexAttrib4f                      = &glVertexAttrib4fNULL;
4828         vertexAttrib4fv                     = &glVertexAttrib4fvNULL;
4829         vertexAttribPointer                 = &glVertexAttribPointerNULL;
4830         viewport                            = &glViewportNULL;
4831     }
4832 
4833     if (version >= gl::Version(3, 0))
4834     {
4835         beginQuery                     = &glBeginQueryNULL;
4836         beginTransformFeedback         = &glBeginTransformFeedbackNULL;
4837         bindBufferBase                 = &glBindBufferBaseNULL;
4838         bindBufferRange                = &glBindBufferRangeNULL;
4839         bindSampler                    = &glBindSamplerNULL;
4840         bindTransformFeedback          = &glBindTransformFeedbackNULL;
4841         bindVertexArray                = &glBindVertexArrayNULL;
4842         blitFramebuffer                = &glBlitFramebufferNULL;
4843         clearBufferfi                  = &glClearBufferfiNULL;
4844         clearBufferfv                  = &glClearBufferfvNULL;
4845         clearBufferiv                  = &glClearBufferivNULL;
4846         clearBufferuiv                 = &glClearBufferuivNULL;
4847         clientWaitSync                 = &glClientWaitSyncNULL;
4848         compressedTexImage3D           = &glCompressedTexImage3DNULL;
4849         compressedTexSubImage3D        = &glCompressedTexSubImage3DNULL;
4850         copyBufferSubData              = &glCopyBufferSubDataNULL;
4851         copyTexSubImage3D              = &glCopyTexSubImage3DNULL;
4852         deleteQueries                  = &glDeleteQueriesNULL;
4853         deleteSamplers                 = &glDeleteSamplersNULL;
4854         deleteSync                     = &glDeleteSyncNULL;
4855         deleteTransformFeedbacks       = &glDeleteTransformFeedbacksNULL;
4856         deleteVertexArrays             = &glDeleteVertexArraysNULL;
4857         drawArraysInstanced            = &glDrawArraysInstancedNULL;
4858         drawBuffers                    = &glDrawBuffersNULL;
4859         drawElementsInstanced          = &glDrawElementsInstancedNULL;
4860         drawRangeElements              = &glDrawRangeElementsNULL;
4861         endQuery                       = &glEndQueryNULL;
4862         endTransformFeedback           = &glEndTransformFeedbackNULL;
4863         fenceSync                      = &glFenceSyncNULL;
4864         flushMappedBufferRange         = &glFlushMappedBufferRangeNULL;
4865         framebufferTextureLayer        = &glFramebufferTextureLayerNULL;
4866         genQueries                     = &glGenQueriesNULL;
4867         genSamplers                    = &glGenSamplersNULL;
4868         genTransformFeedbacks          = &glGenTransformFeedbacksNULL;
4869         genVertexArrays                = &glGenVertexArraysNULL;
4870         getActiveUniformBlockName      = &glGetActiveUniformBlockNameNULL;
4871         getActiveUniformBlockiv        = &glGetActiveUniformBlockivNULL;
4872         getActiveUniformsiv            = &glGetActiveUniformsivNULL;
4873         getBufferParameteri64v         = &glGetBufferParameteri64vNULL;
4874         getBufferPointerv              = &glGetBufferPointervNULL;
4875         getFragDataLocation            = &glGetFragDataLocationNULL;
4876         getInteger64i_v                = &glGetInteger64i_vNULL;
4877         getInteger64v                  = &glGetInteger64vNULL;
4878         getIntegeri_v                  = &glGetIntegeri_vNULL;
4879         getInternalformativ            = &glGetInternalformativNULL;
4880         getProgramBinary               = &glGetProgramBinaryNULL;
4881         getQueryObjectuiv              = &glGetQueryObjectuivNULL;
4882         getQueryiv                     = &glGetQueryivNULL;
4883         getSamplerParameterfv          = &glGetSamplerParameterfvNULL;
4884         getSamplerParameteriv          = &glGetSamplerParameterivNULL;
4885         getStringi                     = &glGetStringiNULL;
4886         getSynciv                      = &glGetSyncivNULL;
4887         getTransformFeedbackVarying    = &glGetTransformFeedbackVaryingNULL;
4888         getUniformBlockIndex           = &glGetUniformBlockIndexNULL;
4889         getUniformIndices              = &glGetUniformIndicesNULL;
4890         getUniformuiv                  = &glGetUniformuivNULL;
4891         getVertexAttribIiv             = &glGetVertexAttribIivNULL;
4892         getVertexAttribIuiv            = &glGetVertexAttribIuivNULL;
4893         invalidateFramebuffer          = &glInvalidateFramebufferNULL;
4894         invalidateSubFramebuffer       = &glInvalidateSubFramebufferNULL;
4895         isQuery                        = &glIsQueryNULL;
4896         isSampler                      = &glIsSamplerNULL;
4897         isSync                         = &glIsSyncNULL;
4898         isTransformFeedback            = &glIsTransformFeedbackNULL;
4899         isVertexArray                  = &glIsVertexArrayNULL;
4900         mapBufferRange                 = &glMapBufferRangeNULL;
4901         pauseTransformFeedback         = &glPauseTransformFeedbackNULL;
4902         programBinary                  = &glProgramBinaryNULL;
4903         programParameteri              = &glProgramParameteriNULL;
4904         readBuffer                     = &glReadBufferNULL;
4905         renderbufferStorageMultisample = &glRenderbufferStorageMultisampleNULL;
4906         resumeTransformFeedback        = &glResumeTransformFeedbackNULL;
4907         samplerParameterf              = &glSamplerParameterfNULL;
4908         samplerParameterfv             = &glSamplerParameterfvNULL;
4909         samplerParameteri              = &glSamplerParameteriNULL;
4910         samplerParameteriv             = &glSamplerParameterivNULL;
4911         texImage3D                     = &glTexImage3DNULL;
4912         texStorage2D                   = &glTexStorage2DNULL;
4913         texStorage3D                   = &glTexStorage3DNULL;
4914         texSubImage3D                  = &glTexSubImage3DNULL;
4915         transformFeedbackVaryings      = &glTransformFeedbackVaryingsNULL;
4916         uniform1ui                     = &glUniform1uiNULL;
4917         uniform1uiv                    = &glUniform1uivNULL;
4918         uniform2ui                     = &glUniform2uiNULL;
4919         uniform2uiv                    = &glUniform2uivNULL;
4920         uniform3ui                     = &glUniform3uiNULL;
4921         uniform3uiv                    = &glUniform3uivNULL;
4922         uniform4ui                     = &glUniform4uiNULL;
4923         uniform4uiv                    = &glUniform4uivNULL;
4924         uniformBlockBinding            = &glUniformBlockBindingNULL;
4925         uniformMatrix2x3fv             = &glUniformMatrix2x3fvNULL;
4926         uniformMatrix2x4fv             = &glUniformMatrix2x4fvNULL;
4927         uniformMatrix3x2fv             = &glUniformMatrix3x2fvNULL;
4928         uniformMatrix3x4fv             = &glUniformMatrix3x4fvNULL;
4929         uniformMatrix4x2fv             = &glUniformMatrix4x2fvNULL;
4930         uniformMatrix4x3fv             = &glUniformMatrix4x3fvNULL;
4931         unmapBuffer                    = &glUnmapBufferNULL;
4932         vertexAttribDivisor            = &glVertexAttribDivisorNULL;
4933         vertexAttribI4i                = &glVertexAttribI4iNULL;
4934         vertexAttribI4iv               = &glVertexAttribI4ivNULL;
4935         vertexAttribI4ui               = &glVertexAttribI4uiNULL;
4936         vertexAttribI4uiv              = &glVertexAttribI4uivNULL;
4937         vertexAttribIPointer           = &glVertexAttribIPointerNULL;
4938         waitSync                       = &glWaitSyncNULL;
4939     }
4940 
4941     if (version >= gl::Version(3, 1))
4942     {
4943         activeShaderProgram        = &glActiveShaderProgramNULL;
4944         bindImageTexture           = &glBindImageTextureNULL;
4945         bindProgramPipeline        = &glBindProgramPipelineNULL;
4946         bindVertexBuffer           = &glBindVertexBufferNULL;
4947         createShaderProgramv       = &glCreateShaderProgramvNULL;
4948         deleteProgramPipelines     = &glDeleteProgramPipelinesNULL;
4949         dispatchCompute            = &glDispatchComputeNULL;
4950         dispatchComputeIndirect    = &glDispatchComputeIndirectNULL;
4951         drawArraysIndirect         = &glDrawArraysIndirectNULL;
4952         drawElementsIndirect       = &glDrawElementsIndirectNULL;
4953         framebufferParameteri      = &glFramebufferParameteriNULL;
4954         genProgramPipelines        = &glGenProgramPipelinesNULL;
4955         getBooleani_v              = &glGetBooleani_vNULL;
4956         getFramebufferParameteriv  = &glGetFramebufferParameterivNULL;
4957         getMultisamplefv           = &glGetMultisamplefvNULL;
4958         getProgramInterfaceiv      = &glGetProgramInterfaceivNULL;
4959         getProgramPipelineInfoLog  = &glGetProgramPipelineInfoLogNULL;
4960         getProgramPipelineiv       = &glGetProgramPipelineivNULL;
4961         getProgramResourceIndex    = &glGetProgramResourceIndexNULL;
4962         getProgramResourceLocation = &glGetProgramResourceLocationNULL;
4963         getProgramResourceName     = &glGetProgramResourceNameNULL;
4964         getProgramResourceiv       = &glGetProgramResourceivNULL;
4965         getTexLevelParameterfv     = &glGetTexLevelParameterfvNULL;
4966         getTexLevelParameteriv     = &glGetTexLevelParameterivNULL;
4967         isProgramPipeline          = &glIsProgramPipelineNULL;
4968         memoryBarrier              = &glMemoryBarrierNULL;
4969         memoryBarrierByRegion      = &glMemoryBarrierByRegionNULL;
4970         programUniform1f           = &glProgramUniform1fNULL;
4971         programUniform1fv          = &glProgramUniform1fvNULL;
4972         programUniform1i           = &glProgramUniform1iNULL;
4973         programUniform1iv          = &glProgramUniform1ivNULL;
4974         programUniform1ui          = &glProgramUniform1uiNULL;
4975         programUniform1uiv         = &glProgramUniform1uivNULL;
4976         programUniform2f           = &glProgramUniform2fNULL;
4977         programUniform2fv          = &glProgramUniform2fvNULL;
4978         programUniform2i           = &glProgramUniform2iNULL;
4979         programUniform2iv          = &glProgramUniform2ivNULL;
4980         programUniform2ui          = &glProgramUniform2uiNULL;
4981         programUniform2uiv         = &glProgramUniform2uivNULL;
4982         programUniform3f           = &glProgramUniform3fNULL;
4983         programUniform3fv          = &glProgramUniform3fvNULL;
4984         programUniform3i           = &glProgramUniform3iNULL;
4985         programUniform3iv          = &glProgramUniform3ivNULL;
4986         programUniform3ui          = &glProgramUniform3uiNULL;
4987         programUniform3uiv         = &glProgramUniform3uivNULL;
4988         programUniform4f           = &glProgramUniform4fNULL;
4989         programUniform4fv          = &glProgramUniform4fvNULL;
4990         programUniform4i           = &glProgramUniform4iNULL;
4991         programUniform4iv          = &glProgramUniform4ivNULL;
4992         programUniform4ui          = &glProgramUniform4uiNULL;
4993         programUniform4uiv         = &glProgramUniform4uivNULL;
4994         programUniformMatrix2fv    = &glProgramUniformMatrix2fvNULL;
4995         programUniformMatrix2x3fv  = &glProgramUniformMatrix2x3fvNULL;
4996         programUniformMatrix2x4fv  = &glProgramUniformMatrix2x4fvNULL;
4997         programUniformMatrix3fv    = &glProgramUniformMatrix3fvNULL;
4998         programUniformMatrix3x2fv  = &glProgramUniformMatrix3x2fvNULL;
4999         programUniformMatrix3x4fv  = &glProgramUniformMatrix3x4fvNULL;
5000         programUniformMatrix4fv    = &glProgramUniformMatrix4fvNULL;
5001         programUniformMatrix4x2fv  = &glProgramUniformMatrix4x2fvNULL;
5002         programUniformMatrix4x3fv  = &glProgramUniformMatrix4x3fvNULL;
5003         sampleMaski                = &glSampleMaskiNULL;
5004         texStorage2DMultisample    = &glTexStorage2DMultisampleNULL;
5005         useProgramStages           = &glUseProgramStagesNULL;
5006         validateProgramPipeline    = &glValidateProgramPipelineNULL;
5007         vertexAttribBinding        = &glVertexAttribBindingNULL;
5008         vertexAttribFormat         = &glVertexAttribFormatNULL;
5009         vertexAttribIFormat        = &glVertexAttribIFormatNULL;
5010         vertexBindingDivisor       = &glVertexBindingDivisorNULL;
5011     }
5012 
5013     if (version >= gl::Version(3, 2))
5014     {
5015         blendBarrier                    = &glBlendBarrierNULL;
5016         blendEquationSeparatei          = &glBlendEquationSeparateiNULL;
5017         blendEquationi                  = &glBlendEquationiNULL;
5018         blendFuncSeparatei              = &glBlendFuncSeparateiNULL;
5019         blendFunci                      = &glBlendFunciNULL;
5020         colorMaski                      = &glColorMaskiNULL;
5021         copyImageSubData                = &glCopyImageSubDataNULL;
5022         debugMessageCallback            = &glDebugMessageCallbackNULL;
5023         debugMessageControl             = &glDebugMessageControlNULL;
5024         debugMessageInsert              = &glDebugMessageInsertNULL;
5025         disablei                        = &glDisableiNULL;
5026         drawElementsBaseVertex          = &glDrawElementsBaseVertexNULL;
5027         drawElementsInstancedBaseVertex = &glDrawElementsInstancedBaseVertexNULL;
5028         drawRangeElementsBaseVertex     = &glDrawRangeElementsBaseVertexNULL;
5029         enablei                         = &glEnableiNULL;
5030         framebufferTexture              = &glFramebufferTextureNULL;
5031         getDebugMessageLog              = &glGetDebugMessageLogNULL;
5032         getGraphicsResetStatus          = &glGetGraphicsResetStatusNULL;
5033         getObjectLabel                  = &glGetObjectLabelNULL;
5034         getObjectPtrLabel               = &glGetObjectPtrLabelNULL;
5035         getPointerv                     = &glGetPointervNULL;
5036         getSamplerParameterIiv          = &glGetSamplerParameterIivNULL;
5037         getSamplerParameterIuiv         = &glGetSamplerParameterIuivNULL;
5038         getTexParameterIiv              = &glGetTexParameterIivNULL;
5039         getTexParameterIuiv             = &glGetTexParameterIuivNULL;
5040         getnUniformfv                   = &glGetnUniformfvNULL;
5041         getnUniformiv                   = &glGetnUniformivNULL;
5042         getnUniformuiv                  = &glGetnUniformuivNULL;
5043         isEnabledi                      = &glIsEnablediNULL;
5044         minSampleShading                = &glMinSampleShadingNULL;
5045         objectLabel                     = &glObjectLabelNULL;
5046         objectPtrLabel                  = &glObjectPtrLabelNULL;
5047         patchParameteri                 = &glPatchParameteriNULL;
5048         popDebugGroup                   = &glPopDebugGroupNULL;
5049         primitiveBoundingBox            = &glPrimitiveBoundingBoxNULL;
5050         pushDebugGroup                  = &glPushDebugGroupNULL;
5051         readnPixels                     = &glReadnPixelsNULL;
5052         samplerParameterIiv             = &glSamplerParameterIivNULL;
5053         samplerParameterIuiv            = &glSamplerParameterIuivNULL;
5054         texBuffer                       = &glTexBufferNULL;
5055         texBufferRange                  = &glTexBufferRangeNULL;
5056         texParameterIiv                 = &glTexParameterIivNULL;
5057         texParameterIuiv                = &glTexParameterIuivNULL;
5058         texStorage3DMultisample         = &glTexStorage3DMultisampleNULL;
5059     }
5060 
5061     if (extensions.count("GL_EXT_base_instance") != 0)
5062     {
5063         drawArraysInstancedBaseInstance   = &glDrawArraysInstancedBaseInstanceNULL;
5064         drawElementsInstancedBaseInstance = &glDrawElementsInstancedBaseInstanceNULL;
5065         drawElementsInstancedBaseVertexBaseInstance =
5066             &glDrawElementsInstancedBaseVertexBaseInstanceNULL;
5067     }
5068 
5069     if (extensions.count("GL_EXT_blend_func_extended") != 0)
5070     {
5071         bindFragDataLocation            = &glBindFragDataLocationNULL;
5072         bindFragDataLocationIndexed     = &glBindFragDataLocationIndexedNULL;
5073         getFragDataIndex                = &glGetFragDataIndexNULL;
5074         getProgramResourceLocationIndex = &glGetProgramResourceLocationIndexNULL;
5075     }
5076 
5077     if (extensions.count("GL_EXT_buffer_storage") != 0)
5078     {
5079         bufferStorage = &glBufferStorageNULL;
5080     }
5081 
5082     if (extensions.count("GL_EXT_clear_texture") != 0)
5083     {
5084         clearTexImage    = &glClearTexImageNULL;
5085         clearTexSubImage = &glClearTexSubImageNULL;
5086     }
5087 
5088     if (extensions.count("GL_EXT_clip_control") != 0)
5089     {
5090         clipControl = &glClipControlNULL;
5091     }
5092 
5093     if (extensions.count("GL_EXT_copy_image") != 0)
5094     {
5095         copyImageSubData = &glCopyImageSubDataNULL;
5096     }
5097 
5098     if (extensions.count("GL_EXT_discard_framebuffer") != 0)
5099     {
5100         discardFramebufferEXT = &glDiscardFramebufferEXTNULL;
5101     }
5102 
5103     if (extensions.count("GL_EXT_disjoint_timer_query") != 0)
5104     {
5105         beginQuery          = &glBeginQueryNULL;
5106         deleteQueries       = &glDeleteQueriesNULL;
5107         endQuery            = &glEndQueryNULL;
5108         genQueries          = &glGenQueriesNULL;
5109         getInteger64v       = &glGetInteger64vNULL;
5110         getQueryObjecti64v  = &glGetQueryObjecti64vNULL;
5111         getQueryObjectiv    = &glGetQueryObjectivNULL;
5112         getQueryObjectui64v = &glGetQueryObjectui64vNULL;
5113         getQueryObjectuiv   = &glGetQueryObjectuivNULL;
5114         getQueryiv          = &glGetQueryivNULL;
5115         isQuery             = &glIsQueryNULL;
5116         queryCounter        = &glQueryCounterNULL;
5117     }
5118 
5119     if (extensions.count("GL_EXT_draw_buffers") != 0)
5120     {
5121         drawBuffers = &glDrawBuffersNULL;
5122     }
5123 
5124     if (extensions.count("GL_EXT_draw_buffers_indexed") != 0)
5125     {
5126         blendEquationSeparatei = &glBlendEquationSeparateiNULL;
5127         blendEquationi         = &glBlendEquationiNULL;
5128         blendFuncSeparatei     = &glBlendFuncSeparateiNULL;
5129         blendFunci             = &glBlendFunciNULL;
5130         colorMaski             = &glColorMaskiNULL;
5131         disablei               = &glDisableiNULL;
5132         enablei                = &glEnableiNULL;
5133         isEnabledi             = &glIsEnablediNULL;
5134     }
5135 
5136     if (extensions.count("GL_EXT_draw_elements_base_vertex") != 0)
5137     {
5138         drawElementsBaseVertex          = &glDrawElementsBaseVertexNULL;
5139         drawElementsInstancedBaseVertex = &glDrawElementsInstancedBaseVertexNULL;
5140         drawRangeElementsBaseVertex     = &glDrawRangeElementsBaseVertexNULL;
5141         multiDrawElementsBaseVertex     = &glMultiDrawElementsBaseVertexNULL;
5142     }
5143 
5144     if (extensions.count("GL_EXT_draw_transform_feedback") != 0)
5145     {
5146         drawTransformFeedback          = &glDrawTransformFeedbackNULL;
5147         drawTransformFeedbackInstanced = &glDrawTransformFeedbackInstancedNULL;
5148     }
5149 
5150     if (extensions.count("GL_EXT_geometry_shader") != 0)
5151     {
5152         framebufferTexture = &glFramebufferTextureNULL;
5153     }
5154 
5155     if (extensions.count("GL_EXT_instanced_arrays") != 0)
5156     {
5157         vertexAttribDivisor = &glVertexAttribDivisorNULL;
5158     }
5159 
5160     if (extensions.count("GL_EXT_map_buffer_range") != 0)
5161     {
5162         flushMappedBufferRange = &glFlushMappedBufferRangeNULL;
5163         mapBufferRange         = &glMapBufferRangeNULL;
5164     }
5165 
5166     if (extensions.count("GL_EXT_multi_draw_indirect") != 0)
5167     {
5168         multiDrawArraysIndirect   = &glMultiDrawArraysIndirectNULL;
5169         multiDrawElementsIndirect = &glMultiDrawElementsIndirectNULL;
5170     }
5171 
5172     if (extensions.count("GL_EXT_multisampled_render_to_texture") != 0)
5173     {
5174         renderbufferStorageMultisample = &glRenderbufferStorageMultisampleNULL;
5175     }
5176 
5177     if (extensions.count("GL_EXT_multiview_draw_buffers") != 0)
5178     {
5179         getIntegeri_v = &glGetIntegeri_vNULL;
5180     }
5181 
5182     if (extensions.count("GL_EXT_occlusion_query_boolean") != 0)
5183     {
5184         beginQuery        = &glBeginQueryNULL;
5185         deleteQueries     = &glDeleteQueriesNULL;
5186         endQuery          = &glEndQueryNULL;
5187         genQueries        = &glGenQueriesNULL;
5188         getQueryObjectuiv = &glGetQueryObjectuivNULL;
5189         getQueryiv        = &glGetQueryivNULL;
5190         isQuery           = &glIsQueryNULL;
5191     }
5192 
5193     if (extensions.count("GL_EXT_primitive_bounding_box") != 0)
5194     {
5195         primitiveBoundingBox = &glPrimitiveBoundingBoxNULL;
5196     }
5197 
5198     if (extensions.count("GL_EXT_robustness") != 0)
5199     {
5200         getGraphicsResetStatus = &glGetGraphicsResetStatusNULL;
5201         getnUniformfv          = &glGetnUniformfvNULL;
5202         getnUniformiv          = &glGetnUniformivNULL;
5203         readnPixels            = &glReadnPixelsNULL;
5204     }
5205 
5206     if (extensions.count("GL_EXT_tessellation_shader") != 0)
5207     {
5208         patchParameteri = &glPatchParameteriNULL;
5209     }
5210 
5211     if (extensions.count("GL_EXT_texture_border_clamp") != 0)
5212     {
5213         getSamplerParameterIiv  = &glGetSamplerParameterIivNULL;
5214         getSamplerParameterIuiv = &glGetSamplerParameterIuivNULL;
5215         getTexParameterIiv      = &glGetTexParameterIivNULL;
5216         getTexParameterIuiv     = &glGetTexParameterIuivNULL;
5217         samplerParameterIiv     = &glSamplerParameterIivNULL;
5218         samplerParameterIuiv    = &glSamplerParameterIuivNULL;
5219         texParameterIiv         = &glTexParameterIivNULL;
5220         texParameterIuiv        = &glTexParameterIuivNULL;
5221     }
5222 
5223     if (extensions.count("GL_EXT_texture_buffer") != 0)
5224     {
5225         texBuffer      = &glTexBufferNULL;
5226         texBufferRange = &glTexBufferRangeNULL;
5227     }
5228 
5229     if (extensions.count("GL_EXT_texture_storage") != 0)
5230     {
5231         texStorage1D     = &glTexStorage1DNULL;
5232         texStorage2D     = &glTexStorage2DNULL;
5233         texStorage3D     = &glTexStorage3DNULL;
5234         textureStorage1D = &glTextureStorage1DNULL;
5235         textureStorage2D = &glTextureStorage2DNULL;
5236         textureStorage3D = &glTextureStorage3DNULL;
5237     }
5238 
5239     if (extensions.count("GL_EXT_texture_view") != 0)
5240     {
5241         textureView = &glTextureViewNULL;
5242     }
5243 
5244     if (extensions.count("GL_KHR_debug") != 0)
5245     {
5246         debugMessageCallback = &glDebugMessageCallbackNULL;
5247         debugMessageControl  = &glDebugMessageControlNULL;
5248         debugMessageInsert   = &glDebugMessageInsertNULL;
5249         getDebugMessageLog   = &glGetDebugMessageLogNULL;
5250         getObjectLabel       = &glGetObjectLabelNULL;
5251         getObjectPtrLabel    = &glGetObjectPtrLabelNULL;
5252         getPointerv          = &glGetPointervNULL;
5253         objectLabel          = &glObjectLabelNULL;
5254         objectPtrLabel       = &glObjectPtrLabelNULL;
5255         popDebugGroup        = &glPopDebugGroupNULL;
5256         pushDebugGroup       = &glPushDebugGroupNULL;
5257     }
5258 
5259     if (extensions.count("GL_KHR_robustness") != 0)
5260     {
5261         getGraphicsResetStatus = &glGetGraphicsResetStatusNULL;
5262         getnUniformfv          = &glGetnUniformfvNULL;
5263         getnUniformiv          = &glGetnUniformivNULL;
5264         getnUniformuiv         = &glGetnUniformuivNULL;
5265         readnPixels            = &glReadnPixelsNULL;
5266     }
5267 
5268     if (extensions.count("GL_OES_EGL_image") != 0)
5269     {
5270         eGLImageTargetRenderbufferStorageOES = &glEGLImageTargetRenderbufferStorageOESNULL;
5271         eGLImageTargetTexture2DOES           = &glEGLImageTargetTexture2DOESNULL;
5272     }
5273 
5274     if (extensions.count("GL_OES_copy_image") != 0)
5275     {
5276         copyImageSubData = &glCopyImageSubDataNULL;
5277     }
5278 
5279     if (extensions.count("GL_OES_draw_buffers_indexed") != 0)
5280     {
5281         blendEquationSeparatei = &glBlendEquationSeparateiNULL;
5282         blendEquationi         = &glBlendEquationiNULL;
5283         blendFuncSeparatei     = &glBlendFuncSeparateiNULL;
5284         blendFunci             = &glBlendFunciNULL;
5285         colorMaski             = &glColorMaskiNULL;
5286         disablei               = &glDisableiNULL;
5287         enablei                = &glEnableiNULL;
5288         isEnabledi             = &glIsEnablediNULL;
5289     }
5290 
5291     if (extensions.count("GL_OES_draw_elements_base_vertex") != 0)
5292     {
5293         drawElementsBaseVertex          = &glDrawElementsBaseVertexNULL;
5294         drawElementsInstancedBaseVertex = &glDrawElementsInstancedBaseVertexNULL;
5295         drawRangeElementsBaseVertex     = &glDrawRangeElementsBaseVertexNULL;
5296         multiDrawElementsBaseVertex     = &glMultiDrawElementsBaseVertexNULL;
5297     }
5298 
5299     if (extensions.count("GL_OES_geometry_shader") != 0)
5300     {
5301         framebufferTexture = &glFramebufferTextureNULL;
5302     }
5303 
5304     if (extensions.count("GL_OES_get_program_binary") != 0)
5305     {
5306         getProgramBinary = &glGetProgramBinaryNULL;
5307         programBinary    = &glProgramBinaryNULL;
5308     }
5309 
5310     if (extensions.count("GL_OES_mapbuffer") != 0)
5311     {
5312         getBufferPointerv = &glGetBufferPointervNULL;
5313         mapBuffer         = &glMapBufferNULL;
5314         unmapBuffer       = &glUnmapBufferNULL;
5315     }
5316 
5317     if (extensions.count("GL_OES_primitive_bounding_box") != 0)
5318     {
5319         primitiveBoundingBox = &glPrimitiveBoundingBoxNULL;
5320     }
5321 
5322     if (extensions.count("GL_OES_sample_shading") != 0)
5323     {
5324         minSampleShading = &glMinSampleShadingNULL;
5325     }
5326 
5327     if (extensions.count("GL_OES_tessellation_shader") != 0)
5328     {
5329         patchParameteri = &glPatchParameteriNULL;
5330     }
5331 
5332     if (extensions.count("GL_OES_texture_3D") != 0)
5333     {
5334         compressedTexImage3D    = &glCompressedTexImage3DNULL;
5335         compressedTexSubImage3D = &glCompressedTexSubImage3DNULL;
5336         copyTexSubImage3D       = &glCopyTexSubImage3DNULL;
5337         framebufferTexture3D    = &glFramebufferTexture3DNULL;
5338         texImage3D              = &glTexImage3DNULL;
5339         texSubImage3D           = &glTexSubImage3DNULL;
5340     }
5341 
5342     if (extensions.count("GL_OES_texture_border_clamp") != 0)
5343     {
5344         getSamplerParameterIiv  = &glGetSamplerParameterIivNULL;
5345         getSamplerParameterIuiv = &glGetSamplerParameterIuivNULL;
5346         getTexParameterIiv      = &glGetTexParameterIivNULL;
5347         getTexParameterIuiv     = &glGetTexParameterIuivNULL;
5348         samplerParameterIiv     = &glSamplerParameterIivNULL;
5349         samplerParameterIuiv    = &glSamplerParameterIuivNULL;
5350         texParameterIiv         = &glTexParameterIivNULL;
5351         texParameterIuiv        = &glTexParameterIuivNULL;
5352     }
5353 
5354     if (extensions.count("GL_OES_texture_buffer") != 0)
5355     {
5356         texBuffer      = &glTexBufferNULL;
5357         texBufferRange = &glTexBufferRangeNULL;
5358     }
5359 
5360     if (extensions.count("GL_OES_texture_storage_multisample_2d_array") != 0)
5361     {
5362         texStorage3DMultisample = &glTexStorage3DMultisampleNULL;
5363     }
5364 
5365     if (extensions.count("GL_OES_texture_view") != 0)
5366     {
5367         textureView = &glTextureViewNULL;
5368     }
5369 
5370     if (extensions.count("GL_OES_vertex_array_object") != 0)
5371     {
5372         bindVertexArray    = &glBindVertexArrayNULL;
5373         deleteVertexArrays = &glDeleteVertexArraysNULL;
5374         genVertexArrays    = &glGenVertexArraysNULL;
5375         isVertexArray      = &glIsVertexArrayNULL;
5376     }
5377 
5378     if (extensions.count("GL_OES_viewport_array") != 0)
5379     {
5380         disablei          = &glDisableiNULL;
5381         enablei           = &glEnableiNULL;
5382         getFloati_v       = &glGetFloati_vNULL;
5383         isEnabledi        = &glIsEnablediNULL;
5384         scissorArrayv     = &glScissorArrayvNULL;
5385         scissorIndexed    = &glScissorIndexedNULL;
5386         scissorIndexedv   = &glScissorIndexedvNULL;
5387         viewportArrayv    = &glViewportArrayvNULL;
5388         viewportIndexedf  = &glViewportIndexedfNULL;
5389         viewportIndexedfv = &glViewportIndexedfvNULL;
5390     }
5391 }
5392 
initProcsSharedExtensionsNULL(const std::set<std::string> & extensions)5393 void DispatchTableGL::initProcsSharedExtensionsNULL(const std::set<std::string> &extensions)
5394 {
5395     if (extensions.count("GL_EXT_blend_minmax") != 0)
5396     {
5397         blendEquation = &glBlendEquationNULL;
5398     }
5399 
5400     if (extensions.count("GL_EXT_debug_label") != 0)
5401     {
5402         getObjectLabel = &glGetObjectLabelNULL;
5403     }
5404 
5405     if (extensions.count("GL_EXT_debug_marker") != 0)
5406     {
5407         insertEventMarkerEXT = &glInsertEventMarkerEXTNULL;
5408         popGroupMarkerEXT    = &glPopGroupMarkerEXTNULL;
5409         pushGroupMarkerEXT   = &glPushGroupMarkerEXTNULL;
5410     }
5411 
5412     if (extensions.count("GL_EXT_draw_instanced") != 0)
5413     {
5414         drawArraysInstanced   = &glDrawArraysInstancedNULL;
5415         drawElementsInstanced = &glDrawElementsInstancedNULL;
5416     }
5417 
5418     if (extensions.count("GL_EXT_memory_object") != 0)
5419     {
5420         bufferStorageMemEXT               = &glBufferStorageMemEXTNULL;
5421         createMemoryObjectsEXT            = &glCreateMemoryObjectsEXTNULL;
5422         deleteMemoryObjectsEXT            = &glDeleteMemoryObjectsEXTNULL;
5423         getMemoryObjectParameterivEXT     = &glGetMemoryObjectParameterivEXTNULL;
5424         getUnsignedBytei_vEXT             = &glGetUnsignedBytei_vEXTNULL;
5425         getUnsignedBytevEXT               = &glGetUnsignedBytevEXTNULL;
5426         isMemoryObjectEXT                 = &glIsMemoryObjectEXTNULL;
5427         memoryObjectParameterivEXT        = &glMemoryObjectParameterivEXTNULL;
5428         namedBufferStorageMemEXT          = &glNamedBufferStorageMemEXTNULL;
5429         texStorageMem2DEXT                = &glTexStorageMem2DEXTNULL;
5430         texStorageMem2DMultisampleEXT     = &glTexStorageMem2DMultisampleEXTNULL;
5431         texStorageMem3DEXT                = &glTexStorageMem3DEXTNULL;
5432         texStorageMem3DMultisampleEXT     = &glTexStorageMem3DMultisampleEXTNULL;
5433         textureStorageMem2DEXT            = &glTextureStorageMem2DEXTNULL;
5434         textureStorageMem2DMultisampleEXT = &glTextureStorageMem2DMultisampleEXTNULL;
5435         textureStorageMem3DEXT            = &glTextureStorageMem3DEXTNULL;
5436         textureStorageMem3DMultisampleEXT = &glTextureStorageMem3DMultisampleEXTNULL;
5437     }
5438 
5439     if (extensions.count("GL_EXT_memory_object_fd") != 0)
5440     {
5441         importMemoryFdEXT = &glImportMemoryFdEXTNULL;
5442     }
5443 
5444     if (extensions.count("GL_EXT_memory_object_win32") != 0)
5445     {
5446         importMemoryWin32HandleEXT = &glImportMemoryWin32HandleEXTNULL;
5447         importMemoryWin32NameEXT   = &glImportMemoryWin32NameEXTNULL;
5448     }
5449 
5450     if (extensions.count("GL_EXT_multi_draw_arrays") != 0)
5451     {
5452         multiDrawArrays   = &glMultiDrawArraysNULL;
5453         multiDrawElements = &glMultiDrawElementsNULL;
5454     }
5455 
5456     if (extensions.count("GL_EXT_semaphore") != 0)
5457     {
5458         deleteSemaphoresEXT           = &glDeleteSemaphoresEXTNULL;
5459         genSemaphoresEXT              = &glGenSemaphoresEXTNULL;
5460         getSemaphoreParameterui64vEXT = &glGetSemaphoreParameterui64vEXTNULL;
5461         getUnsignedBytei_vEXT         = &glGetUnsignedBytei_vEXTNULL;
5462         getUnsignedBytevEXT           = &glGetUnsignedBytevEXTNULL;
5463         isSemaphoreEXT                = &glIsSemaphoreEXTNULL;
5464         semaphoreParameterui64vEXT    = &glSemaphoreParameterui64vEXTNULL;
5465         signalSemaphoreEXT            = &glSignalSemaphoreEXTNULL;
5466         waitSemaphoreEXT              = &glWaitSemaphoreEXTNULL;
5467     }
5468 
5469     if (extensions.count("GL_EXT_semaphore_fd") != 0)
5470     {
5471         importSemaphoreFdEXT = &glImportSemaphoreFdEXTNULL;
5472     }
5473 
5474     if (extensions.count("GL_EXT_semaphore_win32") != 0)
5475     {
5476         importSemaphoreWin32HandleEXT = &glImportSemaphoreWin32HandleEXTNULL;
5477         importSemaphoreWin32NameEXT   = &glImportSemaphoreWin32NameEXTNULL;
5478     }
5479 
5480     if (extensions.count("GL_EXT_separate_shader_objects") != 0)
5481     {
5482         activeShaderProgram       = &glActiveShaderProgramNULL;
5483         bindProgramPipeline       = &glBindProgramPipelineNULL;
5484         createShaderProgramv      = &glCreateShaderProgramvNULL;
5485         deleteProgramPipelines    = &glDeleteProgramPipelinesNULL;
5486         genProgramPipelines       = &glGenProgramPipelinesNULL;
5487         getProgramPipelineInfoLog = &glGetProgramPipelineInfoLogNULL;
5488         getProgramPipelineiv      = &glGetProgramPipelineivNULL;
5489         isProgramPipeline         = &glIsProgramPipelineNULL;
5490         programParameteri         = &glProgramParameteriNULL;
5491         programUniform1f          = &glProgramUniform1fNULL;
5492         programUniform1fv         = &glProgramUniform1fvNULL;
5493         programUniform1i          = &glProgramUniform1iNULL;
5494         programUniform1iv         = &glProgramUniform1ivNULL;
5495         programUniform1ui         = &glProgramUniform1uiNULL;
5496         programUniform1uiv        = &glProgramUniform1uivNULL;
5497         programUniform2f          = &glProgramUniform2fNULL;
5498         programUniform2fv         = &glProgramUniform2fvNULL;
5499         programUniform2i          = &glProgramUniform2iNULL;
5500         programUniform2iv         = &glProgramUniform2ivNULL;
5501         programUniform2ui         = &glProgramUniform2uiNULL;
5502         programUniform2uiv        = &glProgramUniform2uivNULL;
5503         programUniform3f          = &glProgramUniform3fNULL;
5504         programUniform3fv         = &glProgramUniform3fvNULL;
5505         programUniform3i          = &glProgramUniform3iNULL;
5506         programUniform3iv         = &glProgramUniform3ivNULL;
5507         programUniform3ui         = &glProgramUniform3uiNULL;
5508         programUniform3uiv        = &glProgramUniform3uivNULL;
5509         programUniform4f          = &glProgramUniform4fNULL;
5510         programUniform4fv         = &glProgramUniform4fvNULL;
5511         programUniform4i          = &glProgramUniform4iNULL;
5512         programUniform4iv         = &glProgramUniform4ivNULL;
5513         programUniform4ui         = &glProgramUniform4uiNULL;
5514         programUniform4uiv        = &glProgramUniform4uivNULL;
5515         programUniformMatrix2fv   = &glProgramUniformMatrix2fvNULL;
5516         programUniformMatrix2x3fv = &glProgramUniformMatrix2x3fvNULL;
5517         programUniformMatrix2x4fv = &glProgramUniformMatrix2x4fvNULL;
5518         programUniformMatrix3fv   = &glProgramUniformMatrix3fvNULL;
5519         programUniformMatrix3x2fv = &glProgramUniformMatrix3x2fvNULL;
5520         programUniformMatrix3x4fv = &glProgramUniformMatrix3x4fvNULL;
5521         programUniformMatrix4fv   = &glProgramUniformMatrix4fvNULL;
5522         programUniformMatrix4fv   = &glProgramUniformMatrix4fvNULL;
5523         programUniformMatrix4x2fv = &glProgramUniformMatrix4x2fvNULL;
5524         programUniformMatrix4x3fv = &glProgramUniformMatrix4x3fvNULL;
5525         useProgramStages          = &glUseProgramStagesNULL;
5526         validateProgramPipeline   = &glValidateProgramPipelineNULL;
5527     }
5528 
5529     if (extensions.count("GL_KHR_parallel_shader_compile") != 0)
5530     {
5531         maxShaderCompilerThreadsKHR = &glMaxShaderCompilerThreadsKHRNULL;
5532     }
5533 
5534     if (extensions.count("GL_NV_fence") != 0)
5535     {
5536         deleteFencesNV = &glDeleteFencesNVNULL;
5537         finishFenceNV  = &glFinishFenceNVNULL;
5538         genFencesNV    = &glGenFencesNVNULL;
5539         getFenceivNV   = &glGetFenceivNVNULL;
5540         isFenceNV      = &glIsFenceNVNULL;
5541         setFenceNV     = &glSetFenceNVNULL;
5542         testFenceNV    = &glTestFenceNVNULL;
5543     }
5544 
5545     if (extensions.count("GL_NV_framebuffer_mixed_samples") != 0)
5546     {
5547         coverageModulationNV = &glCoverageModulationNVNULL;
5548     }
5549 
5550     if (extensions.count("GL_NV_internalformat_sample_query") != 0)
5551     {
5552         getInternalformatSampleivNV = &glGetInternalformatSampleivNVNULL;
5553     }
5554 
5555     if (extensions.count("GL_OVR_multiview") != 0)
5556     {
5557         framebufferTextureMultiviewOVR = &glFramebufferTextureMultiviewOVRNULL;
5558     }
5559 }
5560 #endif  // defined(ANGLE_ENABLE_OPENGL_NULL)
5561 
5562 }  // namespace rx
5563