1 //          Copyright Michael D. Parker 2018.
2 // Distributed under the Boost Software License, Version 1.0.
3 //    (See accompanying file LICENSE_1_0.txt or copy at
4 //          http://www.boost.org/LICENSE_1_0.txt)
5 
6 module bindbc.opengl.bind.arb.arb_01;
7 
8 import bindbc.loader;
9 import bindbc.opengl.config,
10        bindbc.opengl.context;
11 import bindbc.opengl.bind.types;
12 
13 // ARB_bindless_texture
14 version(GL_ARB) enum useARBBindlessTexture = true;
15 else version(GL_ARB_bindless_texture) enum useARBBindlessTexture = true;
16 else enum useARBBindlessTexture = false;
17 
18 static if(useARBBindlessTexture) {
19     private bool _hasARBBindlessTexture;
20     bool hasARBBindlessTexture() { return _hasARBBindlessTexture; }
21 
22     enum uint GL_UNSIGNED_INT64_ARB = 0x140F;
23 
24     extern(System) @nogc nothrow  {
25         alias pglGetTextureHandleARB = GLuint64 function(GLuint);
26         alias pglGetTextureSamplerHandleARB = GLuint64 function(GLuint,GLuint);
27         alias pglMakeTextureHandleResidentARB = void function(GLuint64);
28         alias pglMakeTextureHandleNonResidentARB = void function(GLuint64);
29         alias pglGetImageHandleARB = GLuint64 function(GLuint,GLint,GLboolean,GLint,GLenum);
30         alias pglMakeImageHandleResidentARB = void function(GLuint64,GLenum);
31         alias pglMakeImageHandleNonResidentARB = void function(GLuint64);
32         alias pglUniformHandleui64ARB = void function(GLint,GLuint64);
33         alias pglUniformHandleui64vARB = void function(GLint,GLsizei,const(GLuint64)*);
34         alias pglProgramUniformHandleui64ARB = void function(GLuint,GLint,GLuint64);
35         alias pglProgramUniformHandleui64vARB = void function(GLuint,GLint,GLsizei,const(GLuint64)*);
36         alias pglIsTextureHandleResidentARB = GLboolean function(GLuint64);
37         alias pglIsImageHandleResidentARB = GLboolean function(GLuint64);
38         alias pglVertexAttribL1ui64ARB = void function(GLuint,GLuint64);
39         alias pglVertexAttribL1ui64vARB = void function(GLuint,const(GLuint64)*);
40         alias pglGetVertexAttribLui64vARB = void function(GLuint,GLenum,GLuint64*);
41     }
42 
43     __gshared {
44         pglGetTextureHandleARB glGetTextureHandleARB;
45         pglGetTextureSamplerHandleARB glGetTextureSamplerHandleARB;
46         pglMakeTextureHandleResidentARB glMakeTextureHandleResidentARB;
47         pglMakeTextureHandleNonResidentARB glMakeTextureHandleNonResidentARB;
48         pglGetImageHandleARB glGetImageHandleARB;
49         pglMakeImageHandleResidentARB glMakeImageHandleResidentARB;
50         pglMakeImageHandleNonResidentARB glMakeImageHandleNonResidentARB;
51         pglUniformHandleui64ARB glUniformHandleui64ARB;
52         pglUniformHandleui64vARB glUniformHandleui64vARB;
53         pglProgramUniformHandleui64ARB glProgramUniformHandleui64ARB;
54         pglProgramUniformHandleui64vARB glProgramUniformHandleui64vARB;
55         pglIsTextureHandleResidentARB glIsTextureHandleResidentARB;
56         pglIsImageHandleResidentARB glIsImageHandleResidentARB;
57         pglVertexAttribL1ui64ARB glVertexAttribL1ui64ARB;
58         pglVertexAttribL1ui64vARB glVertexAttribL1ui64vARB;
59         pglGetVertexAttribLui64vARB glGetVertexAttribLui64vARB;
60     }
61 
62     private @nogc nothrow
63     bool loadARBBindlessTexture(SharedLib lib, GLSupport contextVersion)
64     {
65         lib.bindGLSymbol(cast(void**)&glGetTextureHandleARB, "glGetTextureHandleARB");
66         lib.bindGLSymbol(cast(void**)&glGetTextureSamplerHandleARB, "glGetTextureSamplerHandleARB");
67         lib.bindGLSymbol(cast(void**)&glMakeTextureHandleResidentARB, "glMakeTextureHandleResidentARB");
68         lib.bindGLSymbol(cast(void**)&glMakeTextureHandleNonResidentARB, "glMakeTextureHandleNonResidentARB");
69         lib.bindGLSymbol(cast(void**)&glGetImageHandleARB, "glGetImageHandleARB");
70         lib.bindGLSymbol(cast(void**)&glMakeImageHandleResidentARB, "glMakeImageHandleResidentARB");
71         lib.bindGLSymbol(cast(void**)&glMakeImageHandleNonResidentARB, "glMakeImageHandleNonResidentARB");
72         lib.bindGLSymbol(cast(void**)&glUniformHandleui64ARB, "glUniformHandleui64ARB");
73         lib.bindGLSymbol(cast(void**)&glUniformHandleui64vARB, "glUniformHandleui64vARB");
74         lib.bindGLSymbol(cast(void**)&glProgramUniformHandleui64ARB, "glProgramUniformHandleui64ARB");
75         lib.bindGLSymbol(cast(void**)&glProgramUniformHandleui64vARB, "glProgramUniformHandleui64vARB");
76         lib.bindGLSymbol(cast(void**)&glIsTextureHandleResidentARB, "glIsTextureHandleResidentARB");
77         lib.bindGLSymbol(cast(void**)&glIsImageHandleResidentARB, "glIsImageHandleResidentARB");
78         lib.bindGLSymbol(cast(void**)&glVertexAttribL1ui64ARB, "glVertexAttribL1ui64ARB");
79         lib.bindGLSymbol(cast(void**)&glVertexAttribL1ui64vARB, "glVertexAttribL1ui64vARB");
80         lib.bindGLSymbol(cast(void**)&glGetVertexAttribLui64vARB, "glGetVertexAttribLui64vARB");
81         return resetErrorCountGL();
82     }
83 }
84 else enum hasARBBindlessTexture = false;
85 
86 // ARB_cl_event
87 version(GL_ARB) enum useARBCLEvent = true;
88 else version(GL_ARB_cl_event) enum useARBCLEvent = true;
89 else enum useARBCLEvent = false;
90 
91 static if(useARBCLEvent) {
92     import bindbc.opengl.bind.arb.core_32 : GLsync;
93     private bool _hasARBCLEvent;
94     bool hasARBCLEvent() { return _hasARBCLEvent; }
95 
96     struct _cl_context;
97     struct _cl_event;
98 
99     enum : uint {
100         GL_SYNC_CL_EVENT_ARB              = 0x8240,
101         GL_SYNC_CL_EVENT_COMPLETE_ARB     = 0x8241,
102     }
103 
104     extern(System) @nogc nothrow alias  pglCreateSyncFromCLeventARB = GLsync function(_cl_context*, _cl_event*, GLbitfield);
105     __gshared pglCreateSyncFromCLeventARB glCreateSyncFromCLeventARB;
106 
107     private @nogc nothrow
108     bool loadARBCLEvent(SharedLib lib, GLSupport contextVersion)
109     {
110         lib.bindGLSymbol(cast(void**)&glCreateSyncFromCLeventARB, "glCreateSyncFromCLeventARB");
111         return resetErrorCountGL();
112     }
113 }
114 else enum hasARBCLEvent = false;
115 
116 // ARB_compute_variable_group_size
117 version(GL_ARB) enum useARBComputeVariableGroupSize = true;
118 else version(GL_ARB_compute_variable_group_size) enum useARBComputeVariableGroupSize = true;
119 else enum useARBComputeVariableGroupSize = false;
120 
121 static if(useARBComputeVariableGroupSize) {
122     private bool _hasARBComputeVariableGroupSize;
123     bool hasARBComputeVariableGroupSize() { return _hasARBComputeVariableGroupSize; }
124 
125     enum : uint {
126         GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB   = 0x9344,
127         GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB      = 0x90EB,
128         GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB          = 0x9345,
129         GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB             = 0x91BF,
130     }
131 
132     extern(System) @nogc nothrow alias  pglDispatchComputeGroupSizeARB = GLsync function(GLuint,GLuint,GLuint,GLuint,GLuint,GLuint);
133     __gshared pglDispatchComputeGroupSizeARB glDispatchComputeGroupSizeARB;
134 
135     private @nogc nothrow
136     bool loadARBComputeVariableGroupSize(SharedLib lib, GLSupport contextVersion)
137     {
138         lib.bindGLSymbol(cast(void**)&glDispatchComputeGroupSizeARB, "glDispatchComputeGroupSizeARB");
139         return resetErrorCountGL();
140     }
141 }
142 else enum hasARBComputeVariableGroupSize = false;
143 
144 // ARB_debug_output
145 version(GL_ARB) enum useARBDebugOutput = true;
146 else version(GL_ARB_debug_output) enum useARBDebugOutput = true;
147 else enum useARBDebugOutput = false;
148 
149 static if(useARBDebugOutput) {
150     private bool _hasARBDebugOutput;
151     bool hasARBDebugOutput() { return _hasARBDebugOutput; }
152 
153     enum : uint {
154         GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB   = 0x8242,
155         GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB = 0x8243,
156         GL_DEBUG_CALLBACK_FUNCTION_ARB    = 0x8244,
157         GL_DEBUG_CALLBACK_USER_PARAM_ARB  = 0x8245,
158         GL_DEBUG_SOURCE_API_ARB           = 0x8246,
159         GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB = 0x8247,
160         GL_DEBUG_SOURCE_SHADER_COMPILER_ARB = 0x8248,
161         GL_DEBUG_SOURCE_THIRD_PARTY_ARB   = 0x8249,
162         GL_DEBUG_SOURCE_APPLICATION_ARB   = 0x824A,
163         GL_DEBUG_SOURCE_OTHER_ARB         = 0x824B,
164         GL_DEBUG_TYPE_ERROR_ARB           = 0x824C,
165         GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB = 0x824D,
166         GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB = 0x824E,
167         GL_DEBUG_TYPE_PORTABILITY_ARB     = 0x824F,
168         GL_DEBUG_TYPE_PERFORMANCE_ARB     = 0x8250,
169         GL_DEBUG_TYPE_OTHER_ARB           = 0x8251,
170         GL_MAX_DEBUG_MESSAGE_LENGTH_ARB   = 0x9143,
171         GL_MAX_DEBUG_LOGGED_MESSAGES_ARB  = 0x9144,
172         GL_DEBUG_LOGGED_MESSAGES_ARB      = 0x9145,
173         GL_DEBUG_SEVERITY_HIGH_ARB        = 0x9146,
174         GL_DEBUG_SEVERITY_MEDIUM_ARB      = 0x9147,
175         GL_DEBUG_SEVERITY_LOW_ARB         = 0x9148,
176     }
177 
178     extern(System) nothrow {
179         alias GLDEBUGPROCARB = void function(GLenum,GLenum,GLuint,GLenum,GLsizei,in GLchar*,GLvoid*);
180         alias GLDEBUGPROCAMD = void function(GLuint,GLenum,GLenum,GLsizei,in GLchar*,GLvoid*);
181     }
182 
183     extern(System) @nogc nothrow  {
184         alias pglDebugMessageControlARB = void function(GLenum,GLenum,GLenum,GLsizei,const(GLuint)*,GLboolean);
185         alias pglDebugMessageInsertARB = void function(GLenum,GLenum,GLuint,GLenum,GLsizei,const(GLchar)*);
186         alias pglGetDebugMessageLogARB = void function(GLuint,GLsizei,GLenum*,GLenum*,GLuint*,GLenum*,GLsizei*,GLchar*);
187         alias pglDebugMessageCallbackARB = void function(GLDEBUGPROCARB,const(GLvoid)*);
188     }
189 
190     __gshared {
191         pglDebugMessageControlARB glDebugMessageControlARB;
192         pglDebugMessageInsertARB glDebugMessageInsertARB;
193         pglDebugMessageCallbackARB glDebugMessageCallbackARB;
194         pglGetDebugMessageLogARB glGetDebugMessageLogARB;
195     }
196 
197     private @nogc nothrow
198     bool loadARBDebugOutput(SharedLib lib, GLSupport contextVersion)
199     {
200         lib.bindGLSymbol(cast(void**)&glDebugMessageControlARB, "glDebugMessageControlARB");
201         lib.bindGLSymbol(cast(void**)&glDebugMessageInsertARB, "glDebugMessageInsertARB");
202         lib.bindGLSymbol(cast(void**)&glDebugMessageCallbackARB, "glDebugMessageCallbackARB");
203         lib.bindGLSymbol(cast(void**)&glGetDebugMessageLogARB, "glGetDebugMessageLogARB");
204         return resetErrorCountGL();
205     }
206 }
207 else enum hasARBDebugOutput = false;
208 
209 // ARB_framebuffer_sRGB
210 version(GL_ARB) enum useFramebufferSRGB = true;
211 else version(GL_ARB_framebuffer_sRGB) enum useFramebufferSRGB = true;
212 else enum useFramebufferSRGB = false;
213 
214 static if(useARBFramebufferSRGB) {
215     private bool _hasARBFramebufferSRGB;
216     bool hasARBFramebufferSRGB() { return _hasARBFramebufferSRGB; }
217 
218     enum uint GL_FRAMEBUFFER_SRGB = 0x8DB9;
219 }
220 else enum hasARBFramebufferSRGB = false;
221 
222 // ARB_geometry_shader4
223 version(GL_ARB) enum useARBGeometryShader4 = true;
224 else version(GL_ARB_geometry_shader4) enum useARBGeometryShader4 = true;
225 else enum useARBGeometryShader4 = false;
226 
227 static if(useARBGeometryShader4) {
228     private bool _hasARBGeometryShader4;
229     bool hasARBGeometryShader4() { return _hasARBGeometryShader4; }
230 
231     enum : uint {
232         GL_LINES_ADJACENCY_ARB            = 0x000A,
233         GL_LINE_STRIP_ADJACENCY_ARB       = 0x000B,
234         GL_TRIANGLES_ADJACENCY_ARB        = 0x000C,
235         GL_TRIANGLE_STRIP_ADJACENCY_ARB   = 0x000D,
236         GL_PROGRAM_POINT_SIZE_ARB         = 0x8642,
237         GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB = 0x8C29,
238         GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB = 0x8DA7,
239         GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB = 0x8DA8,
240         GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB = 0x8DA9,
241         GL_GEOMETRY_SHADER_ARB            = 0x8DD9,
242         GL_GEOMETRY_VERTICES_OUT_ARB      = 0x8DDA,
243         GL_GEOMETRY_INPUT_TYPE_ARB        = 0x8DDB,
244         GL_GEOMETRY_OUTPUT_TYPE_ARB       = 0x8DDC,
245         GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB = 0x8DDD,
246         GL_MAX_VERTEX_VARYING_COMPONENTS_ARB = 0x8DDE,
247         GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB = 0x8DDF,
248         GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB = 0x8DE0,
249         GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB = 0x8DE1,
250     }
251 
252     extern(System) @nogc nothrow  {
253         alias pglProgramParameteriARB = void function(GLuint,GLenum,GLint);
254         alias pglFramebufferTextureARB = void function(GLuint,GLenum,GLuint,GLint);
255         alias pglFramebufferTextureLayerARB = void function(GLuint,GLenum,GLuint,GLint,GLint);
256         alias pglFramebufferTextureFaceARB = void function(GLuint,GLenum,GLuint,GLint,GLenum);
257     }
258 
259     __gshared {
260         pglProgramParameteriARB glProgramParameteriARB;
261         pglFramebufferTextureARB glFramebufferTextureARB;
262         pglFramebufferTextureLayerARB glFramebufferTextureLayerARB;
263         pglFramebufferTextureFaceARB glFramebufferTextureFaceARB;
264     }
265 
266     private @nogc nothrow
267     bool loadARBGeometryShader4(SharedLib lib, GLSupport contextVersion)
268     {
269         lib.bindGLSymbol(cast(void**)&glProgramParameteriARB,"glProgramParameteriARB");
270         lib.bindGLSymbol(cast(void**)&glFramebufferTextureARB,"glFramebufferTextureARB");
271         lib.bindGLSymbol(cast(void**)&glFramebufferTextureLayerARB,"glFramebufferTextureLayerARB");
272         lib.bindGLSymbol(cast(void**)&glFramebufferTextureFaceARB,"glFramebufferTextureFaceARB");
273         return resetErrorCountGL();
274     }
275 }
276 else enum hasARBGeometryShader4 = false;
277 
278 // ARB_pipeline_statistics_query
279 version(GL_ARB) enum usePipelineStatisticsQuery = true;
280 else version(GL_ARB_pipeline_statistics_query) enum usePipelineStatisticsQuery = true;
281 else enum usePipelineStatisticsQuery = false;
282 
283 static if(useARBPipelineStatisticsQuery) {
284     private bool _hasARBPipelineStatisticsQuery;
285     bool hasARBPipelineStatisticsQuery() { return _hasARBPipelineStatisticsQuery; }
286 
287     enum : uint {
288         GL_VERTICES_SUBMITTED_ARB         = 0x82EE,
289         GL_PRIMITIVES_SUBMITTED_ARB       = 0x82EF,
290         GL_VERTEX_SHADER_INVOCATIONS_ARB  = 0x82F0,
291         GL_TESS_CONTROL_SHADER_PATCHES_ARB = 0x82F1,
292         GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB = 0x82F2,
293         GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB = 0x82F3,
294         GL_FRAGMENT_SHADER_INVOCATIONS_ARB = 0x82F4,
295         GL_COMPUTE_SHADER_INVOCATIONS_ARB = 0x82F5,
296         GL_CLIPPING_INPUT_PRIMITIVES_ARB  = 0x82F6,
297         GL_CLIPPING_OUTPUT_PRIMITIVES_ARB = 0x82F7,
298     }
299 }
300 else enum hasARBPipelineStatisticsQuery = false;
301 
302 // ARB_robustness_isolation
303 version(GL_ARB) enum useRobustnessIsolation = true;
304 else version(GL_ARB_robustness_isolation) enum useRobustnessIsolation = true;
305 else enum useRobustnessIsolation = false;
306 
307 static if(useARBRobustnessIsolation) {
308     private bool _hasARBRobustnessIsolation;
309     bool hasARBRobustnessIsolation() { return _hasARBRobustnessIsolation; }
310 }
311 else enum hasARBRobustnessIsolation = false;
312 
313 // ARB_sample_shading
314 version(GL_ARB) enum useSampleShading = true;
315 else version(GL_ARB_sample_shading) enum useSampleShading = true;
316 else enum useSampleShading = false;
317 
318 static if(useARBSampleShading) {
319     private bool _hasARBSampleShading;
320     bool hasARBSampleShading() { return _hasARBSampleShading; }
321 
322     enum : uint {
323         GL_SAMPLE_SHADING_ARB             = 0x8C36,
324         GL_MIN_SAMPLE_SHADING_VALUE_ARB   = 0x8C37,
325     }
326 
327     extern(System) @nogc nothrow alias pglMinSampleShadingARB = void function(GLclampf);
328     __gshared pglMinSampleShadingARB glMinSampleShadingARB;
329 
330     private @nogc nothrow
331     bool loadARBSampleShading(SharedLib lib, GLSupport contextVersion)
332     {
333         lib.bindGLSymbol(cast(void**)&glMinSampleShadingARB,"glMinSampleShadingARB");
334         return resetErrorCountGL();
335     }
336 }
337 else enum hasARBSampleShading = false;
338 
339 // ARB_texture_compression_bptc
340 version(GL_ARB) enum useTextureCompressionBPTC = true;
341 else version(GL_ARB_texture_compression_bptc) enum useTextureCompressionBPTC = true;
342 else enum useTextureCompressionBPTC = false;
343 
344 static if(useARBTextureCompressionBPTC) {
345     private bool _hasARBTextureCompressionBPTC;
346     bool hasARBTextureCompressionBPTC() { return _hasARBTextureCompressionBPTC; }
347 
348     enum : uint {
349         GL_COMPRESSED_RGBA_BPTC_UNORM_ARB = 0x8E8C,
350         GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB = 0x8E8D,
351         GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB = 0x8E8E,
352         GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB = 0x8E8F,
353     }
354 }
355 else enum hasARBTextureCompressionBPTC = false;
356 
357 // ARB_texture_cube_map_array
358 version(GL_ARB) enum useTextureCubeMapArray = true;
359 else version(GL_ARB_texture_cube_map_array) enum useTextureCubeMapArray = true;
360 else enum useTextureCubeMapArray = false;
361 
362 static if(useARBTextureCubeMapArray) {
363     private bool _hasARBTextureCubeMapArray;
364     bool hasARBTextureCubeMapArray() { return _hasARBTextureCubeMapArray; }
365 
366     enum : uint {
367         GL_TEXTURE_CUBE_MAP_ARRAY_ARB     = 0x9009,
368         GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB = 0x900A,
369         GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x900B,
370         GL_SAMPLER_CUBE_MAP_ARRAY_ARB     = 0x900C,
371         GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB = 0x900D,
372         GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900E,
373         GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900F,
374     }
375 }
376 else enum hasARBTextureCubeMapArray = false;
377 
378 // ARB_texture_gather
379 version(GL_ARB) enum useTextureGather = true;
380 else version(GL_ARB_texture_gather) enum useTextureGather = true;
381 else enum useTextureGather = false;
382 
383 static if(useARBTextureGather) {
384     private bool _hasARBTextureGather;
385     bool hasARBTextureGather() { return _hasARBTextureGather; }
386 
387     enum : uint {
388         GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5E,
389         GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5F,
390     }
391 }
392 else enum hasARBTextureGather = false;
393 
394 // ARB_transform_feedback_overflow_query
395 version(GL_ARB) enum useTransformFeedbackOverflowQuery = true;
396 else version(GL_ARB_transform_feedback_overflow_query) enum useTransformFeedbackOverflowQuery = true;
397 else enum useTransformFeedbackOverflowQuery = false;
398 
399 static if(useARBTransformFeedbackOverflowQuery) {
400     private bool _hasARBTransformFeedbackOverflowQuery;
401     bool hasARBTransformFeedbackOverflowQuery() { return _hasARBTransformFeedbackOverflowQuery; }
402 
403     enum : uint {
404         GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB          = 0x82EC,
405         GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB   = 0x82ED,
406     }
407 }
408 else enum hasARBTransformFeedbackOverflowQuery = false;
409 
410 package @nogc nothrow
411 void loadARB_01(SharedLib lib, GLSupport contextVersion)
412 {
413     static if(useARBBindlessTexture) _hasARBBindlessTexture =
414             hasExtension(contextVersion, "GL_ARB_bindless_texture") &&
415             lib.loadARBBindlessTexture(contextVersion);
416 
417     static if(useARBCLEvent) _hasARBCLEvent =
418             hasExtension(contextVersion, "GL_ARB_cl_event") &&
419             lib.loadARBCLEvent(contextVersion);
420 
421     static if(useARBComputeVariableGroupSize) _hasARBComputeVariableGroupSize =
422             hasExtension(contextVersion, "GL_ARB_compute_variable_group_size") &&
423             lib.loadARBComputeVariableGroupSize(contextVersion);
424 
425     static if(useARBDebugOutput) _hasARBDebugOutput =
426             hasExtension(contextVersion, "GL_ARB_debug_output") &&
427             lib.loadARBDebugOutput(contextVersion);
428 
429     static if(useARBFramebufferSRGB) _hasARBFramebufferSRGB =
430             hasExtension(contextVersion, "GL_ARB_framebuffer_sRGB");
431 
432     static if(useARBGeometryShader4) _hasARBGeometryShader4 =
433             hasExtension(contextVersion, "GL_ARB_geometry_shader4") &&
434             lib.loadARBGeometryShader4(contextVersion);
435 
436     static if(useARBPipelineStatisticsQuery) _hasARBPipelineStatisticsQuery =
437             hasExtension(contextVersion, "GL_ARB_pipeline_statistics_query");
438 
439     static if(useARBRobustnessIsolation) _hasARBRobustnessIsolation =
440             hasExtension(contextVersion, "GL_ARB_robustness_isolation");
441 
442     static if(useARBSampleShading ) _hasARBSampleShading  =
443             hasExtension(contextVersion, "GL_ARB_sample_shading") &&
444             lib.loadARBSampleShading (contextVersion);
445 
446     static if(useARBTextureCompressionBPTC) _hasARBTextureCompressionBPTC =
447             hasExtension(contextVersion, "GL_ARB_texture_compression_bptc");
448 
449     static if(useARBTextureCubeMapArray) _hasARBTextureCubeMapArray =
450             hasExtension(contextVersion, "GL_ARB_texture_cube_map_array");
451 
452     static if(useARBTextureGather) _hasARBTextureGather =
453             hasExtension(contextVersion, "GL_ARB_texture_gather");
454 
455     static if(useARBTransformFeedbackOverflowQuery) _hasARBTransformFeedbackOverflowQuery =
456             hasExtension(contextVersion, "GL_ARB_transform_feedback_overflow_query");
457 }