* removed native OpenGL support
[glBitmap.git] / examples / dglOpenGL.pas
1 { ============================================================================
2
3        OpenGL 4.4 - Headertranslation
4        Version 4.4
5        Date : 2013/07/22
6
7        Supported environments and targets :
8         - (Win32) Delphi 4 and up
9         - (Win32, Win64) Delphi XE2
10         - (Win32, Win64, Linux, MacOSX) FreePascal (1.9.3 and up)
11
12 ==============================================================================
13
14        Containts the translations of glext.h, gl_1_1.h, glu.h and weglext.h.
15        It also contains some helperfunctions that were inspired by those
16        found in Mike Lischke's OpenGL12.pas.
17
18        Copyright (C) DGL-OpenGL2-Portteam
19        All Rights Reserved
20
21        Obtained through:
22        Delphi OpenGL Community(DGL) - www.delphigl.com
23
24        Converted and maintained by DGL's GL2.0-Team :
25          - Sascha Willems             - http://www.saschawillems.de
26          - Steffen Xonna (Lossy eX)   - http://www.dev-center.de
27        Additional input :
28          - Andrey Gruzdev (Mac OS X patch for XE2 / FPC)
29          - Lars Middendorf
30          - Martin Waldegger (Mars)
31          - Benjamin Rosseaux (BeRo)   - http://www.0ok.de
32        Additional thanks:
33            sigsegv (libdl.so)
34
35 ==============================================================================
36  You may retrieve the latest version of this file at the Delphi OpenGL
37  Community home page, located at http://www.delphigl.com/
38
39  The contents of this file are used with permission, subject to
40  the Mozilla Public License Version 1.1 (the "License"); you may
41  not use this file except in compliance with the License. You may
42  obtain a copy of the License at
43  http://www.mozilla.org/MPL/MPL-1.1.html
44
45  Software distributed under the License is distributed on an
46  "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
47  implied. See the License for the specific language governing
48  rights and limitations under the License.
49
50 ==============================================================================
51  History :
52  Version 1.0    Initial Release
53  Version 1.1    Added PPointer in Tpyessection for compatiblity with Delphi
54                 versions lower than 7                                    (SW)
55                 Added a function named RaiseLastOSError including a comment
56                 on how to make it run under Delphi versions lower than 7 (SW)
57                 Added some data types according to the GL-Syntax         (SW)
58  Version 1.2    Fixed some problems with getting the addresses of some
59                 Extensions (e.g. glTexImage3D) where the EXT/ARB did work
60                 but not the core-functions                               (SW)
61  Version 1.3    A second call to ReadimplementationProperties won't
62                 revert to the default libs anymore                       (MW)
63                 Libraries now will be released if necessary              (MW)
64  Version 1.3a   Small fixes for glSlang-functions                        (SW)
65  Version 1.3b   Fixed a small bug with GL_ARB_shader_objects, that lead
66                 lead to that extension not loaded correctly              (SW)
67  Version 1.3c   more GL 1.5 compliance by FOG_COORD_xx and
68                 ARB less VBO and occlusion query routines                (MW)
69  Version 1.3d   Fixed linebreaks (should now be corrected under D5)      (SW)
70  Version 1.4    Changed header to correspond to the OpenGL-Shading
71                 Language specification 1.10 :
72                 - Added new GL_SAMPLER_*-Constants
73                 - Added Constant GL_SHADING_LANGUAGE_VERSION_ARB
74                 - Added Constant GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB
75                 - Added Constant GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB  (SW)
76  Version 1.4a   Fixed a missing stdcall for glBindAttribLocationARB      (SW)
77  Version 1.4b   Fixed declaration for glUniform*(f/i)vARB (added count)  (MW)
78                 glCompileShaderARB changed from function to procedure    (MW)
79  Version 1.5    Added support for FreePascal                             (BR)
80                 Added type TGLVectorf3/TGLVector3f                       (SW)
81  Version 1.6    Added Extension GL_EXT_framebuffer_object                (SX)
82  Version 1.7    Added Extension GL_ARB_fragment_program_shadow           (SX)
83                 Added Extension GL_ARB_draw_buffers                      (SX)
84                 Added Extension GL_ARB_texture_rectangle                 (SX)
85                 Added Extension GL_ARB_color_buffer_float                (SX)
86                 Added Extension GL_ARB_half_float_pixel                  (SX)
87                 Added Extension GL_ARB_texture_float                     (SX)
88                 Added Extension GL_ARB_pixel_buffer_object               (SX)
89                 Added Extension GL_EXT_depth_bounds_test                 (SX)
90                 Added Extension GL_EXT_texture_mirror_clamp              (SX)
91                 Added Extension GL_EXT_blend_equation_separate           (SX)
92                 Added Extension GL_EXT_pixel_buffer_object               (SX)
93                 Added Extension GL_EXT_texture_compression_dxt1          (SX)
94                 Added Extension GL_NV_fragment_program_option            (SX)
95                 Added Extension GL_NV_fragment_program2                  (SX)
96                 Added Extension GL_NV_vertex_program2_option             (SX)
97                 Added Extension GL_NV_vertex_program3                    (SX)
98  Version 1.8    Added explicit delegate type definitions                 (LM)
99                 Added .Net 1.1 Support                                   (LM)
100                 Added .Net overloaded functions                          (LM)
101                 Added delayed extension loading and stubs                (LM)
102                 Added automatic InitOpenGL call in CreateRenderingContext(LM)
103                 Added extra Read_* function                              (LM)
104  Version 2.0    fixed some Problem with version string and damn drivers.
105                 String 1.15 identified as OpenGL 1.5 not as OpenGL 1.1   (SX)
106                 Removed unexisting extension GL_ARB_texture_mirror_repeat(SX)
107                 Added Extension WGL_ARB_pixel_format_float               (SX)
108                 Added Extension GL_EXT_stencil_clear_tag                 (SX)
109                 Added Extension GL_EXT_texture_rectangle                 (SX)
110                 Added Extension GL_EXT_texture_edge_clamp                (SX)
111                 Some 1.5 Core Consts added (now completed)               (SX)
112                 gluProject need pointer for not .net                     (SX)
113                 gluUnProject need pointer for not .net                   (SX)
114                 wglUseFontOutlines* need pointer for not .net            (SX)
115                 wglSwapMultipleBuffers need pointer for not .net         (SX)
116                 Bug with wglGetExtensionsStringEXT removed
117                 different type for .net                                  (SX)
118                 Added OpenGL 2.0 Core                                    (SX)
119  Version 2.0.1  fixed some problems with glGetActiveAttrib in 2.0 Core   (SX)
120                 fixes some problems with gluProject                      (SX)
121                 fixes some problems with gluUnProject                    (SX)
122                 fixes some problems with gluTessVertex                   (SX)
123                 fixes some problems with gluLoadSamplingMatrices         (SX)
124  Version 2.1    Removed .NET Support                                     (SX)
125                 Better support for Linux                                 (SX)
126                 Better Codeformation                                     (SX)
127                 Added some more Vector/Matrix types                      (SX)
128                 Added OpenGL 2.1 Core                                    (SX)
129                 Added Extension GL_EXT_packed_depth_stencil              (SX)
130                 Added Extension GL_EXT_texture_sRGB                      (SX)
131                 Added Extension GL_EXT_framebuffer_blit                  (SX)
132                 Added Extension GL_EXT_framebuffer_multisample           (SX)
133                 Added Extension GL_EXT_timer_query                       (SX)
134                 Added Extension GL_EXT_gpu_program_parameters            (SX)
135                 Added Extension GL_EXT_bindable_uniform                  (SX)
136                 Added Extension GL_EXT_draw_buffers2                     (SX)
137                 Added Extension GL_EXT_draw_instanced                    (SX)
138                 Added Extension GL_EXT_framebuffer_sRGB                  (SX)
139                 Added Extension GL_EXT_geometry_shader4                  (SX)
140                 Added Extension GL_EXT_gpu_shader4                       (SX)
141                 Added Extension GL_EXT_packed_float                      (SX)
142                 Added Extension GL_EXT_texture_array                     (SX)
143                 Added Extension GL_EXT_texture_buffer_object             (SX)
144                 Added Extension GL_EXT_texture_compression_latc          (SX)
145                 Added Extension GL_EXT_texture_compression_rgtc          (SX)
146                 Added Extension GL_EXT_texture_integer                   (SX)
147                 Added Extension GL_EXT_texture_shared_exponent           (SX)
148                 Added Extension GL_NV_depth_buffer_float                 (SX)
149                 Added Extension GL_NV_fragment_program4                  (SX)
150                 Added Extension GL_NV_framebuffer_multisample_coverage   (SX)
151                 Added Extension GL_NV_geometry_program4                  (SX)
152                 Added Extension GL_NV_gpu_program4                       (SX)
153                 Added Extension GL_NV_parameter_buffer_object            (SX)
154                 Added Extension GL_NV_transform_feedback                 (SX)
155                 Added Extension GL_NV_vertex_program4                    (SX)
156  Version 3.0    fixed some const of GL_EXT_texture_shared_exponent       (SX)
157                 possible better support for mac                          (SX)
158                 Added OpenGL 3.0 Core                                    (SX)
159                 Added Extension GL_ARB_depth_buffer_float                (SX)
160                 Added Extension GL_ARB_draw_instanced                    (SX)
161                 Added Extension GL_ARB_framebuffer_object                (SX)
162                 Added Extension GL_ARB_framebuffer_sRGB                  (SX)
163                 Added Extension GL_ARB_geometry_shader4                  (SX)
164                 Added Extension GL_ARB_half_float_vertex                 (SX)
165                 Added Extension GL_ARB_instanced_arrays                  (SX)
166                 Added Extension GL_ARB_map_buffer_range                  (SX)
167                 Added Extension GL_ARB_texture_buffer_object             (SX)
168                 Added Extension GL_ARB_texture_compression_rgtc          (SX)
169                 Added Extension GL_ARB_texture_rg                        (SX)
170                 Added Extension GL_ARB_vertex_array_object               (SX)
171                 Added Extension GL_NV_conditional_render                 (SX)
172                 Added Extension GL_NV_present_video                      (SX)
173                 Added Extension GL_EXT_transform_feedback                (SX)
174                 Added Extension GL_EXT_direct_state_access               (SX)
175                 Added Extension GL_EXT_vertex_array_bgra                 (SX)
176                 Added Extension GL_EXT_texture_swizzle                   (SX)
177                 Added Extension GL_NV_explicit_multisample               (SX)
178                 Added Extension GL_NV_transform_feedback2                (SX)
179                 Added Extension WGL_ARB_create_context                   (SX)
180                 Added Extension WGL_NV_present_video                     (SX)
181                 Added Extension WGL_NV_video_out                         (SX)
182                 Added Extension WGL_NV_swap_group                        (SX)
183                 Added Extension WGL_NV_gpu_affinity                      (SX)
184                 Added define DGL_TINY_HEADER to suppress automatic
185                 function loading                                         (SX)
186                 glProcedure renamed to dglGetProcAddress and now it's
187                 visible from outside the unit to custom load functions   (SX)
188                 dglCheckExtension added to check if an extension exists  (SX)
189                 Read_GL_ARB_buffer_object renamed to
190                 Read_GL_ARB_vertex_buffer_object                         (SX)
191  Version 3.0.1  fixed an problem with fpc                                (SX)
192  Version 3.0.2  fixed an problem with WGL_ARB_create_context             (SX)
193  Version 3.2    Functions from GL_VERSION_3_0 where updated              (SX)
194                 Functions from GL_ARB_map_buffer_range where updated     (SX)
195                 Functions from GL_NV_present_video where added           (SX)
196                 Added consts of GL_ARB_instanced_arrays                  (SX)
197                 Defines to identify Delphi was changed (prevent for
198                 feature maintenance)                                     (SX)
199                 Added Extension GL_ATI_meminfo                           (SX)
200                 Added Extension GL_AMD_performance_monitor               (SX)
201                 Added Extension GL_AMD_texture_texture4                  (SX)
202                 Added Extension GL_AMD_vertex_shader_tesselator          (SX)
203                 Added Extension GL_EXT_provoking_vertex                  (SX)
204                 Added Extension WGL_AMD_gpu_association                  (SX)
205                 Added OpenGL 3.1 Core                                    (SX)
206                 All deprecated stuff can be disabled if you undef the
207                 define DGL_DEPRECATED                                    (SX)
208                 Added Extension GL_ARB_uniform_buffer_object             (SX)
209                 Added Extension GL_ARB_compatibility                     (SX)
210                 Added Extension GL_ARB_copy_buffer                       (SX)
211                 Added Extension GL_ARB_shader_texture_lod                (SX)
212                 Remove function from GL_NV_present_video                 (SX)
213                 Added Extension WGL_3DL_stereo_control                   (SX)
214                 Added Extension GL_EXT_texture_snorm                     (SX)
215                 Added Extension GL_AMD_draw_buffers_blend                (SX)
216                 Added Extension GL_APPLE_texture_range                   (SX)
217                 Added Extension GL_APPLE_float_pixels                    (SX)
218                 Added Extension GL_APPLE_vertex_program_evaluators       (SX)
219                 Added Extension GL_APPLE_aux_depth_stencil               (SX)
220                 Added Extension GL_APPLE_object_purgeable                (SX)
221                 Added Extension GL_APPLE_row_bytes                       (SX)
222                 Added OpenGL 3.2 Core                                    (SX)
223                 Added Extension GL_ARB_depth_clamp                       (SX)
224                 Added Extension GL_ARB_draw_elements_base_vertex         (SX)
225                 Added Extension GL_ARB_fragment_coord_conventions        (SX)
226                 Added Extension GL_ARB_provoking_vertex                  (SX)
227                 Added Extension GL_ARB_seamless_cube_map                 (SX)
228                 Added Extension GL_ARB_sync                              (SX)
229                 Added Extension GL_ARB_texture_multisample               (SX)
230                 Added Extension GL_ARB_vertex_array_bgra                 (SX)
231                 Added Extension GL_ARB_draw_buffers_blend                (SX)
232                 Added Extension GL_ARB_sample_shading                    (SX)
233                 Added Extension GL_ARB_texture_cube_map_array            (SX)
234                 Added Extension GL_ARB_texture_gather                    (SX)
235                 Added Extension GL_ARB_texture_query_lod                 (SX)
236                 Added Extension WGL_ARB_create_context_profile           (SX)
237                 Added GLX Core up to Version 1.4                         (SX)
238                 Added Extension GLX_ARB_multisample                      (SX)
239                 Added Extension GLX_ARB_fbconfig_float                   (SX)
240                 Added Extension GLX_ARB_get_proc_address                 (SX)
241                 Added Extension GLX_ARB_create_context                   (SX)
242                 Added Extension GLX_ARB_create_context_profile           (SX)
243                 Added Extension GLX_EXT_visual_info                      (SX)
244                 Added Extension GLX_EXT_visual_rating                    (SX)
245                 Added Extension GLX_EXT_import_context                   (SX)
246                 Added Extension GLX_EXT_fbconfig_packed_float            (SX)
247                 Added Extension GLX_EXT_framebuffer_sRGB                 (SX)
248                 Added Extension GLX_EXT_texture_from_pixmap              (SX)
249  Version 3.2.1  Fixed some problems with Delphi < 6                      (SX)
250  Version 3.2.2  Added Extension GL_APPLE_rgb_422                         (SX)
251                 Added Extension GL_EXT_separate_shader_objects           (SX)
252                 Added Extension GL_NV_video_capture                      (SX)
253                 Added Extension GL_NV_copy_image                         (SX)
254                 Added Extension GL_NV_parameter_buffer_object2           (SX)
255                 Added Extension GL_NV_shader_buffer_load                 (SX)
256                 Added Extension GL_NV_vertex_buffer_unified_memory       (SX)
257                 Added Extension GL_NV_texture_barrier                    (SX)
258                 Variable GL_EXT_texture_snorm will be filled             (SX)
259                 Variable GL_APPLE_row_bytes will be filled               (SX)
260                 Added Extension WGL_NV_video_capture                     (SX)
261                 Added Extension WGL_NV_copy_image                        (SX)
262                 WGL_NV_video_out now named WGL_NV_video_output           (SX)
263                 Added Extension GLX_EXT_swap_control                     (SX)
264  Version 3.2.3  Fixed an Problem with glGetAttribLocation                (SX)
265                 Added const GL_UNIFORM_BUFFER_EXT                        (SX)
266                 Functions of GL_NV_texture_barrier now will be loaded    (SX)
267  Version 4.0    Changes on Extension GL_ARB_texture_gather               (SX)
268                 Changes on Extension GL_NV_shader_buffer_load            (SX)
269                 Added OpenGL 3.3 Core                                    (SX)
270                 Added OpenGL 4.0 Core                                    (SX)
271                 Added Extension GL_AMD_shader_stencil_export             (SX)
272                 Added Extension GL_AMD_seamless_cubemap_per_texture      (SX)
273                 Added Extension GL_ARB_shading_language_include          (SX)
274                 Added Extension GL_ARB_texture_compression_bptc          (SX)
275                 Added Extension GL_ARB_blend_func_extended               (SX)
276                 Added Extension GL_ARB_explicit_attrib_location          (SX)
277                 Added Extension GL_ARB_occlusion_query2                  (SX)
278                 Added Extension GL_ARB_sampler_objects                   (SX)
279                 Added Extension GL_ARB_shader_bit_encoding               (SX)
280                 Added Extension GL_ARB_texture_rgb10_a2ui                (SX)
281                 Added Extension GL_ARB_texture_swizzle                   (SX)
282                 Added Extension GL_ARB_timer_query                       (SX)
283                 Added Extension GL_ARB_vertex_type_2_10_10_10_rev        (SX)
284                 Added Extension GL_ARB_draw_indirect                     (SX)
285                 Added Extension GL_ARB_gpu_shader5                       (SX)
286                 Added Extension GL_ARB_gpu_shader_fp64                   (SX)
287                 Added Extension GL_ARB_shader_subroutine                 (SX)
288                 Added Extension GL_ARB_tessellation_shader               (SX)
289                 Added Extension GL_ARB_texture_buffer_object_rgb32       (SX)
290                 Added Extension GL_ARB_transform_feedback2               (SX)
291                 Added Extension GL_ARB_transform_feedback3               (SX)
292  Version 4.1    Possible fix some strange linux behavior                 (SX)
293                 All function uses GL instead of TGL types                (SX)
294                 GL_AMD_vertex_shader_tesselator will be read now         (SX)
295                 GL_AMD_draw_buffers_blend will be read now               (SX)
296                 Changes on glStencilFuncSeparate (GL_2_0)                (SX)
297                 Changes on GL_VERSION_3_2                                (SX)
298                 Changes on GL_VERSION_3_3                                (SX)
299                 Changes on GL_VERSION_4_0                                (SX)
300                 Changes on GL_ARB_sample_shading                         (SX)
301                 Changes on GL_ARB_texture_cube_map_array                 (SX)
302                 Changes on GL_ARB_gpu_shader5                            (SX)
303                 Changes on GL_ARB_transform_feedback3                    (SX)
304                 Changes on GL_ARB_sampler_objects                        (SX)
305                 Changes on GL_ARB_gpu_shader_fp64                        (SX)
306                 Changes on GL_APPLE_element_array                        (SX)
307                 Changes on GL_APPLE_vertex_array_range                   (SX)
308                 Changes on GL_NV_transform_feedback                      (SX)
309                 Changes on GL_NV_vertex_buffer_unified_memory            (SX)
310                 Changes on GL_EXT_multi_draw_arrays                      (SX)
311                 Changes on GL_EXT_direct_state_access                    (SX)
312                 Changes on GL_AMD_performance_monitor                    (SX)
313                 Changes on GL_AMD_seamless_cubemap_per_texture           (SX)
314                 Changes on GL_EXT_geometry_shader4                       (SX)
315                 Added OpenGL 4.1 Core                                    (SX)
316                 Added Extension GL_ARB_ES2_compatibility                 (SX)
317                 Added Extension GL_ARB_get_program_binary                (SX)
318                 Added Extension GL_ARB_separate_shader_objects           (SX)
319                 Added Extension GL_ARB_shader_precision                  (SX)
320                 Added Extension GL_ARB_vertex_attrib_64bit               (SX)
321                 Added Extension GL_ARB_viewport_array                    (SX)
322                 Added Extension GL_ARB_cl_event                          (SX)
323                 Added Extension GL_ARB_debug_output                      (SX)
324                 Added Extension GL_ARB_robustness                        (SX)
325                 Added Extension GL_ARB_shader_stencil_export             (SX)
326                 Added Extension GL_AMD_conservative_depth                (SX)
327                 Added Extension GL_EXT_shader_image_load_store           (SX)
328                 Added Extension GL_EXT_vertex_attrib_64bit               (SX)
329                 Added Extension GL_NV_gpu_program5                       (SX)
330                 Added Extension GL_NV_gpu_shader5                        (SX)
331                 Added Extension GL_NV_shader_buffer_store                (SX)
332                 Added Extension GL_NV_tessellation_program5              (SX)
333                 Added Extension GL_NV_vertex_attrib_integer_64bit        (SX)
334                 Added Extension GL_NV_multisample_coverage               (SX)
335                 Added Extension GL_AMD_name_gen_delete                   (SX)
336                 Added Extension GL_AMD_debug_output                      (SX)
337                 Added Extension GL_NV_vdpau_interop                      (SX)
338                 Added Extension GL_AMD_transform_feedback3_lines_triangles (SX)
339                 Added Extension GL_AMD_depth_clamp_separate              (SX)
340                 Added Extension GL_EXT_texture_sRGB_decode               (SX)
341                 Added Extension WGL_ARB_framebuffer_sRGB                 (SX)
342                 Added Extension WGL_ARB_create_context_robustness        (SX)
343                 Added Extension WGL_EXT_create_context_es2_profile       (SX)
344                 Added Extension WGL_NV_multisample_coverage              (SX)
345                 Added Extension GLX_ARB_vertex_buffer_object             (SX)
346                 Added Extension GLX_ARB_framebuffer_sRGB                 (SX)
347                 Added Extension GLX_ARB_create_context_robustness        (SX)
348                 Added Extension GLX_EXT_create_context_es2_profile       (SX)
349  Version 4.1a   Fix for dglGetProcAddress with FPC and linux (def param) (SW)
350  Version 4.2    Added OpenGL 4.2 Core                                    (SW)
351                 Added Extension GL_ARB_base_instance                     (SW)
352                 Added Extension GL_ARB_shading_language_420pack          (SW)
353                 Added Extension GL_ARB_transform_feedback_instanced      (SW)
354                 Added Extension GL_ARB_compressed_texture_pixel_storage  (SW)
355                 Added Extension GL_ARB_conservative_depth                (SW)
356                 Added Extension GL_ARB_internalformat_query              (SW)
357                 Added Extension GL_ARB_map_buffer_alignment              (SW)
358                 Added Extension GL_ARB_shader_atomic_counters            (SW)
359                 Added Extension GL_ARB_shader_image_load_store           (SW)
360                 Added Extension GL_ARB_shading_language_packing          (SW)
361                 Added Extension GL_ARB_texture_storage                   (SW)
362                 Added Extension WGL_NV_DX_interop                        (SW)
363                 Added Define for WGL_EXT_create_context_es2_profile      (SW)
364  Version 4.2a   Added Mac OS X patch by Andrey Gruzdev                   (SW)
365  Version 4.3    Added OpenGL 4.3 Core                                    (SW)
366                                                         Added GL_ARB_arrays_of_arrays                                    (SW)
367                                                         Added GL_ARB_fragment_layer_viewport                     (SW)
368                                                         Added GL_ARB_shader_image_size                           (SW)
369                                                         Added GL_ARB_ES3_compatibility                           (SW)
370                                                         Added GL_ARB_clear_buffer_object                         (SW)
371                                                         Added GL_ARB_compute_shader                              (SW)
372                                                         Added GL_ARB_copy_image                                  (SW)
373                                                         Added GL_KHR_debug                                       (SW)
374                                                         Added GL_ARB_explicit_uniform_location,                  (SW)
375                                                         Added GL_ARB_framebuffer_no_attachments                  (SW)
376                                                         Added GL_ARB_internalformat_query2                       (SW)
377                                                         Added GL_ARB_invalidate_subdata                          (SW)
378                                                         Added GL_ARB_multi_draw_indirect                         (SW)
379                                                         Added GL_ARB_program_interface_query                     (SW)
380                                                         Added GL_ARB_robust_buffer_access_behavior               (SW)
381                                                         Added GL_ARB_shader_storage_buffer_object                (SW)
382                                                         Added GL_ARB_stencil_texturing                           (SW)
383                                                         Added GL_ARB_texture_buffer_range                        (SW)
384                                                         Added GL_ARB_texture_query_levels                        (SW)
385                                                         Added GL_ARB_texture_storage_multisample                 (SW)
386                                                         Added GL_ARB_texture_view                                (SW)
387                                                         Added GL_ARB_vertex_attrib_binding                       (SW)
388                 Added new vendor-specific extensions                                                                             (SW)
389                                                                 Added GL_NV_path_rendering                               (SW)
390                                                         Added GL_AMD_pinned_memory                               (SW)
391                 Added GL_AMD_stencil_operation_extended                  (SW)
392                 Added GL_AMD_vertex_shader_viewport_index                (SW)
393                 Added GL_AMD_vertex_shader_layer                         (SW)
394                 Added GL_NV_bindless_texture                             (SW)
395                 Added GL_NV_shader_atomic_float                          (SW)
396                 Added GL_AMD_query_buffer_object                         (SW)
397                 Added CreateRenderingContextVersion                      (SW)
398  Version 4.4    Added ARB_buffer_storage                                 (SW)
399                 Added ARB_clear_texture extension                        (SW)
400                 Added ARB_enhanced_layouts extension                     (SW)
401                 Added ARB_multi_bind extension                           (SW)
402                 Added ARB_query_buffer_object extension                  (SW)
403                 Added ARB_texture_mirror_clamp_to_edge extension         (SW)
404                 Added ARB_texture_stencil8 extension                     (SW)
405                 Added ARB_vertex_type_10f_11f_11f_rev extension          (SW)
406                 Added MAX_VERTEX_ATTRIB_STRIDE stat                      (SW)
407                 Added missing functions for GL_EXT_direct_state_access   (SW)
408                 GL3.0+ uses non-deprecated way of getting extensions
409                 (thanks to frenK)                                                                                                                                                        (SW)
410                 Added missing cdecl for TglXGetVisualFromFBConfig        (SW)
411
412
413 ==============================================================================
414  Header based on glext.h  rev 87 (2012-08-06)
415  Header based on wglext.h rev 24 (2012/01/04)
416  Header based on glxext.h rev 33 (2012/02/29)  (only Core/ARB/EXT)
417
418  This is an important notice for maintaining. Dont remove it. And make sure
419  to keep it up to date
420 ============================================================================== }
421
422 {$define DGL_DEPRECATED}
423 {
424   This define defines if the header should use deprecated ARB stuff or not.
425   per Default the Header use deprecated Stuff.
426 }
427
428
429 {.$define DGL_TINY_HEADER}
430 {
431   If you enable the define DGL_TINY_HEADER no function automatically will be loaded if you
432   call ActivateRenderingContext. This may some bit faster and the smart linker can delete
433   all non used functions. This will reduce the filesize of your binary file. But in this
434   case you have to load the functions by yourself. There are two ways to do this.
435
436   1. You can load whole extension by calling the func Read_Extensionname. But if you do
437      this it's possible to load functions you dont use. So you have the same "problem"
438      like before. But it's only an bit smaler.
439      > Read_GL_ARB_multitexture;
440
441   2. You are able to load only the functions you exactly need. In this case you are able
442      to use the variables of the dglOpenGL.pas. So you only need to load the functions
443      and you can use the header like before.
444      To do this you have to created and activated an opengl context and than you can load
445      the needed functions.
446      > ActivateRenderingContext(fDC, fRC);
447      > glActiveTextureARB := dglGetProcAddress('glActiveTextureARB');
448      > glMultiTexCoord2fARB := dglGetProcAddress('glMultiTexCoord2fARB');
449
450      So only the function "glActiveTextureARB" and "glMultiTexCoord2fARB" will be loaded.
451
452
453   Please notice that the extension variables won't be loaded if this define is active. But
454   you can call dglCheckExtension to check if any extension exists. You can assign them to
455   the variables of the dglOpenGL.pas so all code they use this will find them.
456
457   > GL_ARB_shading_language_100 := dglCheckExtension('GL_ARB_shading_language_100');
458 }
459
460
461 unit dglOpenGL;
462
463 interface
464
465 // defines to configure freepascal
466 {$IFDEF FPC}
467   {$MODE Delphi}
468
469   {$IFNDEF WINDOWS}
470     {$LINKLIB c}
471   {$ENDIF}
472 {$ENDIF}
473
474 // known delphi versions
475 {$IFNDEF FPC}       // if freepascal isnt defined
476   {$IFDEF VER140}   // Delphi 6
477     {$DEFINE DELPHI6_AND_DOWN}
478   {$ENDIF}
479
480   {$IFDEF VER130}   // Delphi 5
481     {$DEFINE DELPHI6_AND_DOWN}
482   {$ENDIF}
483
484   {$IFDEF VER120}   // Delphi 4
485     {$DEFINE DELPHI6_AND_DOWN}
486   {$ENDIF}
487
488   {$IFDEF VER110}   // C++ Builder 3
489     {$DEFINE DELPHI6_AND_DOWN}
490   {$ENDIF}
491
492   {$IFDEF VER100}   // Delphi 3
493     {$DEFINE DELPHI6_AND_DOWN}
494   {$ENDIF}
495 {$ENDIF}
496
497 // Options for Delphi < 5
498 {$IFDEF DELPHI6_AND_DOWN}
499   {$A+}
500 {$ELSE}
501   {$A4}
502 {$ENDIF}
503
504 // generell options
505 {$H+,O+,X+}
506
507 // detecting Windows
508 {$IFDEF Win32}          // Delphi and fpc of 32 Bit Windows
509   {$DEFINE DGL_WIN}
510 {$ENDIF}
511
512 {$IFDEF Win64}          // Delphi and fpc of 32 Bit Windows
513   {$DEFINE DGL_WIN}
514 {$ENDIF}
515
516 // detecting Linux
517 {$IFDEF linux}          // Linux
518   {$DEFINE DGL_LINUX}
519 {$ENDIF}
520
521 {$IFDEF DARWIN}  // Mac OS X and FPC
522    {$DEFINE DGL_MAC}
523 {$ENDIF}   
524
525 {$IFDEF DELPHI}  // Mac OS X add Delphi 
526 {$IFDEF MACOS}
527    {$DEFINE DGL_MAC}
528 {$ENDIF}   
529 {$ENDIF}   
530
531
532 // detecting 64 Bit CPU
533 {$IFDEF CPU64}          // fpc on 64 bit cpus
534   {$DEFINE DGL_64BIT}   // dgl define for 64 bit
535 {$ENDIF}
536
537
538
539 uses
540   {$IFDEF FPC}{$IFDEF DARWIN}dynlibs,{$ENDIF}{$ENDIF}  // LoadLibrary functions 
541   SysUtils
542   {$IFDEF DGL_WIN}, Windows{$ENDIF}
543   {$IFDEF DGL_LINUX}, X, XLib, XUtil{$ENDIF}
544   ;
545
546 type
547   // Needed for Delphi 6 and less (defined in system.pas for Delphi 7)
548   PPointer = ^Pointer;
549   PCardinal = ^Cardinal;
550
551   GLenum = Cardinal;
552   GLboolean = BYTEBOOL;
553   GLbitfield = Cardinal;
554   GLbyte = Shortint;
555   GLshort = SmallInt;
556   GLint = Integer;
557   GLsizei = Integer;
558   GLubyte = Byte;
559   GLushort = Word;
560   GLuint = Cardinal;
561   GLfloat = Single;
562   GLclampf = Single;
563   GLdouble = Double;
564   GLclampd = Double;
565   GLvoid = Pointer;
566   GLint64 = Int64;
567   GLuint64 = {$IFDEF DELPHI6_AND_DOWN} Int64 {$ELSE} UInt64 {$ENDIF};
568   
569   TGLenum = GLenum;
570   TGLboolean = GLboolean;
571   TGLbitfield = GLbitfield;
572   TGLbyte = GLbyte;
573   TGLshort = GLshort;
574   TGLint = GLint;
575   TGLsizei = GLsizei;
576   TGLubyte = GLubyte;
577   TGLushort = GLushort;
578   TGLuint = GLuint;
579   TGLfloat = GLfloat;
580   TGLclampf = GLclampf;
581   TGLdouble = GLdouble;
582   TGLclampd = GLclampd;
583   TGLvoid = GLvoid;
584   TGLint64 = GLint64;
585   TGLuint64 = GLuint64;
586
587   PGLboolean = ^GLboolean;
588   PGLbyte = ^GLbyte;
589   PGLshort = ^GLshort;
590   PGLint = ^GLint;
591   PGLsizei = ^GLsizei;
592   PGLubyte = ^GLubyte;
593   PGLushort = ^GLushort;
594   PGLuint = ^GLuint;
595   PGLclampf = ^GLclampf;
596   PGLfloat = ^GLfloat;
597   PGLdouble = ^GLdouble;
598   PGLclampd = ^GLclampd;
599   PGLenum = ^GLenum;
600   PGLvoid = Pointer;
601   PPGLvoid = ^PGLvoid;
602   PGLint64 = ^GLint64;
603   PGLuint64 = ^GLuint64;
604
605   // GL_NV_half_float
606   GLhalfNV = WORD;
607   TGLhalfNV = GLhalfNV;
608   PGLhalfNV = ^GLhalfNV;
609
610   // GL_ARB_shader_objects
611   PGLHandleARB = ^GLHandleARB;
612   GLHandleARB = Integer;
613   GLcharARB = AnsiChar;
614   PGLcharARB = PAnsiChar;
615   PPGLcharARB = ^PGLcharARB;
616
617   // GL_VERSION_1_5
618   GLintptr = GLint;
619   GLsizeiptr = GLsizei;
620
621   // GL_ARB_vertex_buffer_object
622   GLintptrARB = GLint;
623   GLsizeiptrARB = GLsizei;
624
625   // GL_VERSION_2_0
626   GLHandle = Integer;
627   PGLchar = PAnsiChar;
628   PPGLchar = ^PGLChar;
629
630   // GL_EXT_timer_query
631   GLint64EXT = Int64;
632   TGLint64EXT = GLint64EXT;
633   PGLint64EXT = ^GLint64EXT;
634
635   GLuint64EXT = GLuint64;
636   TGLuint64EXT = GLuint64EXT;
637   PGLuint64EXT = ^GLuint64EXT;
638
639   // WGL_ARB_pbuffer
640   HPBUFFERARB = THandle;
641
642   // WGL_EXT_pbuffer
643   HPBUFFEREXT = THandle;
644
645   // WGL_NV_present_video
646   PHVIDEOOUTPUTDEVICENV = ^HVIDEOOUTPUTDEVICENV;
647   HVIDEOOUTPUTDEVICENV = THandle;
648
649   // WGL_NV_video_output
650   PHPVIDEODEV = ^HPVIDEODEV;
651   HPVIDEODEV = THandle;
652
653   // WGL_NV_gpu_affinity
654   PHPGPUNV = ^HPGPUNV;
655   PHGPUNV = ^HGPUNV;
656
657   // WGL_NV_video_capture
658   HVIDEOINPUTDEVICENV = THandle;
659   PHVIDEOINPUTDEVICENV = ^HVIDEOINPUTDEVICENV;
660   
661   HPGPUNV = THandle;
662   HGPUNV = THandle;
663
664   // GL_ARB_sync
665   GLsync = Pointer;
666
667   // GL_ARB_cl_event
668   { These incomplete types let us declare types compatible with OpenCL's cl_context and cl_event }
669   _cl_context = record end;
670   _cl_event = record end;
671   p_cl_context = ^_cl_context;
672   p_cl_event = ^_cl_event;
673
674   // GL_ARB_debug_output
675   TglDebugProcARB = procedure (source: GLenum; type_: GLenum; id: GLuint; severity: GLenum; length: GLsizei; const message_: PGLchar; userParam: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
676
677   // GL_AMD_debug_output
678   TglDebugProcAMD = procedure (id: GLuint; category: GLenum; severity: GLenum; length: GLsizei; const message_: PGLchar; userParam: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
679
680         // (4.3) GL_KHR_debug
681   TglDebugProc = procedure(source : GLEnum; type_ : GLEnum; id : GLUInt; severity : GLUInt; length : GLsizei; const message_ : PGLCHar; userParam : PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
682
683   // GL_NV_vdpau_interop
684   GLvdpauSurfaceNV = GLintptr;
685   PGLvdpauSurfaceNV = ^GLvdpauSurfaceNV;
686   
687   
688   // GLX
689   {$IFDEF DGL_LINUX}
690     GLXContext = Pointer;
691     GLXContextID = TXID;
692     GLXDrawable = TXID;
693     GLXFBConfig = Pointer;
694     GLXPbuffer = TXID;
695     GLXPixmap = TXID;
696     GLXWindow = TXID;
697
698     Window = TXID;
699     Colormap = TXID;
700     Pixmap = TXID;
701     Font = TXID;
702   {$ENDIF}
703
704   // Datatypes corresponding to GL's types TGL(name)(type)(count)
705   TGLVectorub2 = array[0..1] of GLubyte;
706   TGLVectori2  = array[0..1] of GLint;
707   TGLVectorf2  = array[0..1] of GLfloat;
708   TGLVectord2  = array[0..1] of GLdouble;
709   TGLVectorp2  = array[0..1] of Pointer;
710
711   TGLVectorub3 = array[0..2] of GLubyte;
712   TGLVectori3  = array[0..2] of GLint;
713   TGLVectorf3  = array[0..2] of GLfloat;
714   TGLVectord3  = array[0..2] of GLdouble;
715   TGLVectorp3  = array[0..2] of Pointer;
716
717   TGLVectorub4 = array[0..3] of GLubyte;
718   TGLVectori4  = array[0..3] of GLint;
719   TGLVectorf4  = array[0..3] of GLfloat;
720   TGLVectord4  = array[0..3] of GLdouble;
721   TGLVectorp4  = array[0..3] of Pointer;
722
723   TGLArrayf4 = TGLVectorf4;
724   TGLArrayf3 = TGLVectorf3;
725   TGLArrayd3 = TGLVectord3;
726   TGLArrayi4 = TGLVectori4;
727   TGLArrayp4 = TGLVectorp4;
728
729   TGlMatrixub3 = array[0..2, 0..2] of GLubyte;
730   TGlMatrixi3  = array[0..2, 0..2] of GLint;
731   TGLMatrixf3  = array[0..2, 0..2] of GLfloat;
732   TGLMatrixd3  = array[0..2, 0..2] of GLdouble;
733
734   TGlMatrixub4 = array[0..3, 0..3] of GLubyte;
735   TGlMatrixi4  = array[0..3, 0..3] of GLint;
736   TGLMatrixf4  = array[0..3, 0..3] of GLfloat;
737   TGLMatrixd4  = array[0..3, 0..3] of GLdouble;
738
739   TGLVector3f = TGLVectorf3;
740
741   // Datatypes corresponding to OpenGL12.pas for easy porting
742   TVector3d = TGLVectord3;
743
744   TVector4i = TGLVectori4;
745   TVector4f = TGLVectorf4;
746   TVector4p = TGLVectorp4;
747
748   TMatrix4f = TGLMatrixf4;
749   TMatrix4d = TGLMatrixd4;
750
751   PGLMatrixd4 = ^TGLMatrixd4;
752   PVector4i = ^TVector4i;
753
754
755
756 {$IFDEF FPC}
757   TRect = packed record
758     Left, Top, Right, Bottom: Longint;
759   end;
760 {$ENDIF}
761
762
763   PGPU_DEVICE = ^GPU_DEVICE;
764   GPU_DEVICE = record
765     cb: DWORD;
766     DeviceName: array [0..31] of AnsiChar;
767     DeviceString: array [0..127] of AnsiChar;
768     Flags: DWORD;
769     rcVirtualScreen: TRect;
770   end;
771   
772
773 type
774 {$IFDEF FPC}
775   {$IFDEF DGL_WIN}
776     PWGLSwap = ^TWGLSwap;
777     {$EXTERNALSYM _WGLSWAP}
778       _WGLSWAP = packed record
779         hdc: HDC;
780         uiFlags: UINT;
781       end;
782
783     TWGLSwap = _WGLSWAP;
784   {$EXTERNALSYM WGLSWAP}
785     WGLSWAP = _WGLSWAP;
786
787   {$ENDIF}
788 {$ENDIF}
789
790   // GLU types
791   TGLUNurbs = record
792   end;
793   TGLUQuadric = record
794   end;
795   TGLUTesselator = record
796   end;
797   PGLUNurbs = ^TGLUNurbs;
798   PGLUQuadric = ^TGLUQuadric;
799   PGLUTesselator = ^TGLUTesselator;
800   // backwards compatibility
801   TGLUNurbsObj = TGLUNurbs;
802   TGLUQuadricObj = TGLUQuadric;
803   TGLUTesselatorObj = TGLUTesselator;
804   TGLUTriangulatorObj = TGLUTesselator;
805   PGLUNurbsObj = PGLUNurbs;
806   PGLUQuadricObj = PGLUQuadric;
807   PGLUTesselatorObj = PGLUTesselator;
808   PGLUTriangulatorObj = PGLUTesselator;
809
810   // GLUQuadricCallback
811   TGLUQuadricErrorProc = procedure(errorCode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
812   // GLUTessCallback
813   TGLUTessBeginProc = procedure(AType: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
814   TGLUTessEdgeFlagProc = procedure(Flag: GLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
815   TGLUTessVertexProc = procedure(VertexData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
816   TGLUTessEndProc = procedure; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
817   TGLUTessErrorProc = procedure(ErrNo: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
818   TGLUTessCombineProc = procedure(Coords: TGLArrayd3; VertexData: TGLArrayp4; Weight: TGLArrayf4; OutData: PPointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
819   TGLUTessBeginDataProc = procedure(AType: GLenum; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
820   TGLUTessEdgeFlagDataProc = procedure(Flag: GLboolean; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
821   TGLUTessVertexDataProc = procedure(VertexData: Pointer; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
822   TGLUTessEndDataProc = procedure(UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
823   TGLUTessErrorDataProc = procedure(ErrNo: GLenum; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
824   TGLUTessCombineDataProc = procedure(Coords: TGLArrayd3; VertexData: TGLArrayp4; Weight: TGLArrayf4; OutData: PPointer; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
825   // GLUNurbsCallback
826   TGLUNurbsErrorProc = procedure(ErrorCode: GLEnum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
827
828 var
829   GL_VERSION_1_0,
830   GL_VERSION_1_1,
831   GL_VERSION_1_2,
832   GL_VERSION_1_3,
833   GL_VERSION_1_4,
834   GL_VERSION_1_5,
835   GL_VERSION_2_0,
836   GL_VERSION_2_1,
837   GL_VERSION_3_0,
838   GL_VERSION_3_1,
839   GL_VERSION_3_2,
840   GL_VERSION_3_3,
841   GL_VERSION_4_0,
842   GL_VERSION_4_1,
843   GL_VERSION_4_2,
844   GL_VERSION_4_3,
845   GL_VERSION_4_4,
846   GLU_VERSION_1_1,
847   GLU_VERSION_1_2,
848   GLU_VERSION_1_3,
849   GL_3DFX_multisample,
850   GL_3DFX_tbuffer,
851   GL_3DFX_texture_compression_FXT1,
852   GL_APPLE_client_storage,
853   GL_APPLE_element_array,
854   GL_APPLE_fence,
855   GL_APPLE_specular_vector,
856   GL_APPLE_transform_hint,
857   GL_APPLE_vertex_array_object,
858   GL_APPLE_vertex_array_range,
859   GL_APPLE_ycbcr_422,
860   GL_APPLE_texture_range,
861   GL_APPLE_float_pixels,
862   GL_APPLE_vertex_program_evaluators,
863   GL_APPLE_aux_depth_stencil,
864   GL_APPLE_object_purgeable,
865   GL_APPLE_row_bytes,
866   GL_APPLE_rgb_422,
867   GL_ARB_depth_texture,
868   GL_ARB_fragment_program,
869   GL_ARB_imaging,
870   GL_ARB_matrix_palette,
871   GL_ARB_multisample,
872   GL_ARB_multitexture,
873   GL_ARB_point_parameters,
874   GL_ARB_shadow,
875   GL_ARB_shadow_ambient,
876   GL_ARB_texture_border_clamp,
877   GL_ARB_texture_compression,
878   GL_ARB_texture_cube_map,
879   GL_ARB_texture_env_add,
880   GL_ARB_texture_env_combine,
881   GL_ARB_texture_env_crossbar,
882   GL_ARB_texture_env_dot3,
883   GL_ARB_texture_mirrored_repeat,
884   GL_ARB_transpose_matrix,
885   GL_ARB_vertex_blend,
886   GL_ARB_vertex_buffer_object,
887   GL_ARB_vertex_program,
888   GL_ARB_window_pos,
889   GL_ARB_shader_objects,
890   GL_ARB_vertex_shader,
891   GL_ARB_fragment_shader,
892   GL_ARB_shading_language_100,
893   GL_ARB_occlusion_query,
894   GL_ARB_texture_non_power_of_two,
895   GL_ARB_point_sprite,
896   GL_ARB_fragment_program_shadow,
897   GL_ARB_draw_buffers,
898   GL_ARB_texture_rectangle,
899   GL_ARB_color_buffer_float,
900   GL_ARB_half_float_pixel,
901   GL_ARB_texture_float,
902   GL_ARB_pixel_buffer_object,
903   GL_ARB_depth_buffer_float,
904   GL_ARB_draw_instanced,
905   GL_ARB_framebuffer_object,
906   GL_ARB_framebuffer_sRGB,
907   GL_ARB_geometry_shader4,
908   GL_ARB_half_float_vertex,
909   GL_ARB_instanced_arrays,
910   GL_ARB_map_buffer_range,
911   GL_ARB_texture_buffer_object,
912   GL_ARB_texture_compression_rgtc,
913   GL_ARB_texture_rg,
914   GL_ARB_vertex_array_object,
915   GL_ARB_uniform_buffer_object,
916   GL_ARB_compatibility,
917   GL_ARB_copy_buffer,
918   GL_ARB_shader_texture_lod,
919   GL_ARB_depth_clamp,
920   GL_ARB_draw_elements_base_vertex,
921   GL_ARB_fragment_coord_conventions,
922   GL_ARB_provoking_vertex,
923   GL_ARB_seamless_cube_map,
924   GL_ARB_sync,
925   GL_ARB_texture_multisample,
926   GL_ARB_vertex_array_bgra,
927   GL_ARB_draw_buffers_blend,
928   GL_ARB_sample_shading,
929   GL_ARB_texture_cube_map_array,
930   GL_ARB_texture_gather,
931   GL_ARB_texture_query_lod,
932   GL_ARB_shading_language_include,
933   GL_ARB_texture_compression_bptc,
934   GL_ARB_blend_func_extended,
935   GL_ARB_explicit_attrib_location,
936   GL_ARB_occlusion_query2,
937   GL_ARB_sampler_objects,
938   GL_ARB_shader_bit_encoding,
939   GL_ARB_texture_rgb10_a2ui,
940   GL_ARB_texture_swizzle,
941   GL_ARB_timer_query,
942   GL_ARB_vertex_type_2_10_10_10_rev,
943   GL_ARB_draw_indirect,
944   GL_ARB_gpu_shader5,
945   GL_ARB_gpu_shader_fp64,
946   GL_ARB_shader_subroutine,
947   GL_ARB_tessellation_shader,
948   GL_ARB_texture_buffer_object_rgb32,
949   GL_ARB_transform_feedback2,
950   GL_ARB_transform_feedback3,
951   GL_ARB_ES2_compatibility,
952   GL_ARB_get_program_binary,
953   GL_ARB_separate_shader_objects,
954   GL_ARB_shader_precision,
955   GL_ARB_vertex_attrib_64bit,
956   GL_ARB_viewport_array,
957
958   // GL 4.2
959     GL_ARB_base_instance,
960     GL_ARB_shading_language_420pack,
961     GL_ARB_transform_feedback_instanced,
962     GL_ARB_compressed_texture_pixel_storage,
963     GL_ARB_conservative_depth,
964     GL_ARB_internalformat_query,
965     GL_ARB_map_buffer_alignment,
966     GL_ARB_shader_atomic_counters,
967     GL_ARB_shader_image_load_store,
968     GL_ARB_shading_language_packing,
969     GL_ARB_texture_storage,
970   // END GL 4.2
971
972   // GL 4.3
973     GL_ARB_arrays_of_arrays,
974     GL_ARB_fragment_layer_viewport,
975     GL_ARB_shader_image_size,
976     GL_ARB_ES3_compatibility,
977     GL_ARB_clear_buffer_object,
978     GL_ARB_compute_shader,
979     GL_ARB_copy_image,
980     GL_KHR_debug,
981     GL_ARB_explicit_uniform_location,
982     GL_ARB_framebuffer_no_attachments,
983     GL_ARB_internalformat_query2,
984     GL_ARB_invalidate_subdata,
985     GL_ARB_multi_draw_indirect,
986     GL_ARB_program_interface_query,
987     GL_ARB_robust_buffer_access_behavior,
988     GL_ARB_shader_storage_buffer_object,
989     GL_ARB_stencil_texturing,
990     GL_ARB_texture_buffer_range,
991     GL_ARB_texture_query_levels,
992     GL_ARB_texture_storage_multisample,
993     GL_ARB_texture_view,
994     GL_ARB_vertex_attrib_binding,
995     GL_NV_path_rendering,
996     GL_AMD_pinned_memory,
997     GL_AMD_stencil_operation_extended,
998     GL_AMD_vertex_shader_viewport_index,
999     GL_AMD_vertex_shader_layer,
1000     GL_NV_bindless_texture,
1001     GL_NV_shader_atomic_float,
1002     GL_AMD_query_buffer_object,
1003   // END GL 4.3
1004
1005   // GL 4.4
1006     GL_ARB_buffer_storage,
1007     GL_ARB_clear_texture,
1008     GL_ARB_enhanced_layouts,
1009     GL_ARB_multi_bind,
1010     GL_ARB_query_buffer_object,
1011     GL_ARB_texture_mirror_clamp_to_edge,
1012     GL_ARB_texture_stencil8,
1013     GL_ARB_vertex_type_10f_11f_11f_rev,
1014   // END 4.4
1015
1016   GL_ARB_cl_event,
1017   GL_ARB_debug_output,
1018   GL_ARB_robustness,
1019   GL_ARB_shader_stencil_export,
1020   GL_ATI_draw_buffers,
1021   GL_ATI_element_array,
1022   GL_ATI_envmap_bumpmap,
1023   GL_ATI_fragment_shader,
1024   GL_ATI_map_object_buffer,
1025   GL_ATI_pn_triangles,
1026   GL_ATI_separate_stencil,
1027   GL_ATI_text_fragment_shader,
1028   GL_ATI_texture_env_combine3,
1029   GL_ATI_texture_float,
1030   GL_ATI_texture_mirror_once,
1031   GL_ATI_vertex_array_object,
1032   GL_ATI_vertex_attrib_array_object,
1033   GL_ATI_vertex_streams,
1034   GL_ATI_meminfo,
1035   GL_AMD_performance_monitor,
1036   GL_AMD_texture_texture4,
1037   GL_AMD_vertex_shader_tesselator,
1038   GL_AMD_draw_buffers_blend,
1039   GL_AMD_shader_stencil_export,
1040   GL_AMD_seamless_cubemap_per_texture,
1041   GL_AMD_conservative_depth,
1042   GL_AMD_name_gen_delete,
1043   GL_AMD_debug_output,
1044   GL_AMD_transform_feedback3_lines_triangles,
1045   GL_AMD_depth_clamp_separate,
1046   GL_EXT_422_pixels,
1047   GL_EXT_abgr,
1048   GL_EXT_bgra,
1049   GL_EXT_blend_color,
1050   GL_EXT_blend_func_separate,
1051   GL_EXT_blend_logic_op,
1052   GL_EXT_blend_minmax,
1053   GL_EXT_blend_subtract,
1054   GL_EXT_clip_volume_hint,
1055   GL_EXT_cmyka,
1056   GL_EXT_color_matrix,
1057   GL_EXT_color_subtable,
1058   GL_EXT_compiled_vertex_array,
1059   GL_EXT_convolution,
1060   GL_EXT_coordinate_frame,
1061   GL_EXT_copy_texture,
1062   GL_EXT_cull_vertex,
1063   GL_EXT_draw_range_elements,
1064   GL_EXT_fog_coord,
1065   GL_EXT_framebuffer_object,
1066   GL_EXT_histogram,
1067   GL_EXT_index_array_formats,
1068   GL_EXT_index_func,
1069   GL_EXT_index_material,
1070   GL_EXT_index_texture,
1071   GL_EXT_light_texture,
1072   GL_EXT_misc_attribute,
1073   GL_EXT_multi_draw_arrays,
1074   GL_EXT_multisample,
1075   GL_EXT_packed_pixels,
1076   GL_EXT_paletted_texture,
1077   GL_EXT_pixel_transform,
1078   GL_EXT_pixel_transform_color_table,
1079   GL_EXT_point_parameters,
1080   GL_EXT_polygon_offset,
1081   GL_EXT_rescale_normal,
1082   GL_EXT_secondary_color,
1083   GL_EXT_separate_specular_color,
1084   GL_EXT_shadow_funcs,
1085   GL_EXT_shared_texture_palette,
1086   GL_EXT_stencil_two_side,
1087   GL_EXT_stencil_wrap,
1088   GL_EXT_subtexture,
1089   GL_EXT_texture,
1090   GL_EXT_texture3D,
1091   GL_EXT_texture_compression_s3tc,
1092   GL_EXT_texture_cube_map,
1093   GL_EXT_texture_edge_clamp,
1094   GL_EXT_texture_env_add,
1095   GL_EXT_texture_env_combine,
1096   GL_EXT_texture_env_dot3,
1097   GL_EXT_texture_filter_anisotropic,
1098   GL_EXT_texture_lod_bias,
1099   GL_EXT_texture_object,
1100   GL_EXT_texture_perturb_normal,
1101   GL_EXT_texture_rectangle,
1102   GL_EXT_vertex_array,
1103   GL_EXT_vertex_shader,
1104   GL_EXT_vertex_weighting,
1105   GL_EXT_depth_bounds_test,
1106   GL_EXT_texture_mirror_clamp,
1107   GL_EXT_blend_equation_separate,
1108   GL_EXT_pixel_buffer_object,
1109   GL_EXT_texture_compression_dxt1,
1110   GL_EXT_stencil_clear_tag,
1111   GL_EXT_packed_depth_stencil,
1112   GL_EXT_texture_sRGB,
1113   GL_EXT_framebuffer_blit,
1114   GL_EXT_framebuffer_multisample,
1115   GL_EXT_timer_query,
1116   GL_EXT_gpu_program_parameters,
1117   GL_EXT_bindable_uniform,
1118   GL_EXT_draw_buffers2,
1119   GL_EXT_draw_instanced,
1120   GL_EXT_framebuffer_sRGB,
1121   GL_EXT_geometry_shader4,
1122   GL_EXT_gpu_shader4,
1123   GL_EXT_packed_float,
1124   GL_EXT_texture_array,
1125   GL_EXT_texture_buffer_object,
1126   GL_EXT_texture_compression_latc,
1127   GL_EXT_texture_compression_rgtc,
1128   GL_EXT_texture_integer,
1129   GL_EXT_texture_shared_exponent,
1130   GL_EXT_transform_feedback,
1131   GL_EXT_direct_state_access,
1132   GL_EXT_vertex_array_bgra,
1133   GL_EXT_texture_swizzle,
1134   GL_EXT_provoking_vertex,
1135   GL_EXT_texture_snorm,
1136   GL_EXT_separate_shader_objects,
1137   GL_EXT_shader_image_load_store,
1138   GL_EXT_vertex_attrib_64bit,
1139   GL_EXT_texture_sRGB_decode,
1140   GL_FfdMaskSGIX,
1141   GL_HP_convolution_border_modes,
1142   GL_HP_image_transform,
1143   GL_HP_occlusion_test,
1144   GL_HP_texture_lighting,
1145   GL_IBM_cull_vertex,
1146   GL_IBM_multimode_draw_arrays,
1147   GL_IBM_rasterpos_clip,
1148   GL_IBM_texture_mirrored_repeat,
1149   GL_IBM_vertex_array_lists,
1150   GL_INGR_blend_func_separate,
1151   GL_INGR_color_clamp,
1152   GL_INGR_interlace_read,
1153   GL_INGR_palette_buffer,
1154   GL_INTEL_parallel_arrays,
1155   GL_INTEL_texture_scissor,
1156   GL_MESA_resize_buffers,
1157   GL_MESA_window_pos,
1158   GL_NV_blend_square,
1159   GL_NV_copy_depth_to_color,
1160   GL_NV_depth_clamp,
1161   GL_NV_evaluators,
1162   GL_NV_fence,
1163   GL_NV_float_buffer,
1164   GL_NV_fog_distance,
1165   GL_NV_fragment_program,
1166   GL_NV_half_float,
1167   GL_NV_light_max_exponent,
1168   GL_NV_multisample_filter_hint,
1169   GL_NV_occlusion_query,
1170   GL_NV_packed_depth_stencil,
1171   GL_NV_pixel_data_range,
1172   GL_NV_point_sprite,
1173   GL_NV_primitive_restart,
1174   GL_NV_register_combiners,
1175   GL_NV_register_combiners2,
1176   GL_NV_texgen_emboss,
1177   GL_NV_texgen_reflection,
1178   GL_NV_texture_compression_vtc,
1179   GL_NV_texture_env_combine4,
1180   GL_NV_texture_expand_normal,
1181   GL_NV_texture_rectangle,
1182   GL_NV_texture_shader,
1183   GL_NV_texture_shader2,
1184   GL_NV_texture_shader3,
1185   GL_NV_vertex_array_range,
1186   GL_NV_vertex_array_range2,
1187   GL_NV_vertex_program,
1188   GL_NV_vertex_program1_1,
1189   GL_NV_vertex_program2,
1190   GL_NV_fragment_program_option,
1191   GL_NV_fragment_program2,
1192   GL_NV_vertex_program2_option,
1193   GL_NV_vertex_program3,
1194   GL_NV_depth_buffer_float,
1195   GL_NV_fragment_program4,
1196   GL_NV_framebuffer_multisample_coverage,
1197   GL_NV_geometry_program4,
1198   GL_NV_gpu_program4,
1199   GL_NV_parameter_buffer_object,
1200   GL_NV_transform_feedback,
1201   GL_NV_vertex_program4,
1202   GL_NV_conditional_render,
1203   GL_NV_present_video,
1204   GL_NV_explicit_multisample,
1205   GL_NV_transform_feedback2,
1206   GL_NV_video_capture,
1207   GL_NV_copy_image,
1208   GL_NV_parameter_buffer_object2,
1209   GL_NV_shader_buffer_load,
1210   GL_NV_vertex_buffer_unified_memory,
1211   GL_NV_gpu_program5,
1212   GL_NV_gpu_shader5,
1213   GL_NV_shader_buffer_store,
1214   GL_NV_tessellation_program5,
1215   GL_NV_vertex_attrib_integer_64bit,
1216   GL_NV_multisample_coverage,
1217   GL_NV_vdpau_interop,
1218   GL_NV_texture_barrier,
1219   GL_OML_interlace,
1220   GL_OML_resample,
1221   GL_OML_subsample,
1222   GL_PGI_misc_hints,
1223   GL_PGI_vertex_hints,
1224   GL_REND_screen_coordinates,
1225   GL_S3_s3tc,
1226   GL_SGIS_detail_texture,
1227   GL_SGIS_fog_function,
1228   GL_SGIS_generate_mipmap,
1229   GL_SGIS_multisample,
1230   GL_SGIS_pixel_texture,
1231   GL_SGIS_point_line_texgen,
1232   GL_SGIS_point_parameters,
1233   GL_SGIS_sharpen_texture,
1234   GL_SGIS_texture4D,
1235   GL_SGIS_texture_border_clamp,
1236   GL_SGIS_texture_color_mask,
1237   GL_SGIS_texture_edge_clamp,
1238   GL_SGIS_texture_filter4,
1239   GL_SGIS_texture_lod,
1240   GL_SGIS_texture_select,
1241   GL_SGIX_async,
1242   GL_SGIX_async_histogram,
1243   GL_SGIX_async_pixel,
1244   GL_SGIX_blend_alpha_minmax,
1245   GL_SGIX_calligraphic_fragment,
1246   GL_SGIX_clipmap,
1247   GL_SGIX_convolution_accuracy,
1248   GL_SGIX_depth_pass_instrument,
1249   GL_SGIX_depth_texture,
1250   GL_SGIX_flush_raster,
1251   GL_SGIX_fog_offset,
1252   GL_SGIX_fog_scale,
1253   GL_SGIX_fragment_lighting,
1254   GL_SGIX_framezoom,
1255   GL_SGIX_igloo_interface,
1256   GL_SGIX_impact_pixel_texture,
1257   GL_SGIX_instruments,
1258   GL_SGIX_interlace,
1259   GL_SGIX_ir_instrument1,
1260   GL_SGIX_list_priority,
1261   GL_SGIX_pixel_texture,
1262   GL_SGIX_pixel_tiles,
1263   GL_SGIX_polynomial_ffd,
1264   GL_SGIX_reference_plane,
1265   GL_SGIX_resample,
1266   GL_SGIX_scalebias_hint,
1267   GL_SGIX_shadow,
1268   GL_SGIX_shadow_ambient,
1269   GL_SGIX_sprite,
1270   GL_SGIX_subsample,
1271   GL_SGIX_tag_sample_buffer,
1272   GL_SGIX_texture_add_env,
1273   GL_SGIX_texture_coordinate_clamp,
1274   GL_SGIX_texture_lod_bias,
1275   GL_SGIX_texture_multi_buffer,
1276   GL_SGIX_texture_scale_bias,
1277   GL_SGIX_texture_select,
1278   GL_SGIX_vertex_preclip,
1279   GL_SGIX_ycrcb,
1280   GL_SGIX_ycrcb_subsample,
1281   GL_SGIX_ycrcba,
1282   GL_SGI_color_matrix,
1283   GL_SGI_color_table,
1284   GL_SGI_depth_pass_instrument,
1285   GL_SGI_texture_color_table,
1286   GL_SUNX_constant_data,
1287   GL_SUN_convolution_border_modes,
1288   GL_SUN_global_alpha,
1289   GL_SUN_mesh_array,
1290   GL_SUN_slice_accum,
1291   GL_SUN_triangle_list,
1292   GL_SUN_vertex,
1293
1294   GL_WIN_phong_shading,
1295   GL_WIN_specular_fog,
1296   WGL_3DFX_multisample,
1297   WGL_ARB_buffer_region,
1298   WGL_ARB_extensions_string,
1299   WGL_ARB_make_current_read,
1300   WGL_ARB_multisample,
1301   WGL_ARB_pbuffer,
1302   WGL_ARB_pixel_format,
1303   WGL_ARB_pixel_format_float,
1304   WGL_ARB_render_texture,
1305   WGL_ARB_create_context,
1306   WGL_ARB_create_context_profile,
1307   WGL_ARB_framebuffer_sRGB,
1308   WGL_ARB_create_context_robustness,
1309   WGL_ATI_pixel_format_float,
1310   WGL_AMD_gpu_association,
1311   WGL_EXT_depth_float,
1312   WGL_EXT_display_color_table,
1313   WGL_EXT_extensions_string,
1314   WGL_EXT_make_current_read,
1315   WGL_EXT_multisample,
1316   WGL_EXT_pbuffer,
1317   WGL_EXT_pixel_format,
1318   WGL_EXT_swap_control,
1319   WGL_EXT_create_context_es2_profile,
1320   WGL_I3D_digital_video_control,
1321   WGL_I3D_gamma,
1322   WGL_I3D_genlock,
1323   WGL_I3D_image_buffer,
1324   WGL_I3D_swap_frame_lock,
1325   WGL_I3D_swap_frame_usage,
1326   WGL_NV_float_buffer,
1327   WGL_NV_render_depth_texture,
1328   WGL_NV_render_texture_rectangle,
1329   WGL_NV_vertex_array_range,
1330   WGL_NV_present_video,
1331   WGL_NV_video_output,
1332   WGL_NV_swap_group,
1333   WGL_NV_gpu_affinity,
1334   WGL_NV_video_capture,
1335   WGL_NV_copy_image,
1336   WGL_NV_multisample_coverage,
1337   WGL_NV_DX_interop,
1338   WGL_OML_sync_control,
1339   WGL_3DL_stereo_control,
1340   WIN_draw_range_elements,
1341   WIN_swap_hint,
1342   
1343 //  GLX_VERSION_1_0,
1344   GLX_VERSION_1_3,
1345   GLX_VERSION_1_4,
1346   GLX_ARB_multisample,
1347   GLX_ARB_fbconfig_float,
1348   GLX_ARB_get_proc_address,
1349   GLX_ARB_create_context,
1350   GLX_ARB_create_context_profile,
1351   GLX_ARB_vertex_buffer_object,
1352   GLX_ARB_framebuffer_sRGB,
1353   GLX_ARB_create_context_robustness,
1354   GLX_EXT_visual_info,
1355   GLX_EXT_visual_rating,
1356   GLX_EXT_import_context,
1357   GLX_EXT_fbconfig_packed_float,
1358   GLX_EXT_framebuffer_sRGB,
1359   GLX_EXT_texture_from_pixmap,
1360   GLX_EXT_swap_control,
1361   GLX_EXT_create_context_es2_profile : Boolean;
1362
1363 const
1364   // GL_VERSION_1_1
1365   { AttribMask }
1366   GL_DEPTH_BUFFER_BIT = $00000100;
1367   GL_STENCIL_BUFFER_BIT = $00000400;
1368   GL_COLOR_BUFFER_BIT = $00004000;
1369   { Boolean }
1370   GL_TRUE = 1;
1371   GL_FALSE = 0;
1372   { BeginMode }
1373   GL_POINTS = $0000;
1374   GL_LINES = $0001;
1375   GL_LINE_LOOP = $0002;
1376   GL_LINE_STRIP = $0003;
1377   GL_TRIANGLES = $0004;
1378   GL_TRIANGLE_STRIP = $0005;
1379   GL_TRIANGLE_FAN = $0006;
1380   { AlphaFunction }
1381   GL_NEVER = $0200;
1382   GL_LESS = $0201;
1383   GL_EQUAL = $0202;
1384   GL_LEQUAL = $0203;
1385   GL_GREATER = $0204;
1386   GL_NOTEQUAL = $0205;
1387   GL_GEQUAL = $0206;
1388   GL_ALWAYS = $0207;
1389   { BlendingFactorDest }
1390   GL_ZERO = 0;
1391   GL_ONE = 1;
1392   GL_SRC_COLOR = $0300;
1393   GL_ONE_MINUS_SRC_COLOR = $0301;
1394   GL_SRC_ALPHA = $0302;
1395   GL_ONE_MINUS_SRC_ALPHA = $0303;
1396   GL_DST_ALPHA = $0304;
1397   GL_ONE_MINUS_DST_ALPHA = $0305;
1398   { BlendingFactorSrc }
1399   GL_DST_COLOR = $0306;
1400   GL_ONE_MINUS_DST_COLOR = $0307;
1401   GL_SRC_ALPHA_SATURATE = $0308;
1402   { DrawBufferMode }
1403   GL_NONE = 0;
1404   GL_FRONT_LEFT = $0400;
1405   GL_FRONT_RIGHT = $0401;
1406   GL_BACK_LEFT = $0402;
1407   GL_BACK_RIGHT = $0403;
1408   GL_FRONT = $0404;
1409   GL_BACK = $0405;
1410   GL_LEFT = $0406;
1411   GL_RIGHT = $0407;
1412   GL_FRONT_AND_BACK = $0408;
1413   { ErrorCode }
1414   GL_NO_ERROR = 0;
1415   GL_INVALID_ENUM = $0500;
1416   GL_INVALID_VALUE = $0501;
1417   GL_INVALID_OPERATION = $0502;
1418   GL_OUT_OF_MEMORY = $0505;
1419   { FrontFaceDirection }
1420   GL_CW = $0900;
1421   GL_CCW = $0901;
1422   { GetPName }
1423   GL_POINT_SIZE = $0B11;
1424   GL_POINT_SIZE_RANGE = $0B12;
1425   GL_POINT_SIZE_GRANULARITY = $0B13;
1426   GL_LINE_SMOOTH = $0B20;
1427   GL_LINE_WIDTH = $0B21;
1428   GL_LINE_WIDTH_RANGE = $0B22;
1429   GL_LINE_WIDTH_GRANULARITY = $0B23;
1430   GL_POLYGON_SMOOTH = $0B41;
1431   GL_CULL_FACE = $0B44;
1432   GL_CULL_FACE_MODE = $0B45;
1433   GL_FRONT_FACE = $0B46;
1434   GL_DEPTH_RANGE = $0B70;
1435   GL_DEPTH_TEST = $0B71;
1436   GL_DEPTH_WRITEMASK = $0B72;
1437   GL_DEPTH_CLEAR_VALUE = $0B73;
1438   GL_DEPTH_FUNC = $0B74;
1439   GL_STENCIL_TEST = $0B90;
1440   GL_STENCIL_CLEAR_VALUE = $0B91;
1441   GL_STENCIL_FUNC = $0B92;
1442   GL_STENCIL_VALUE_MASK = $0B93;
1443   GL_STENCIL_FAIL = $0B94;
1444   GL_STENCIL_PASS_DEPTH_FAIL = $0B95;
1445   GL_STENCIL_PASS_DEPTH_PASS = $0B96;
1446   GL_STENCIL_REF = $0B97;
1447   GL_STENCIL_WRITEMASK = $0B98;
1448   GL_VIEWPORT = $0BA2;
1449   GL_DITHER = $0BD0;
1450   GL_BLEND_DST = $0BE0;
1451   GL_BLEND_SRC = $0BE1;
1452   GL_BLEND = $0BE2;
1453   GL_LOGIC_OP_MODE = $0BF0;
1454   GL_COLOR_LOGIC_OP = $0BF2;
1455   GL_DRAW_BUFFER = $0C01;
1456   GL_READ_BUFFER = $0C02;
1457   GL_SCISSOR_BOX = $0C10;
1458   GL_SCISSOR_TEST = $0C11;
1459   GL_COLOR_CLEAR_VALUE = $0C22;
1460   GL_COLOR_WRITEMASK = $0C23;
1461   GL_DOUBLEBUFFER = $0C32;
1462   GL_STEREO = $0C33;
1463   GL_LINE_SMOOTH_HINT = $0C52;
1464   GL_POLYGON_SMOOTH_HINT = $0C53;
1465   GL_UNPACK_SWAP_BYTES = $0CF0;
1466   GL_UNPACK_LSB_FIRST = $0CF1;
1467   GL_UNPACK_ROW_LENGTH = $0CF2;
1468   GL_UNPACK_SKIP_ROWS = $0CF3;
1469   GL_UNPACK_SKIP_PIXELS = $0CF4;
1470   GL_UNPACK_ALIGNMENT = $0CF5;
1471   GL_PACK_SWAP_BYTES = $0D00;
1472   GL_PACK_LSB_FIRST = $0D01;
1473   GL_PACK_ROW_LENGTH = $0D02;
1474   GL_PACK_SKIP_ROWS = $0D03;
1475   GL_PACK_SKIP_PIXELS = $0D04;
1476   GL_PACK_ALIGNMENT = $0D05;
1477   GL_MAX_TEXTURE_SIZE = $0D33;
1478   GL_MAX_VIEWPORT_DIMS = $0D3A;
1479   GL_SUBPIXEL_BITS = $0D50;
1480   GL_TEXTURE_1D = $0DE0;
1481   GL_TEXTURE_2D = $0DE1;
1482   GL_POLYGON_OFFSET_UNITS = $2A00;
1483   GL_POLYGON_OFFSET_POINT = $2A01;
1484   GL_POLYGON_OFFSET_LINE = $2A02;
1485   GL_POLYGON_OFFSET_FILL = $8037;
1486   GL_POLYGON_OFFSET_FACTOR = $8038;
1487   GL_TEXTURE_BINDING_1D = $8068;
1488   GL_TEXTURE_BINDING_2D = $8069;
1489   { GetTextureParameter }
1490   GL_TEXTURE_WIDTH = $1000;
1491   GL_TEXTURE_HEIGHT = $1001;
1492   GL_TEXTURE_INTERNAL_FORMAT = $1003;
1493   GL_TEXTURE_BORDER_COLOR = $1004;
1494   GL_TEXTURE_BORDER = $1005;
1495   GL_TEXTURE_RED_SIZE = $805C;
1496   GL_TEXTURE_GREEN_SIZE = $805D;
1497   GL_TEXTURE_BLUE_SIZE = $805E;
1498   GL_TEXTURE_ALPHA_SIZE = $805F;
1499   { HintMode }
1500   GL_DONT_CARE = $1100;
1501   GL_FASTEST = $1101;
1502   GL_NICEST = $1102;
1503   { DataType }
1504   GL_BYTE = $1400;
1505   GL_UNSIGNED_BYTE = $1401;
1506   GL_SHORT = $1402;
1507   GL_UNSIGNED_SHORT = $1403;
1508   GL_INT = $1404;
1509   GL_UNSIGNED_INT = $1405;
1510   GL_FLOAT = $1406;
1511   GL_DOUBLE = $140A;
1512   { LogicOp }
1513   GL_CLEAR = $1500;
1514   GL_AND = $1501;
1515   GL_AND_REVERSE = $1502;
1516   GL_COPY = $1503;
1517   GL_AND_INVERTED = $1504;
1518   GL_NOOP = $1505;
1519   GL_XOR = $1506;
1520   GL_OR = $1507;
1521   GL_NOR = $1508;
1522   GL_EQUIV = $1509;
1523   GL_INVERT = $150A;
1524   GL_OR_REVERSE = $150B;
1525   GL_COPY_INVERTED = $150C;
1526   GL_OR_INVERTED = $150D;
1527   GL_NAND = $150E;
1528   GL_SET = $150F;
1529   { MatrixMode (for gl3.h, FBO attachment type) }
1530   GL_TEXTURE = $1702;
1531   { PixelCopyType }
1532   GL_COLOR = $1800;
1533   GL_DEPTH = $1801;
1534   GL_STENCIL = $1802;
1535   { PixelFormat }
1536   GL_STENCIL_INDEX = $1901;
1537   GL_DEPTH_COMPONENT = $1902;
1538   GL_RED = $1903;
1539   GL_GREEN = $1904;
1540   GL_BLUE = $1905;
1541   GL_ALPHA = $1906;
1542   GL_RGB = $1907;
1543   GL_RGBA = $1908;
1544   { PolygonMode }
1545   GL_POINT = $1B00;
1546   GL_LINE = $1B01;
1547   GL_FILL = $1B02;
1548   { StencilOp }
1549   GL_KEEP = $1E00;
1550   GL_REPLACE = $1E01;
1551   GL_INCR = $1E02;
1552   GL_DECR = $1E03;
1553   { StringName }
1554   GL_VENDOR = $1F00;
1555   GL_RENDERER = $1F01;
1556   GL_VERSION = $1F02;
1557   GL_EXTENSIONS = $1F03;
1558   { TextureMagFilter }
1559   GL_NEAREST = $2600;
1560   GL_LINEAR = $2601;
1561   { TextureMinFilter }
1562   GL_NEAREST_MIPMAP_NEAREST = $2700;
1563   GL_LINEAR_MIPMAP_NEAREST = $2701;
1564   GL_NEAREST_MIPMAP_LINEAR = $2702;
1565   GL_LINEAR_MIPMAP_LINEAR = $2703;
1566   { TextureParameterName }
1567   GL_TEXTURE_MAG_FILTER = $2800;
1568   GL_TEXTURE_MIN_FILTER = $2801;
1569   GL_TEXTURE_WRAP_S = $2802;
1570   GL_TEXTURE_WRAP_T = $2803;
1571   { TextureTarget }
1572   GL_PROXY_TEXTURE_1D = $8063;
1573   GL_PROXY_TEXTURE_2D = $8064;
1574   { TextureWrapMode }
1575   GL_REPEAT = $2901;
1576   { PixelInternalFormat }
1577   GL_R3_G3_B2 = $2A10;
1578   GL_RGB4 = $804F;
1579   GL_RGB5 = $8050;
1580   GL_RGB8 = $8051;
1581   GL_RGB10 = $8052;
1582   GL_RGB12 = $8053;
1583   GL_RGB16 = $8054;
1584   GL_RGBA2 = $8055;
1585   GL_RGBA4 = $8056;
1586   GL_RGB5_A1 = $8057;
1587   GL_RGBA8 = $8058;
1588   GL_RGB10_A2 = $8059;
1589   GL_RGBA12 = $805A;
1590   GL_RGBA16 = $805B;
1591 {$ifdef DGL_DEPRECATED}
1592   GL_ACCUM = $0100;
1593   GL_LOAD = $0101;
1594   GL_RETURN = $0102;
1595   GL_MULT = $0103;
1596   GL_ADD = $0104;
1597   GL_CURRENT_BIT = $00000001;
1598   GL_POINT_BIT = $00000002;
1599   GL_LINE_BIT = $00000004;
1600   GL_POLYGON_BIT = $00000008;
1601   GL_POLYGON_STIPPLE_BIT = $00000010;
1602   GL_PIXEL_MODE_BIT = $00000020;
1603   GL_LIGHTING_BIT = $00000040;
1604   GL_FOG_BIT = $00000080;
1605   GL_ACCUM_BUFFER_BIT = $00000200;
1606   GL_VIEWPORT_BIT = $00000800;
1607   GL_TRANSFORM_BIT = $00001000;
1608   GL_ENABLE_BIT = $00002000;
1609   GL_HINT_BIT = $00008000;
1610   GL_EVAL_BIT = $00010000;
1611   GL_LIST_BIT = $00020000;
1612   GL_TEXTURE_BIT = $00040000;
1613   GL_SCISSOR_BIT = $00080000;
1614   GL_ALL_ATTRIB_BITS = $000FFFFF;
1615   GL_QUADS = $0007;
1616   GL_QUAD_STRIP = $0008;
1617   GL_POLYGON = $0009;
1618   GL_CLIP_PLANE0 = $3000;
1619   GL_CLIP_PLANE1 = $3001;
1620   GL_CLIP_PLANE2 = $3002;
1621   GL_CLIP_PLANE3 = $3003;
1622   GL_CLIP_PLANE4 = $3004;
1623   GL_CLIP_PLANE5 = $3005;
1624   GL_2_BYTES = $1407;
1625   GL_3_BYTES = $1408;
1626   GL_4_BYTES = $1409;
1627   GL_AUX0 = $0409;
1628   GL_AUX1 = $040A;
1629   GL_AUX2 = $040B;
1630   GL_AUX3 = $040C;
1631   GL_STACK_OVERFLOW = $0503;
1632   GL_STACK_UNDERFLOW = $0504;
1633   GL_2D = $0600;
1634   GL_3D = $0601;
1635   GL_3D_COLOR = $0602;
1636   GL_3D_COLOR_TEXTURE = $0603;
1637   GL_4D_COLOR_TEXTURE = $0604;
1638   GL_PASS_THROUGH_TOKEN = $0700;
1639   GL_POINT_TOKEN = $0701;
1640   GL_LINE_TOKEN = $0702;
1641   GL_POLYGON_TOKEN = $0703;
1642   GL_BITMAP_TOKEN = $0704;
1643   GL_DRAW_PIXEL_TOKEN = $0705;
1644   GL_COPY_PIXEL_TOKEN = $0706;
1645   GL_LINE_RESET_TOKEN = $0707;
1646   GL_EXP = $0800;
1647   GL_EXP2 = $0801;
1648   GL_COEFF = $0A00;
1649   GL_ORDER = $0A01;
1650   GL_DOMAIN = $0A02;
1651   GL_CURRENT_COLOR = $0B00;
1652   GL_CURRENT_INDEX = $0B01;
1653   GL_CURRENT_NORMAL = $0B02;
1654   GL_CURRENT_TEXTURE_COORDS = $0B03;
1655   GL_CURRENT_RASTER_COLOR = $0B04;
1656   GL_CURRENT_RASTER_INDEX = $0B05;
1657   GL_CURRENT_RASTER_TEXTURE_COORDS = $0B06;
1658   GL_CURRENT_RASTER_POSITION = $0B07;
1659   GL_CURRENT_RASTER_POSITION_VALID = $0B08;
1660   GL_CURRENT_RASTER_DISTANCE = $0B09;
1661   GL_POINT_SMOOTH = $0B10;
1662   GL_LINE_STIPPLE = $0B24;
1663   GL_LINE_STIPPLE_PATTERN = $0B25;
1664   GL_LINE_STIPPLE_REPEAT = $0B26;
1665   GL_LIST_MODE = $0B30;
1666   GL_MAX_LIST_NESTING = $0B31;
1667   GL_LIST_BASE = $0B32;
1668   GL_LIST_INDEX = $0B33;
1669   GL_POLYGON_MODE = $0B40;
1670   GL_POLYGON_STIPPLE = $0B42;
1671   GL_EDGE_FLAG = $0B43;
1672   GL_LIGHTING = $0B50;
1673   GL_LIGHT_MODEL_LOCAL_VIEWER = $0B51;
1674   GL_LIGHT_MODEL_TWO_SIDE = $0B52;
1675   GL_LIGHT_MODEL_AMBIENT = $0B53;
1676   GL_SHADE_MODEL = $0B54;
1677   GL_COLOR_MATERIAL_FACE = $0B55;
1678   GL_COLOR_MATERIAL_PARAMETER = $0B56;
1679   GL_COLOR_MATERIAL = $0B57;
1680   GL_FOG = $0B60;
1681   GL_FOG_INDEX = $0B61;
1682   GL_FOG_DENSITY = $0B62;
1683   GL_FOG_START = $0B63;
1684   GL_FOG_END = $0B64;
1685   GL_FOG_MODE = $0B65;
1686   GL_FOG_COLOR = $0B66;
1687   GL_ACCUM_CLEAR_VALUE = $0B80;
1688   GL_MATRIX_MODE = $0BA0;
1689   GL_NORMALIZE = $0BA1;
1690   GL_MODELVIEW_STACK_DEPTH = $0BA3;
1691   GL_PROJECTION_STACK_DEPTH = $0BA4;
1692   GL_TEXTURE_STACK_DEPTH = $0BA5;
1693   GL_MODELVIEW_MATRIX = $0BA6;
1694   GL_PROJECTION_MATRIX = $0BA7;
1695   GL_TEXTURE_MATRIX = $0BA8;
1696   GL_ATTRIB_STACK_DEPTH = $0BB0;
1697   GL_CLIENT_ATTRIB_STACK_DEPTH = $0BB1;
1698   GL_ALPHA_TEST = $0BC0;
1699   GL_ALPHA_TEST_FUNC = $0BC1;
1700   GL_ALPHA_TEST_REF = $0BC2;
1701   GL_INDEX_LOGIC_OP = $0BF1;
1702   GL_AUX_BUFFERS = $0C00;
1703   GL_INDEX_CLEAR_VALUE = $0C20;
1704   GL_INDEX_WRITEMASK = $0C21;
1705   GL_INDEX_MODE = $0C30;
1706   GL_RGBA_MODE = $0C31;
1707   GL_RENDER_MODE = $0C40;
1708   GL_PERSPECTIVE_CORRECTION_HINT = $0C50;
1709   GL_POINT_SMOOTH_HINT = $0C51;
1710   GL_FOG_HINT = $0C54;
1711   GL_TEXTURE_GEN_S = $0C60;
1712   GL_TEXTURE_GEN_T = $0C61;
1713   GL_TEXTURE_GEN_R = $0C62;
1714   GL_TEXTURE_GEN_Q = $0C63;
1715   GL_PIXEL_MAP_I_TO_I = $0C70;
1716   GL_PIXEL_MAP_S_TO_S = $0C71;
1717   GL_PIXEL_MAP_I_TO_R = $0C72;
1718   GL_PIXEL_MAP_I_TO_G = $0C73;
1719   GL_PIXEL_MAP_I_TO_B = $0C74;
1720   GL_PIXEL_MAP_I_TO_A = $0C75;
1721   GL_PIXEL_MAP_R_TO_R = $0C76;
1722   GL_PIXEL_MAP_G_TO_G = $0C77;
1723   GL_PIXEL_MAP_B_TO_B = $0C78;
1724   GL_PIXEL_MAP_A_TO_A = $0C79;
1725   GL_PIXEL_MAP_I_TO_I_SIZE = $0CB0;
1726   GL_PIXEL_MAP_S_TO_S_SIZE = $0CB1;
1727   GL_PIXEL_MAP_I_TO_R_SIZE = $0CB2;
1728   GL_PIXEL_MAP_I_TO_G_SIZE = $0CB3;
1729   GL_PIXEL_MAP_I_TO_B_SIZE = $0CB4;
1730   GL_PIXEL_MAP_I_TO_A_SIZE = $0CB5;
1731   GL_PIXEL_MAP_R_TO_R_SIZE = $0CB6;
1732   GL_PIXEL_MAP_G_TO_G_SIZE = $0CB7;
1733   GL_PIXEL_MAP_B_TO_B_SIZE = $0CB8;
1734   GL_PIXEL_MAP_A_TO_A_SIZE = $0CB9;
1735   GL_MAP_COLOR = $0D10;
1736   GL_MAP_STENCIL = $0D11;
1737   GL_INDEX_SHIFT = $0D12;
1738   GL_INDEX_OFFSET = $0D13;
1739   GL_RED_SCALE = $0D14;
1740   GL_RED_BIAS = $0D15;
1741   GL_ZOOM_X = $0D16;
1742   GL_ZOOM_Y = $0D17;
1743   GL_GREEN_SCALE = $0D18;
1744   GL_GREEN_BIAS = $0D19;
1745   GL_BLUE_SCALE = $0D1A;
1746   GL_BLUE_BIAS = $0D1B;
1747   GL_ALPHA_SCALE = $0D1C;
1748   GL_ALPHA_BIAS = $0D1D;
1749   GL_DEPTH_SCALE = $0D1E;
1750   GL_DEPTH_BIAS = $0D1F;
1751   GL_MAX_EVAL_ORDER = $0D30;
1752   GL_MAX_LIGHTS = $0D31;
1753   GL_MAX_CLIP_PLANES = $0D32;
1754   GL_MAX_PIXEL_MAP_TABLE = $0D34;
1755   GL_MAX_ATTRIB_STACK_DEPTH = $0D35;
1756   GL_MAX_MODELVIEW_STACK_DEPTH = $0D36;
1757   GL_MAX_NAME_STACK_DEPTH = $0D37;
1758   GL_MAX_PROJECTION_STACK_DEPTH = $0D38;
1759   GL_MAX_TEXTURE_STACK_DEPTH = $0D39;
1760   GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = $0D3B;
1761   GL_INDEX_BITS = $0D51;
1762   GL_RED_BITS = $0D52;
1763   GL_GREEN_BITS = $0D53;
1764   GL_BLUE_BITS = $0D54;
1765   GL_ALPHA_BITS = $0D55;
1766   GL_DEPTH_BITS = $0D56;
1767   GL_STENCIL_BITS = $0D57;
1768   GL_ACCUM_RED_BITS = $0D58;
1769   GL_ACCUM_GREEN_BITS = $0D59;
1770   GL_ACCUM_BLUE_BITS = $0D5A;
1771   GL_ACCUM_ALPHA_BITS = $0D5B;
1772   GL_NAME_STACK_DEPTH = $0D70;
1773   GL_AUTO_NORMAL = $0D80;
1774   GL_MAP1_COLOR_4 = $0D90;
1775   GL_MAP1_INDEX = $0D91;
1776   GL_MAP1_NORMAL = $0D92;
1777   GL_MAP1_TEXTURE_COORD_1 = $0D93;
1778   GL_MAP1_TEXTURE_COORD_2 = $0D94;
1779   GL_MAP1_TEXTURE_COORD_3 = $0D95;
1780   GL_MAP1_TEXTURE_COORD_4 = $0D96;
1781   GL_MAP1_VERTEX_3 = $0D97;
1782   GL_MAP1_VERTEX_4 = $0D98;
1783   GL_MAP2_COLOR_4 = $0DB0;
1784   GL_MAP2_INDEX = $0DB1;
1785   GL_MAP2_NORMAL = $0DB2;
1786   GL_MAP2_TEXTURE_COORD_1 = $0DB3;
1787   GL_MAP2_TEXTURE_COORD_2 = $0DB4;
1788   GL_MAP2_TEXTURE_COORD_3 = $0DB5;
1789   GL_MAP2_TEXTURE_COORD_4 = $0DB6;
1790   GL_MAP2_VERTEX_3 = $0DB7;
1791   GL_MAP2_VERTEX_4 = $0DB8;
1792   GL_MAP1_GRID_DOMAIN = $0DD0;
1793   GL_MAP1_GRID_SEGMENTS = $0DD1;
1794   GL_MAP2_GRID_DOMAIN = $0DD2;
1795   GL_MAP2_GRID_SEGMENTS = $0DD3;
1796   GL_FEEDBACK_BUFFER_POINTER = $0DF0;
1797   GL_FEEDBACK_BUFFER_SIZE = $0DF1;
1798   GL_FEEDBACK_BUFFER_TYPE = $0DF2;
1799   GL_SELECTION_BUFFER_POINTER = $0DF3;
1800   GL_SELECTION_BUFFER_SIZE = $0DF4;
1801   GL_LIGHT0 = $4000;
1802   GL_LIGHT1 = $4001;
1803   GL_LIGHT2 = $4002;
1804   GL_LIGHT3 = $4003;
1805   GL_LIGHT4 = $4004;
1806   GL_LIGHT5 = $4005;
1807   GL_LIGHT6 = $4006;
1808   GL_LIGHT7 = $4007;
1809   GL_AMBIENT = $1200;
1810   GL_DIFFUSE = $1201;
1811   GL_SPECULAR = $1202;
1812   GL_POSITION = $1203;
1813   GL_SPOT_DIRECTION = $1204;
1814   GL_SPOT_EXPONENT = $1205;
1815   GL_SPOT_CUTOFF = $1206;
1816   GL_CONSTANT_ATTENUATION = $1207;
1817   GL_LINEAR_ATTENUATION = $1208;
1818   GL_QUADRATIC_ATTENUATION = $1209;
1819   GL_COMPILE = $1300;
1820   GL_COMPILE_AND_EXECUTE = $1301;
1821   GL_EMISSION = $1600;
1822   GL_SHININESS = $1601;
1823   GL_AMBIENT_AND_DIFFUSE = $1602;
1824   GL_COLOR_INDEXES = $1603;
1825   GL_MODELVIEW = $1700;
1826   GL_PROJECTION = $1701;
1827   GL_COLOR_INDEX = $1900;
1828   GL_LUMINANCE = $1909;
1829   GL_LUMINANCE_ALPHA = $190A;
1830   GL_BITMAP = $1A00;
1831   GL_RENDER = $1C00;
1832   GL_FEEDBACK = $1C01;
1833   GL_SELECT = $1C02;
1834   GL_FLAT = $1D00;
1835   GL_SMOOTH = $1D01;
1836   GL_S = $2000;
1837   GL_T = $2001;
1838   GL_R = $2002;
1839   GL_Q = $2003;
1840   GL_MODULATE = $2100;
1841   GL_DECAL = $2101;
1842   GL_TEXTURE_ENV_MODE = $2200;
1843   GL_TEXTURE_ENV_COLOR = $2201;
1844   GL_TEXTURE_ENV = $2300;
1845   GL_EYE_LINEAR = $2400;
1846   GL_OBJECT_LINEAR = $2401;
1847   GL_SPHERE_MAP = $2402;
1848   GL_TEXTURE_GEN_MODE = $2500;
1849   GL_OBJECT_PLANE = $2501;
1850   GL_EYE_PLANE = $2502;
1851   GL_CLAMP = $2900;
1852   GL_CLIENT_PIXEL_STORE_BIT = $00000001;
1853   GL_CLIENT_VERTEX_ARRAY_BIT = $00000002;
1854   GL_CLIENT_ALL_ATTRIB_BITS = $FFFFFFFF;
1855   GL_ALPHA4 = $803B;
1856   GL_ALPHA8 = $803C;
1857   GL_ALPHA12 = $803D;
1858   GL_ALPHA16 = $803E;
1859   GL_LUMINANCE4 = $803F;
1860   GL_LUMINANCE8 = $8040;
1861   GL_LUMINANCE12 = $8041;
1862   GL_LUMINANCE16 = $8042;
1863   GL_LUMINANCE4_ALPHA4 = $8043;
1864   GL_LUMINANCE6_ALPHA2 = $8044;
1865   GL_LUMINANCE8_ALPHA8 = $8045;
1866   GL_LUMINANCE12_ALPHA4 = $8046;
1867   GL_LUMINANCE12_ALPHA12 = $8047;
1868   GL_LUMINANCE16_ALPHA16 = $8048;
1869   GL_INTENSITY = $8049;
1870   GL_INTENSITY4 = $804A;
1871   GL_INTENSITY8 = $804B;
1872   GL_INTENSITY12 = $804C;
1873   GL_INTENSITY16 = $804D;
1874   GL_TEXTURE_LUMINANCE_SIZE = $8060;
1875   GL_TEXTURE_INTENSITY_SIZE = $8061;
1876   GL_TEXTURE_PRIORITY = $8066;
1877   GL_TEXTURE_RESIDENT = $8067;
1878   GL_VERTEX_ARRAY = $8074;
1879   GL_NORMAL_ARRAY = $8075;
1880   GL_COLOR_ARRAY = $8076;
1881   GL_INDEX_ARRAY = $8077;
1882   GL_TEXTURE_COORD_ARRAY = $8078;
1883   GL_EDGE_FLAG_ARRAY = $8079;
1884   GL_VERTEX_ARRAY_SIZE = $807A;
1885   GL_VERTEX_ARRAY_TYPE = $807B;
1886   GL_VERTEX_ARRAY_STRIDE = $807C;
1887   GL_NORMAL_ARRAY_TYPE = $807E;
1888   GL_NORMAL_ARRAY_STRIDE = $807F;
1889   GL_COLOR_ARRAY_SIZE = $8081;
1890   GL_COLOR_ARRAY_TYPE = $8082;
1891   GL_COLOR_ARRAY_STRIDE = $8083;
1892   GL_INDEX_ARRAY_TYPE = $8085;
1893   GL_INDEX_ARRAY_STRIDE = $8086;
1894   GL_TEXTURE_COORD_ARRAY_SIZE = $8088;
1895   GL_TEXTURE_COORD_ARRAY_TYPE = $8089;
1896   GL_TEXTURE_COORD_ARRAY_STRIDE = $808A;
1897   GL_EDGE_FLAG_ARRAY_STRIDE = $808C;
1898   GL_VERTEX_ARRAY_POINTER = $808E;
1899   GL_NORMAL_ARRAY_POINTER = $808F;
1900   GL_COLOR_ARRAY_POINTER = $8090;
1901   GL_INDEX_ARRAY_POINTER = $8091;
1902   GL_TEXTURE_COORD_ARRAY_POINTER = $8092;
1903   GL_EDGE_FLAG_ARRAY_POINTER = $8093;
1904   GL_V2F = $2A20;
1905   GL_V3F = $2A21;
1906   GL_C4UB_V2F = $2A22;
1907   GL_C4UB_V3F = $2A23;
1908   GL_C3F_V3F = $2A24;
1909   GL_N3F_V3F = $2A25;
1910   GL_C4F_N3F_V3F = $2A26;
1911   GL_T2F_V3F = $2A27;
1912   GL_T4F_V4F = $2A28;
1913   GL_T2F_C4UB_V3F = $2A29;
1914   GL_T2F_C3F_V3F = $2A2A;
1915   GL_T2F_N3F_V3F = $2A2B;
1916   GL_T2F_C4F_N3F_V3F = $2A2C;
1917   GL_T4F_C4F_N3F_V4F = $2A2D;
1918   GL_COLOR_TABLE_FORMAT_EXT = $80D8;
1919   GL_COLOR_TABLE_WIDTH_EXT = $80D9;
1920   GL_COLOR_TABLE_RED_SIZE_EXT = $80DA;
1921   GL_COLOR_TABLE_GREEN_SIZE_EXT = $80DB;
1922   GL_COLOR_TABLE_BLUE_SIZE_EXT = $80DC;
1923   GL_COLOR_TABLE_ALPHA_SIZE_EXT = $80DD;
1924   GL_COLOR_TABLE_LUMINANCE_SIZE_EXT = $80DE;
1925   GL_COLOR_TABLE_INTENSITY_SIZE_EXT = $80DF;
1926   GL_LOGIC_OP = GL_INDEX_LOGIC_OP;
1927   GL_TEXTURE_COMPONENTS = GL_TEXTURE_INTERNAL_FORMAT;
1928 {$endif}
1929
1930   // GL_VERSION_1_2
1931   GL_UNSIGNED_BYTE_3_3_2 = $8032;
1932   GL_UNSIGNED_SHORT_4_4_4_4 = $8033;
1933   GL_UNSIGNED_SHORT_5_5_5_1 = $8034;
1934   GL_UNSIGNED_INT_8_8_8_8 = $8035;
1935   GL_UNSIGNED_INT_10_10_10_2 = $8036;
1936   GL_TEXTURE_BINDING_3D = $806A;
1937   GL_PACK_SKIP_IMAGES = $806B;
1938   GL_PACK_IMAGE_HEIGHT = $806C;
1939   GL_UNPACK_SKIP_IMAGES = $806D;
1940   GL_UNPACK_IMAGE_HEIGHT = $806E;
1941   GL_TEXTURE_3D = $806F;
1942   GL_PROXY_TEXTURE_3D = $8070;
1943   GL_TEXTURE_DEPTH = $8071;
1944   GL_TEXTURE_WRAP_R = $8072;
1945   GL_MAX_3D_TEXTURE_SIZE = $8073;
1946   GL_UNSIGNED_BYTE_2_3_3_REV = $8362;
1947   GL_UNSIGNED_SHORT_5_6_5 = $8363;
1948   GL_UNSIGNED_SHORT_5_6_5_REV = $8364;
1949   GL_UNSIGNED_SHORT_4_4_4_4_REV = $8365;
1950   GL_UNSIGNED_SHORT_1_5_5_5_REV = $8366;
1951   GL_UNSIGNED_INT_8_8_8_8_REV = $8367;
1952   GL_UNSIGNED_INT_2_10_10_10_REV = $8368;
1953   GL_BGR = $80E0;
1954   GL_BGRA = $80E1;
1955   GL_MAX_ELEMENTS_VERTICES = $80E8;
1956   GL_MAX_ELEMENTS_INDICES = $80E9;
1957   GL_CLAMP_TO_EDGE = $812F;
1958   GL_TEXTURE_MIN_LOD = $813A;
1959   GL_TEXTURE_MAX_LOD = $813B;
1960   GL_TEXTURE_BASE_LEVEL = $813C;
1961   GL_TEXTURE_MAX_LEVEL = $813D;
1962   GL_SMOOTH_POINT_SIZE_RANGE = $0B12;
1963   GL_SMOOTH_POINT_SIZE_GRANULARITY = $0B13;
1964   GL_SMOOTH_LINE_WIDTH_RANGE = $0B22;
1965   GL_SMOOTH_LINE_WIDTH_GRANULARITY = $0B23;
1966   GL_ALIASED_LINE_WIDTH_RANGE = $846E;
1967 {$ifdef DGL_DEPRECATED}
1968   GL_RESCALE_NORMAL = $803A;
1969   GL_LIGHT_MODEL_COLOR_CONTROL = $81F8;
1970   GL_SINGLE_COLOR = $81F9;
1971   GL_SEPARATE_SPECULAR_COLOR = $81FA;
1972   GL_ALIASED_POINT_SIZE_RANGE = $846D;
1973 {$endif}
1974
1975   // GL_VERSION_1_3
1976   GL_TEXTURE0 = $84C0;
1977   GL_TEXTURE1 = $84C1;
1978   GL_TEXTURE2 = $84C2;
1979   GL_TEXTURE3 = $84C3;
1980   GL_TEXTURE4 = $84C4;
1981   GL_TEXTURE5 = $84C5;
1982   GL_TEXTURE6 = $84C6;
1983   GL_TEXTURE7 = $84C7;
1984   GL_TEXTURE8 = $84C8;
1985   GL_TEXTURE9 = $84C9;
1986   GL_TEXTURE10 = $84CA;
1987   GL_TEXTURE11 = $84CB;
1988   GL_TEXTURE12 = $84CC;
1989   GL_TEXTURE13 = $84CD;
1990   GL_TEXTURE14 = $84CE;
1991   GL_TEXTURE15 = $84CF;
1992   GL_TEXTURE16 = $84D0;
1993   GL_TEXTURE17 = $84D1;
1994   GL_TEXTURE18 = $84D2;
1995   GL_TEXTURE19 = $84D3;
1996   GL_TEXTURE20 = $84D4;
1997   GL_TEXTURE21 = $84D5;
1998   GL_TEXTURE22 = $84D6;
1999   GL_TEXTURE23 = $84D7;
2000   GL_TEXTURE24 = $84D8;
2001   GL_TEXTURE25 = $84D9;
2002   GL_TEXTURE26 = $84DA;
2003   GL_TEXTURE27 = $84DB;
2004   GL_TEXTURE28 = $84DC;
2005   GL_TEXTURE29 = $84DD;
2006   GL_TEXTURE30 = $84DE;
2007   GL_TEXTURE31 = $84DF;
2008   GL_ACTIVE_TEXTURE = $84E0;
2009   GL_MULTISAMPLE = $809D;
2010   GL_SAMPLE_ALPHA_TO_COVERAGE = $809E;
2011   GL_SAMPLE_ALPHA_TO_ONE = $809F;
2012   GL_SAMPLE_COVERAGE = $80A0;
2013   GL_SAMPLE_BUFFERS = $80A8;
2014   GL_SAMPLES = $80A9;
2015   GL_SAMPLE_COVERAGE_VALUE = $80AA;
2016   GL_SAMPLE_COVERAGE_INVERT = $80AB;
2017   GL_TEXTURE_CUBE_MAP = $8513;
2018   GL_TEXTURE_BINDING_CUBE_MAP = $8514;
2019   GL_TEXTURE_CUBE_MAP_POSITIVE_X = $8515;
2020   GL_TEXTURE_CUBE_MAP_NEGATIVE_X = $8516;
2021   GL_TEXTURE_CUBE_MAP_POSITIVE_Y = $8517;
2022   GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = $8518;
2023   GL_TEXTURE_CUBE_MAP_POSITIVE_Z = $8519;
2024   GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = $851A;
2025   GL_PROXY_TEXTURE_CUBE_MAP = $851B;
2026   GL_MAX_CUBE_MAP_TEXTURE_SIZE = $851C;
2027   GL_COMPRESSED_RGB = $84ED;
2028   GL_COMPRESSED_RGBA = $84EE;
2029   GL_TEXTURE_COMPRESSION_HINT = $84EF;
2030   GL_TEXTURE_COMPRESSED_IMAGE_SIZE = $86A0;
2031   GL_TEXTURE_COMPRESSED = $86A1;
2032   GL_NUM_COMPRESSED_TEXTURE_FORMATS = $86A2;
2033   GL_COMPRESSED_TEXTURE_FORMATS = $86A3;
2034   GL_CLAMP_TO_BORDER = $812D;
2035 {$ifdef DGL_DEPRECATED}
2036   GL_CLIENT_ACTIVE_TEXTURE = $84E1;
2037   GL_MAX_TEXTURE_UNITS = $84E2;
2038   GL_TRANSPOSE_MODELVIEW_MATRIX = $84E3;
2039   GL_TRANSPOSE_PROJECTION_MATRIX = $84E4;
2040   GL_TRANSPOSE_TEXTURE_MATRIX = $84E5;
2041   GL_TRANSPOSE_COLOR_MATRIX = $84E6;
2042   GL_MULTISAMPLE_BIT = $20000000;
2043   GL_NORMAL_MAP = $8511;
2044   GL_REFLECTION_MAP = $8512;
2045   GL_COMPRESSED_ALPHA = $84E9;
2046   GL_COMPRESSED_LUMINANCE = $84EA;
2047   GL_COMPRESSED_LUMINANCE_ALPHA = $84EB;
2048   GL_COMPRESSED_INTENSITY = $84EC;
2049   GL_COMBINE = $8570;
2050   GL_COMBINE_RGB = $8571;
2051   GL_COMBINE_ALPHA = $8572;
2052   GL_SOURCE0_RGB = $8580;
2053   GL_SOURCE1_RGB = $8581;
2054   GL_SOURCE2_RGB = $8582;
2055   GL_SOURCE0_ALPHA = $8588;
2056   GL_SOURCE1_ALPHA = $8589;
2057   GL_SOURCE2_ALPHA = $858A;
2058   GL_OPERAND0_RGB = $8590;
2059   GL_OPERAND1_RGB = $8591;
2060   GL_OPERAND2_RGB = $8592;
2061   GL_OPERAND0_ALPHA = $8598;
2062   GL_OPERAND1_ALPHA = $8599;
2063   GL_OPERAND2_ALPHA = $859A;
2064   GL_RGB_SCALE = $8573;
2065   GL_ADD_SIGNED = $8574;
2066   GL_INTERPOLATE = $8575;
2067   GL_SUBTRACT = $84E7;
2068   GL_CONSTANT = $8576;
2069   GL_PRIMARY_COLOR = $8577;
2070   GL_PREVIOUS = $8578;
2071   GL_DOT3_RGB = $86AE;
2072   GL_DOT3_RGBA = $86AF;
2073 {$endif}
2074
2075   // GL_VERSION_1_4
2076   GL_BLEND_DST_RGB = $80C8;
2077   GL_BLEND_SRC_RGB = $80C9;
2078   GL_BLEND_DST_ALPHA = $80CA;
2079   GL_BLEND_SRC_ALPHA = $80CB;
2080   GL_POINT_FADE_THRESHOLD_SIZE = $8128;
2081   GL_DEPTH_COMPONENT16 = $81A5;
2082   GL_DEPTH_COMPONENT24 = $81A6;
2083   GL_DEPTH_COMPONENT32 = $81A7;
2084   GL_MIRRORED_REPEAT = $8370;
2085   GL_MAX_TEXTURE_LOD_BIAS = $84FD;
2086   GL_TEXTURE_LOD_BIAS = $8501;
2087   GL_INCR_WRAP = $8507;
2088   GL_DECR_WRAP = $8508;
2089   GL_TEXTURE_DEPTH_SIZE = $884A;
2090   GL_TEXTURE_COMPARE_MODE = $884C;
2091   GL_TEXTURE_COMPARE_FUNC = $884D;
2092 {$ifdef DGL_DEPRECATED}
2093   GL_POINT_SIZE_MIN = $8126;
2094   GL_POINT_SIZE_MAX = $8127;
2095   GL_POINT_DISTANCE_ATTENUATION = $8129;
2096   GL_GENERATE_MIPMAP = $8191;
2097   GL_GENERATE_MIPMAP_HINT = $8192;
2098   GL_FOG_COORDINATE_SOURCE = $8450;
2099   GL_FOG_COORDINATE = $8451;
2100   GL_FRAGMENT_DEPTH = $8452;
2101   GL_CURRENT_FOG_COORDINATE = $8453;
2102   GL_FOG_COORDINATE_ARRAY_TYPE = $8454;
2103   GL_FOG_COORDINATE_ARRAY_STRIDE = $8455;
2104   GL_FOG_COORDINATE_ARRAY_POINTER = $8456;
2105   GL_FOG_COORDINATE_ARRAY = $8457;
2106   GL_COLOR_SUM = $8458;
2107   GL_CURRENT_SECONDARY_COLOR = $8459;
2108   GL_SECONDARY_COLOR_ARRAY_SIZE = $845A;
2109   GL_SECONDARY_COLOR_ARRAY_TYPE = $845B;
2110   GL_SECONDARY_COLOR_ARRAY_STRIDE = $845C;
2111   GL_SECONDARY_COLOR_ARRAY_POINTER = $845D;
2112   GL_SECONDARY_COLOR_ARRAY = $845E;
2113   GL_TEXTURE_FILTER_CONTROL = $8500;
2114   GL_DEPTH_TEXTURE_MODE = $884B;
2115   GL_COMPARE_R_TO_TEXTURE = $884E;
2116 {$endif}
2117
2118   // GL_VERSION_1_5
2119   GL_BUFFER_SIZE = $8764;
2120   GL_BUFFER_USAGE = $8765;
2121   GL_QUERY_COUNTER_BITS = $8864;
2122   GL_CURRENT_QUERY = $8865;
2123   GL_QUERY_RESULT = $8866;
2124   GL_QUERY_RESULT_AVAILABLE = $8867;
2125   GL_ARRAY_BUFFER = $8892;
2126   GL_ELEMENT_ARRAY_BUFFER = $8893;
2127   GL_ARRAY_BUFFER_BINDING = $8894;
2128   GL_ELEMENT_ARRAY_BUFFER_BINDING = $8895;
2129   GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = $889F;
2130   GL_READ_ONLY = $88B8;
2131   GL_WRITE_ONLY = $88B9;
2132   GL_READ_WRITE = $88BA;
2133   GL_BUFFER_ACCESS = $88BB;
2134   GL_BUFFER_MAPPED = $88BC;
2135   GL_BUFFER_MAP_POINTER = $88BD;
2136   GL_STREAM_DRAW = $88E0;
2137   GL_STREAM_READ = $88E1;
2138   GL_STREAM_COPY = $88E2;
2139   GL_STATIC_DRAW = $88E4;
2140   GL_STATIC_READ = $88E5;
2141   GL_STATIC_COPY = $88E6;
2142   GL_DYNAMIC_DRAW = $88E8;
2143   GL_DYNAMIC_READ = $88E9;
2144   GL_DYNAMIC_COPY = $88EA;
2145   GL_SAMPLES_PASSED = $8914;
2146 {$ifdef DGL_DEPRECATED}
2147   GL_VERTEX_ARRAY_BUFFER_BINDING = $8896;
2148   GL_NORMAL_ARRAY_BUFFER_BINDING = $8897;
2149   GL_COLOR_ARRAY_BUFFER_BINDING = $8898;
2150   GL_INDEX_ARRAY_BUFFER_BINDING = $8899;
2151   GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = $889A;
2152   GL_EDGE_FLAG_ARRAY_BUFFER_BINDING = $889B;
2153   GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING = $889C;
2154   GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING = $889D;
2155   GL_WEIGHT_ARRAY_BUFFER_BINDING = $889E;
2156   GL_FOG_COORD_SRC = $8450;
2157   GL_FOG_COORD = $8451;
2158   GL_CURRENT_FOG_COORD = $8453;
2159   GL_FOG_COORD_ARRAY_TYPE = $8454;
2160   GL_FOG_COORD_ARRAY_STRIDE = $8455;
2161   GL_FOG_COORD_ARRAY_POINTER = $8456;
2162   GL_FOG_COORD_ARRAY = $8457;
2163   GL_FOG_COORD_ARRAY_BUFFER_BINDING = $889D;
2164   GL_SRC0_RGB = $8580;
2165   GL_SRC1_RGB = $8581;
2166   GL_SRC2_RGB = $8582;
2167   GL_SRC0_ALPHA = $8588;
2168   GL_SRC1_ALPHA = $8589;
2169   GL_SRC2_ALPHA = $858A;
2170 {$endif}
2171
2172   // GL_VERSION_2_0
2173   GL_BLEND_EQUATION_RGB = $8009;
2174   GL_VERTEX_ATTRIB_ARRAY_ENABLED = $8622;
2175   GL_VERTEX_ATTRIB_ARRAY_SIZE = $8623;
2176   GL_VERTEX_ATTRIB_ARRAY_STRIDE = $8624;
2177   GL_VERTEX_ATTRIB_ARRAY_TYPE = $8625;
2178   GL_CURRENT_VERTEX_ATTRIB = $8626;
2179   GL_VERTEX_PROGRAM_POINT_SIZE = $8642;
2180   GL_VERTEX_ATTRIB_ARRAY_POINTER = $8645;
2181   GL_STENCIL_BACK_FUNC = $8800;
2182   GL_STENCIL_BACK_FAIL = $8801;
2183   GL_STENCIL_BACK_PASS_DEPTH_FAIL = $8802;
2184   GL_STENCIL_BACK_PASS_DEPTH_PASS = $8803;
2185   GL_MAX_DRAW_BUFFERS = $8824;
2186   GL_DRAW_BUFFER0 = $8825;
2187   GL_DRAW_BUFFER1 = $8826;
2188   GL_DRAW_BUFFER2 = $8827;
2189   GL_DRAW_BUFFER3 = $8828;
2190   GL_DRAW_BUFFER4 = $8829;
2191   GL_DRAW_BUFFER5 = $882A;
2192   GL_DRAW_BUFFER6 = $882B;
2193   GL_DRAW_BUFFER7 = $882C;
2194   GL_DRAW_BUFFER8 = $882D;
2195   GL_DRAW_BUFFER9 = $882E;
2196   GL_DRAW_BUFFER10 = $882F;
2197   GL_DRAW_BUFFER11 = $8830;
2198   GL_DRAW_BUFFER12 = $8831;
2199   GL_DRAW_BUFFER13 = $8832;
2200   GL_DRAW_BUFFER14 = $8833;
2201   GL_DRAW_BUFFER15 = $8834;
2202   GL_BLEND_EQUATION_ALPHA = $883D;
2203   GL_MAX_VERTEX_ATTRIBS = $8869;
2204   GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = $886A;
2205   GL_MAX_TEXTURE_IMAGE_UNITS = $8872;
2206   GL_FRAGMENT_SHADER = $8B30;
2207   GL_VERTEX_SHADER = $8B31;
2208   GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = $8B49;
2209   GL_MAX_VERTEX_UNIFORM_COMPONENTS = $8B4A;
2210   GL_MAX_VARYING_FLOATS = $8B4B;
2211   GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = $8B4C;
2212   GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = $8B4D;
2213   GL_SHADER_TYPE = $8B4F;
2214   GL_FLOAT_VEC2 = $8B50;
2215   GL_FLOAT_VEC3 = $8B51;
2216   GL_FLOAT_VEC4 = $8B52;
2217   GL_INT_VEC2 = $8B53;
2218   GL_INT_VEC3 = $8B54;
2219   GL_INT_VEC4 = $8B55;
2220   GL_BOOL = $8B56;
2221   GL_BOOL_VEC2 = $8B57;
2222   GL_BOOL_VEC3 = $8B58;
2223   GL_BOOL_VEC4 = $8B59;
2224   GL_FLOAT_MAT2 = $8B5A;
2225   GL_FLOAT_MAT3 = $8B5B;
2226   GL_FLOAT_MAT4 = $8B5C;
2227   GL_SAMPLER_1D = $8B5D;
2228   GL_SAMPLER_2D = $8B5E;
2229   GL_SAMPLER_3D = $8B5F;
2230   GL_SAMPLER_CUBE = $8B60;
2231   GL_SAMPLER_1D_SHADOW = $8B61;
2232   GL_SAMPLER_2D_SHADOW = $8B62;
2233   GL_DELETE_STATUS = $8B80;
2234   GL_COMPILE_STATUS = $8B81;
2235   GL_LINK_STATUS = $8B82;
2236   GL_VALIDATE_STATUS = $8B83;
2237   GL_INFO_LOG_LENGTH = $8B84;
2238   GL_ATTACHED_SHADERS = $8B85;
2239   GL_ACTIVE_UNIFORMS = $8B86;
2240   GL_ACTIVE_UNIFORM_MAX_LENGTH = $8B87;
2241   GL_SHADER_SOURCE_LENGTH = $8B88;
2242   GL_ACTIVE_ATTRIBUTES = $8B89;
2243   GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = $8B8A;
2244   GL_FRAGMENT_SHADER_DERIVATIVE_HINT = $8B8B;
2245   GL_SHADING_LANGUAGE_VERSION = $8B8C;
2246   GL_CURRENT_PROGRAM = $8B8D;
2247   GL_POINT_SPRITE_COORD_ORIGIN = $8CA0;
2248   GL_LOWER_LEFT = $8CA1;
2249   GL_UPPER_LEFT = $8CA2;
2250   GL_STENCIL_BACK_REF = $8CA3;
2251   GL_STENCIL_BACK_VALUE_MASK = $8CA4;
2252   GL_STENCIL_BACK_WRITEMASK = $8CA5;
2253 {$ifdef DGL_DEPRECATED}
2254   GL_VERTEX_PROGRAM_TWO_SIDE = $8643;
2255   GL_POINT_SPRITE = $8861;
2256   GL_COORD_REPLACE = $8862;
2257   GL_MAX_TEXTURE_COORDS = $8871;
2258 {$endif}
2259
2260   // GL_VERSION_2_1
2261   GL_PIXEL_PACK_BUFFER = $88EB;
2262   GL_PIXEL_UNPACK_BUFFER = $88EC;
2263   GL_PIXEL_PACK_BUFFER_BINDING = $88ED;
2264   GL_PIXEL_UNPACK_BUFFER_BINDING = $88EF;
2265   GL_FLOAT_MAT2x3 = $8B65;
2266   GL_FLOAT_MAT2x4 = $8B66;
2267   GL_FLOAT_MAT3x2 = $8B67;
2268   GL_FLOAT_MAT3x4 = $8B68;
2269   GL_FLOAT_MAT4x2 = $8B69;
2270   GL_FLOAT_MAT4x3 = $8B6A;
2271   GL_SRGB = $8C40;
2272   GL_SRGB8 = $8C41;
2273   GL_SRGB_ALPHA = $8C42;
2274   GL_SRGB8_ALPHA8 = $8C43;
2275   GL_COMPRESSED_SRGB = $8C48;
2276   GL_COMPRESSED_SRGB_ALPHA = $8C49;
2277 {$ifdef DGL_DEPRECATED}
2278   GL_CURRENT_RASTER_SECONDARY_COLOR = $845F;
2279   GL_SLUMINANCE_ALPHA = $8C44;
2280   GL_SLUMINANCE8_ALPHA8 = $8C45;
2281   GL_SLUMINANCE = $8C46;
2282   GL_SLUMINANCE8 = $8C47;
2283   GL_COMPRESSED_SLUMINANCE = $8C4A;
2284   GL_COMPRESSED_SLUMINANCE_ALPHA = $8C4B;
2285 {$endif}
2286
2287   // GL_VERSION_3_0
2288   GL_COMPARE_REF_TO_TEXTURE = $884E;
2289   GL_CLIP_DISTANCE0 = $3000;
2290   GL_CLIP_DISTANCE1 = $3001;
2291   GL_CLIP_DISTANCE2 = $3002;
2292   GL_CLIP_DISTANCE3 = $3003;
2293   GL_CLIP_DISTANCE4 = $3004;
2294   GL_CLIP_DISTANCE5 = $3005;
2295   GL_CLIP_DISTANCE6 = $3006;
2296   GL_CLIP_DISTANCE7 = $3007;
2297   GL_MAX_CLIP_DISTANCES = $0D32;
2298   GL_MAJOR_VERSION = $821B;
2299   GL_MINOR_VERSION = $821C;
2300   GL_NUM_EXTENSIONS = $821D;
2301   GL_CONTEXT_FLAGS = $821E;
2302   GL_DEPTH_BUFFER = $8223;
2303   GL_STENCIL_BUFFER = $8224;
2304   GL_COMPRESSED_RED = $8225;
2305   GL_COMPRESSED_RG = $8226;
2306   GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = $0001;
2307   GL_RGBA32F = $8814;
2308   GL_RGB32F = $8815;
2309   GL_RGBA16F = $881A;
2310   GL_RGB16F = $881B;
2311   GL_VERTEX_ATTRIB_ARRAY_INTEGER = $88FD;
2312   GL_MAX_ARRAY_TEXTURE_LAYERS = $88FF;
2313   GL_MIN_PROGRAM_TEXEL_OFFSET = $8904;
2314   GL_MAX_PROGRAM_TEXEL_OFFSET = $8905;
2315   GL_CLAMP_READ_COLOR = $891C;
2316   GL_FIXED_ONLY = $891D;
2317   GL_MAX_VARYING_COMPONENTS = $8B4B;
2318   GL_TEXTURE_1D_ARRAY = $8C18;
2319   GL_PROXY_TEXTURE_1D_ARRAY = $8C19;
2320   GL_TEXTURE_2D_ARRAY = $8C1A;
2321   GL_PROXY_TEXTURE_2D_ARRAY = $8C1B;
2322   GL_TEXTURE_BINDING_1D_ARRAY = $8C1C;
2323   GL_TEXTURE_BINDING_2D_ARRAY = $8C1D;
2324   GL_R11F_G11F_B10F = $8C3A;
2325   GL_UNSIGNED_INT_10F_11F_11F_REV = $8C3B;
2326   GL_RGB9_E5 = $8C3D;
2327   GL_UNSIGNED_INT_5_9_9_9_REV = $8C3E;
2328   GL_TEXTURE_SHARED_SIZE = $8C3F;
2329   GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = $8C76;
2330   GL_TRANSFORM_FEEDBACK_BUFFER_MODE = $8C7F;
2331   GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = $8C80;
2332   GL_TRANSFORM_FEEDBACK_VARYINGS = $8C83;
2333   GL_TRANSFORM_FEEDBACK_BUFFER_START = $8C84;
2334   GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = $8C85;
2335   GL_PRIMITIVES_GENERATED = $8C87;
2336   GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = $8C88;
2337   GL_RASTERIZER_DISCARD = $8C89;
2338   GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = $8C8A;
2339   GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = $8C8B;
2340   GL_INTERLEAVED_ATTRIBS = $8C8C;
2341   GL_SEPARATE_ATTRIBS = $8C8D;
2342   GL_TRANSFORM_FEEDBACK_BUFFER = $8C8E;
2343   GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = $8C8F;
2344   GL_RGBA32UI = $8D70;
2345   GL_RGB32UI = $8D71;
2346   GL_RGBA16UI = $8D76;
2347   GL_RGB16UI = $8D77;
2348   GL_RGBA8UI = $8D7C;
2349   GL_RGB8UI = $8D7D;
2350   GL_RGBA32I = $8D82;
2351   GL_RGB32I = $8D83;
2352   GL_RGBA16I = $8D88;
2353   GL_RGB16I = $8D89;
2354   GL_RGBA8I = $8D8E;
2355   GL_RGB8I = $8D8F;
2356   GL_RED_INTEGER = $8D94;
2357   GL_GREEN_INTEGER = $8D95;
2358   GL_BLUE_INTEGER = $8D96;
2359   GL_RGB_INTEGER = $8D98;
2360   GL_RGBA_INTEGER = $8D99;
2361   GL_BGR_INTEGER = $8D9A;
2362   GL_BGRA_INTEGER = $8D9B;
2363   GL_SAMPLER_1D_ARRAY = $8DC0;
2364   GL_SAMPLER_2D_ARRAY = $8DC1;
2365   GL_SAMPLER_1D_ARRAY_SHADOW = $8DC3;
2366   GL_SAMPLER_2D_ARRAY_SHADOW = $8DC4;
2367   GL_SAMPLER_CUBE_SHADOW = $8DC5;
2368   GL_UNSIGNED_INT_VEC2 = $8DC6;
2369   GL_UNSIGNED_INT_VEC3 = $8DC7;
2370   GL_UNSIGNED_INT_VEC4 = $8DC8;
2371   GL_INT_SAMPLER_1D = $8DC9;
2372   GL_INT_SAMPLER_2D = $8DCA;
2373   GL_INT_SAMPLER_3D = $8DCB;
2374   GL_INT_SAMPLER_CUBE = $8DCC;
2375   GL_INT_SAMPLER_1D_ARRAY = $8DCE;
2376   GL_INT_SAMPLER_2D_ARRAY = $8DCF;
2377   GL_UNSIGNED_INT_SAMPLER_1D = $8DD1;
2378   GL_UNSIGNED_INT_SAMPLER_2D = $8DD2;
2379   GL_UNSIGNED_INT_SAMPLER_3D = $8DD3;
2380   GL_UNSIGNED_INT_SAMPLER_CUBE = $8DD4;
2381   GL_UNSIGNED_INT_SAMPLER_1D_ARRAY = $8DD6;
2382   GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = $8DD7;
2383   GL_QUERY_WAIT = $8E13;
2384   GL_QUERY_NO_WAIT = $8E14;
2385   GL_QUERY_BY_REGION_WAIT = $8E15;
2386   GL_QUERY_BY_REGION_NO_WAIT = $8E16;
2387   GL_BUFFER_ACCESS_FLAGS = $911F;
2388   GL_BUFFER_MAP_LENGTH = $9120;
2389   GL_BUFFER_MAP_OFFSET = $9121;
2390   { Reuse tokens from ARB_depth_buffer_float }
2391   { reuse GL_DEPTH_COMPONENT32F }
2392   { reuse GL_DEPTH32F_STENCIL8 }
2393   { reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV }
2394   { Reuse tokens from ARB_framebuffer_object }
2395   { reuse GL_INVALID_FRAMEBUFFER_OPERATION }
2396   { reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING }
2397   { reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE }
2398   { reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE }
2399   { reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE }
2400   { reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE }
2401   { reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE }
2402   { reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE }
2403   { reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE }
2404   { reuse GL_FRAMEBUFFER_DEFAULT }
2405   { reuse GL_FRAMEBUFFER_UNDEFINED }
2406   { reuse GL_DEPTH_STENCIL_ATTACHMENT }
2407   { reuse GL_INDEX }
2408   { reuse GL_MAX_RENDERBUFFER_SIZE }
2409   { reuse GL_DEPTH_STENCIL }
2410   { reuse GL_UNSIGNED_INT_24_8 }
2411   { reuse GL_DEPTH24_STENCIL8 }
2412   { reuse GL_TEXTURE_STENCIL_SIZE }
2413   { reuse GL_TEXTURE_RED_TYPE }
2414   { reuse GL_TEXTURE_GREEN_TYPE }
2415   { reuse GL_TEXTURE_BLUE_TYPE }
2416   { reuse GL_TEXTURE_ALPHA_TYPE }
2417   { reuse GL_TEXTURE_DEPTH_TYPE }
2418   { reuse GL_UNSIGNED_NORMALIZED }
2419   { reuse GL_FRAMEBUFFER_BINDING }
2420   { reuse GL_DRAW_FRAMEBUFFER_BINDING }
2421   { reuse GL_RENDERBUFFER_BINDING }
2422   { reuse GL_READ_FRAMEBUFFER }
2423   { reuse GL_DRAW_FRAMEBUFFER }
2424   { reuse GL_READ_FRAMEBUFFER_BINDING }
2425   { reuse GL_RENDERBUFFER_SAMPLES }
2426   { reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE }
2427   { reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME }
2428   { reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL }
2429   { reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE }
2430   { reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER }
2431   { reuse GL_FRAMEBUFFER_COMPLETE }
2432   { reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT }
2433   { reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT }
2434   { reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER }
2435   { reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER }
2436   { reuse GL_FRAMEBUFFER_UNSUPPORTED }
2437   { reuse GL_MAX_COLOR_ATTACHMENTS }
2438   { reuse GL_COLOR_ATTACHMENT0 }
2439   { reuse GL_COLOR_ATTACHMENT1 }
2440   { reuse GL_COLOR_ATTACHMENT2 }
2441   { reuse GL_COLOR_ATTACHMENT3 }
2442   { reuse GL_COLOR_ATTACHMENT4 }
2443   { reuse GL_COLOR_ATTACHMENT5 }
2444   { reuse GL_COLOR_ATTACHMENT6 }
2445   { reuse GL_COLOR_ATTACHMENT7 }
2446   { reuse GL_COLOR_ATTACHMENT8 }
2447   { reuse GL_COLOR_ATTACHMENT9 }
2448   { reuse GL_COLOR_ATTACHMENT10 }
2449   { reuse GL_COLOR_ATTACHMENT11 }
2450   { reuse GL_COLOR_ATTACHMENT12 }
2451   { reuse GL_COLOR_ATTACHMENT13 }
2452   { reuse GL_COLOR_ATTACHMENT14 }
2453   { reuse GL_COLOR_ATTACHMENT15 }
2454   { reuse GL_DEPTH_ATTACHMENT }
2455   { reuse GL_STENCIL_ATTACHMENT }
2456   { reuse GL_FRAMEBUFFER }
2457   { reuse GL_RENDERBUFFER }
2458   { reuse GL_RENDERBUFFER_WIDTH }
2459   { reuse GL_RENDERBUFFER_HEIGHT }
2460   { reuse GL_RENDERBUFFER_INTERNAL_FORMAT }
2461   { reuse GL_STENCIL_INDEX1 }
2462   { reuse GL_STENCIL_INDEX4 }
2463   { reuse GL_STENCIL_INDEX8 }
2464   { reuse GL_STENCIL_INDEX16 }
2465   { reuse GL_RENDERBUFFER_RED_SIZE }
2466   { reuse GL_RENDERBUFFER_GREEN_SIZE }
2467   { reuse GL_RENDERBUFFER_BLUE_SIZE }
2468   { reuse GL_RENDERBUFFER_ALPHA_SIZE }
2469   { reuse GL_RENDERBUFFER_DEPTH_SIZE }
2470   { reuse GL_RENDERBUFFER_STENCIL_SIZE }
2471   { reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE }
2472   { reuse GL_MAX_SAMPLES }
2473   { Reuse tokens from ARB_framebuffer_sRGB }
2474   { reuse GL_FRAMEBUFFER_SRGB }
2475   { Reuse tokens from ARB_half_float_vertex }
2476   { reuse GL_HALF_FLOAT }
2477   { Reuse tokens from ARB_map_buffer_range }
2478   { reuse GL_MAP_READ_BIT }
2479   { reuse GL_MAP_WRITE_BIT }
2480   { reuse GL_MAP_INVALIDATE_RANGE_BIT }
2481   { reuse GL_MAP_INVALIDATE_BUFFER_BIT }
2482   { reuse GL_MAP_FLUSH_EXPLICIT_BIT }
2483   { reuse GL_MAP_UNSYNCHRONIZED_BIT }
2484   { Reuse tokens from ARB_texture_compression_rgtc }
2485   { reuse GL_COMPRESSED_RED_RGTC1 }
2486   { reuse GL_COMPRESSED_SIGNED_RED_RGTC1 }
2487   { reuse GL_COMPRESSED_RG_RGTC2 }
2488   { reuse GL_COMPRESSED_SIGNED_RG_RGTC2 }
2489   { Reuse tokens from ARB_texture_rg }
2490   { reuse GL_RG }
2491   { reuse GL_RG_INTEGER }
2492   { reuse GL_R8 }
2493   { reuse GL_R16 }
2494   { reuse GL_RG8 }
2495   { reuse GL_RG16 }
2496   { reuse GL_R16F }
2497   { reuse GL_R32F }
2498   { reuse GL_RG16F }
2499   { reuse GL_RG32F }
2500   { reuse GL_R8I }
2501   { reuse GL_R8UI }
2502   { reuse GL_R16I }
2503   { reuse GL_R16UI }
2504   { reuse GL_R32I }
2505   { reuse GL_R32UI }
2506   { reuse GL_RG8I }
2507   { reuse GL_RG8UI }
2508   { reuse GL_RG16I }
2509   { reuse GL_RG16UI }
2510   { reuse GL_RG32I }
2511   { reuse GL_RG32UI }
2512   { Reuse tokens from ARB_vertex_array_object }
2513   { reuse GL_VERTEX_ARRAY_BINDING }
2514 {$ifdef DGL_DEPRECATED}
2515   GL_CLAMP_VERTEX_COLOR = $891A;
2516   GL_CLAMP_FRAGMENT_COLOR = $891B;
2517   GL_ALPHA_INTEGER = $8D97;
2518   { Reuse tokens from ARB_framebuffer_object }
2519   { reuse GL_TEXTURE_LUMINANCE_TYPE }
2520   { reuse GL_TEXTURE_INTENSITY_TYPE }
2521 {$endif}
2522
2523   // GL_VERSION_3_1
2524   GL_SAMPLER_2D_RECT = $8B63;
2525   GL_SAMPLER_2D_RECT_SHADOW = $8B64;
2526   GL_SAMPLER_BUFFER = $8DC2;
2527   GL_INT_SAMPLER_2D_RECT = $8DCD;
2528   GL_INT_SAMPLER_BUFFER = $8DD0;
2529   GL_UNSIGNED_INT_SAMPLER_2D_RECT = $8DD5;
2530   GL_UNSIGNED_INT_SAMPLER_BUFFER = $8DD8;
2531   GL_TEXTURE_BUFFER = $8C2A;
2532   GL_MAX_TEXTURE_BUFFER_SIZE = $8C2B;
2533   GL_TEXTURE_BINDING_BUFFER = $8C2C;
2534   GL_TEXTURE_BUFFER_DATA_STORE_BINDING = $8C2D;
2535   GL_TEXTURE_BUFFER_FORMAT = $8C2E;
2536   GL_TEXTURE_RECTANGLE = $84F5;
2537   GL_TEXTURE_BINDING_RECTANGLE = $84F6;
2538   GL_PROXY_TEXTURE_RECTANGLE = $84F7;
2539   GL_MAX_RECTANGLE_TEXTURE_SIZE = $84F8;
2540   GL_RED_SNORM = $8F90;
2541   GL_RG_SNORM = $8F91;
2542   GL_RGB_SNORM = $8F92;
2543   GL_RGBA_SNORM = $8F93;
2544   GL_R8_SNORM = $8F94;
2545   GL_RG8_SNORM = $8F95;
2546   GL_RGB8_SNORM = $8F96;
2547   GL_RGBA8_SNORM = $8F97;
2548   GL_R16_SNORM = $8F98;
2549   GL_RG16_SNORM = $8F99;
2550   GL_RGB16_SNORM = $8F9A;
2551   GL_RGBA16_SNORM = $8F9B;
2552   GL_SIGNED_NORMALIZED = $8F9C;
2553   GL_PRIMITIVE_RESTART = $8F9D;
2554   GL_PRIMITIVE_RESTART_INDEX = $8F9E;
2555   { Reuse tokens from ARB_copy_buffer }
2556   { reuse GL_COPY_READ_BUFFER }
2557   { reuse GL_COPY_WRITE_BUFFER }
2558   { Reuse tokens from ARB_draw_instanced (none) }
2559   { Reuse tokens from ARB_uniform_buffer_object }
2560   { reuse GL_UNIFORM_BUFFER }
2561   { reuse GL_UNIFORM_BUFFER_BINDING }
2562   { reuse GL_UNIFORM_BUFFER_START }
2563   { reuse GL_UNIFORM_BUFFER_SIZE }
2564   { reuse GL_MAX_VERTEX_UNIFORM_BLOCKS }
2565   { reuse GL_MAX_FRAGMENT_UNIFORM_BLOCKS }
2566   { reuse GL_MAX_COMBINED_UNIFORM_BLOCKS }
2567   { reuse GL_MAX_UNIFORM_BUFFER_BINDINGS }
2568   { reuse GL_MAX_UNIFORM_BLOCK_SIZE }
2569   { reuse GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS }
2570   { reuse GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS }
2571   { reuse GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT }
2572   { reuse GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH }
2573   { reuse GL_ACTIVE_UNIFORM_BLOCKS }
2574   { reuse GL_UNIFORM_TYPE }
2575   { reuse GL_UNIFORM_SIZE }
2576   { reuse GL_UNIFORM_NAME_LENGTH }
2577   { reuse GL_UNIFORM_BLOCK_INDEX }
2578   { reuse GL_UNIFORM_OFFSET }
2579   { reuse GL_UNIFORM_ARRAY_STRIDE }
2580   { reuse GL_UNIFORM_MATRIX_STRIDE }
2581   { reuse GL_UNIFORM_IS_ROW_MAJOR }
2582   { reuse GL_UNIFORM_BLOCK_BINDING }
2583   { reuse GL_UNIFORM_BLOCK_DATA_SIZE }
2584   { reuse GL_UNIFORM_BLOCK_NAME_LENGTH }
2585   { reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS }
2586   { reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES }
2587   { reuse GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER }
2588   { reuse GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER }
2589   { reuse GL_INVALID_INDEX }
2590
2591   // GL_VERSION_3_2
2592   GL_CONTEXT_CORE_PROFILE_BIT = $00000001;
2593   GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = $00000002;
2594   GL_LINES_ADJACENCY = $000A;
2595   GL_LINE_STRIP_ADJACENCY = $000B;
2596   GL_TRIANGLES_ADJACENCY = $000C;
2597   GL_TRIANGLE_STRIP_ADJACENCY = $000D;
2598   GL_PROGRAM_POINT_SIZE = $8642;
2599   GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = $8C29;
2600   GL_FRAMEBUFFER_ATTACHMENT_LAYERED = $8DA7;
2601   GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = $8DA8;
2602   GL_GEOMETRY_SHADER = $8DD9;
2603   GL_GEOMETRY_VERTICES_OUT = $8916;
2604   GL_GEOMETRY_INPUT_TYPE = $8917;
2605   GL_GEOMETRY_OUTPUT_TYPE = $8918;
2606   GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = $8DDF;
2607   GL_MAX_GEOMETRY_OUTPUT_VERTICES = $8DE0;
2608   GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = $8DE1;
2609   GL_MAX_VERTEX_OUTPUT_COMPONENTS = $9122;
2610   GL_MAX_GEOMETRY_INPUT_COMPONENTS = $9123;
2611   GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = $9124;
2612   GL_MAX_FRAGMENT_INPUT_COMPONENTS = $9125;
2613   GL_CONTEXT_PROFILE_MASK = $9126;
2614   { reuse GL_MAX_VARYING_COMPONENTS }
2615   { reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER }
2616   { Reuse tokens from ARB_depth_clamp }
2617   { reuse GL_DEPTH_CLAMP }
2618   { Reuse tokens from ARB_draw_elements_base_vertex (none) }
2619   { Reuse tokens from ARB_fragment_coord_conventions (none) }
2620   { Reuse tokens from ARB_provoking_vertex }
2621   { reuse GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION }
2622   { reuse GL_FIRST_VERTEX_CONVENTION }
2623   { reuse GL_LAST_VERTEX_CONVENTION }
2624   { reuse GL_PROVOKING_VERTEX }
2625   { Reuse tokens from ARB_seamless_cube_map }
2626   { reuse GL_TEXTURE_CUBE_MAP_SEAMLESS }
2627   { Reuse tokens from ARB_sync }
2628   { reuse GL_MAX_SERVER_WAIT_TIMEOUT }
2629   { reuse GL_OBJECT_TYPE }
2630   { reuse GL_SYNC_CONDITION }
2631   { reuse GL_SYNC_STATUS }
2632   { reuse GL_SYNC_FLAGS }
2633   { reuse GL_SYNC_FENCE }
2634   { reuse GL_SYNC_GPU_COMMANDS_COMPLETE }
2635   { reuse GL_UNSIGNALED }
2636   { reuse GL_SIGNALED }
2637   { reuse GL_ALREADY_SIGNALED }
2638   { reuse GL_TIMEOUT_EXPIRED }
2639   { reuse GL_CONDITION_SATISFIED }
2640   { reuse GL_WAIT_FAILED }
2641   { reuse GL_TIMEOUT_IGNORED }
2642   { reuse GL_SYNC_FLUSH_COMMANDS_BIT }
2643   { reuse GL_TIMEOUT_IGNORED }
2644   { Reuse tokens from ARB_texture_multisample }
2645   { reuse GL_SAMPLE_POSITION }
2646   { reuse GL_SAMPLE_MASK }
2647   { reuse GL_SAMPLE_MASK_VALUE }
2648   { reuse GL_MAX_SAMPLE_MASK_WORDS }
2649   { reuse GL_TEXTURE_2D_MULTISAMPLE }
2650   { reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE }
2651   { reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY }
2652   { reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY }
2653   { reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE }
2654   { reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY }
2655   { reuse GL_TEXTURE_SAMPLES }
2656   { reuse GL_TEXTURE_FIXED_SAMPLE_LOCATIONS }
2657   { reuse GL_SAMPLER_2D_MULTISAMPLE }
2658   { reuse GL_INT_SAMPLER_2D_MULTISAMPLE }
2659   { reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE }
2660   { reuse GL_SAMPLER_2D_MULTISAMPLE_ARRAY }
2661   { reuse GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY }
2662   { reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY }
2663   { reuse GL_MAX_COLOR_TEXTURE_SAMPLES }
2664   { reuse GL_MAX_DEPTH_TEXTURE_SAMPLES }
2665   { reuse GL_MAX_INTEGER_SAMPLES }
2666   { Don't need to reuse tokens from ARB_vertex_array_bgra since they're already in 1.2 core }
2667
2668   // GL_VERSION_3_3
2669   GL_VERTEX_ATTRIB_ARRAY_DIVISOR = $88FE;
2670   { Reuse tokens from ARB_blend_func_extended }
2671   { reuse GL_SRC1_COLOR }
2672   { reuse GL_ONE_MINUS_SRC1_COLOR }
2673   { reuse GL_ONE_MINUS_SRC1_ALPHA }
2674   { reuse GL_MAX_DUAL_SOURCE_DRAW_BUFFERS }
2675   { Reuse tokens from ARB_explicit_attrib_location (none) }
2676   { Reuse tokens from ARB_occlusion_query2 }
2677   { reuse GL_ANY_SAMPLES_PASSED }
2678   { Reuse tokens from ARB_sampler_objects }
2679   { reuse GL_SAMPLER_BINDING }
2680   { Reuse tokens from ARB_shader_bit_encoding (none) }
2681   { Reuse tokens from ARB_texture_rgb10_a2ui }
2682   { reuse GL_RGB10_A2UI }
2683   { Reuse tokens from ARB_texture_swizzle }
2684   { reuse GL_TEXTURE_SWIZZLE_R }
2685   { reuse GL_TEXTURE_SWIZZLE_G }
2686   { reuse GL_TEXTURE_SWIZZLE_B }
2687   { reuse GL_TEXTURE_SWIZZLE_A }
2688   { reuse GL_TEXTURE_SWIZZLE_RGBA }
2689   { Reuse tokens from ARB_timer_query }
2690   { reuse GL_TIME_ELAPSED }
2691   { reuse GL_TIMESTAMP }
2692   { Reuse tokens from ARB_vertex_type_2_10_10_10_rev }
2693   { reuse GL_INT_2_10_10_10_REV }
2694
2695   // GL_VERSION_4_0
2696   GL_SAMPLE_SHADING = $8C36;
2697   GL_MIN_SAMPLE_SHADING_VALUE = $8C37;
2698   GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = $8E5E;
2699   GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = $8E5F;
2700   GL_TEXTURE_CUBE_MAP_ARRAY = $9009;
2701   GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = $900A;
2702   GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = $900B;
2703   GL_SAMPLER_CUBE_MAP_ARRAY = $900C;
2704   GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = $900D;
2705   GL_INT_SAMPLER_CUBE_MAP_ARRAY = $900E;
2706   GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = $900F;
2707   { Reuse tokens from ARB_texture_query_lod (none) }
2708   { Reuse tokens from ARB_draw_buffers_blend (none) }
2709   { Reuse tokens from ARB_draw_indirect }
2710   { reuse GL_DRAW_INDIRECT_BUFFER }
2711   { reuse GL_DRAW_INDIRECT_BUFFER_BINDING }
2712   { Reuse tokens from ARB_gpu_shader5 }
2713   { reuse GL_GEOMETRY_SHADER_INVOCATIONS }
2714   { reuse GL_MAX_GEOMETRY_SHADER_INVOCATIONS }
2715   { reuse GL_MIN_FRAGMENT_INTERPOLATION_OFFSET }
2716   { reuse GL_MAX_FRAGMENT_INTERPOLATION_OFFSET }
2717   { reuse GL_FRAGMENT_INTERPOLATION_OFFSET_BITS }
2718   { reuse GL_MAX_VERTEX_STREAMS }
2719   { Reuse tokens from ARB_gpu_shader_fp64 }
2720   { reuse GL_DOUBLE_VEC2 }
2721   { reuse GL_DOUBLE_VEC3 }
2722   { reuse GL_DOUBLE_VEC4 }
2723   { reuse GL_DOUBLE_MAT2 }
2724   { reuse GL_DOUBLE_MAT3 }
2725   { reuse GL_DOUBLE_MAT4 }
2726   { reuse GL_DOUBLE_MAT2x3 }
2727   { reuse GL_DOUBLE_MAT2x4 }
2728   { reuse GL_DOUBLE_MAT3x2 }
2729   { reuse GL_DOUBLE_MAT3x4 }
2730   { reuse GL_DOUBLE_MAT4x2 }
2731   { reuse GL_DOUBLE_MAT4x3 }
2732   { Reuse tokens from ARB_shader_subroutine }
2733   { reuse GL_ACTIVE_SUBROUTINES }
2734   { reuse GL_ACTIVE_SUBROUTINE_UNIFORMS }
2735   { reuse GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS }
2736   { reuse GL_ACTIVE_SUBROUTINE_MAX_LENGTH }
2737   { reuse GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH }
2738   { reuse GL_MAX_SUBROUTINES }
2739   { reuse GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS }
2740   { reuse GL_NUM_COMPATIBLE_SUBROUTINES }
2741   { reuse GL_COMPATIBLE_SUBROUTINES }
2742   { Reuse tokens from ARB_tessellation_shader }
2743   { reuse GL_PATCHES }
2744   { reuse GL_PATCH_VERTICES }
2745   { reuse GL_PATCH_DEFAULT_INNER_LEVEL }
2746   { reuse GL_PATCH_DEFAULT_OUTER_LEVEL }
2747   { reuse GL_TESS_CONTROL_OUTPUT_VERTICES }
2748   { reuse GL_TESS_GEN_MODE }
2749   { reuse GL_TESS_GEN_SPACING }
2750   { reuse GL_TESS_GEN_VERTEX_ORDER }
2751   { reuse GL_TESS_GEN_POINT_MODE }
2752   { reuse GL_ISOLINES }
2753   { reuse GL_FRACTIONAL_ODD }
2754   { reuse GL_FRACTIONAL_EVEN }
2755   { reuse GL_MAX_PATCH_VERTICES }
2756   { reuse GL_MAX_TESS_GEN_LEVEL }
2757   { reuse GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS }
2758   { reuse GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS }
2759   { reuse GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS }
2760   { reuse GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS }
2761   { reuse GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS }
2762   { reuse GL_MAX_TESS_PATCH_COMPONENTS }
2763   { reuse GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS }
2764   { reuse GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS }
2765   { reuse GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS }
2766   { reuse GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS }
2767   { reuse GL_MAX_TESS_CONTROL_INPUT_COMPONENTS }
2768   { reuse GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS }
2769   { reuse GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS }
2770   { reuse GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS }
2771   { reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER }
2772   { reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER }
2773   { reuse GL_TESS_EVALUATION_SHADER }
2774   { reuse GL_TESS_CONTROL_SHADER }
2775   { Reuse tokens from ARB_texture_buffer_object_rgb32 (none) }
2776   { Reuse tokens from ARB_transform_feedback2 }
2777   { reuse GL_TRANSFORM_FEEDBACK }
2778   { reuse GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED }
2779   { reuse GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE }
2780   { reuse GL_TRANSFORM_FEEDBACK_BINDING }
2781   { Reuse tokens from ARB_transform_feedback3 }
2782   { reuse GL_MAX_TRANSFORM_FEEDBACK_BUFFERS }
2783   { reuse GL_MAX_VERTEX_STREAMS }
2784
2785   // GL_VERSION_4_1
2786   { Reuse tokens from ARB_ES2_compatibility }
2787   { reuse GL_FIXED }
2788   { reuse GL_IMPLEMENTATION_COLOR_READ_TYPE }
2789   { reuse GL_IMPLEMENTATION_COLOR_READ_FORMAT }
2790   { reuse GL_LOW_FLOAT }
2791   { reuse GL_MEDIUM_FLOAT }
2792   { reuse GL_HIGH_FLOAT }
2793   { reuse GL_LOW_INT }
2794   { reuse GL_MEDIUM_INT }
2795   { reuse GL_HIGH_INT }
2796   { reuse GL_SHADER_COMPILER }
2797   { reuse GL_NUM_SHADER_BINARY_FORMATS }
2798   { reuse GL_MAX_VERTEX_UNIFORM_VECTORS }
2799   { reuse GL_MAX_VARYING_VECTORS }
2800   { reuse GL_MAX_FRAGMENT_UNIFORM_VECTORS }
2801   { reuse GL_RGB565 }
2802   { Reuse tokens from ARB_get_program_binary }
2803   { reuse GL_PROGRAM_BINARY_RETRIEVABLE_HINT }
2804   { reuse GL_PROGRAM_BINARY_LENGTH }
2805   { reuse GL_NUM_PROGRAM_BINARY_FORMATS }
2806   { reuse GL_PROGRAM_BINARY_FORMATS }
2807   { Reuse tokens from ARB_separate_shader_objects }
2808   { reuse GL_VERTEX_SHADER_BIT }
2809   { reuse GL_FRAGMENT_SHADER_BIT }
2810   { reuse GL_GEOMETRY_SHADER_BIT }
2811   { reuse GL_TESS_CONTROL_SHADER_BIT }
2812   { reuse GL_TESS_EVALUATION_SHADER_BIT }
2813   { reuse GL_ALL_SHADER_BITS }
2814   { reuse GL_PROGRAM_SEPARABLE }
2815   { reuse GL_ACTIVE_PROGRAM }
2816   { reuse GL_PROGRAM_PIPELINE_BINDING }
2817   { Reuse tokens from ARB_shader_precision (none) }
2818   { Reuse tokens from ARB_vertex_attrib_64bit - all are in GL 3.0 and 4.0 already }
2819   { Reuse tokens from ARB_viewport_array - some are in GL 1.1 and ARB_provoking_vertex already }
2820   { reuse GL_MAX_VIEWPORTS }
2821   { reuse GL_VIEWPORT_SUBPIXEL_BITS }
2822   { reuse GL_VIEWPORT_BOUNDS_RANGE }
2823   { reuse GL_LAYER_PROVOKING_VERTEX }
2824   { reuse GL_VIEWPORT_INDEX_PROVOKING_VERTEX }
2825   { reuse GL_UNDEFINED_VERTEX }
2826
2827   // GL_VERSION_4_2
2828   { Reuse tokens from ARB_base_instance (none) }
2829   { Reuse tokens from ARB_shading_language_420pack (none) }
2830   { Reuse tokens from ARB_transform_feedback_instanced (none) }
2831   { Reuse tokens from ARB_compressed_texture_pixel_storage }
2832   { reuse GL_UNPACK_COMPRESSED_BLOCK_WIDTH }
2833   { reuse GL_UNPACK_COMPRESSED_BLOCK_HEIGHT }
2834   { reuse GL_UNPACK_COMPRESSED_BLOCK_DEPTH }
2835   { reuse GL_UNPACK_COMPRESSED_BLOCK_SIZE }
2836   { reuse GL_PACK_COMPRESSED_BLOCK_WIDTH }
2837   { reuse GL_PACK_COMPRESSED_BLOCK_HEIGHT }
2838   { reuse GL_PACK_COMPRESSED_BLOCK_DEPTH }
2839   { reuse GL_PACK_COMPRESSED_BLOCK_SIZE }
2840   { Reuse tokens from ARB_conservative_depth (none) }
2841   { Reuse tokens from ARB_internalformat_query }
2842   { reuse GL_NUM_SAMPLE_COUNTS }
2843   { Reuse tokens from ARB_map_buffer_alignment }
2844   { reuse GL_MIN_MAP_BUFFER_ALIGNMENT }
2845   { Reuse tokens from ARB_shader_atomic_counters }
2846   { reuse GL_ATOMIC_COUNTER_BUFFER }
2847   { reuse GL_ATOMIC_COUNTER_BUFFER_BINDING }
2848   { reuse GL_ATOMIC_COUNTER_BUFFER_START }
2849   { reuse GL_ATOMIC_COUNTER_BUFFER_SIZE }
2850   { reuse GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE }
2851   { reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS }
2852   { reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES }
2853   { reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER }
2854   { reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER }
2855   { reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER }
2856   { reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER }
2857   { reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER }
2858   { reuse GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS }
2859   { reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS }
2860   { reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS }
2861   { reuse GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS }
2862   { reuse GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS }
2863   { reuse GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS }
2864   { reuse GL_MAX_VERTEX_ATOMIC_COUNTERS }
2865   { reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS }
2866   { reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS }
2867   { reuse GL_MAX_GEOMETRY_ATOMIC_COUNTERS }
2868   { reuse GL_MAX_FRAGMENT_ATOMIC_COUNTERS }
2869   { reuse GL_MAX_COMBINED_ATOMIC_COUNTERS }
2870   { reuse GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE }
2871   { reuse GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS }
2872   { reuse GL_ACTIVE_ATOMIC_COUNTER_BUFFERS }
2873   { reuse GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX }
2874   { reuse GL_UNSIGNED_INT_ATOMIC_COUNTER }
2875   { Reuse tokens from ARB_shader_image_load_store }
2876   { reuse GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT }
2877   { reuse GL_ELEMENT_ARRAY_BARRIER_BIT }
2878   { reuse GL_UNIFORM_BARRIER_BIT }
2879   { reuse GL_TEXTURE_FETCH_BARRIER_BIT }
2880   { reuse GL_SHADER_IMAGE_ACCESS_BARRIER_BIT }
2881   { reuse GL_COMMAND_BARRIER_BIT }
2882   { reuse GL_PIXEL_BUFFER_BARRIER_BIT }
2883   { reuse GL_TEXTURE_UPDATE_BARRIER_BIT }
2884   { reuse GL_BUFFER_UPDATE_BARRIER_BIT }
2885   { reuse GL_FRAMEBUFFER_BARRIER_BIT }
2886   { reuse GL_TRANSFORM_FEEDBACK_BARRIER_BIT }
2887   { reuse GL_ATOMIC_COUNTER_BARRIER_BIT }
2888   { reuse GL_ALL_BARRIER_BITS }
2889   { reuse GL_MAX_IMAGE_UNITS }
2890   { reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS }
2891   { reuse GL_IMAGE_BINDING_NAME }
2892   { reuse GL_IMAGE_BINDING_LEVEL }
2893   { reuse GL_IMAGE_BINDING_LAYERED }
2894   { reuse GL_IMAGE_BINDING_LAYER }
2895   { reuse GL_IMAGE_BINDING_ACCESS }
2896   { reuse GL_IMAGE_1D }
2897   { reuse GL_IMAGE_2D }
2898   { reuse GL_IMAGE_3D }
2899   { reuse GL_IMAGE_2D_RECT }
2900   { reuse GL_IMAGE_CUBE }
2901   { reuse GL_IMAGE_BUFFER }
2902   { reuse GL_IMAGE_1D_ARRAY }
2903   { reuse GL_IMAGE_2D_ARRAY }
2904   { reuse GL_IMAGE_CUBE_MAP_ARRAY }
2905   { reuse GL_IMAGE_2D_MULTISAMPLE }
2906   { reuse GL_IMAGE_2D_MULTISAMPLE_ARRAY }
2907   { reuse GL_INT_IMAGE_1D }
2908   { reuse GL_INT_IMAGE_2D }
2909   { reuse GL_INT_IMAGE_3D }
2910   { reuse GL_INT_IMAGE_2D_RECT }
2911   { reuse GL_INT_IMAGE_CUBE }
2912   { reuse GL_INT_IMAGE_BUFFER }
2913   { reuse GL_INT_IMAGE_1D_ARRAY }
2914   { reuse GL_INT_IMAGE_2D_ARRAY }
2915   { reuse GL_INT_IMAGE_CUBE_MAP_ARRAY }
2916   { reuse GL_INT_IMAGE_2D_MULTISAMPLE }
2917   { reuse GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY }
2918   { reuse GL_UNSIGNED_INT_IMAGE_1D }
2919   { reuse GL_UNSIGNED_INT_IMAGE_2D }
2920   { reuse GL_UNSIGNED_INT_IMAGE_3D }
2921   { reuse GL_UNSIGNED_INT_IMAGE_2D_RECT }
2922   { reuse GL_UNSIGNED_INT_IMAGE_CUBE }
2923   { reuse GL_UNSIGNED_INT_IMAGE_BUFFER }
2924   { reuse GL_UNSIGNED_INT_IMAGE_1D_ARRAY }
2925   { reuse GL_UNSIGNED_INT_IMAGE_2D_ARRAY }
2926   { reuse GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY }
2927   { reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE }
2928   { reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY }
2929   { reuse GL_MAX_IMAGE_SAMPLES }
2930   { reuse GL_IMAGE_BINDING_FORMAT }
2931   { reuse GL_IMAGE_FORMAT_COMPATIBILITY_TYPE }
2932   { reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE }
2933   { reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS }
2934   { reuse GL_MAX_VERTEX_IMAGE_UNIFORMS }
2935   { reuse GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS }
2936   { reuse GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS }
2937   { reuse GL_MAX_GEOMETRY_IMAGE_UNIFORMS }
2938   { reuse GL_MAX_FRAGMENT_IMAGE_UNIFORMS }
2939   { reuse GL_MAX_COMBINED_IMAGE_UNIFORMS }
2940   { Reuse tokens from ARB_shading_language_packing (none) }
2941   { Reuse tokens from ARB_texture_storage }
2942   { reuse GL_TEXTURE_IMMUTABLE_FORMAT }
2943
2944   // GL_VERSION_4_3
2945   GL_NUM_SHADING_LANGUAGE_VERSIONS  = $82E9;
2946   GL_VERTEX_ATTRIB_ARRAY_LONG = $874E;
2947   { Reuse tokens from ARB_arrays_of_arrays (none, GLSL only) }
2948   { Reuse tokens from ARB_fragment_layer_viewport (none, GLSL only) }
2949   { Reuse tokens from ARB_shader_image_size (none, GLSL only) }
2950   { Reuse tokens from ARB_ES3_compatibility }
2951   { reuse GL_COMPRESSED_RGB8_ETC2 }
2952   { reuse GL_COMPRESSED_SRGB8_ETC2 }
2953   { reuse GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 }
2954   { reuse GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 }
2955   { reuse GL_COMPRESSED_RGBA8_ETC2_EAC }
2956   { reuse GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC }
2957   { reuse GL_COMPRESSED_R11_EAC }
2958   { reuse GL_COMPRESSED_SIGNED_R11_EAC }
2959   { reuse GL_COMPRESSED_RG11_EAC }
2960   { reuse GL_COMPRESSED_SIGNED_RG11_EAC }
2961   { reuse GL_PRIMITIVE_RESTART_FIXED_INDEX }
2962   { reuse GL_ANY_SAMPLES_PASSED_CONSERVATIVE }
2963   { reuse GL_MAX_ELEMENT_INDEX }
2964   { Reuse tokens from ARB_clear_buffer_object (none) }
2965   { Reuse tokens from ARB_compute_shader }
2966   { reuse GL_COMPUTE_SHADER }
2967   { reuse GL_MAX_COMPUTE_UNIFORM_BLOCKS }
2968   { reuse GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS }
2969   { reuse GL_MAX_COMPUTE_IMAGE_UNIFORMS }
2970   { reuse GL_MAX_COMPUTE_SHARED_MEMORY_SIZE }
2971   { reuse GL_MAX_COMPUTE_UNIFORM_COMPONENTS }
2972   { reuse GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS }
2973   { reuse GL_MAX_COMPUTE_ATOMIC_COUNTERS }
2974   { reuse GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS }
2975   { reuse GL_MAX_COMPUTE_LOCAL_INVOCATIONS }
2976   { reuse GL_MAX_COMPUTE_WORK_GROUP_COUNT }
2977   { reuse GL_MAX_COMPUTE_WORK_GROUP_SIZE }
2978   { reuse GL_COMPUTE_LOCAL_WORK_SIZE }
2979   { reuse GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER }
2980   { reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER }
2981   { reuse GL_DISPATCH_INDIRECT_BUFFER }
2982   { reuse GL_DISPATCH_INDIRECT_BUFFER_BINDING }
2983   { Reuse tokens from ARB_copy_image (none) }
2984   { Reuse tokens from KHR_debug }
2985   { reuse GL_DEBUG_OUTPUT_SYNCHRONOUS }
2986   { reuse GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH }
2987   { reuse GL_DEBUG_CALLBACK_FUNCTION }
2988   { reuse GL_DEBUG_CALLBACK_USER_PARAM }
2989   { reuse GL_DEBUG_SOURCE_API }
2990   { reuse GL_DEBUG_SOURCE_WINDOW_SYSTEM }
2991   { reuse GL_DEBUG_SOURCE_SHADER_COMPILER }
2992   { reuse GL_DEBUG_SOURCE_THIRD_PARTY }
2993   { reuse GL_DEBUG_SOURCE_APPLICATION }
2994   { reuse GL_DEBUG_SOURCE_OTHER }
2995   { reuse GL_DEBUG_TYPE_ERROR }
2996   { reuse GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR }
2997   { reuse GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR }
2998   { reuse GL_DEBUG_TYPE_PORTABILITY }
2999   { reuse GL_DEBUG_TYPE_PERFORMANCE }
3000   { reuse GL_DEBUG_TYPE_OTHER }
3001   { reuse GL_MAX_DEBUG_MESSAGE_LENGTH }
3002   { reuse GL_MAX_DEBUG_LOGGED_MESSAGES }
3003   { reuse GL_DEBUG_LOGGED_MESSAGES }
3004   { reuse GL_DEBUG_SEVERITY_HIGH }
3005   { reuse GL_DEBUG_SEVERITY_MEDIUM }
3006   { reuse GL_DEBUG_SEVERITY_LOW }
3007   { reuse GL_DEBUG_TYPE_MARKER }
3008   { reuse GL_DEBUG_TYPE_PUSH_GROUP }
3009   { reuse GL_DEBUG_TYPE_POP_GROUP }
3010   { reuse GL_DEBUG_SEVERITY_NOTIFICATION }
3011   { reuse GL_MAX_DEBUG_GROUP_STACK_DEPTH }
3012   { reuse GL_DEBUG_GROUP_STACK_DEPTH }
3013   { reuse GL_BUFFER }
3014   { reuse GL_SHADER }
3015   { reuse GL_PROGRAM }
3016   { reuse GL_QUERY }
3017   { reuse GL_PROGRAM_PIPELINE }
3018   { reuse GL_SAMPLER }
3019   { reuse GL_DISPLAY_LIST }
3020   { reuse GL_MAX_LABEL_LENGTH }
3021   { reuse GL_DEBUG_OUTPUT }
3022   { reuse GL_CONTEXT_FLAG_DEBUG_BIT }
3023   { reuse GL_STACK_UNDERFLOW }
3024   { reuse GL_STACK_OVERFLOW }
3025   { Reuse tokens from ARB_explicit_uniform_location }
3026   { reuse GL_MAX_UNIFORM_LOCATIONS }
3027   { Reuse tokens from ARB_framebuffer_no_attachments }
3028   { reuse GL_FRAMEBUFFER_DEFAULT_WIDTH }
3029   { reuse GL_FRAMEBUFFER_DEFAULT_HEIGHT }
3030   { reuse GL_FRAMEBUFFER_DEFAULT_LAYERS }
3031   { reuse GL_FRAMEBUFFER_DEFAULT_SAMPLES }
3032   { reuse GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS }
3033   { reuse GL_MAX_FRAMEBUFFER_WIDTH }
3034   { reuse GL_MAX_FRAMEBUFFER_HEIGHT }
3035   { reuse GL_MAX_FRAMEBUFFER_LAYERS }
3036   { reuse GL_MAX_FRAMEBUFFER_SAMPLES }
3037   { Reuse tokens from ARB_internalformat_query2 }
3038   { reuse GL_INTERNALFORMAT_SUPPORTED }
3039   { reuse GL_INTERNALFORMAT_PREFERRED }
3040   { reuse GL_INTERNALFORMAT_RED_SIZE }
3041   { reuse GL_INTERNALFORMAT_GREEN_SIZE }
3042   { reuse GL_INTERNALFORMAT_BLUE_SIZE }
3043   { reuse GL_INTERNALFORMAT_ALPHA_SIZE }
3044   { reuse GL_INTERNALFORMAT_DEPTH_SIZE }
3045   { reuse GL_INTERNALFORMAT_STENCIL_SIZE }
3046   { reuse GL_INTERNALFORMAT_SHARED_SIZE }
3047   { reuse GL_INTERNALFORMAT_RED_TYPE }
3048   { reuse GL_INTERNALFORMAT_GREEN_TYPE }
3049   { reuse GL_INTERNALFORMAT_BLUE_TYPE }
3050   { reuse GL_INTERNALFORMAT_ALPHA_TYPE }
3051   { reuse GL_INTERNALFORMAT_DEPTH_TYPE }
3052   { reuse GL_INTERNALFORMAT_STENCIL_TYPE }
3053   { reuse GL_MAX_WIDTH }
3054   { reuse GL_MAX_HEIGHT }
3055   { reuse GL_MAX_DEPTH }
3056   { reuse GL_MAX_LAYERS }
3057   { reuse GL_MAX_COMBINED_DIMENSIONS }
3058   { reuse GL_COLOR_COMPONENTS }
3059   { reuse GL_DEPTH_COMPONENTS }
3060   { reuse GL_STENCIL_COMPONENTS }
3061   { reuse GL_COLOR_RENDERABLE }
3062   { reuse GL_DEPTH_RENDERABLE }
3063   { reuse GL_STENCIL_RENDERABLE }
3064   { reuse GL_FRAMEBUFFER_RENDERABLE }
3065   { reuse GL_FRAMEBUFFER_RENDERABLE_LAYERED }
3066   { reuse GL_FRAMEBUFFER_BLEND }
3067   { reuse GL_READ_PIXELS }
3068   { reuse GL_READ_PIXELS_FORMAT }
3069   { reuse GL_READ_PIXELS_TYPE }
3070   { reuse GL_TEXTURE_IMAGE_FORMAT }
3071   { reuse GL_TEXTURE_IMAGE_TYPE }
3072   { reuse GL_GET_TEXTURE_IMAGE_FORMAT }
3073   { reuse GL_GET_TEXTURE_IMAGE_TYPE }
3074   { reuse GL_MIPMAP }
3075   { reuse GL_MANUAL_GENERATE_MIPMAP }
3076   { reuse GL_AUTO_GENERATE_MIPMAP }
3077   { reuse GL_COLOR_ENCODING }
3078   { reuse GL_SRGB_READ }
3079   { reuse GL_SRGB_WRITE }
3080   { reuse GL_FILTER }
3081   { reuse GL_VERTEX_TEXTURE }
3082   { reuse GL_TESS_CONTROL_TEXTURE }
3083   { reuse GL_TESS_EVALUATION_TEXTURE }
3084   { reuse GL_GEOMETRY_TEXTURE }
3085   { reuse GL_FRAGMENT_TEXTURE }
3086   { reuse GL_COMPUTE_TEXTURE }
3087   { reuse GL_TEXTURE_SHADOW }
3088   { reuse GL_TEXTURE_GATHER }
3089   { reuse GL_TEXTURE_GATHER_SHADOW }
3090   { reuse GL_SHADER_IMAGE_LOAD }
3091   { reuse GL_SHADER_IMAGE_STORE }
3092   { reuse GL_SHADER_IMAGE_ATOMIC }
3093   { reuse GL_IMAGE_TEXEL_SIZE }
3094   { reuse GL_IMAGE_COMPATIBILITY_CLASS }
3095   { reuse GL_IMAGE_PIXEL_FORMAT }
3096   { reuse GL_IMAGE_PIXEL_TYPE }
3097   { reuse GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST }
3098   { reuse GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST }
3099   { reuse GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE }
3100   { reuse GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE }
3101   { reuse GL_TEXTURE_COMPRESSED_BLOCK_WIDTH }
3102   { reuse GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT }
3103   { reuse GL_TEXTURE_COMPRESSED_BLOCK_SIZE }
3104   { reuse GL_CLEAR_BUFFER }
3105   { reuse GL_TEXTURE_VIEW }
3106   { reuse GL_VIEW_COMPATIBILITY_CLASS }
3107   { reuse GL_FULL_SUPPORT }
3108   { reuse GL_CAVEAT_SUPPORT }
3109   { reuse GL_IMAGE_CLASS_4_X_32 }
3110   { reuse GL_IMAGE_CLASS_2_X_32 }
3111   { reuse GL_IMAGE_CLASS_1_X_32 }
3112   { reuse GL_IMAGE_CLASS_4_X_16 }
3113   { reuse GL_IMAGE_CLASS_2_X_16 }
3114   { reuse GL_IMAGE_CLASS_1_X_16 }
3115   { reuse GL_IMAGE_CLASS_4_X_8 }
3116   { reuse GL_IMAGE_CLASS_2_X_8 }
3117   { reuse GL_IMAGE_CLASS_1_X_8 }
3118   { reuse GL_IMAGE_CLASS_11_11_10 }
3119   { reuse GL_IMAGE_CLASS_10_10_10_2 }
3120   { reuse GL_VIEW_CLASS_128_BITS }
3121   { reuse GL_VIEW_CLASS_96_BITS }
3122   { reuse GL_VIEW_CLASS_64_BITS }
3123   { reuse GL_VIEW_CLASS_48_BITS }
3124   { reuse GL_VIEW_CLASS_32_BITS }
3125   { reuse GL_VIEW_CLASS_24_BITS }
3126   { reuse GL_VIEW_CLASS_16_BITS }
3127   { reuse GL_VIEW_CLASS_8_BITS }
3128   { reuse GL_VIEW_CLASS_S3TC_DXT1_RGB }
3129   { reuse GL_VIEW_CLASS_S3TC_DXT1_RGBA }
3130   { reuse GL_VIEW_CLASS_S3TC_DXT3_RGBA }
3131   { reuse GL_VIEW_CLASS_S3TC_DXT5_RGBA }
3132   { reuse GL_VIEW_CLASS_RGTC1_RED }
3133   { reuse GL_VIEW_CLASS_RGTC2_RG }
3134   { reuse GL_VIEW_CLASS_BPTC_UNORM }
3135   { reuse GL_VIEW_CLASS_BPTC_FLOAT }
3136   { Reuse tokens from ARB_invalidate_subdata (none) }
3137   { Reuse tokens from ARB_multi_draw_indirect (none) }
3138   { Reuse tokens from ARB_program_interface_query }
3139   { reuse GL_UNIFORM }
3140   { reuse GL_UNIFORM_BLOCK }
3141   { reuse GL_PROGRAM_INPUT }
3142   { reuse GL_PROGRAM_OUTPUT }
3143   { reuse GL_BUFFER_VARIABLE }
3144   { reuse GL_SHADER_STORAGE_BLOCK }
3145   { reuse GL_VERTEX_SUBROUTINE }
3146   { reuse GL_TESS_CONTROL_SUBROUTINE }
3147   { reuse GL_TESS_EVALUATION_SUBROUTINE }
3148   { reuse GL_GEOMETRY_SUBROUTINE }
3149   { reuse GL_FRAGMENT_SUBROUTINE }
3150   { reuse GL_COMPUTE_SUBROUTINE }
3151   { reuse GL_VERTEX_SUBROUTINE_UNIFORM }
3152   { reuse GL_TESS_CONTROL_SUBROUTINE_UNIFORM }
3153   { reuse GL_TESS_EVALUATION_SUBROUTINE_UNIFORM }
3154   { reuse GL_GEOMETRY_SUBROUTINE_UNIFORM }
3155   { reuse GL_FRAGMENT_SUBROUTINE_UNIFORM }
3156   { reuse GL_COMPUTE_SUBROUTINE_UNIFORM }
3157   { reuse GL_TRANSFORM_FEEDBACK_VARYING }
3158   { reuse GL_ACTIVE_RESOURCES }
3159   { reuse GL_MAX_NAME_LENGTH }
3160   { reuse GL_MAX_NUM_ACTIVE_VARIABLES }
3161   { reuse GL_MAX_NUM_COMPATIBLE_SUBROUTINES }
3162   { reuse GL_NAME_LENGTH }
3163   { reuse GL_TYPE }
3164   { reuse GL_ARRAY_SIZE }
3165   { reuse GL_OFFSET }
3166   { reuse GL_BLOCK_INDEX }
3167   { reuse GL_ARRAY_STRIDE }
3168   { reuse GL_MATRIX_STRIDE }
3169   { reuse GL_IS_ROW_MAJOR }
3170   { reuse GL_ATOMIC_COUNTER_BUFFER_INDEX }
3171   { reuse GL_BUFFER_BINDING }
3172   { reuse GL_BUFFER_DATA_SIZE }
3173   { reuse GL_NUM_ACTIVE_VARIABLES }
3174   { reuse GL_ACTIVE_VARIABLES }
3175   { reuse GL_REFERENCED_BY_VERTEX_SHADER }
3176   { reuse GL_REFERENCED_BY_TESS_CONTROL_SHADER }
3177   { reuse GL_REFERENCED_BY_TESS_EVALUATION_SHADER }
3178   { reuse GL_REFERENCED_BY_GEOMETRY_SHADER }
3179   { reuse GL_REFERENCED_BY_FRAGMENT_SHADER }
3180   { reuse GL_REFERENCED_BY_COMPUTE_SHADER }
3181   { reuse GL_TOP_LEVEL_ARRAY_SIZE }
3182   { reuse GL_TOP_LEVEL_ARRAY_STRIDE }
3183   { reuse GL_LOCATION }
3184   { reuse GL_LOCATION_INDEX }
3185   { reuse GL_IS_PER_PATCH }
3186   { Reuse tokens from ARB_robust_buffer_access_behavior (none) }
3187   { Reuse tokens from ARB_shader_storage_buffer_object }
3188   { reuse GL_SHADER_STORAGE_BUFFER }
3189   { reuse GL_SHADER_STORAGE_BUFFER_BINDING }
3190   { reuse GL_SHADER_STORAGE_BUFFER_START }
3191   { reuse GL_SHADER_STORAGE_BUFFER_SIZE }
3192   { reuse GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS }
3193   { reuse GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS }
3194   { reuse GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS }
3195   { reuse GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS }
3196   { reuse GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS }
3197   { reuse GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS }
3198   { reuse GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS }
3199   { reuse GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS }
3200   { reuse GL_MAX_SHADER_STORAGE_BLOCK_SIZE }
3201   { reuse GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT }
3202   { reuse GL_SHADER_STORAGE_BARRIER_BIT }
3203   { reuse GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES }
3204   { Reuse tokens from ARB_stencil_texturing }
3205   { reuse GL_DEPTH_STENCIL_TEXTURE_MODE }
3206   { Reuse tokens from ARB_texture_buffer_range }
3207   { reuse GL_TEXTURE_BUFFER_OFFSET }
3208   { reuse GL_TEXTURE_BUFFER_SIZE }
3209   { reuse GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT }
3210   { Reuse tokens from ARB_texture_query_levels (none) }
3211   { Reuse tokens from ARB_texture_storage_multisample (none) }
3212   { Reuse tokens from ARB_texture_view }
3213   { reuse GL_TEXTURE_VIEW_MIN_LEVEL }
3214   { reuse GL_TEXTURE_VIEW_NUM_LEVELS }
3215   { reuse GL_TEXTURE_VIEW_MIN_LAYER }
3216   { reuse GL_TEXTURE_VIEW_NUM_LAYERS }
3217   { reuse GL_TEXTURE_IMMUTABLE_LEVELS }
3218   { Reuse tokens from ARB_vertex_attrib_binding }
3219   { reuse GL_VERTEX_ATTRIB_BINDING }
3220   { reuse GL_VERTEX_ATTRIB_RELATIVE_OFFSET }
3221   { reuse GL_VERTEX_BINDING_DIVISOR }
3222   { reuse GL_VERTEX_BINDING_OFFSET }
3223   { reuse GL_VERTEX_BINDING_STRIDE }
3224   { reuse GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET }
3225   { reuse GL_MAX_VERTEX_ATTRIB_BINDINGS }
3226
3227
3228   // GL_3DFX_multisample
3229   GL_MULTISAMPLE_3DFX = $86B2;
3230   GL_SAMPLE_BUFFERS_3DFX = $86B3;
3231   GL_SAMPLES_3DFX = $86B4;
3232   GL_MULTISAMPLE_BIT_3DFX = $20000000;
3233
3234   // GL_3DFX_texture_compression_FXT1
3235   GL_COMPRESSED_RGB_FXT1_3DFX = $86B0;
3236   GL_COMPRESSED_RGBA_FXT1_3DFX = $86B1;
3237
3238   // GL_APPLE_client_storage
3239   GL_UNPACK_CLIENT_STORAGE_APPLE = $85B2;
3240
3241   // GL_APPLE_element_array
3242   GL_ELEMENT_ARRAY_APPLE = $8A0C;
3243   GL_ELEMENT_ARRAY_TYPE_APPLE = $8A0D;
3244   GL_ELEMENT_ARRAY_POINTER_APPLE = $8A0E;
3245
3246   // GL_APPLE_fence
3247   GL_DRAW_PIXELS_APPLE = $8A0A;
3248   GL_FENCE_APPLE = $8A0B;
3249
3250   // GL_APPLE_specular_vector
3251   GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE = $85B0;
3252
3253   // GL_APPLE_transform_hint
3254   GL_TRANSFORM_HINT_APPLE = $85B1;
3255
3256   // GL_APPLE_vertex_array_object
3257   GL_VERTEX_ARRAY_BINDING_APPLE = $85B5;
3258
3259   // GL_APPLE_vertex_array_range
3260   GL_VERTEX_ARRAY_RANGE_APPLE = $851D;
3261   GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE = $851E;
3262   GL_VERTEX_ARRAY_STORAGE_HINT_APPLE = $851F;
3263   GL_VERTEX_ARRAY_RANGE_POINTER_APPLE = $8521;
3264   GL_STORAGE_CLIENT_APPLE = $85B4;
3265   GL_STORAGE_CACHED_APPLE = $85BE;
3266   GL_STORAGE_SHARED_APPLE = $85BF;
3267
3268   // GL_APPLE_ycbcr_422
3269   GL_YCBCR_422_APPLE = $85B9;
3270   GL_UNSIGNED_SHORT_8_8_APPLE = $85BA;
3271   GL_UNSIGNED_SHORT_8_8_REV_APPLE = $85BB;
3272
3273   // GL_APPLE_texture_range
3274   GL_TEXTURE_RANGE_LENGTH_APPLE = $85B7;
3275   GL_TEXTURE_RANGE_POINTER_APPLE = $85B8;
3276   GL_TEXTURE_STORAGE_HINT_APPLE = $85BC;
3277   GL_STORAGE_PRIVATE_APPLE = $85BD;
3278   { reuse GL_STORAGE_CACHED_APPLE }
3279   { reuse GL_STORAGE_SHARED_APPLE }
3280
3281   // GL_APPLE_float_pixels
3282   GL_HALF_APPLE = $140B;
3283   GL_RGBA_FLOAT32_APPLE = $8814;
3284   GL_RGB_FLOAT32_APPLE = $8815;
3285   GL_ALPHA_FLOAT32_APPLE = $8816;
3286   GL_INTENSITY_FLOAT32_APPLE = $8817;
3287   GL_LUMINANCE_FLOAT32_APPLE = $8818;
3288   GL_LUMINANCE_ALPHA_FLOAT32_APPLE = $8819;
3289   GL_RGBA_FLOAT16_APPLE = $881A;
3290   GL_RGB_FLOAT16_APPLE = $881B;
3291   GL_ALPHA_FLOAT16_APPLE = $881C;
3292   GL_INTENSITY_FLOAT16_APPLE = $881D;
3293   GL_LUMINANCE_FLOAT16_APPLE = $881E;
3294   GL_LUMINANCE_ALPHA_FLOAT16_APPLE = $881F;
3295   GL_COLOR_FLOAT_APPLE = $8A0F;
3296
3297   // GL_APPLE_vertex_program_evaluators
3298   GL_VERTEX_ATTRIB_MAP1_APPLE = $8A00;
3299   GL_VERTEX_ATTRIB_MAP2_APPLE = $8A01;
3300   GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE = $8A02;
3301   GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE = $8A03;
3302   GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE = $8A04;
3303   GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE = $8A05;
3304   GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE = $8A06;
3305   GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE = $8A07;
3306   GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE = $8A08;
3307   GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE = $8A09;
3308
3309   // GL_APPLE_aux_depth_stencil
3310   GL_AUX_DEPTH_STENCIL_APPLE = $8A14;
3311
3312   // GL_APPLE_object_purgeable
3313   GL_BUFFER_OBJECT_APPLE = $85B3;
3314   GL_RELEASED_APPLE = $8A19;
3315   GL_VOLATILE_APPLE = $8A1A;
3316   GL_RETAINED_APPLE = $8A1B;
3317   GL_UNDEFINED_APPLE = $8A1C;
3318   GL_PURGEABLE_APPLE = $8A1D;
3319
3320   // GL_APPLE_row_bytes
3321   GL_PACK_ROW_BYTES_APPLE = $8A15;
3322   GL_UNPACK_ROW_BYTES_APPLE = $8A16;
3323   
3324   // GL_APPLE_rgb_422
3325   { reuse GL_UNSIGNED_SHORT_8_8_APPLE }
3326   { reuse GL_UNSIGNED_SHORT_8_8_REV_APPLE }  
3327   
3328   // GL_ARB_depth_texture
3329   GL_DEPTH_COMPONENT16_ARB = $81A5;
3330   GL_DEPTH_COMPONENT24_ARB = $81A6;
3331   GL_DEPTH_COMPONENT32_ARB = $81A7;
3332   GL_TEXTURE_DEPTH_SIZE_ARB = $884A;
3333   GL_DEPTH_TEXTURE_MODE_ARB = $884B;
3334
3335   // GL_ARB_fragment_program
3336   GL_FRAGMENT_PROGRAM_ARB = $8804;
3337   GL_PROGRAM_ALU_INSTRUCTIONS_ARB = $8805;
3338   GL_PROGRAM_TEX_INSTRUCTIONS_ARB = $8806;
3339   GL_PROGRAM_TEX_INDIRECTIONS_ARB = $8807;
3340   GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = $8808;
3341   GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = $8809;
3342   GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = $880A;
3343   GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = $880B;
3344   GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = $880C;
3345   GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = $880D;
3346   GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = $880E;
3347   GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = $880F;
3348   GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = $8810;
3349   GL_MAX_TEXTURE_COORDS_ARB = $8871;
3350   GL_MAX_TEXTURE_IMAGE_UNITS_ARB = $8872;
3351
3352   // GL_ARB_imaging
3353   GL_CONSTANT_COLOR_ARB = $8001;
3354   GL_CONSTANT_COLOR = $8001;
3355   GL_ONE_MINUS_CONSTANT_COLOR = $8002;
3356   GL_CONSTANT_ALPHA = $8003;
3357   GL_ONE_MINUS_CONSTANT_ALPHA = $8004;
3358   GL_BLEND_COLOR = $8005;
3359   GL_FUNC_ADD = $8006;
3360   GL_MIN = $8007;
3361   GL_MAX = $8008;
3362   GL_BLEND_EQUATION = $8009;
3363   GL_FUNC_SUBTRACT = $800A;
3364   GL_FUNC_REVERSE_SUBTRACT = $800B;
3365 {$ifdef DGL_DEPRECATED}
3366   GL_CONVOLUTION_1D = $8010;
3367   GL_CONVOLUTION_2D = $8011;
3368   GL_SEPARABLE_2D = $8012;
3369   GL_CONVOLUTION_BORDER_MODE = $8013;
3370   GL_CONVOLUTION_FILTER_SCALE = $8014;
3371   GL_CONVOLUTION_FILTER_BIAS = $8015;
3372   GL_REDUCE = $8016;
3373   GL_CONVOLUTION_FORMAT = $8017;
3374   GL_CONVOLUTION_WIDTH = $8018;
3375   GL_CONVOLUTION_HEIGHT = $8019;
3376   GL_MAX_CONVOLUTION_WIDTH = $801A;
3377   GL_MAX_CONVOLUTION_HEIGHT = $801B;
3378   GL_POST_CONVOLUTION_RED_SCALE = $801C;
3379   GL_POST_CONVOLUTION_GREEN_SCALE = $801D;
3380   GL_POST_CONVOLUTION_BLUE_SCALE = $801E;
3381   GL_POST_CONVOLUTION_ALPHA_SCALE = $801F;
3382   GL_POST_CONVOLUTION_RED_BIAS = $8020;
3383   GL_POST_CONVOLUTION_GREEN_BIAS = $8021;
3384   GL_POST_CONVOLUTION_BLUE_BIAS = $8022;
3385   GL_POST_CONVOLUTION_ALPHA_BIAS = $8023;
3386   GL_HISTOGRAM = $8024;
3387   GL_PROXY_HISTOGRAM = $8025;
3388   GL_HISTOGRAM_WIDTH = $8026;
3389   GL_HISTOGRAM_FORMAT = $8027;
3390   GL_HISTOGRAM_RED_SIZE = $8028;
3391   GL_HISTOGRAM_GREEN_SIZE = $8029;
3392   GL_HISTOGRAM_BLUE_SIZE = $802A;
3393   GL_HISTOGRAM_ALPHA_SIZE = $802B;
3394   GL_HISTOGRAM_LUMINANCE_SIZE = $802C;
3395   GL_HISTOGRAM_SINK = $802D;
3396   GL_MINMAX = $802E;
3397   GL_MINMAX_FORMAT = $802F;
3398   GL_MINMAX_SINK = $8030;
3399   GL_TABLE_TOO_LARGE = $8031;
3400   GL_COLOR_MATRIX = $80B1;
3401   GL_COLOR_MATRIX_STACK_DEPTH = $80B2;
3402   GL_MAX_COLOR_MATRIX_STACK_DEPTH = $80B3;
3403   GL_POST_COLOR_MATRIX_RED_SCALE = $80B4;
3404   GL_POST_COLOR_MATRIX_GREEN_SCALE = $80B5;
3405   GL_POST_COLOR_MATRIX_BLUE_SCALE = $80B6;
3406   GL_POST_COLOR_MATRIX_ALPHA_SCALE = $80B7;
3407   GL_POST_COLOR_MATRIX_RED_BIAS = $80B8;
3408   GL_POST_COLOR_MATRIX_GREEN_BIAS = $80B9;
3409   GL_POST_COLOR_MATRIX_BLUE_BIAS = $80BA;
3410   GL_POST_COLOR_MATRIX_ALPHA_BIAS = $80BB;
3411   GL_COLOR_TABLE = $80D0;
3412   GL_POST_CONVOLUTION_COLOR_TABLE = $80D1;
3413   GL_POST_COLOR_MATRIX_COLOR_TABLE = $80D2;
3414   GL_PROXY_COLOR_TABLE = $80D3;
3415   GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = $80D4;
3416   GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = $80D5;
3417   GL_COLOR_TABLE_SCALE = $80D6;
3418   GL_COLOR_TABLE_BIAS = $80D7;
3419   GL_COLOR_TABLE_FORMAT = $80D8;
3420   GL_COLOR_TABLE_WIDTH = $80D9;
3421   GL_COLOR_TABLE_RED_SIZE = $80DA;
3422   GL_COLOR_TABLE_GREEN_SIZE = $80DB;
3423   GL_COLOR_TABLE_BLUE_SIZE = $80DC;
3424   GL_COLOR_TABLE_ALPHA_SIZE = $80DD;
3425   GL_COLOR_TABLE_LUMINANCE_SIZE = $80DE;
3426   GL_COLOR_TABLE_INTENSITY_SIZE = $80DF;
3427   GL_CONSTANT_BORDER = $8151;
3428   GL_REPLICATE_BORDER = $8153;
3429   GL_CONVOLUTION_BORDER_COLOR = $8154;
3430 {$endif}
3431
3432   // GL_ARB_matrix_palette
3433   GL_MATRIX_PALETTE_ARB = $8840;
3434   GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = $8841;
3435   GL_MAX_PALETTE_MATRICES_ARB = $8842;
3436   GL_CURRENT_PALETTE_MATRIX_ARB = $8843;
3437   GL_MATRIX_INDEX_ARRAY_ARB = $8844;
3438   GL_CURRENT_MATRIX_INDEX_ARB = $8845;
3439   GL_MATRIX_INDEX_ARRAY_SIZE_ARB = $8846;
3440   GL_MATRIX_INDEX_ARRAY_TYPE_ARB = $8847;
3441   GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = $8848;
3442   GL_MATRIX_INDEX_ARRAY_POINTER_ARB = $8849;
3443
3444   // GL_ARB_multisample
3445   GL_MULTISAMPLE_ARB = $809D;
3446   GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = $809E;
3447   GL_SAMPLE_ALPHA_TO_ONE_ARB = $809F;
3448   GL_SAMPLE_COVERAGE_ARB = $80A0;
3449   GL_SAMPLE_BUFFERS_ARB = $80A8;
3450   GL_SAMPLES_ARB = $80A9;
3451   GL_SAMPLE_COVERAGE_VALUE_ARB = $80AA;
3452   GL_SAMPLE_COVERAGE_INVERT_ARB = $80AB;
3453   GL_MULTISAMPLE_BIT_ARB = $20000000;
3454
3455   // GL_ARB_multitexture
3456   GL_TEXTURE0_ARB = $84C0;
3457   GL_TEXTURE1_ARB = $84C1;
3458   GL_TEXTURE2_ARB = $84C2;
3459   GL_TEXTURE3_ARB = $84C3;
3460   GL_TEXTURE4_ARB = $84C4;
3461   GL_TEXTURE5_ARB = $84C5;
3462   GL_TEXTURE6_ARB = $84C6;
3463   GL_TEXTURE7_ARB = $84C7;
3464   GL_TEXTURE8_ARB = $84C8;
3465   GL_TEXTURE9_ARB = $84C9;
3466   GL_TEXTURE10_ARB = $84CA;
3467   GL_TEXTURE11_ARB = $84CB;
3468   GL_TEXTURE12_ARB = $84CC;
3469   GL_TEXTURE13_ARB = $84CD;
3470   GL_TEXTURE14_ARB = $84CE;
3471   GL_TEXTURE15_ARB = $84CF;
3472   GL_TEXTURE16_ARB = $84D0;
3473   GL_TEXTURE17_ARB = $84D1;
3474   GL_TEXTURE18_ARB = $84D2;
3475   GL_TEXTURE19_ARB = $84D3;
3476   GL_TEXTURE20_ARB = $84D4;
3477   GL_TEXTURE21_ARB = $84D5;
3478   GL_TEXTURE22_ARB = $84D6;
3479   GL_TEXTURE23_ARB = $84D7;
3480   GL_TEXTURE24_ARB = $84D8;
3481   GL_TEXTURE25_ARB = $84D9;
3482   GL_TEXTURE26_ARB = $84DA;
3483   GL_TEXTURE27_ARB = $84DB;
3484   GL_TEXTURE28_ARB = $84DC;
3485   GL_TEXTURE29_ARB = $84DD;
3486   GL_TEXTURE30_ARB = $84DE;
3487   GL_TEXTURE31_ARB = $84DF;
3488   GL_ACTIVE_TEXTURE_ARB = $84E0;
3489   GL_CLIENT_ACTIVE_TEXTURE_ARB = $84E1;
3490   GL_MAX_TEXTURE_UNITS_ARB = $84E2;
3491
3492   // GL_ARB_point_parameters
3493   GL_POINT_SIZE_MIN_ARB = $8126;
3494   GL_POINT_SIZE_MAX_ARB = $8127;
3495   GL_POINT_FADE_THRESHOLD_SIZE_ARB = $8128;
3496   GL_POINT_DISTANCE_ATTENUATION_ARB = $8129;
3497
3498   // GL_ARB_shadow
3499   GL_TEXTURE_COMPARE_MODE_ARB = $884C;
3500   GL_TEXTURE_COMPARE_FUNC_ARB = $884D;
3501   GL_COMPARE_R_TO_TEXTURE_ARB = $884E;
3502
3503   // GL_ARB_shadow_ambient
3504   GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = $80BF;
3505
3506   // GL_ARB_texture_border_clamp
3507   GL_CLAMP_TO_BORDER_ARB = $812D;
3508
3509   // GL_ARB_texture_compression
3510   GL_COMPRESSED_ALPHA_ARB = $84E9;
3511   GL_COMPRESSED_LUMINANCE_ARB = $84EA;
3512   GL_COMPRESSED_LUMINANCE_ALPHA_ARB = $84EB;
3513   GL_COMPRESSED_INTENSITY_ARB = $84EC;
3514   GL_COMPRESSED_RGB_ARB = $84ED;
3515   GL_COMPRESSED_RGBA_ARB = $84EE;
3516   GL_TEXTURE_COMPRESSION_HINT_ARB = $84EF;
3517   GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = $86A0;
3518   GL_TEXTURE_COMPRESSED_ARB = $86A1;
3519   GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB = $86A2;
3520   GL_COMPRESSED_TEXTURE_FORMATS_ARB = $86A3;
3521
3522   // GL_ARB_texture_cube_map
3523   GL_NORMAL_MAP_ARB = $8511;
3524   GL_REFLECTION_MAP_ARB = $8512;
3525   GL_TEXTURE_CUBE_MAP_ARB = $8513;
3526   GL_TEXTURE_BINDING_CUBE_MAP_ARB = $8514;
3527   GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = $8515;
3528   GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = $8516;
3529   GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = $8517;
3530   GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = $8518;
3531   GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = $8519;
3532   GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = $851A;
3533   GL_PROXY_TEXTURE_CUBE_MAP_ARB = $851B;
3534   GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB = $851C;
3535
3536   // GL_ARB_texture_env_combine
3537   GL_COMBINE_ARB = $8570;
3538   GL_COMBINE_RGB_ARB = $8571;
3539   GL_COMBINE_ALPHA_ARB = $8572;
3540   GL_SOURCE0_RGB_ARB = $8580;
3541   GL_SOURCE1_RGB_ARB = $8581;
3542   GL_SOURCE2_RGB_ARB = $8582;
3543   GL_SOURCE0_ALPHA_ARB = $8588;
3544   GL_SOURCE1_ALPHA_ARB = $8589;
3545   GL_SOURCE2_ALPHA_ARB = $858A;
3546   GL_OPERAND0_RGB_ARB = $8590;
3547   GL_OPERAND1_RGB_ARB = $8591;
3548   GL_OPERAND2_RGB_ARB = $8592;
3549   GL_OPERAND0_ALPHA_ARB = $8598;
3550   GL_OPERAND1_ALPHA_ARB = $8599;
3551   GL_OPERAND2_ALPHA_ARB = $859A;
3552   GL_RGB_SCALE_ARB = $8573;
3553   GL_ADD_SIGNED_ARB = $8574;
3554   GL_INTERPOLATE_ARB = $8575;
3555   GL_SUBTRACT_ARB = $84E7;
3556   GL_CONSTANT_ARB = $8576;
3557   GL_PRIMARY_COLOR_ARB = $8577;
3558   GL_PREVIOUS_ARB = $8578;
3559
3560   // GL_ARB_texture_env_dot3
3561   GL_DOT3_RGB_ARB = $86AE;
3562   GL_DOT3_RGBA_ARB = $86AF;
3563
3564   // GL_ARB_texture_mirrored_repeat
3565   GL_MIRRORED_REPEAT_ARB = $8370;
3566
3567   // GL_ARB_transpose_matrix
3568   GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = $84E3;
3569   GL_TRANSPOSE_PROJECTION_MATRIX_ARB = $84E4;
3570   GL_TRANSPOSE_TEXTURE_MATRIX_ARB = $84E5;
3571   GL_TRANSPOSE_COLOR_MATRIX_ARB = $84E6;
3572
3573   // GL_ARB_vertex_blend
3574   GL_MAX_VERTEX_UNITS_ARB = $86A4;
3575   GL_ACTIVE_VERTEX_UNITS_ARB = $86A5;
3576   GL_WEIGHT_SUM_UNITY_ARB = $86A6;
3577   GL_VERTEX_BLEND_ARB = $86A7;
3578   GL_CURRENT_WEIGHT_ARB = $86A8;
3579   GL_WEIGHT_ARRAY_TYPE_ARB = $86A9;
3580   GL_WEIGHT_ARRAY_STRIDE_ARB = $86AA;
3581   GL_WEIGHT_ARRAY_SIZE_ARB = $86AB;
3582   GL_WEIGHT_ARRAY_POINTER_ARB = $86AC;
3583   GL_WEIGHT_ARRAY_ARB = $86AD;
3584   GL_MODELVIEW0_ARB = $1700;
3585   GL_MODELVIEW1_ARB = $850A;
3586   GL_MODELVIEW2_ARB = $8722;
3587   GL_MODELVIEW3_ARB = $8723;
3588   GL_MODELVIEW4_ARB = $8724;
3589   GL_MODELVIEW5_ARB = $8725;
3590   GL_MODELVIEW6_ARB = $8726;
3591   GL_MODELVIEW7_ARB = $8727;
3592   GL_MODELVIEW8_ARB = $8728;
3593   GL_MODELVIEW9_ARB = $8729;
3594   GL_MODELVIEW10_ARB = $872A;
3595   GL_MODELVIEW11_ARB = $872B;
3596   GL_MODELVIEW12_ARB = $872C;
3597   GL_MODELVIEW13_ARB = $872D;
3598   GL_MODELVIEW14_ARB = $872E;
3599   GL_MODELVIEW15_ARB = $872F;
3600   GL_MODELVIEW16_ARB = $8730;
3601   GL_MODELVIEW17_ARB = $8731;
3602   GL_MODELVIEW18_ARB = $8732;
3603   GL_MODELVIEW19_ARB = $8733;
3604   GL_MODELVIEW20_ARB = $8734;
3605   GL_MODELVIEW21_ARB = $8735;
3606   GL_MODELVIEW22_ARB = $8736;
3607   GL_MODELVIEW23_ARB = $8737;
3608   GL_MODELVIEW24_ARB = $8738;
3609   GL_MODELVIEW25_ARB = $8739;
3610   GL_MODELVIEW26_ARB = $873A;
3611   GL_MODELVIEW27_ARB = $873B;
3612   GL_MODELVIEW28_ARB = $873C;
3613   GL_MODELVIEW29_ARB = $873D;
3614   GL_MODELVIEW30_ARB = $873E;
3615   GL_MODELVIEW31_ARB = $873F;
3616
3617   // GL_ARB_vertex_buffer_object
3618   GL_BUFFER_SIZE_ARB = $8764;
3619   GL_BUFFER_USAGE_ARB = $8765;
3620   GL_ARRAY_BUFFER_ARB = $8892;
3621   GL_ELEMENT_ARRAY_BUFFER_ARB = $8893;
3622   GL_ARRAY_BUFFER_BINDING_ARB = $8894;
3623   GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB = $8895;
3624   GL_VERTEX_ARRAY_BUFFER_BINDING_ARB = $8896;
3625   GL_NORMAL_ARRAY_BUFFER_BINDING_ARB = $8897;
3626   GL_COLOR_ARRAY_BUFFER_BINDING_ARB = $8898;
3627   GL_INDEX_ARRAY_BUFFER_BINDING_ARB = $8899;
3628   GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB = $889A;
3629   GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB = $889B;
3630   GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = $889C;
3631   GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = $889D;
3632   GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB = $889E;
3633   GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = $889F;
3634   GL_READ_ONLY_ARB = $88B8;
3635   GL_WRITE_ONLY_ARB = $88B9;
3636   GL_READ_WRITE_ARB = $88BA;
3637   GL_BUFFER_ACCESS_ARB = $88BB;
3638   GL_BUFFER_MAPPED_ARB = $88BC;
3639   GL_BUFFER_MAP_POINTER_ARB = $88BD;
3640   GL_STREAM_DRAW_ARB = $88E0;
3641   GL_STREAM_READ_ARB = $88E1;
3642   GL_STREAM_COPY_ARB = $88E2;
3643   GL_STATIC_DRAW_ARB = $88E4;
3644   GL_STATIC_READ_ARB = $88E5;
3645   GL_STATIC_COPY_ARB = $88E6;
3646   GL_DYNAMIC_DRAW_ARB = $88E8;
3647   GL_DYNAMIC_READ_ARB = $88E9;
3648   GL_DYNAMIC_COPY_ARB = $88EA;
3649
3650   // GL_ARB_vertex_program
3651   GL_COLOR_SUM_ARB = $8458;
3652   GL_VERTEX_PROGRAM_ARB = $8620;
3653   GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = $8622;
3654   GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = $8623;
3655   GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = $8624;
3656   GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = $8625;
3657   GL_CURRENT_VERTEX_ATTRIB_ARB = $8626;
3658   GL_PROGRAM_LENGTH_ARB = $8627;
3659   GL_PROGRAM_STRING_ARB = $8628;
3660   GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = $862E;
3661   GL_MAX_PROGRAM_MATRICES_ARB = $862F;
3662   GL_CURRENT_MATRIX_STACK_DEPTH_ARB = $8640;
3663   GL_CURRENT_MATRIX_ARB = $8641;
3664   GL_VERTEX_PROGRAM_POINT_SIZE_ARB = $8642;
3665   GL_VERTEX_PROGRAM_TWO_SIDE_ARB = $8643;
3666   GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = $8645;
3667   GL_PROGRAM_ERROR_POSITION_ARB = $864B;
3668   GL_PROGRAM_BINDING_ARB = $8677;
3669   GL_MAX_VERTEX_ATTRIBS_ARB = $8869;
3670   GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = $886A;
3671   GL_PROGRAM_ERROR_STRING_ARB = $8874;
3672   GL_PROGRAM_FORMAT_ASCII_ARB = $8875;
3673   GL_PROGRAM_FORMAT_ARB = $8876;
3674   GL_PROGRAM_INSTRUCTIONS_ARB = $88A0;
3675   GL_MAX_PROGRAM_INSTRUCTIONS_ARB = $88A1;
3676   GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB = $88A2;
3677   GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = $88A3;
3678   GL_PROGRAM_TEMPORARIES_ARB = $88A4;
3679   GL_MAX_PROGRAM_TEMPORARIES_ARB = $88A5;
3680   GL_PROGRAM_NATIVE_TEMPORARIES_ARB = $88A6;
3681   GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = $88A7;
3682   GL_PROGRAM_PARAMETERS_ARB = $88A8;
3683   GL_MAX_PROGRAM_PARAMETERS_ARB = $88A9;
3684   GL_PROGRAM_NATIVE_PARAMETERS_ARB = $88AA;
3685   GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB = $88AB;
3686   GL_PROGRAM_ATTRIBS_ARB = $88AC;
3687   GL_MAX_PROGRAM_ATTRIBS_ARB = $88AD;
3688   GL_PROGRAM_NATIVE_ATTRIBS_ARB = $88AE;
3689   GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB = $88AF;
3690   GL_PROGRAM_ADDRESS_REGISTERS_ARB = $88B0;
3691   GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = $88B1;
3692   GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = $88B2;
3693   GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = $88B3;
3694   GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB = $88B4;
3695   GL_MAX_PROGRAM_ENV_PARAMETERS_ARB = $88B5;
3696   GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB = $88B6;
3697   GL_TRANSPOSE_CURRENT_MATRIX_ARB = $88B7;
3698   GL_MATRIX0_ARB = $88C0;
3699   GL_MATRIX1_ARB&