Browse Source

Merge pull request #3386 from AvaloniaUI/glcontrol

GLControl
danwalmsley 5 years ago
parent
commit
ceb2f09f9e
54 changed files with 6611 additions and 406 deletions
  1. 2 0
      samples/ControlCatalog.NetCore/Program.cs
  2. 3 1
      samples/ControlCatalog/ControlCatalog.csproj
  3. 1 0
      samples/ControlCatalog/MainView.xaml
  4. 29 0
      samples/ControlCatalog/Pages/OpenGlPage.xaml
  5. 401 0
      samples/ControlCatalog/Pages/OpenGlPage.xaml.cs
  6. BIN
      samples/ControlCatalog/Pages/teapot.bin
  7. 50 0
      src/Avalonia.Base/Utilities/DisposableLock.cs
  8. 57 29
      src/Avalonia.Native/GlPlatformFeature.cs
  9. 2 1
      src/Avalonia.Native/PopupImpl.cs
  10. 3 2
      src/Avalonia.Native/WindowImpl.cs
  11. 4 2
      src/Avalonia.Native/WindowImplBase.cs
  12. 2 0
      src/Avalonia.OpenGL/Avalonia.OpenGL.csproj
  13. 51 4
      src/Avalonia.OpenGL/EglContext.cs
  14. 14 42
      src/Avalonia.OpenGL/EglDisplay.cs
  15. 10 7
      src/Avalonia.OpenGL/EglGlPlatformFeature.cs
  16. 13 11
      src/Avalonia.OpenGL/EglGlPlatformSurface.cs
  17. 24 13
      src/Avalonia.OpenGL/EglInterface.cs
  18. 1 3
      src/Avalonia.OpenGL/EglSurface.cs
  19. 72 0
      src/Avalonia.OpenGL/GlBasicInfoInterface.cs
  20. 4673 1
      src/Avalonia.OpenGL/GlConsts.cs
  21. 0 8
      src/Avalonia.OpenGL/GlDisplayType.cs
  22. 107 6
      src/Avalonia.OpenGL/GlEntryPointAttribute.cs
  23. 278 6
      src/Avalonia.OpenGL/GlInterface.cs
  24. 47 21
      src/Avalonia.OpenGL/GlInterfaceBase.cs
  25. 22 0
      src/Avalonia.OpenGL/GlVersion.cs
  26. 8 3
      src/Avalonia.OpenGL/IGlContext.cs
  27. 0 11
      src/Avalonia.OpenGL/IGlDisplay.cs
  28. 1 1
      src/Avalonia.OpenGL/IGlPlatformSurfaceRenderingSession.cs
  29. 9 0
      src/Avalonia.OpenGL/IOpenGlAwarePlatformRenderInterface.cs
  30. 2 1
      src/Avalonia.OpenGL/IWindowingPlatformGlFeature.cs
  31. 13 0
      src/Avalonia.OpenGL/Imaging/IOpenGlTextureBitmapImpl.cs
  32. 46 0
      src/Avalonia.OpenGL/Imaging/OpenGlTextureBitmap.cs
  33. 215 0
      src/Avalonia.OpenGL/OpenGlControlBase.cs
  34. 3 42
      src/Avalonia.Visuals/Rendering/ManagedDeferredRendererLock.cs
  35. 36 5
      src/Avalonia.X11/Glx/Glx.cs
  36. 2 0
      src/Avalonia.X11/Glx/GlxConsts.cs
  37. 52 4
      src/Avalonia.X11/Glx/GlxContext.cs
  38. 86 48
      src/Avalonia.X11/Glx/GlxDisplay.cs
  39. 8 6
      src/Avalonia.X11/Glx/GlxGlPlatformSurface.cs
  40. 7 6
      src/Avalonia.X11/Glx/GlxPlatformFeature.cs
  41. 11 1
      src/Avalonia.X11/X11Platform.cs
  42. 1 1
      src/Avalonia.X11/X11Window.cs
  43. 25 19
      src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs
  44. 2 2
      src/Skia/Avalonia.Skia/DrawingContextImpl.cs
  45. 8 7
      src/Skia/Avalonia.Skia/Gpu/ISkiaGpu.cs
  46. 1 1
      src/Skia/Avalonia.Skia/Gpu/ISkiaGpuRenderSession.cs
  47. 5 2
      src/Skia/Avalonia.Skia/Gpu/ISkiaGpuRenderTarget.cs
  48. 42 31
      src/Skia/Avalonia.Skia/Gpu/OpenGl/GlRenderTarget.cs
  49. 46 0
      src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs
  50. 81 0
      src/Skia/Avalonia.Skia/Gpu/OpenGlTextureBitmapImpl.cs
  51. 7 5
      src/Skia/Avalonia.Skia/Gpu/SkiaGpuRenderTarget.cs
  52. 25 43
      src/Skia/Avalonia.Skia/PlatformRenderInterface.cs
  53. 2 6
      src/Skia/Avalonia.Skia/SkiaOptions.cs
  54. 1 4
      src/Windows/Avalonia.Win32/WindowImpl.cs

+ 2 - 0
samples/ControlCatalog.NetCore/Program.cs

@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.Linq;
@@ -6,6 +7,7 @@ using System.Threading;
 using Avalonia;
 using Avalonia.ReactiveUI;
 using Avalonia.Dialogs;
+using Avalonia.OpenGL;
 
 namespace ControlCatalog.NetCore
 {

+ 3 - 1
samples/ControlCatalog/ControlCatalog.csproj

@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>    
+    <TargetFramework>netstandard2.0</TargetFramework>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>    
   </PropertyGroup>
   <ItemGroup>
     <Compile Update="**\*.xaml.cs">
@@ -17,6 +18,7 @@
     <EmbeddedResource Include="Assets\Fonts\SourceSansPro-BoldItalic.ttf" />
     <EmbeddedResource Include="Assets\Fonts\SourceSansPro-Italic.ttf" />
     <EmbeddedResource Include="Assets\Fonts\SourceSansPro-Regular.ttf" />
+    <EmbeddedResource Include="Pages\teapot.bin" />
   </ItemGroup>
 
   <ItemGroup>

+ 1 - 0
samples/ControlCatalog/MainView.xaml

@@ -47,6 +47,7 @@
       <TabItem Header="Menu"><pages:MenuPage/></TabItem>
       <TabItem Header="Notifications"><pages:NotificationsPage/></TabItem>
 	    <TabItem Header="NumericUpDown"><pages:NumericUpDownPage/></TabItem>
+      <TabItem Header="OpenGL"><pages:OpenGlPage/></TabItem>
       <TabItem Header="Pointers (Touch)"><pages:PointersPage/></TabItem>
       <TabItem Header="ProgressBar"><pages:ProgressBarPage/></TabItem>
       <TabItem Header="RadioButton"><pages:RadioButtonPage/></TabItem>

+ 29 - 0
samples/ControlCatalog/Pages/OpenGlPage.xaml

@@ -0,0 +1,29 @@
+<UserControl xmlns="https://github.com/avaloniaui"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             x:Class="ControlCatalog.Pages.OpenGlPage"
+             xmlns:pages="clr-namespace:ControlCatalog.Pages">
+  <Grid>
+    <pages:OpenGlPageControl x:Name="GL"/>
+    <StackPanel>
+      <TextBlock Text="{Binding #GL.Info}"/>
+    </StackPanel>
+    <Grid ColumnDefinitions="*,Auto" Margin="20">
+      <StackPanel Grid.Column="1" MinWidth="300">
+        <TextBlock>Yaw</TextBlock>
+        <Slider Value="{Binding Yaw, Mode=TwoWay, ElementName=GL}" Maximum="10"/>
+        <TextBlock>Pitch</TextBlock>
+        <Slider Value="{Binding Pitch, Mode=TwoWay, ElementName=GL}" Maximum="10"/>
+        <TextBlock>Roll</TextBlock>
+        <Slider Value="{Binding Roll, Mode=TwoWay, ElementName=GL}" Maximum="10"/>
+        <StackPanel Orientation="Horizontal">
+          <TextBlock FontWeight="Bold" Foreground="#C000C0">D</TextBlock>
+          <TextBlock FontWeight="Bold" Foreground="#00C090">I</TextBlock>
+          <TextBlock FontWeight="Bold" Foreground="#90C000">S</TextBlock>
+          <TextBlock FontWeight="Bold" Foreground="#C09000">C</TextBlock>
+          <TextBlock FontWeight="Bold" Foreground="#00C090">O</TextBlock>
+        </StackPanel>
+        <Slider Value="{Binding Disco, Mode=TwoWay, ElementName=GL}" Maximum="1"/>
+      </StackPanel>
+    </Grid>
+  </Grid>
+</UserControl>

+ 401 - 0
samples/ControlCatalog/Pages/OpenGlPage.xaml.cs

@@ -0,0 +1,401 @@
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Numerics;
+using System.Runtime.InteropServices;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.OpenGL;
+using Avalonia.Platform.Interop;
+using Avalonia.Threading;
+using static Avalonia.OpenGL.GlConsts;
+// ReSharper disable StringLiteralTypo
+
+namespace ControlCatalog.Pages
+{
+    public class OpenGlPage : UserControl
+    {
+
+    }
+
+    public class OpenGlPageControl : OpenGlControlBase
+    {
+        private float _yaw;
+
+        public static readonly DirectProperty<OpenGlPageControl, float> YawProperty =
+            AvaloniaProperty.RegisterDirect<OpenGlPageControl, float>("Yaw", o => o.Yaw, (o, v) => o.Yaw = v);
+
+        public float Yaw
+        {
+            get => _yaw;
+            set => SetAndRaise(YawProperty, ref _yaw, value);
+        }
+
+        private float _pitch;
+
+        public static readonly DirectProperty<OpenGlPageControl, float> PitchProperty =
+            AvaloniaProperty.RegisterDirect<OpenGlPageControl, float>("Pitch", o => o.Pitch, (o, v) => o.Pitch = v);
+
+        public float Pitch
+        {
+            get => _pitch;
+            set => SetAndRaise(PitchProperty, ref _pitch, value);
+        }
+
+
+        private float _roll;
+
+        public static readonly DirectProperty<OpenGlPageControl, float> RollProperty =
+            AvaloniaProperty.RegisterDirect<OpenGlPageControl, float>("Roll", o => o.Roll, (o, v) => o.Roll = v);
+
+        public float Roll
+        {
+            get => _roll;
+            set => SetAndRaise(RollProperty, ref _roll, value);
+        }
+
+
+        private float _disco;
+
+        public static readonly DirectProperty<OpenGlPageControl, float> DiscoProperty =
+            AvaloniaProperty.RegisterDirect<OpenGlPageControl, float>("Disco", o => o.Disco, (o, v) => o.Disco = v);
+
+        public float Disco
+        {
+            get => _disco;
+            set => SetAndRaise(DiscoProperty, ref _disco, value);
+        }
+
+        private string _info;
+
+        public static readonly DirectProperty<OpenGlPageControl, string> InfoProperty =
+            AvaloniaProperty.RegisterDirect<OpenGlPageControl, string>("Info", o => o.Info, (o, v) => o.Info = v);
+
+        public string Info
+        {
+            get => _info;
+            private set => SetAndRaise(InfoProperty, ref _info, value);
+        }
+
+        static OpenGlPageControl()
+        {
+            AffectsRender<OpenGlPageControl>(YawProperty, PitchProperty, RollProperty, DiscoProperty);
+        }
+
+        private int _vertexShader;
+        private int _fragmentShader;
+        private int _shaderProgram;
+        private int _vertexBufferObject;
+        private int _indexBufferObject;
+        private int _vertexArrayObject;
+        private GlExtrasInterface _glExt;
+
+        private string GetShader(bool fragment, string shader)
+        {
+            var version = (GlVersion.Type == GlProfileType.OpenGL ?
+                RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? 150 : 120 :
+                100);
+            var data = "#version " + version + "\n";
+            if (GlVersion.Type == GlProfileType.OpenGLES)
+                data += "precision mediump float;\n";
+            if (version >= 150)
+            {
+                shader = shader.Replace("attribute", "in");
+                if (fragment)
+                    shader = shader
+                        .Replace("varying", "in")
+                        .Replace("//DECLAREGLFRAG", "out vec4 outFragColor;")
+                        .Replace("gl_FragColor", "outFragColor");
+                else
+                    shader = shader.Replace("varying", "out");
+            }
+
+            data += shader;
+
+            return data;
+        }
+
+
+        private string VertexShaderSource => GetShader(false, @"
+        attribute vec3 aPos;
+        attribute vec3 aNormal;
+        uniform mat4 uModel;
+        uniform mat4 uProjection;
+        uniform mat4 uView;
+
+        varying vec3 FragPos;
+        varying vec3 VecPos;  
+        varying vec3 Normal;
+        uniform float uTime;
+        uniform float uDisco;
+        void main()
+        {
+            float discoScale = sin(uTime * 10.0) / 10.0;
+            float distortionX = 1.0 + uDisco * cos(uTime * 20.0) / 10.0;
+            
+            float scale = 1.0 + uDisco * discoScale;
+            
+            vec3 scaledPos = aPos;
+            scaledPos.x = scaledPos.x * distortionX;
+            
+            scaledPos *= scale;
+            gl_Position = uProjection * uView * uModel * vec4(scaledPos, 1.0);
+            FragPos = vec3(uModel * vec4(aPos, 1.0));
+            VecPos = aPos;
+            Normal = normalize(vec3(uModel * vec4(aNormal, 1.0)));
+        }
+");
+
+        private string FragmentShaderSource => GetShader(true, @"
+        varying vec3 FragPos; 
+        varying vec3 VecPos; 
+        varying vec3 Normal;
+        uniform float uMaxY;
+        uniform float uMinY;
+        uniform float uTime;
+        uniform float uDisco;
+        //DECLAREGLFRAG
+
+        void main()
+        {
+            float y = (VecPos.y - uMinY) / (uMaxY - uMinY);
+            float c = cos(atan(VecPos.x, VecPos.z) * 20.0 + uTime * 40.0 + y * 50.0);
+            float s = sin(-atan(VecPos.z, VecPos.x) * 20.0 - uTime * 20.0 - y * 30.0);
+
+            vec3 discoColor = vec3(
+                0.5 + abs(0.5 - y) * cos(uTime * 10.0),
+                0.25 + (smoothstep(0.3, 0.8, y) * (0.5 - c / 4.0)),
+                0.25 + abs((smoothstep(0.1, 0.4, y) * (0.5 - s / 4.0))));
+
+            vec3 objectColor = vec3((1.0 - y), 0.40 +  y / 4.0, y * 0.75 + 0.25);
+            objectColor = objectColor * (1.0 - uDisco) + discoColor * uDisco;
+
+            float ambientStrength = 0.3;
+            vec3 lightColor = vec3(1.0, 1.0, 1.0);
+            vec3 lightPos = vec3(uMaxY * 2.0, uMaxY * 2.0, uMaxY * 2.0);
+            vec3 ambient = ambientStrength * lightColor;
+
+
+            vec3 norm = normalize(Normal);
+            vec3 lightDir = normalize(lightPos - FragPos);  
+
+            float diff = max(dot(norm, lightDir), 0.0);
+            vec3 diffuse = diff * lightColor;
+
+            vec3 result = (ambient + diffuse) * objectColor;
+            gl_FragColor = vec4(result, 1.0);
+
+        }
+");
+
+        [StructLayout(LayoutKind.Sequential, Pack = 4)]
+        private struct Vertex
+        {
+            public Vector3 Position;
+            public Vector3 Normal;
+        }
+
+        private readonly Vertex[] _points;
+        private readonly ushort[] _indices;
+        private readonly float _minY;
+        private readonly float _maxY;
+
+
+        public OpenGlPageControl()
+        {
+            var name = typeof(OpenGlPage).Assembly.GetManifestResourceNames().First(x => x.Contains("teapot.bin"));
+            using (var sr = new BinaryReader(typeof(OpenGlPage).Assembly.GetManifestResourceStream(name)))
+            {
+                var buf = new byte[sr.ReadInt32()];
+                sr.Read(buf, 0, buf.Length);
+                var points = new float[buf.Length / 4];
+                Buffer.BlockCopy(buf, 0, points, 0, buf.Length);
+                buf = new byte[sr.ReadInt32()];
+                sr.Read(buf, 0, buf.Length);
+                _indices = new ushort[buf.Length / 2];
+                Buffer.BlockCopy(buf, 0, _indices, 0, buf.Length);
+                _points = new Vertex[points.Length / 3];
+                for (var primitive = 0; primitive < points.Length / 3; primitive++)
+                {
+                    var srci = primitive * 3;
+                    _points[primitive] = new Vertex
+                    {
+                        Position = new Vector3(points[srci], points[srci + 1], points[srci + 2])
+                    };
+                }
+
+                for (int i = 0; i < _indices.Length; i += 3)
+                {
+                    Vector3 a = _points[_indices[i]].Position;
+                    Vector3 b = _points[_indices[i + 1]].Position;
+                    Vector3 c = _points[_indices[i + 2]].Position;
+                    var normal = Vector3.Normalize(Vector3.Cross(c - b, a - b));
+
+                    _points[_indices[i]].Normal += normal;
+                    _points[_indices[i + 1]].Normal += normal;
+                    _points[_indices[i + 2]].Normal += normal;
+                }
+
+                for (int i = 0; i < _points.Length; i++)
+                {
+                    _points[i].Normal = Vector3.Normalize(_points[i].Normal);
+                    _maxY = Math.Max(_maxY, _points[i].Position.Y);
+                    _minY = Math.Min(_minY, _points[i].Position.Y);
+                }
+            }
+
+        }
+
+        private void CheckError(GlInterface gl)
+        {
+            int err;
+            while ((err = gl.GetError()) != GL_NO_ERROR)
+                Console.WriteLine(err);
+        }
+
+        protected unsafe override void OnOpenGlInit(GlInterface GL, int fb)
+        {
+            CheckError(GL);
+            _glExt = new GlExtrasInterface(GL);
+
+            Info = $"Renderer: {GL.GetString(GL_RENDERER)} Version: {GL.GetString(GL_VERSION)}";
+            
+            // Load the source of the vertex shader and compile it.
+            _vertexShader = GL.CreateShader(GL_VERTEX_SHADER);
+            Console.WriteLine(GL.CompileShaderAndGetError(_vertexShader, VertexShaderSource));
+
+            // Load the source of the fragment shader and compile it.
+            _fragmentShader = GL.CreateShader(GL_FRAGMENT_SHADER);
+            Console.WriteLine(GL.CompileShaderAndGetError(_fragmentShader, FragmentShaderSource));
+
+            // Create the shader program, attach the vertex and fragment shaders and link the program.
+            _shaderProgram = GL.CreateProgram();
+            GL.AttachShader(_shaderProgram, _vertexShader);
+            GL.AttachShader(_shaderProgram, _fragmentShader);
+            const int positionLocation = 0;
+            const int normalLocation = 1;
+            GL.BindAttribLocationString(_shaderProgram, positionLocation, "aPos");
+            GL.BindAttribLocationString(_shaderProgram, normalLocation, "aNormal");
+            Console.WriteLine(GL.LinkProgramAndGetError(_shaderProgram));
+            CheckError(GL);
+
+            // Create the vertex buffer object (VBO) for the vertex data.
+            _vertexBufferObject = GL.GenBuffer();
+            // Bind the VBO and copy the vertex data into it.
+            GL.BindBuffer(GL_ARRAY_BUFFER, _vertexBufferObject);
+            CheckError(GL);
+            var vertexSize = Marshal.SizeOf<Vertex>();
+            fixed (void* pdata = _points)
+                GL.BufferData(GL_ARRAY_BUFFER, new IntPtr(_points.Length * vertexSize),
+                    new IntPtr(pdata), GL_STATIC_DRAW);
+
+            _indexBufferObject = GL.GenBuffer();
+            GL.BindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBufferObject);
+            CheckError(GL);
+            fixed (void* pdata = _indices)
+                GL.BufferData(GL_ELEMENT_ARRAY_BUFFER, new IntPtr(_indices.Length * sizeof(ushort)), new IntPtr(pdata),
+                    GL_STATIC_DRAW);
+            CheckError(GL);
+            _vertexArrayObject = _glExt.GenVertexArray();
+            _glExt.BindVertexArray(_vertexArrayObject);
+            CheckError(GL);
+            GL.VertexAttribPointer(positionLocation, 3, GL_FLOAT,
+                0, vertexSize, IntPtr.Zero);
+            GL.VertexAttribPointer(normalLocation, 3, GL_FLOAT,
+                0, vertexSize, new IntPtr(12));
+            GL.EnableVertexAttribArray(positionLocation);
+            GL.EnableVertexAttribArray(normalLocation);
+            CheckError(GL);
+
+        }
+
+        protected override void OnOpenGlDeinit(GlInterface GL, int fb)
+        {
+            // Unbind everything
+            GL.BindBuffer(GL_ARRAY_BUFFER, 0);
+            GL.BindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+            _glExt.BindVertexArray(0);
+            GL.UseProgram(0);
+
+            // Delete all resources.
+            GL.DeleteBuffers(2, new[] { _vertexBufferObject, _indexBufferObject });
+            _glExt.DeleteVertexArrays(1, new[] { _vertexArrayObject });
+            GL.DeleteProgram(_shaderProgram);
+            GL.DeleteShader(_fragmentShader);
+            GL.DeleteShader(_vertexShader);
+        }
+
+        static Stopwatch St = Stopwatch.StartNew();
+        protected override unsafe void OnOpenGlRender(GlInterface gl, int fb)
+        {
+            gl.ClearColor(0, 0, 0, 0);
+            gl.Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+            gl.Enable(GL_DEPTH_TEST);
+            gl.Viewport(0, 0, (int)Bounds.Width, (int)Bounds.Height);
+            var GL = gl;
+
+            GL.BindBuffer(GL_ARRAY_BUFFER, _vertexBufferObject);
+            GL.BindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBufferObject);
+            _glExt.BindVertexArray(_vertexArrayObject);
+            GL.UseProgram(_shaderProgram);
+            CheckError(GL);
+            var projection =
+                Matrix4x4.CreatePerspectiveFieldOfView((float)(Math.PI / 4), (float)(Bounds.Width / Bounds.Height),
+                    0.01f, 1000);
+
+
+            var view = Matrix4x4.CreateLookAt(new Vector3(25, 25, 25), new Vector3(), new Vector3(0, -1, 0));
+            var model = Matrix4x4.CreateFromYawPitchRoll(_yaw, _pitch, _roll);
+            var modelLoc = GL.GetUniformLocationString(_shaderProgram, "uModel");
+            var viewLoc = GL.GetUniformLocationString(_shaderProgram, "uView");
+            var projectionLoc = GL.GetUniformLocationString(_shaderProgram, "uProjection");
+            var maxYLoc = GL.GetUniformLocationString(_shaderProgram, "uMaxY");
+            var minYLoc = GL.GetUniformLocationString(_shaderProgram, "uMinY");
+            var timeLoc = GL.GetUniformLocationString(_shaderProgram, "uTime");
+            var discoLoc = GL.GetUniformLocationString(_shaderProgram, "uDisco");
+            GL.UniformMatrix4fv(modelLoc, 1, false, &model);
+            GL.UniformMatrix4fv(viewLoc, 1, false, &view);
+            GL.UniformMatrix4fv(projectionLoc, 1, false, &projection);
+            GL.Uniform1f(maxYLoc, _maxY);
+            GL.Uniform1f(minYLoc, _minY);
+            GL.Uniform1f(timeLoc, (float)St.Elapsed.TotalSeconds);
+            GL.Uniform1f(discoLoc, _disco);
+            CheckError(GL);
+            GL.DrawElements(GL_TRIANGLES, _indices.Length, GL_UNSIGNED_SHORT, IntPtr.Zero);
+
+            CheckError(GL);
+            if (_disco > 0.01)
+                Dispatcher.UIThread.Post(InvalidateVisual, DispatcherPriority.Background);
+        }
+
+        class GlExtrasInterface : GlInterfaceBase<GlInterface.GlContextInfo>
+        {
+            public GlExtrasInterface(GlInterface gl) : base(gl.GetProcAddress, gl.ContextInfo)
+            {
+            }
+            
+            public delegate void GlDeleteVertexArrays(int count, int[] buffers);
+            [GlMinVersionEntryPoint("glDeleteVertexArrays", 3,0)]
+            [GlExtensionEntryPoint("glDeleteVertexArraysOES", "GL_OES_vertex_array_object")]
+            public GlDeleteVertexArrays DeleteVertexArrays { get; }
+            
+            public delegate void GlBindVertexArray(int array);
+            [GlMinVersionEntryPoint("glBindVertexArray", 3,0)]
+            [GlExtensionEntryPoint("glBindVertexArrayOES", "GL_OES_vertex_array_object")]
+            public GlBindVertexArray BindVertexArray { get; }
+            public delegate void GlGenVertexArrays(int n, int[] rv);
+        
+            [GlMinVersionEntryPoint("glGenVertexArrays",3,0)]
+            [GlExtensionEntryPoint("glGenVertexArraysOES", "GL_OES_vertex_array_object")]
+            public GlGenVertexArrays GenVertexArrays { get; }
+            
+            public int GenVertexArray()
+            {
+                var rv = new int[1];
+                GenVertexArrays(1, rv);
+                return rv[0];
+            }
+        }
+    }
+}

BIN
samples/ControlCatalog/Pages/teapot.bin


+ 50 - 0
src/Avalonia.Base/Utilities/DisposableLock.cs

@@ -0,0 +1,50 @@
+using System;
+using System.Threading;
+
+namespace Avalonia.Utilities
+{
+    public class DisposableLock
+    {
+        private readonly object _lock = new object();
+
+        /// <summary>
+        /// Tries to take a lock
+        /// </summary>
+        /// <returns>IDisposable if succeeded to obtain the lock</returns>
+        public IDisposable TryLock()
+        {
+            if (Monitor.TryEnter(_lock))
+                return new UnlockDisposable(_lock);
+            return null;
+        }
+
+        /// <summary>
+        /// Enters a waiting lock
+        /// </summary>
+        public IDisposable Lock()
+        {
+            Monitor.Enter(_lock);
+            return new UnlockDisposable(_lock);
+        }
+
+        private sealed class UnlockDisposable : IDisposable
+        {
+            private object _lock;
+
+            public UnlockDisposable(object @lock)
+            {
+                _lock = @lock;
+            }
+
+            public void Dispose()
+            {
+                object @lock = Interlocked.Exchange(ref _lock, null);
+
+                if (@lock != null)
+                {
+                    Monitor.Exit(@lock);
+                }
+            }
+        }
+    }
+}

+ 57 - 29
src/Avalonia.Native/GlPlatformFeature.cs

@@ -8,42 +8,58 @@ namespace Avalonia.Native
 {
     class GlPlatformFeature : IWindowingPlatformGlFeature
     {
+        private readonly IAvnGlDisplay _display;
+
         public GlPlatformFeature(IAvnGlDisplay display)
         {
+            _display = display;
             var immediate = display.CreateContext(null);
             var deferred = display.CreateContext(immediate);
-            GlDisplay = new GlDisplay(display, immediate.SampleCount, immediate.StencilSize);
             
-            ImmediateContext = new GlContext(Display, immediate);
-            DeferredContext = new GlContext(Display, deferred);
+
+            int major, minor;
+            GlInterface glInterface;
+            using (immediate.MakeCurrent())
+            {
+                var basic = new GlBasicInfoInterface(display.GetProcAddress);
+                basic.GetIntegerv(GlConsts.GL_MAJOR_VERSION, out major);
+                basic.GetIntegerv(GlConsts.GL_MINOR_VERSION, out minor);
+                _version = new GlVersion(GlProfileType.OpenGL, major, minor);
+                glInterface = new GlInterface(_version, (name) =>
+                {
+                    var rv = _display.GetProcAddress(name);
+                    return rv;
+                });
+            }
+
+            GlDisplay = new GlDisplay(display, glInterface, immediate.SampleCount, immediate.StencilSize);
+            
+            ImmediateContext = new GlContext(GlDisplay, immediate, _version);
+            DeferredContext = new GlContext(GlDisplay, deferred, _version);
         }
 
-        public IGlContext ImmediateContext { get; }
+        internal IGlContext ImmediateContext { get; }
+        public IGlContext MainContext => DeferredContext;
         internal GlContext DeferredContext { get; }
         internal GlDisplay GlDisplay;
-        public GlDisplay Display => GlDisplay;
+        private readonly GlVersion _version;
+
+        public IGlContext CreateContext() => new GlContext(GlDisplay,
+            _display.CreateContext(((GlContext)ImmediateContext).Context), _version);
     }
 
-    class GlDisplay : IGlDisplay
+    class GlDisplay
     {
         private readonly IAvnGlDisplay _display;
 
-        public GlDisplay(IAvnGlDisplay display, int sampleCount, int stencilSize)
+        public GlDisplay(IAvnGlDisplay display, GlInterface glInterface, int sampleCount, int stencilSize)
         {
             _display = display;
             SampleCount = sampleCount;
             StencilSize = stencilSize;
-            GlInterface = new GlInterface((name, optional) =>
-            {
-                var rv = _display.GetProcAddress(name);
-                if (rv == IntPtr.Zero && !optional)
-                    throw new OpenGlException($"{name} not found in system OpenGL");
-                return rv;
-            });
+            GlInterface = glInterface;
         }
 
-        public GlDisplayType Type => GlDisplayType.OpenGL2;
-
         public GlInterface GlInterface { get; }
 
         public int SampleCount { get; }
@@ -55,19 +71,26 @@ namespace Avalonia.Native
 
     class GlContext : IGlContext
     {
-        public IAvnGlContext Context { get; }
+        private readonly GlDisplay _display;
+        public IAvnGlContext Context { get; private set; }
 
-        public GlContext(GlDisplay display, IAvnGlContext context)
+        public GlContext(GlDisplay display, IAvnGlContext context, GlVersion version)
         {
-            Display = display;
+            _display = display;
             Context = context;
+            Version = version;
         }
 
-        public IGlDisplay Display { get; }
+        public GlVersion Version { get; }
+        public GlInterface GlInterface => _display.GlInterface;
+        public int SampleCount => _display.SampleCount;
+        public int StencilSize => _display.StencilSize;
+        public IDisposable MakeCurrent() => Context.MakeCurrent();
 
-        public void MakeCurrent()
+        public void Dispose()
         {
-            Context.LegacyMakeCurrent();
+            Context.Dispose();
+            Context = null;
         }
     }
 
@@ -75,15 +98,18 @@ namespace Avalonia.Native
     class GlPlatformSurfaceRenderTarget : IGlPlatformSurfaceRenderTarget
     {
         private IAvnGlSurfaceRenderTarget _target;
-        public GlPlatformSurfaceRenderTarget(IAvnGlSurfaceRenderTarget target)
+        private readonly IGlContext _context;
+
+        public GlPlatformSurfaceRenderTarget(IAvnGlSurfaceRenderTarget target, IGlContext context)
         {
             _target = target;
+            _context = context;
         }
 
         public IGlPlatformSurfaceRenderingSession BeginDraw()
         {
             var feature = (GlPlatformFeature)AvaloniaLocator.Current.GetService<IWindowingPlatformGlFeature>();
-            return new GlPlatformSurfaceRenderingSession(feature.Display, _target.BeginDrawing());
+            return new GlPlatformSurfaceRenderingSession(_context, _target.BeginDrawing());
         }
 
         public void Dispose()
@@ -97,13 +123,13 @@ namespace Avalonia.Native
     {
         private IAvnGlSurfaceRenderingSession _session;
 
-        public GlPlatformSurfaceRenderingSession(GlDisplay display, IAvnGlSurfaceRenderingSession session)
+        public GlPlatformSurfaceRenderingSession(IGlContext context, IAvnGlSurfaceRenderingSession session)
         {
-            Display = display;
+            Context = context;
             _session = session;
         }
 
-        public IGlDisplay Display { get; }
+        public IGlContext Context { get; }
 
         public PixelSize Size
         {
@@ -129,14 +155,16 @@ namespace Avalonia.Native
     class GlPlatformSurface : IGlPlatformSurface
     {
         private readonly IAvnWindowBase _window;
+        private readonly IGlContext _context;
 
-        public GlPlatformSurface(IAvnWindowBase window)
+        public GlPlatformSurface(IAvnWindowBase window, IGlContext context)
         {
             _window = window;
+            _context = context;
         }
         public IGlPlatformSurfaceRenderTarget CreateGlRenderTarget()
         {
-            return new GlPlatformSurfaceRenderTarget(_window.CreateGlRenderTarget());
+            return new GlPlatformSurfaceRenderTarget(_window.CreateGlRenderTarget(), _context);
         }
 
     }

+ 2 - 1
src/Avalonia.Native/PopupImpl.cs

@@ -21,7 +21,8 @@ namespace Avalonia.Native
             _glFeature = glFeature;
             using (var e = new PopupEvents(this))
             {
-                Init(factory.CreatePopup(e, _opts.UseGpu ? glFeature?.DeferredContext.Context : null), factory.CreateScreens());
+                var context = _opts.UseGpu ? glFeature?.DeferredContext : null;
+                Init(factory.CreatePopup(e, context?.Context), factory.CreateScreens(), context);
             }
             PopupPositioner = new ManagedPopupPositioner(new OsxManagedPopupPositionerPopupImplHelper(parent, MoveResize));
         }

+ 3 - 2
src/Avalonia.Native/WindowImpl.cs

@@ -2,6 +2,7 @@
 using Avalonia.Controls;
 using Avalonia.Controls.Platform;
 using Avalonia.Native.Interop;
+using Avalonia.OpenGL;
 using Avalonia.Platform;
 using Avalonia.Platform.Interop;
 
@@ -21,8 +22,8 @@ namespace Avalonia.Native
             _glFeature = glFeature;
             using (var e = new WindowEvents(this))
             {
-                Init(_native = factory.CreateWindow(e,
-                    _opts.UseGpu ? glFeature?.DeferredContext.Context : null), factory.CreateScreens());
+                var context = _opts.UseGpu ? glFeature?.DeferredContext : null;
+                Init(_native = factory.CreateWindow(e, context?.Context), factory.CreateScreens(), context);
             }
 
             NativeMenuExporter = new AvaloniaNativeMenuExporter(_native, factory);

+ 4 - 2
src/Avalonia.Native/WindowImplBase.cs

@@ -56,6 +56,7 @@ namespace Avalonia.Native
         private Size _lastRenderedLogicalSize;
         private double _savedScaling;
         private GlPlatformSurface _glSurface;
+        private IGlContext _glContext;
 
         internal WindowBaseImpl(AvaloniaNativePlatformOptions opts, GlPlatformFeature glFeature)
         {
@@ -67,13 +68,14 @@ namespace Avalonia.Native
             _cursorFactory = AvaloniaLocator.Current.GetService<IStandardCursorFactory>();
         }
 
-        protected void Init(IAvnWindowBase window, IAvnScreens screens)
+        protected void Init(IAvnWindowBase window, IAvnScreens screens, IGlContext glContext)
         {
             _native = window;
+            _glContext = glContext;
 
             Handle = new MacOSTopLevelWindowHandle(window);
             if (_gpu)
-                _glSurface = new GlPlatformSurface(window);
+                _glSurface = new GlPlatformSurface(window, _glContext);
             Screen = new ScreenImpl(screens);
             _savedLogicalSize = ClientSize;
             _savedScaling = Scaling;

+ 2 - 0
src/Avalonia.OpenGL/Avalonia.OpenGL.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <TargetFramework>netstandard2.0</TargetFramework>
+        <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     </PropertyGroup>
 
     <ItemGroup>
       <ProjectReference Include="..\Avalonia.Base\Avalonia.Base.csproj" />
+      <ProjectReference Include="..\Avalonia.Controls\Avalonia.Controls.csproj" />
       <ProjectReference Include="..\Avalonia.Visuals\Avalonia.Visuals.csproj" />
     </ItemGroup>
 

+ 51 - 4
src/Avalonia.OpenGL/EglContext.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Reactive.Disposables;
 using System.Threading;
+using static Avalonia.OpenGL.EglConsts;
 
 namespace Avalonia.OpenGL
 {
@@ -10,17 +11,27 @@ namespace Avalonia.OpenGL
         private readonly EglInterface _egl;
         private readonly object _lock = new object();
 
-        public EglContext(EglDisplay display, EglInterface egl, IntPtr ctx, EglSurface offscreenSurface)
+        public EglContext(EglDisplay display, EglInterface egl, IntPtr ctx, EglSurface offscreenSurface,
+            GlVersion version, int sampleCount, int stencilSize)
         {
             _disp = display;
             _egl = egl;
             Context = ctx;
             OffscreenSurface = offscreenSurface;
+            Version = version;
+            SampleCount = sampleCount;
+            StencilSize = stencilSize;
+            using (MakeCurrent())
+                GlInterface = GlInterface.FromNativeUtf8GetProcAddress(version, b => _egl.GetProcAddress(b));
         }
 
         public IntPtr Context { get; }
         public EglSurface OffscreenSurface { get; }
-        public IGlDisplay Display => _disp;
+        public GlVersion Version { get; }
+        public GlInterface GlInterface { get; }
+        public int SampleCount { get; }
+        public int StencilSize { get; }
+        public EglDisplay Display => _disp;
 
         public IDisposable Lock()
         {
@@ -28,17 +39,53 @@ namespace Avalonia.OpenGL
             return Disposable.Create(() => Monitor.Exit(_lock));
         }
 
-        public void MakeCurrent()
+        class RestoreContext : IDisposable
         {
+            private readonly EglInterface _egl;
+            private readonly IntPtr _display;
+            private IntPtr _context, _read, _draw;
+
+            public RestoreContext(EglInterface egl, IntPtr defDisplay)
+            {
+                _egl = egl;
+                _display = _egl.GetCurrentDisplay();
+                if (_display == IntPtr.Zero)
+                    _display = defDisplay;
+                _context = _egl.GetCurrentContext();
+                _read = _egl.GetCurrentSurface(EGL_READ);
+                _draw = _egl.GetCurrentSurface(EGL_DRAW);
+            }
+
+            public void Dispose() 
+            {
+                _egl.MakeCurrent(_display, _draw, _read, _context);
+            }
+
+        }
+
+        public IDisposable MakeCurrent()
+        {
+            var old = new RestoreContext(_egl, _disp.Handle);
+            _egl.MakeCurrent(_disp.Handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
             if (!_egl.MakeCurrent(_disp.Handle, IntPtr.Zero, IntPtr.Zero, Context))
                 throw OpenGlException.GetFormattedException("eglMakeCurrent", _egl);
+            return old;
         }
         
-        public void MakeCurrent(EglSurface surface)
+        public IDisposable MakeCurrent(EglSurface surface)
         {
+            var old = new RestoreContext(_egl, _disp.Handle);
             var surf = surface ?? OffscreenSurface;
+            _egl.MakeCurrent(_disp.Handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
             if (!_egl.MakeCurrent(_disp.Handle, surf.DangerousGetHandle(), surf.DangerousGetHandle(), Context))
                 throw OpenGlException.GetFormattedException("eglMakeCurrent", _egl);
+            return old;
+        }
+
+        public void Dispose()
+        {
+            _egl.DestroyContext(_disp.Handle, Context);
+            OffscreenSurface?.Dispose();
         }
     }
 }

+ 14 - 42
src/Avalonia.OpenGL/EglDisplay.cs

@@ -6,7 +6,7 @@ using static Avalonia.OpenGL.EglConsts;
 
 namespace Avalonia.OpenGL
 {
-    public class EglDisplay : IGlDisplay
+    public class EglDisplay
     {
         private readonly EglInterface _egl;
         private readonly IntPtr _display;
@@ -16,6 +16,9 @@ namespace Avalonia.OpenGL
 
         public IntPtr Handle => _display;
         private AngleOptions.PlatformApi? _angleApi;
+        private int _sampleCount;
+        private int _stencilSize;
+        private GlVersion _version;
 
         public EglDisplay(EglInterface egl) : this(egl, -1, IntPtr.Zero, null)
         {
@@ -76,13 +79,6 @@ namespace Avalonia.OpenGL
 
             foreach (var cfg in new[]
             {
-                new
-                {
-                    Attributes = new[] {EGL_NONE},
-                    Api = EGL_OPENGL_API,
-                    RenderableTypeBit = EGL_OPENGL_BIT,
-                    Type = GlDisplayType.OpenGL2
-                },
                 new
                 {
                     Attributes = new[]
@@ -92,7 +88,7 @@ namespace Avalonia.OpenGL
                     },
                     Api = EGL_OPENGL_ES_API,
                     RenderableTypeBit = EGL_OPENGL_ES2_BIT,
-                    Type = GlDisplayType.OpenGLES2
+                    Version = new GlVersion(GlProfileType.OpenGLES, 2, 0)
                 }
             })
             {
@@ -120,14 +116,16 @@ namespace Avalonia.OpenGL
                         continue;
                     _contextAttributes = cfg.Attributes;
                     _surfaceType = surfaceType;
-                    Type = cfg.Type;
+                    _version = cfg.Version;
+                    _egl.GetConfigAttrib(_display, _config, EGL_SAMPLES, out _sampleCount);
+                    _egl.GetConfigAttrib(_display, _config, EGL_STENCIL_SIZE, out _stencilSize);
+                    goto Found;
                 }
-            }
 
+            }
+            Found:
             if (_contextAttributes == null)
                 throw new OpenGlException("No suitable EGL config was found");
-               
-            GlInterface = GlInterface.FromNativeUtf8GetProcAddress(b => _egl.GetProcAddress(b));
         }
 
         public EglDisplay() : this(new EglInterface())
@@ -135,8 +133,6 @@ namespace Avalonia.OpenGL
             
         }
         
-        public GlDisplayType Type { get; }
-        public GlInterface GlInterface { get; }
         public EglInterface EglInterface => _egl;
         public EglContext CreateContext(IGlContext share)
         {
@@ -154,8 +150,8 @@ namespace Avalonia.OpenGL
             });
             if (surf == IntPtr.Zero)
                 throw OpenGlException.GetFormattedException("eglCreatePBufferSurface", _egl);
-            var rv = new EglContext(this, _egl, ctx, new EglSurface(this, _egl, surf));
-            rv.MakeCurrent(null);
+            var rv = new EglContext(this, _egl, ctx, new EglSurface(this, _egl, surf),
+                _version, _sampleCount, _stencilSize);
             return rv;
         }
 
@@ -164,17 +160,11 @@ namespace Avalonia.OpenGL
             var ctx = _egl.CreateContext(_display, _config, share?.Context ?? IntPtr.Zero, _contextAttributes);
             if (ctx == IntPtr.Zero)
                 throw OpenGlException.GetFormattedException("eglCreateContext", _egl);
-            var rv = new EglContext(this, _egl, ctx, offscreenSurface);
+            var rv = new EglContext(this, _egl, ctx, offscreenSurface, _version, _sampleCount, _stencilSize);
             rv.MakeCurrent(null);
             return rv;
         }
 
-        public void ClearContext()
-        {
-            if (!_egl.MakeCurrent(_display, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero))
-                throw OpenGlException.GetFormattedException("eglMakeCurrent", _egl);
-        }
-
         public EglSurface CreateWindowSurface(IntPtr window)
         {
             var s = _egl.CreateWindowSurface(_display, _config, window, new[] {EGL_NONE, EGL_NONE});
@@ -182,23 +172,5 @@ namespace Avalonia.OpenGL
                 throw OpenGlException.GetFormattedException("eglCreateWindowSurface", _egl);
             return new EglSurface(this, _egl, s);
         }
-
-        public int SampleCount
-        {
-            get
-            {
-                _egl.GetConfigAttrib(_display, _config, EGL_SAMPLES, out var rv);
-                return rv;
-            }
-        }
-
-        public int StencilSize
-        {
-            get
-            {
-                _egl.GetConfigAttrib(_display, _config, EGL_STENCIL_SIZE, out var rv);
-                return rv;
-            }
-        }
     }
 }

+ 10 - 7
src/Avalonia.OpenGL/EglGlPlatformFeature.cs

@@ -5,9 +5,14 @@ namespace Avalonia.OpenGL
 {
     public class EglGlPlatformFeature : IWindowingPlatformGlFeature
     {
-        public IGlDisplay Display { get; set; }
-        public IGlContext ImmediateContext { get; set; }
-        public EglContext DeferredContext { get; set; }
+        private EglDisplay _display;
+        public EglDisplay Display => _display;
+        public IGlContext CreateContext()
+        {
+            return _display.CreateContext(DeferredContext);
+        }
+        public EglContext DeferredContext { get; private set; }
+        public IGlContext MainContext => DeferredContext;
 
         public static void TryInitialize()
         {
@@ -21,12 +26,10 @@ namespace Avalonia.OpenGL
             try
             {
                 var disp = new EglDisplay();
-                var ctx = disp.CreateContext(null);
                 return new EglGlPlatformFeature
                 {
-                    Display = disp,
-                    ImmediateContext = ctx,
-                    DeferredContext = (EglContext)disp.CreateContext(ctx)
+                    _display = disp,
+                    DeferredContext = disp.CreateContext(null)
                 };
             }
             catch(Exception e)

+ 13 - 11
src/Avalonia.OpenGL/EglGlPlatformSurface.cs

@@ -16,9 +16,9 @@ namespace Avalonia.OpenGL
         private readonly EglContext _context;
         private readonly IEglWindowGlPlatformSurfaceInfo _info;
         
-        public EglGlPlatformSurface(EglDisplay display, EglContext context, IEglWindowGlPlatformSurfaceInfo info)
+        public EglGlPlatformSurface(EglContext context, IEglWindowGlPlatformSurfaceInfo info)
         {
-            _display = display;
+            _display = context.Display;
             _context = context;
             _info = info;
         }
@@ -58,12 +58,12 @@ namespace Avalonia.OpenGL
                 {
                     if (IsCorrupted)
                         throw new RenderTargetCorruptedException();
-                    _context.MakeCurrent(_glSurface);
+                    var restoreContext = _context.MakeCurrent(_glSurface);
                     _display.EglInterface.WaitClient();
                     _display.EglInterface.WaitGL();
-                    _display.EglInterface.WaitNative();
+                    _display.EglInterface.WaitNative(EglConsts.EGL_CORE_NATIVE_ENGINE);
                     
-                    return new Session(_display, _context, _glSurface, _info, l);
+                    return new Session(_display, _context, _glSurface, _info, l, restoreContext);
                 }
                 catch
                 {
@@ -79,32 +79,34 @@ namespace Avalonia.OpenGL
                 private readonly IEglWindowGlPlatformSurfaceInfo _info;
                 private readonly EglDisplay _display;
                 private IDisposable _lock;
-                
+                private readonly IDisposable _restoreContext;
+
 
                 public Session(EglDisplay display, EglContext context,
                     EglSurface glSurface, IEglWindowGlPlatformSurfaceInfo info,
-                    IDisposable @lock)
+                    IDisposable @lock, IDisposable restoreContext)
                 {
                     _context = context;
                     _display = display;
                     _glSurface = glSurface;
                     _info = info;
                     _lock = @lock;
+                    _restoreContext = restoreContext;
                 }
 
                 public void Dispose()
                 {
-                    _context.Display.GlInterface.Flush();
+                    _context.GlInterface.Flush();
                     _display.EglInterface.WaitGL();
                     _glSurface.SwapBuffers();
                     _display.EglInterface.WaitClient();
                     _display.EglInterface.WaitGL();
-                    _display.EglInterface.WaitNative();
-                    _context.Display.ClearContext();
+                    _display.EglInterface.WaitNative(EglConsts.EGL_CORE_NATIVE_ENGINE);
+                    _restoreContext.Dispose();
                     _lock.Dispose();
                 }
 
-                public IGlDisplay Display => _context.Display;
+                public IGlContext Context => _context;
                 public PixelSize Size => _info.Size;
                 public double Scaling => _info.Scaling;
                 public bool IsYFlipped { get; }

+ 24 - 13
src/Avalonia.OpenGL/EglInterface.cs

@@ -24,7 +24,7 @@ namespace Avalonia.OpenGL
         [DllImport("libegl.dll", CharSet = CharSet.Ansi)]
         static extern IntPtr eglGetProcAddress(string proc);
         
-        static Func<string, bool, IntPtr> Load()
+        static Func<string, IntPtr> Load()
         {
             var os = AvaloniaLocator.Current.GetService<IRuntimePlatform>().GetRuntimeInfo().OperatingSystem;
             if(os == OperatingSystemType.Linux || os == OperatingSystemType.Android)
@@ -34,23 +34,17 @@ namespace Avalonia.OpenGL
                 var disp = eglGetProcAddress("eglGetPlatformDisplayEXT");
                 if (disp == IntPtr.Zero)
                     throw new OpenGlException("libegl.dll doesn't have eglGetPlatformDisplayEXT entry point");
-                return (name, optional) =>
-                {
-                    var r = eglGetProcAddress(name);
-                    if (r == IntPtr.Zero && !optional)
-                        throw new OpenGlException($"Entry point {r} is not found");
-                    return r;
-                };
+                return eglGetProcAddress;
             }
 
             throw new PlatformNotSupportedException();
         }
 
-        static Func<string, bool, IntPtr> Load(string library)
+        static Func<string, IntPtr> Load(string library)
         {
             var dyn = AvaloniaLocator.Current.GetService<IDynamicLibraryLoader>();
             var lib = dyn.LoadLibrary(library);
-            return (s, o) => dyn.GetProcAddress(lib, s, o);
+            return (s) => dyn.GetProcAddress(lib, s, true);
         }
 
         // ReSharper disable UnassignedGetOnlyAutoProperty
@@ -63,7 +57,8 @@ namespace Avalonia.OpenGL
         public EglGetDisplay GetDisplay { get; }
         
         public delegate IntPtr EglGetPlatformDisplayEXT(int platform, IntPtr nativeDisplay, int[] attrs);
-        [GlEntryPoint("eglGetPlatformDisplayEXT", true)]
+        [GlEntryPoint("eglGetPlatformDisplayEXT")]
+        [GlOptionalEntryPoint]
         public EglGetPlatformDisplayEXT GetPlatformDisplayEXT { get; }
 
         public delegate bool EglInitialize(IntPtr display, out int major, out int minor);
@@ -87,6 +82,10 @@ namespace Avalonia.OpenGL
             IntPtr share, int[] attrs);
         [GlEntryPoint("eglCreateContext")]
         public EglCreateContext CreateContext { get; }
+        
+        public delegate bool EglDestroyContext(IntPtr display, IntPtr context);
+        [GlEntryPoint("eglDestroyContext")]
+        public EglDestroyContext DestroyContext { get; }
 
         public delegate IntPtr EglCreatePBufferSurface(IntPtr display, IntPtr config, int[] attrs);
         [GlEntryPoint("eglCreatePbufferSurface")]
@@ -96,6 +95,18 @@ namespace Avalonia.OpenGL
         [GlEntryPoint("eglMakeCurrent")]
         public EglMakeCurrent MakeCurrent { get; }
 
+        public delegate IntPtr EglGetCurrentContext();
+        [GlEntryPoint("eglGetCurrentContext")]
+        public EglGetCurrentContext GetCurrentContext { get; }
+        
+        public delegate IntPtr EglGetCurrentDisplay();
+        [GlEntryPoint("eglGetCurrentDisplay")]
+        public EglGetCurrentContext GetCurrentDisplay { get; }
+
+        public delegate IntPtr EglGetCurrentSurface(int readDraw);
+        [GlEntryPoint("eglGetCurrentSurface")] 
+        public EglGetCurrentSurface GetCurrentSurface { get; }
+
         public delegate void EglDisplaySurfaceVoidDelegate(IntPtr display, IntPtr surface);
         [GlEntryPoint("eglDestroySurface")]
         public EglDisplaySurfaceVoidDelegate DestroySurface { get; }
@@ -120,9 +131,9 @@ namespace Avalonia.OpenGL
         [GlEntryPoint("eglWaitClient")]
         public EglWaitGL WaitClient { get; }
         
-        public delegate bool EglWaitNative();
+        public delegate bool EglWaitNative(int engine);
         [GlEntryPoint("eglWaitNative")]
-        public EglWaitGL WaitNative { get; }
+        public EglWaitNative WaitNative { get; }
         
         public delegate IntPtr EglQueryString(IntPtr display, int i);
         

+ 1 - 3
src/Avalonia.OpenGL/EglSurface.cs

@@ -21,8 +21,6 @@ namespace Avalonia.OpenGL
         }
 
         public override bool IsInvalid => handle == IntPtr.Zero;
-
-        public IGlDisplay Display => _display;
         public void SwapBuffers() => _egl.SwapBuffers(_display.Handle, handle);
     }
-}
+}

+ 72 - 0
src/Avalonia.OpenGL/GlBasicInfoInterface.cs

@@ -0,0 +1,72 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.InteropServices;
+using Avalonia.Platform.Interop;
+
+namespace Avalonia.OpenGL
+{
+    public class GlBasicInfoInterface : GlBasicInfoInterface<object>
+    {
+        public GlBasicInfoInterface(Func<string, IntPtr> getProcAddress) : base(getProcAddress, null)
+        {
+        }
+
+        public GlBasicInfoInterface(Func<Utf8Buffer, IntPtr> nativeGetProcAddress) : base(nativeGetProcAddress, null)
+        {
+        }
+        
+        public delegate void GlGetIntegerv(int name, out int rv);
+        public delegate IntPtr GlGetString(int v);
+        public delegate IntPtr GlGetStringi(int v, int v1);
+    }
+    
+    public class GlBasicInfoInterface<TContextInfo> : GlInterfaceBase<TContextInfo>
+    {
+        public GlBasicInfoInterface(Func<string, IntPtr> getProcAddress, TContextInfo context) : base(getProcAddress, context)
+        {
+        }
+
+        public GlBasicInfoInterface(Func<Utf8Buffer, IntPtr> nativeGetProcAddress, TContextInfo context) : base(nativeGetProcAddress, context)
+        {
+        }
+        
+        [GlEntryPoint("glGetIntegerv")]
+        public GlBasicInfoInterface.GlGetIntegerv GetIntegerv { get; }
+        
+        
+        [GlEntryPoint("glGetString")]
+        public GlBasicInfoInterface.GlGetString GetStringNative { get; }
+        
+        [GlEntryPoint("glGetStringi")]
+        public GlBasicInfoInterface.GlGetStringi GetStringiNative { get; }
+
+        public string GetString(int v)
+        {
+            var ptr = GetStringNative(v);
+            if (ptr != IntPtr.Zero)
+                return Marshal.PtrToStringAnsi(ptr);
+            return null;
+        }
+        
+        public string GetString(int v, int index)
+        {
+            var ptr = GetStringiNative(v, index);
+            if (ptr != IntPtr.Zero)
+                return Marshal.PtrToStringAnsi(ptr);
+            return null;
+        }
+
+        public List<string> GetExtensions()
+        {
+            var sp = GetString(GlConsts.GL_EXTENSIONS);
+            if (sp != null)
+                return sp.Split(' ').ToList();
+            GetIntegerv(GlConsts.GL_NUM_EXTENSIONS, out int count);
+            var rv = new List<string>(count);
+            for (var c = 0; c < count; c++)
+                rv.Add(GetString(GlConsts.GL_EXTENSIONS, c));
+            return rv;
+        }
+    }
+}

+ 4673 - 1
src/Avalonia.OpenGL/GlConsts.cs

@@ -786,7 +786,4679 @@ namespace Avalonia.OpenGL
 
         
         // glext.h
-
+        public const int GL_BLEND_DST_RGB = 0x80C8;
+        public const int GL_BLEND_SRC_RGB = 0x80C9;
+        public const int GL_BLEND_DST_ALPHA = 0x80CA;
+        public const int GL_BLEND_SRC_ALPHA = 0x80CB;
+        public const int GL_POINT_FADE_THRESHOLD_SIZE = 0x8128;
+        public const int GL_DEPTH_COMPONENT16 = 0x81A5;
+        public const int GL_DEPTH_COMPONENT24 = 0x81A6;
+        public const int GL_DEPTH_COMPONENT32 = 0x81A7;
+        public const int GL_MIRRORED_REPEAT = 0x8370;
+        public const int GL_MAX_TEXTURE_LOD_BIAS = 0x84FD;
+        public const int GL_TEXTURE_LOD_BIAS = 0x8501;
+        public const int GL_INCR_WRAP = 0x8507;
+        public const int GL_DECR_WRAP = 0x8508;
+        public const int GL_TEXTURE_DEPTH_SIZE = 0x884A;
+        public const int GL_TEXTURE_COMPARE_MODE = 0x884C;
+        public const int GL_TEXTURE_COMPARE_FUNC = 0x884D;
+        public const int GL_POINT_SIZE_MIN = 0x8126;
+        public const int GL_POINT_SIZE_MAX = 0x8127;
+        public const int GL_POINT_DISTANCE_ATTENUATION = 0x8129;
+        public const int GL_GENERATE_MIPMAP = 0x8191;
+        public const int GL_GENERATE_MIPMAP_HINT = 0x8192;
+        public const int GL_FOG_COORDINATE_SOURCE = 0x8450;
+        public const int GL_FOG_COORDINATE = 0x8451;
+        public const int GL_FRAGMENT_DEPTH = 0x8452;
+        public const int GL_CURRENT_FOG_COORDINATE = 0x8453;
+        public const int GL_FOG_COORDINATE_ARRAY_TYPE = 0x8454;
+        public const int GL_FOG_COORDINATE_ARRAY_STRIDE = 0x8455;
+        public const int GL_FOG_COORDINATE_ARRAY_POINTER = 0x8456;
+        public const int GL_FOG_COORDINATE_ARRAY = 0x8457;
+        public const int GL_COLOR_SUM = 0x8458;
+        public const int GL_CURRENT_SECONDARY_COLOR = 0x8459;
+        public const int GL_SECONDARY_COLOR_ARRAY_SIZE = 0x845A;
+        public const int GL_SECONDARY_COLOR_ARRAY_TYPE = 0x845B;
+        public const int GL_SECONDARY_COLOR_ARRAY_STRIDE = 0x845C;
+        public const int GL_SECONDARY_COLOR_ARRAY_POINTER = 0x845D;
+        public const int GL_SECONDARY_COLOR_ARRAY = 0x845E;
+        public const int GL_TEXTURE_FILTER_CONTROL = 0x8500;
+        public const int GL_DEPTH_TEXTURE_MODE = 0x884B;
+        public const int GL_COMPARE_R_TO_TEXTURE = 0x884E;
+        public const int GL_BUFFER_SIZE = 0x8764;
+        public const int GL_BUFFER_USAGE = 0x8765;
+        public const int GL_QUERY_COUNTER_BITS = 0x8864;
+        public const int GL_CURRENT_QUERY = 0x8865;
+        public const int GL_QUERY_RESULT = 0x8866;
+        public const int GL_QUERY_RESULT_AVAILABLE = 0x8867;
+        public const int GL_ARRAY_BUFFER = 0x8892;
+        public const int GL_ELEMENT_ARRAY_BUFFER = 0x8893;
+        public const int GL_ARRAY_BUFFER_BINDING = 0x8894;
+        public const int GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
+        public const int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
+        public const int GL_READ_ONLY = 0x88B8;
+        public const int GL_WRITE_ONLY = 0x88B9;
+        public const int GL_READ_WRITE = 0x88BA;
+        public const int GL_BUFFER_ACCESS = 0x88BB;
+        public const int GL_BUFFER_MAPPED = 0x88BC;
+        public const int GL_BUFFER_MAP_POINTER = 0x88BD;
+        public const int GL_STREAM_DRAW = 0x88E0;
+        public const int GL_STREAM_READ = 0x88E1;
+        public const int GL_STREAM_COPY = 0x88E2;
+        public const int GL_STATIC_DRAW = 0x88E4;
+        public const int GL_STATIC_READ = 0x88E5;
+        public const int GL_STATIC_COPY = 0x88E6;
+        public const int GL_DYNAMIC_DRAW = 0x88E8;
+        public const int GL_DYNAMIC_READ = 0x88E9;
+        public const int GL_DYNAMIC_COPY = 0x88EA;
+        public const int GL_SAMPLES_PASSED = 0x8914;
+        public const int GL_SRC1_ALPHA = 0x8589;
+        public const int GL_VERTEX_ARRAY_BUFFER_BINDING = 0x8896;
+        public const int GL_NORMAL_ARRAY_BUFFER_BINDING = 0x8897;
+        public const int GL_COLOR_ARRAY_BUFFER_BINDING = 0x8898;
+        public const int GL_INDEX_ARRAY_BUFFER_BINDING = 0x8899;
+        public const int GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = 0x889A;
+        public const int GL_EDGE_FLAG_ARRAY_BUFFER_BINDING = 0x889B;
+        public const int GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING = 0x889C;
+        public const int GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING = 0x889D;
+        public const int GL_WEIGHT_ARRAY_BUFFER_BINDING = 0x889E;
+        public const int GL_FOG_COORD_SRC = 0x8450;
+        public const int GL_FOG_COORD = 0x8451;
+        public const int GL_CURRENT_FOG_COORD = 0x8453;
+        public const int GL_FOG_COORD_ARRAY_TYPE = 0x8454;
+        public const int GL_FOG_COORD_ARRAY_STRIDE = 0x8455;
+        public const int GL_FOG_COORD_ARRAY_POINTER = 0x8456;
+        public const int GL_FOG_COORD_ARRAY = 0x8457;
+        public const int GL_FOG_COORD_ARRAY_BUFFER_BINDING = 0x889D;
+        public const int GL_SRC0_RGB = 0x8580;
+        public const int GL_SRC1_RGB = 0x8581;
+        public const int GL_SRC2_RGB = 0x8582;
+        public const int GL_SRC0_ALPHA = 0x8588;
+        public const int GL_SRC2_ALPHA = 0x858A;
+        public const int GL_BLEND_EQUATION_RGB = 0x8009;
+        public const int GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
+        public const int GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
+        public const int GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
+        public const int GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
+        public const int GL_CURRENT_VERTEX_ATTRIB = 0x8626;
+        public const int GL_VERTEX_PROGRAM_POINT_SIZE = 0x8642;
+        public const int GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
+        public const int GL_STENCIL_BACK_FUNC = 0x8800;
+        public const int GL_STENCIL_BACK_FAIL = 0x8801;
+        public const int GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
+        public const int GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
+        public const int GL_MAX_DRAW_BUFFERS = 0x8824;
+        public const int GL_DRAW_BUFFER0 = 0x8825;
+        public const int GL_DRAW_BUFFER1 = 0x8826;
+        public const int GL_DRAW_BUFFER2 = 0x8827;
+        public const int GL_DRAW_BUFFER3 = 0x8828;
+        public const int GL_DRAW_BUFFER4 = 0x8829;
+        public const int GL_DRAW_BUFFER5 = 0x882A;
+        public const int GL_DRAW_BUFFER6 = 0x882B;
+        public const int GL_DRAW_BUFFER7 = 0x882C;
+        public const int GL_DRAW_BUFFER8 = 0x882D;
+        public const int GL_DRAW_BUFFER9 = 0x882E;
+        public const int GL_DRAW_BUFFER10 = 0x882F;
+        public const int GL_DRAW_BUFFER11 = 0x8830;
+        public const int GL_DRAW_BUFFER12 = 0x8831;
+        public const int GL_DRAW_BUFFER13 = 0x8832;
+        public const int GL_DRAW_BUFFER14 = 0x8833;
+        public const int GL_DRAW_BUFFER15 = 0x8834;
+        public const int GL_BLEND_EQUATION_ALPHA = 0x883D;
+        public const int GL_MAX_VERTEX_ATTRIBS = 0x8869;
+        public const int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
+        public const int GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872;
+        public const int GL_FRAGMENT_SHADER = 0x8B30;
+        public const int GL_VERTEX_SHADER = 0x8B31;
+        public const int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49;
+        public const int GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A;
+        public const int GL_MAX_VARYING_FLOATS = 0x8B4B;
+        public const int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
+        public const int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
+        public const int GL_SHADER_TYPE = 0x8B4F;
+        public const int GL_FLOAT_VEC2 = 0x8B50;
+        public const int GL_FLOAT_VEC3 = 0x8B51;
+        public const int GL_FLOAT_VEC4 = 0x8B52;
+        public const int GL_INT_VEC2 = 0x8B53;
+        public const int GL_INT_VEC3 = 0x8B54;
+        public const int GL_INT_VEC4 = 0x8B55;
+        public const int GL_BOOL = 0x8B56;
+        public const int GL_BOOL_VEC2 = 0x8B57;
+        public const int GL_BOOL_VEC3 = 0x8B58;
+        public const int GL_BOOL_VEC4 = 0x8B59;
+        public const int GL_FLOAT_MAT2 = 0x8B5A;
+        public const int GL_FLOAT_MAT3 = 0x8B5B;
+        public const int GL_FLOAT_MAT4 = 0x8B5C;
+        public const int GL_SAMPLER_1D = 0x8B5D;
+        public const int GL_SAMPLER_2D = 0x8B5E;
+        public const int GL_SAMPLER_3D = 0x8B5F;
+        public const int GL_SAMPLER_CUBE = 0x8B60;
+        public const int GL_SAMPLER_1D_SHADOW = 0x8B61;
+        public const int GL_SAMPLER_2D_SHADOW = 0x8B62;
+        public const int GL_DELETE_STATUS = 0x8B80;
+        public const int GL_COMPILE_STATUS = 0x8B81;
+        public const int GL_LINK_STATUS = 0x8B82;
+        public const int GL_VALIDATE_STATUS = 0x8B83;
+        public const int GL_INFO_LOG_LENGTH = 0x8B84;
+        public const int GL_ATTACHED_SHADERS = 0x8B85;
+        public const int GL_ACTIVE_UNIFORMS = 0x8B86;
+        public const int GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87;
+        public const int GL_SHADER_SOURCE_LENGTH = 0x8B88;
+        public const int GL_ACTIVE_ATTRIBUTES = 0x8B89;
+        public const int GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A;
+        public const int GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B;
+        public const int GL_SHADING_LANGUAGE_VERSION = 0x8B8C;
+        public const int GL_CURRENT_PROGRAM = 0x8B8D;
+        public const int GL_POINT_SPRITE_COORD_ORIGIN = 0x8CA0;
+        public const int GL_LOWER_LEFT = 0x8CA1;
+        public const int GL_UPPER_LEFT = 0x8CA2;
+        public const int GL_STENCIL_BACK_REF = 0x8CA3;
+        public const int GL_STENCIL_BACK_VALUE_MASK = 0x8CA4;
+        public const int GL_STENCIL_BACK_WRITEMASK = 0x8CA5;
+        public const int GL_VERTEX_PROGRAM_TWO_SIDE = 0x8643;
+        public const int GL_POINT_SPRITE = 0x8861;
+        public const int GL_COORD_REPLACE = 0x8862;
+        public const int GL_MAX_TEXTURE_COORDS = 0x8871;
+        public const int GL_VERSION_2_1 = 1;
+        public const int GL_PIXEL_PACK_BUFFER = 0x88EB;
+        public const int GL_PIXEL_UNPACK_BUFFER = 0x88EC;
+        public const int GL_PIXEL_PACK_BUFFER_BINDING = 0x88ED;
+        public const int GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88EF;
+        public const int GL_FLOAT_MAT2x3 = 0x8B65;
+        public const int GL_FLOAT_MAT2x4 = 0x8B66;
+        public const int GL_FLOAT_MAT3x2 = 0x8B67;
+        public const int GL_FLOAT_MAT3x4 = 0x8B68;
+        public const int GL_FLOAT_MAT4x2 = 0x8B69;
+        public const int GL_FLOAT_MAT4x3 = 0x8B6A;
+        public const int GL_SRGB = 0x8C40;
+        public const int GL_SRGB8 = 0x8C41;
+        public const int GL_SRGB_ALPHA = 0x8C42;
+        public const int GL_SRGB8_ALPHA8 = 0x8C43;
+        public const int GL_COMPRESSED_SRGB = 0x8C48;
+        public const int GL_COMPRESSED_SRGB_ALPHA = 0x8C49;
+        public const int GL_CURRENT_RASTER_SECONDARY_COLOR = 0x845F;
+        public const int GL_SLUMINANCE_ALPHA = 0x8C44;
+        public const int GL_SLUMINANCE8_ALPHA8 = 0x8C45;
+        public const int GL_SLUMINANCE = 0x8C46;
+        public const int GL_SLUMINANCE8 = 0x8C47;
+        public const int GL_COMPRESSED_SLUMINANCE = 0x8C4A;
+        public const int GL_COMPRESSED_SLUMINANCE_ALPHA = 0x8C4B;
+        public const int GL_VERSION_3_0 = 1;
+        public const int GL_COMPARE_REF_TO_TEXTURE = 0x884E;
+        public const int GL_CLIP_DISTANCE0 = 0x3000;
+        public const int GL_CLIP_DISTANCE1 = 0x3001;
+        public const int GL_CLIP_DISTANCE2 = 0x3002;
+        public const int GL_CLIP_DISTANCE3 = 0x3003;
+        public const int GL_CLIP_DISTANCE4 = 0x3004;
+        public const int GL_CLIP_DISTANCE5 = 0x3005;
+        public const int GL_CLIP_DISTANCE6 = 0x3006;
+        public const int GL_CLIP_DISTANCE7 = 0x3007;
+        public const int GL_MAX_CLIP_DISTANCES = 0x0D32;
+        public const int GL_MAJOR_VERSION = 0x821B;
+        public const int GL_MINOR_VERSION = 0x821C;
+        public const int GL_NUM_EXTENSIONS = 0x821D;
+        public const int GL_CONTEXT_FLAGS = 0x821E;
+        public const int GL_COMPRESSED_RED = 0x8225;
+        public const int GL_COMPRESSED_RG = 0x8226;
+        public const int GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x00000001;
+        public const int GL_RGBA32F = 0x8814;
+        public const int GL_RGB32F = 0x8815;
+        public const int GL_RGBA16F = 0x881A;
+        public const int GL_RGB16F = 0x881B;
+        public const int GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD;
+        public const int GL_MAX_ARRAY_TEXTURE_LAYERS = 0x88FF;
+        public const int GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904;
+        public const int GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905;
+        public const int GL_CLAMP_READ_COLOR = 0x891C;
+        public const int GL_FIXED_ONLY = 0x891D;
+        public const int GL_MAX_VARYING_COMPONENTS = 0x8B4B;
+        public const int GL_TEXTURE_1D_ARRAY = 0x8C18;
+        public const int GL_PROXY_TEXTURE_1D_ARRAY = 0x8C19;
+        public const int GL_TEXTURE_2D_ARRAY = 0x8C1A;
+        public const int GL_PROXY_TEXTURE_2D_ARRAY = 0x8C1B;
+        public const int GL_TEXTURE_BINDING_1D_ARRAY = 0x8C1C;
+        public const int GL_TEXTURE_BINDING_2D_ARRAY = 0x8C1D;
+        public const int GL_R11F_G11F_B10F = 0x8C3A;
+        public const int GL_UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B;
+        public const int GL_RGB9_E5 = 0x8C3D;
+        public const int GL_UNSIGNED_INT_5_9_9_9_REV = 0x8C3E;
+        public const int GL_TEXTURE_SHARED_SIZE = 0x8C3F;
+        public const int GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F;
+        public const int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80;
+        public const int GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85;
+        public const int GL_PRIMITIVES_GENERATED = 0x8C87;
+        public const int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88;
+        public const int GL_RASTERIZER_DISCARD = 0x8C89;
+        public const int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A;
+        public const int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B;
+        public const int GL_INTERLEAVED_ATTRIBS = 0x8C8C;
+        public const int GL_SEPARATE_ATTRIBS = 0x8C8D;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F;
+        public const int GL_RGBA32UI = 0x8D70;
+        public const int GL_RGB32UI = 0x8D71;
+        public const int GL_RGBA16UI = 0x8D76;
+        public const int GL_RGB16UI = 0x8D77;
+        public const int GL_RGBA8UI = 0x8D7C;
+        public const int GL_RGB8UI = 0x8D7D;
+        public const int GL_RGBA32I = 0x8D82;
+        public const int GL_RGB32I = 0x8D83;
+        public const int GL_RGBA16I = 0x8D88;
+        public const int GL_RGB16I = 0x8D89;
+        public const int GL_RGBA8I = 0x8D8E;
+        public const int GL_RGB8I = 0x8D8F;
+        public const int GL_RED_INTEGER = 0x8D94;
+        public const int GL_GREEN_INTEGER = 0x8D95;
+        public const int GL_BLUE_INTEGER = 0x8D96;
+        public const int GL_RGB_INTEGER = 0x8D98;
+        public const int GL_RGBA_INTEGER = 0x8D99;
+        public const int GL_BGR_INTEGER = 0x8D9A;
+        public const int GL_BGRA_INTEGER = 0x8D9B;
+        public const int GL_SAMPLER_1D_ARRAY = 0x8DC0;
+        public const int GL_SAMPLER_2D_ARRAY = 0x8DC1;
+        public const int GL_SAMPLER_1D_ARRAY_SHADOW = 0x8DC3;
+        public const int GL_SAMPLER_2D_ARRAY_SHADOW = 0x8DC4;
+        public const int GL_SAMPLER_CUBE_SHADOW = 0x8DC5;
+        public const int GL_UNSIGNED_INT_VEC2 = 0x8DC6;
+        public const int GL_UNSIGNED_INT_VEC3 = 0x8DC7;
+        public const int GL_UNSIGNED_INT_VEC4 = 0x8DC8;
+        public const int GL_INT_SAMPLER_1D = 0x8DC9;
+        public const int GL_INT_SAMPLER_2D = 0x8DCA;
+        public const int GL_INT_SAMPLER_3D = 0x8DCB;
+        public const int GL_INT_SAMPLER_CUBE = 0x8DCC;
+        public const int GL_INT_SAMPLER_1D_ARRAY = 0x8DCE;
+        public const int GL_INT_SAMPLER_2D_ARRAY = 0x8DCF;
+        public const int GL_UNSIGNED_INT_SAMPLER_1D = 0x8DD1;
+        public const int GL_UNSIGNED_INT_SAMPLER_2D = 0x8DD2;
+        public const int GL_UNSIGNED_INT_SAMPLER_3D = 0x8DD3;
+        public const int GL_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4;
+        public const int GL_UNSIGNED_INT_SAMPLER_1D_ARRAY = 0x8DD6;
+        public const int GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7;
+        public const int GL_QUERY_WAIT = 0x8E13;
+        public const int GL_QUERY_NO_WAIT = 0x8E14;
+        public const int GL_QUERY_BY_REGION_WAIT = 0x8E15;
+        public const int GL_QUERY_BY_REGION_NO_WAIT = 0x8E16;
+        public const int GL_BUFFER_ACCESS_FLAGS = 0x911F;
+        public const int GL_BUFFER_MAP_LENGTH = 0x9120;
+        public const int GL_BUFFER_MAP_OFFSET = 0x9121;
+        public const int GL_DEPTH_COMPONENT32F = 0x8CAC;
+        public const int GL_DEPTH32F_STENCIL8 = 0x8CAD;
+        public const int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217;
+        public const int GL_FRAMEBUFFER_DEFAULT = 0x8218;
+        public const int GL_FRAMEBUFFER_UNDEFINED = 0x8219;
+        public const int GL_DEPTH_STENCIL_ATTACHMENT = 0x821A;
+        public const int GL_MAX_RENDERBUFFER_SIZE = 0x84E8;
+        public const int GL_DEPTH_STENCIL = 0x84F9;
+        public const int GL_UNSIGNED_INT_24_8 = 0x84FA;
+        public const int GL_DEPTH24_STENCIL8 = 0x88F0;
+        public const int GL_TEXTURE_STENCIL_SIZE = 0x88F1;
+        public const int GL_TEXTURE_RED_TYPE = 0x8C10;
+        public const int GL_TEXTURE_GREEN_TYPE = 0x8C11;
+        public const int GL_TEXTURE_BLUE_TYPE = 0x8C12;
+        public const int GL_TEXTURE_ALPHA_TYPE = 0x8C13;
+        public const int GL_TEXTURE_DEPTH_TYPE = 0x8C16;
+        public const int GL_UNSIGNED_NORMALIZED = 0x8C17;
         public const int GL_FRAMEBUFFER_BINDING = 0x8CA6;
+        public const int GL_DRAW_FRAMEBUFFER_BINDING = 0x8CA6;
+        public const int GL_RENDERBUFFER_BINDING = 0x8CA7;
+        public const int GL_READ_FRAMEBUFFER = 0x8CA8;
+        public const int GL_DRAW_FRAMEBUFFER = 0x8CA9;
+        public const int GL_READ_FRAMEBUFFER_BINDING = 0x8CAA;
+        public const int GL_RENDERBUFFER_SAMPLES = 0x8CAB;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4;
+        public const int GL_FRAMEBUFFER_COMPLETE = 0x8CD5;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC;
+        public const int GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
+        public const int GL_MAX_COLOR_ATTACHMENTS = 0x8CDF;
+        public const int GL_COLOR_ATTACHMENT0 = 0x8CE0;
+        public const int GL_COLOR_ATTACHMENT1 = 0x8CE1;
+        public const int GL_COLOR_ATTACHMENT2 = 0x8CE2;
+        public const int GL_COLOR_ATTACHMENT3 = 0x8CE3;
+        public const int GL_COLOR_ATTACHMENT4 = 0x8CE4;
+        public const int GL_COLOR_ATTACHMENT5 = 0x8CE5;
+        public const int GL_COLOR_ATTACHMENT6 = 0x8CE6;
+        public const int GL_COLOR_ATTACHMENT7 = 0x8CE7;
+        public const int GL_COLOR_ATTACHMENT8 = 0x8CE8;
+        public const int GL_COLOR_ATTACHMENT9 = 0x8CE9;
+        public const int GL_COLOR_ATTACHMENT10 = 0x8CEA;
+        public const int GL_COLOR_ATTACHMENT11 = 0x8CEB;
+        public const int GL_COLOR_ATTACHMENT12 = 0x8CEC;
+        public const int GL_COLOR_ATTACHMENT13 = 0x8CED;
+        public const int GL_COLOR_ATTACHMENT14 = 0x8CEE;
+        public const int GL_COLOR_ATTACHMENT15 = 0x8CEF;
+        public const int GL_COLOR_ATTACHMENT16 = 0x8CF0;
+        public const int GL_COLOR_ATTACHMENT17 = 0x8CF1;
+        public const int GL_COLOR_ATTACHMENT18 = 0x8CF2;
+        public const int GL_COLOR_ATTACHMENT19 = 0x8CF3;
+        public const int GL_COLOR_ATTACHMENT20 = 0x8CF4;
+        public const int GL_COLOR_ATTACHMENT21 = 0x8CF5;
+        public const int GL_COLOR_ATTACHMENT22 = 0x8CF6;
+        public const int GL_COLOR_ATTACHMENT23 = 0x8CF7;
+        public const int GL_COLOR_ATTACHMENT24 = 0x8CF8;
+        public const int GL_COLOR_ATTACHMENT25 = 0x8CF9;
+        public const int GL_COLOR_ATTACHMENT26 = 0x8CFA;
+        public const int GL_COLOR_ATTACHMENT27 = 0x8CFB;
+        public const int GL_COLOR_ATTACHMENT28 = 0x8CFC;
+        public const int GL_COLOR_ATTACHMENT29 = 0x8CFD;
+        public const int GL_COLOR_ATTACHMENT30 = 0x8CFE;
+        public const int GL_COLOR_ATTACHMENT31 = 0x8CFF;
+        public const int GL_DEPTH_ATTACHMENT = 0x8D00;
+        public const int GL_STENCIL_ATTACHMENT = 0x8D20;
+        public const int GL_FRAMEBUFFER = 0x8D40;
+        public const int GL_RENDERBUFFER = 0x8D41;
+        public const int GL_RENDERBUFFER_WIDTH = 0x8D42;
+        public const int GL_RENDERBUFFER_HEIGHT = 0x8D43;
+        public const int GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
+        public const int GL_STENCIL_INDEX1 = 0x8D46;
+        public const int GL_STENCIL_INDEX4 = 0x8D47;
+        public const int GL_STENCIL_INDEX8 = 0x8D48;
+        public const int GL_STENCIL_INDEX16 = 0x8D49;
+        public const int GL_RENDERBUFFER_RED_SIZE = 0x8D50;
+        public const int GL_RENDERBUFFER_GREEN_SIZE = 0x8D51;
+        public const int GL_RENDERBUFFER_BLUE_SIZE = 0x8D52;
+        public const int GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53;
+        public const int GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54;
+        public const int GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56;
+        public const int GL_MAX_SAMPLES = 0x8D57;
+        public const int GL_INDEX = 0x8222;
+        public const int GL_TEXTURE_LUMINANCE_TYPE = 0x8C14;
+        public const int GL_TEXTURE_INTENSITY_TYPE = 0x8C15;
+        public const int GL_FRAMEBUFFER_SRGB = 0x8DB9;
+        public const int GL_HALF_FLOAT = 0x140B;
+        public const int GL_MAP_READ_BIT = 0x0001;
+        public const int GL_MAP_WRITE_BIT = 0x0002;
+        public const int GL_MAP_INVALIDATE_RANGE_BIT = 0x0004;
+        public const int GL_MAP_INVALIDATE_BUFFER_BIT = 0x0008;
+        public const int GL_MAP_FLUSH_EXPLICIT_BIT = 0x0010;
+        public const int GL_MAP_UNSYNCHRONIZED_BIT = 0x0020;
+        public const int GL_COMPRESSED_RED_RGTC1 = 0x8DBB;
+        public const int GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC;
+        public const int GL_COMPRESSED_RG_RGTC2 = 0x8DBD;
+        public const int GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE;
+        public const int GL_RG = 0x8227;
+        public const int GL_RG_INTEGER = 0x8228;
+        public const int GL_R8 = 0x8229;
+        public const int GL_R16 = 0x822A;
+        public const int GL_RG8 = 0x822B;
+        public const int GL_RG16 = 0x822C;
+        public const int GL_R16F = 0x822D;
+        public const int GL_R32F = 0x822E;
+        public const int GL_RG16F = 0x822F;
+        public const int GL_RG32F = 0x8230;
+        public const int GL_R8I = 0x8231;
+        public const int GL_R8UI = 0x8232;
+        public const int GL_R16I = 0x8233;
+        public const int GL_R16UI = 0x8234;
+        public const int GL_R32I = 0x8235;
+        public const int GL_R32UI = 0x8236;
+        public const int GL_RG8I = 0x8237;
+        public const int GL_RG8UI = 0x8238;
+        public const int GL_RG16I = 0x8239;
+        public const int GL_RG16UI = 0x823A;
+        public const int GL_RG32I = 0x823B;
+        public const int GL_RG32UI = 0x823C;
+        public const int GL_VERTEX_ARRAY_BINDING = 0x85B5;
+        public const int GL_CLAMP_VERTEX_COLOR = 0x891A;
+        public const int GL_CLAMP_FRAGMENT_COLOR = 0x891B;
+        public const int GL_ALPHA_INTEGER = 0x8D97;
+        public const int GL_VERSION_3_1 = 1;
+        public const int GL_SAMPLER_2D_RECT = 0x8B63;
+        public const int GL_SAMPLER_2D_RECT_SHADOW = 0x8B64;
+        public const int GL_SAMPLER_BUFFER = 0x8DC2;
+        public const int GL_INT_SAMPLER_2D_RECT = 0x8DCD;
+        public const int GL_INT_SAMPLER_BUFFER = 0x8DD0;
+        public const int GL_UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5;
+        public const int GL_UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8;
+        public const int GL_TEXTURE_BUFFER = 0x8C2A;
+        public const int GL_MAX_TEXTURE_BUFFER_SIZE = 0x8C2B;
+        public const int GL_TEXTURE_BINDING_BUFFER = 0x8C2C;
+        public const int GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D;
+        public const int GL_TEXTURE_RECTANGLE = 0x84F5;
+        public const int GL_TEXTURE_BINDING_RECTANGLE = 0x84F6;
+        public const int GL_PROXY_TEXTURE_RECTANGLE = 0x84F7;
+        public const int GL_MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8;
+        public const int GL_R8_SNORM = 0x8F94;
+        public const int GL_RG8_SNORM = 0x8F95;
+        public const int GL_RGB8_SNORM = 0x8F96;
+        public const int GL_RGBA8_SNORM = 0x8F97;
+        public const int GL_R16_SNORM = 0x8F98;
+        public const int GL_RG16_SNORM = 0x8F99;
+        public const int GL_RGB16_SNORM = 0x8F9A;
+        public const int GL_RGBA16_SNORM = 0x8F9B;
+        public const int GL_SIGNED_NORMALIZED = 0x8F9C;
+        public const int GL_PRIMITIVE_RESTART = 0x8F9D;
+        public const int GL_PRIMITIVE_RESTART_INDEX = 0x8F9E;
+        public const int GL_COPY_READ_BUFFER = 0x8F36;
+        public const int GL_COPY_WRITE_BUFFER = 0x8F37;
+        public const int GL_UNIFORM_BUFFER = 0x8A11;
+        public const int GL_UNIFORM_BUFFER_BINDING = 0x8A28;
+        public const int GL_UNIFORM_BUFFER_START = 0x8A29;
+        public const int GL_UNIFORM_BUFFER_SIZE = 0x8A2A;
+        public const int GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B;
+        public const int GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C;
+        public const int GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D;
+        public const int GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E;
+        public const int GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F;
+        public const int GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30;
+        public const int GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31;
+        public const int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32;
+        public const int GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33;
+        public const int GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34;
+        public const int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35;
+        public const int GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36;
+        public const int GL_UNIFORM_TYPE = 0x8A37;
+        public const int GL_UNIFORM_SIZE = 0x8A38;
+        public const int GL_UNIFORM_NAME_LENGTH = 0x8A39;
+        public const int GL_UNIFORM_BLOCK_INDEX = 0x8A3A;
+        public const int GL_UNIFORM_OFFSET = 0x8A3B;
+        public const int GL_UNIFORM_ARRAY_STRIDE = 0x8A3C;
+        public const int GL_UNIFORM_MATRIX_STRIDE = 0x8A3D;
+        public const int GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E;
+        public const int GL_UNIFORM_BLOCK_BINDING = 0x8A3F;
+        public const int GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40;
+        public const int GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41;
+        public const int GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42;
+        public const int GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43;
+        public const int GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44;
+        public const int GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45;
+        public const int GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46;
+        public const int GL_INVALID_INDEX = -1;
+        public const int GL_VERSION_3_2 = 1;
+        public const int GL_CONTEXT_CORE_PROFILE_BIT = 0x00000001;
+        public const int GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x00000002;
+        public const int GL_LINES_ADJACENCY = 0x000A;
+        public const int GL_LINE_STRIP_ADJACENCY = 0x000B;
+        public const int GL_TRIANGLES_ADJACENCY = 0x000C;
+        public const int GL_TRIANGLE_STRIP_ADJACENCY = 0x000D;
+        public const int GL_PROGRAM_POINT_SIZE = 0x8642;
+        public const int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8;
+        public const int GL_GEOMETRY_SHADER = 0x8DD9;
+        public const int GL_GEOMETRY_VERTICES_OUT = 0x8916;
+        public const int GL_GEOMETRY_INPUT_TYPE = 0x8917;
+        public const int GL_GEOMETRY_OUTPUT_TYPE = 0x8918;
+        public const int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF;
+        public const int GL_MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0;
+        public const int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1;
+        public const int GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122;
+        public const int GL_MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123;
+        public const int GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124;
+        public const int GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125;
+        public const int GL_CONTEXT_PROFILE_MASK = 0x9126;
+        public const int GL_DEPTH_CLAMP = 0x864F;
+        public const int GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C;
+        public const int GL_FIRST_VERTEX_CONVENTION = 0x8E4D;
+        public const int GL_LAST_VERTEX_CONVENTION = 0x8E4E;
+        public const int GL_PROVOKING_VERTEX = 0x8E4F;
+        public const int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F;
+        public const int GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111;
+        public const int GL_OBJECT_TYPE = 0x9112;
+        public const int GL_SYNC_CONDITION = 0x9113;
+        public const int GL_SYNC_STATUS = 0x9114;
+        public const int GL_SYNC_FLAGS = 0x9115;
+        public const int GL_SYNC_FENCE = 0x9116;
+        public const int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117;
+        public const int GL_UNSIGNALED = 0x9118;
+        public const int GL_SIGNALED = 0x9119;
+        public const int GL_ALREADY_SIGNALED = 0x911A;
+        public const int GL_TIMEOUT_EXPIRED = 0x911B;
+        public const int GL_CONDITION_SATISFIED = 0x911C;
+        public const int GL_WAIT_FAILED = 0x911D;
+        public const int GL_SYNC_FLUSH_COMMANDS_BIT = 0x00000001;
+        public const int GL_SAMPLE_POSITION = 0x8E50;
+        public const int GL_SAMPLE_MASK = 0x8E51;
+        public const int GL_SAMPLE_MASK_VALUE = 0x8E52;
+        public const int GL_MAX_SAMPLE_MASK_WORDS = 0x8E59;
+        public const int GL_TEXTURE_2D_MULTISAMPLE = 0x9100;
+        public const int GL_PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101;
+        public const int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102;
+        public const int GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103;
+        public const int GL_TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104;
+        public const int GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105;
+        public const int GL_TEXTURE_SAMPLES = 0x9106;
+        public const int GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107;
+        public const int GL_SAMPLER_2D_MULTISAMPLE = 0x9108;
+        public const int GL_INT_SAMPLER_2D_MULTISAMPLE = 0x9109;
+        public const int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A;
+        public const int GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B;
+        public const int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C;
+        public const int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D;
+        public const int GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E;
+        public const int GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F;
+        public const int GL_MAX_INTEGER_SAMPLES = 0x9110;
+        public const int GL_VERSION_3_3 = 1;
+        public const int GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE;
+        public const int GL_SRC1_COLOR = 0x88F9;
+        public const int GL_ONE_MINUS_SRC1_COLOR = 0x88FA;
+        public const int GL_ONE_MINUS_SRC1_ALPHA = 0x88FB;
+        public const int GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC;
+        public const int GL_ANY_SAMPLES_PASSED = 0x8C2F;
+        public const int GL_SAMPLER_BINDING = 0x8919;
+        public const int GL_RGB10_A2UI = 0x906F;
+        public const int GL_TEXTURE_SWIZZLE_R = 0x8E42;
+        public const int GL_TEXTURE_SWIZZLE_G = 0x8E43;
+        public const int GL_TEXTURE_SWIZZLE_B = 0x8E44;
+        public const int GL_TEXTURE_SWIZZLE_A = 0x8E45;
+        public const int GL_TEXTURE_SWIZZLE_RGBA = 0x8E46;
+        public const int GL_TIME_ELAPSED = 0x88BF;
+        public const int GL_TIMESTAMP = 0x8E28;
+        public const int GL_INT_2_10_10_10_REV = 0x8D9F;
+        public const int GL_VERSION_4_0 = 1;
+        public const int GL_SAMPLE_SHADING = 0x8C36;
+        public const int GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37;
+        public const int GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5E;
+        public const int GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5F;
+        public const int GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009;
+        public const int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A;
+        public const int GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B;
+        public const int GL_SAMPLER_CUBE_MAP_ARRAY = 0x900C;
+        public const int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D;
+        public const int GL_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E;
+        public const int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F;
+        public const int GL_DRAW_INDIRECT_BUFFER = 0x8F3F;
+        public const int GL_DRAW_INDIRECT_BUFFER_BINDING = 0x8F43;
+        public const int GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F;
+        public const int GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A;
+        public const int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B;
+        public const int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C;
+        public const int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D;
+        public const int GL_MAX_VERTEX_STREAMS = 0x8E71;
+        public const int GL_DOUBLE_VEC2 = 0x8FFC;
+        public const int GL_DOUBLE_VEC3 = 0x8FFD;
+        public const int GL_DOUBLE_VEC4 = 0x8FFE;
+        public const int GL_DOUBLE_MAT2 = 0x8F46;
+        public const int GL_DOUBLE_MAT3 = 0x8F47;
+        public const int GL_DOUBLE_MAT4 = 0x8F48;
+        public const int GL_DOUBLE_MAT2x3 = 0x8F49;
+        public const int GL_DOUBLE_MAT2x4 = 0x8F4A;
+        public const int GL_DOUBLE_MAT3x2 = 0x8F4B;
+        public const int GL_DOUBLE_MAT3x4 = 0x8F4C;
+        public const int GL_DOUBLE_MAT4x2 = 0x8F4D;
+        public const int GL_DOUBLE_MAT4x3 = 0x8F4E;
+        public const int GL_ACTIVE_SUBROUTINES = 0x8DE5;
+        public const int GL_ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6;
+        public const int GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47;
+        public const int GL_ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48;
+        public const int GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49;
+        public const int GL_MAX_SUBROUTINES = 0x8DE7;
+        public const int GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8;
+        public const int GL_NUM_COMPATIBLE_SUBROUTINES = 0x8E4A;
+        public const int GL_COMPATIBLE_SUBROUTINES = 0x8E4B;
+        public const int GL_PATCHES = 0x000E;
+        public const int GL_PATCH_VERTICES = 0x8E72;
+        public const int GL_PATCH_DEFAULT_INNER_LEVEL = 0x8E73;
+        public const int GL_PATCH_DEFAULT_OUTER_LEVEL = 0x8E74;
+        public const int GL_TESS_CONTROL_OUTPUT_VERTICES = 0x8E75;
+        public const int GL_TESS_GEN_MODE = 0x8E76;
+        public const int GL_TESS_GEN_SPACING = 0x8E77;
+        public const int GL_TESS_GEN_VERTEX_ORDER = 0x8E78;
+        public const int GL_TESS_GEN_POINT_MODE = 0x8E79;
+        public const int GL_ISOLINES = 0x8E7A;
+        public const int GL_FRACTIONAL_ODD = 0x8E7B;
+        public const int GL_FRACTIONAL_EVEN = 0x8E7C;
+        public const int GL_MAX_PATCH_VERTICES = 0x8E7D;
+        public const int GL_MAX_TESS_GEN_LEVEL = 0x8E7E;
+        public const int GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F;
+        public const int GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80;
+        public const int GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81;
+        public const int GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82;
+        public const int GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83;
+        public const int GL_MAX_TESS_PATCH_COMPONENTS = 0x8E84;
+        public const int GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85;
+        public const int GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86;
+        public const int GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89;
+        public const int GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A;
+        public const int GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C;
+        public const int GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D;
+        public const int GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E;
+        public const int GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F;
+        public const int GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = 0x84F0;
+        public const int GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1;
+        public const int GL_TESS_EVALUATION_SHADER = 0x8E87;
+        public const int GL_TESS_CONTROL_SHADER = 0x8E88;
+        public const int GL_TRANSFORM_FEEDBACK = 0x8E22;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED = 0x8E23;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = 0x8E24;
+        public const int GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25;
+        public const int GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = 0x8E70;
+        public const int GL_VERSION_4_1 = 1;
+        public const int GL_FIXED = 0x140C;
+        public const int GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;
+        public const int GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;
+        public const int GL_LOW_FLOAT = 0x8DF0;
+        public const int GL_MEDIUM_FLOAT = 0x8DF1;
+        public const int GL_HIGH_FLOAT = 0x8DF2;
+        public const int GL_LOW_INT = 0x8DF3;
+        public const int GL_MEDIUM_INT = 0x8DF4;
+        public const int GL_HIGH_INT = 0x8DF5;
+        public const int GL_SHADER_COMPILER = 0x8DFA;
+        public const int GL_SHADER_BINARY_FORMATS = 0x8DF8;
+        public const int GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9;
+        public const int GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
+        public const int GL_MAX_VARYING_VECTORS = 0x8DFC;
+        public const int GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
+        public const int GL_RGB565 = 0x8D62;
+        public const int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257;
+        public const int GL_PROGRAM_BINARY_LENGTH = 0x8741;
+        public const int GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE;
+        public const int GL_PROGRAM_BINARY_FORMATS = 0x87FF;
+        public const int GL_VERTEX_SHADER_BIT = 0x00000001;
+        public const int GL_FRAGMENT_SHADER_BIT = 0x00000002;
+        public const int GL_GEOMETRY_SHADER_BIT = 0x00000004;
+        public const int GL_TESS_CONTROL_SHADER_BIT = 0x00000008;
+        public const int GL_TESS_EVALUATION_SHADER_BIT = 0x00000010;
+        public const int GL_ALL_SHADER_BITS = -1;
+        public const int GL_PROGRAM_SEPARABLE = 0x8258;
+        public const int GL_ACTIVE_PROGRAM = 0x8259;
+        public const int GL_PROGRAM_PIPELINE_BINDING = 0x825A;
+        public const int GL_MAX_VIEWPORTS = 0x825B;
+        public const int GL_VIEWPORT_SUBPIXEL_BITS = 0x825C;
+        public const int GL_VIEWPORT_BOUNDS_RANGE = 0x825D;
+        public const int GL_LAYER_PROVOKING_VERTEX = 0x825E;
+        public const int GL_VIEWPORT_INDEX_PROVOKING_VERTEX = 0x825F;
+        public const int GL_UNDEFINED_VERTEX = 0x8260;
+        public const int GL_VERSION_4_2 = 1;
+        public const int GL_COPY_READ_BUFFER_BINDING = 0x8F36;
+        public const int GL_COPY_WRITE_BUFFER_BINDING = 0x8F37;
+        public const int GL_TRANSFORM_FEEDBACK_ACTIVE = 0x8E24;
+        public const int GL_TRANSFORM_FEEDBACK_PAUSED = 0x8E23;
+        public const int GL_UNPACK_COMPRESSED_BLOCK_WIDTH = 0x9127;
+        public const int GL_UNPACK_COMPRESSED_BLOCK_HEIGHT = 0x9128;
+        public const int GL_UNPACK_COMPRESSED_BLOCK_DEPTH = 0x9129;
+        public const int GL_UNPACK_COMPRESSED_BLOCK_SIZE = 0x912A;
+        public const int GL_PACK_COMPRESSED_BLOCK_WIDTH = 0x912B;
+        public const int GL_PACK_COMPRESSED_BLOCK_HEIGHT = 0x912C;
+        public const int GL_PACK_COMPRESSED_BLOCK_DEPTH = 0x912D;
+        public const int GL_PACK_COMPRESSED_BLOCK_SIZE = 0x912E;
+        public const int GL_NUM_SAMPLE_COUNTS = 0x9380;
+        public const int GL_MIN_MAP_BUFFER_ALIGNMENT = 0x90BC;
+        public const int GL_ATOMIC_COUNTER_BUFFER = 0x92C0;
+        public const int GL_ATOMIC_COUNTER_BUFFER_BINDING = 0x92C1;
+        public const int GL_ATOMIC_COUNTER_BUFFER_START = 0x92C2;
+        public const int GL_ATOMIC_COUNTER_BUFFER_SIZE = 0x92C3;
+        public const int GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE = 0x92C4;
+        public const int GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = 0x92C5;
+        public const int GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = 0x92C6;
+        public const int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = 0x92C7;
+        public const int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = 0x92C8;
+        public const int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x92C9;
+        public const int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = 0x92CA;
+        public const int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = 0x92CB;
+        public const int GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = 0x92CC;
+        public const int GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 0x92CD;
+        public const int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 0x92CE;
+        public const int GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 0x92CF;
+        public const int GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = 0x92D0;
+        public const int GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = 0x92D1;
+        public const int GL_MAX_VERTEX_ATOMIC_COUNTERS = 0x92D2;
+        public const int GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3;
+        public const int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4;
+        public const int GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5;
+        public const int GL_MAX_FRAGMENT_ATOMIC_COUNTERS = 0x92D6;
+        public const int GL_MAX_COMBINED_ATOMIC_COUNTERS = 0x92D7;
+        public const int GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = 0x92D8;
+        public const int GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = 0x92DC;
+        public const int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = 0x92D9;
+        public const int GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = 0x92DA;
+        public const int GL_UNSIGNED_INT_ATOMIC_COUNTER = 0x92DB;
+        public const int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = 0x00000001;
+        public const int GL_ELEMENT_ARRAY_BARRIER_BIT = 0x00000002;
+        public const int GL_UNIFORM_BARRIER_BIT = 0x00000004;
+        public const int GL_TEXTURE_FETCH_BARRIER_BIT = 0x00000008;
+        public const int GL_SHADER_IMAGE_ACCESS_BARRIER_BIT = 0x00000020;
+        public const int GL_COMMAND_BARRIER_BIT = 0x00000040;
+        public const int GL_PIXEL_BUFFER_BARRIER_BIT = 0x00000080;
+        public const int GL_TEXTURE_UPDATE_BARRIER_BIT = 0x00000100;
+        public const int GL_BUFFER_UPDATE_BARRIER_BIT = 0x00000200;
+        public const int GL_FRAMEBUFFER_BARRIER_BIT = 0x00000400;
+        public const int GL_TRANSFORM_FEEDBACK_BARRIER_BIT = 0x00000800;
+        public const int GL_ATOMIC_COUNTER_BARRIER_BIT = 0x00001000;
+        public const int GL_ALL_BARRIER_BITS = -1;
+        public const int GL_MAX_IMAGE_UNITS = 0x8F38;
+        public const int GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = 0x8F39;
+        public const int GL_IMAGE_BINDING_NAME = 0x8F3A;
+        public const int GL_IMAGE_BINDING_LEVEL = 0x8F3B;
+        public const int GL_IMAGE_BINDING_LAYERED = 0x8F3C;
+        public const int GL_IMAGE_BINDING_LAYER = 0x8F3D;
+        public const int GL_IMAGE_BINDING_ACCESS = 0x8F3E;
+        public const int GL_IMAGE_1D = 0x904C;
+        public const int GL_IMAGE_2D = 0x904D;
+        public const int GL_IMAGE_3D = 0x904E;
+        public const int GL_IMAGE_2D_RECT = 0x904F;
+        public const int GL_IMAGE_CUBE = 0x9050;
+        public const int GL_IMAGE_BUFFER = 0x9051;
+        public const int GL_IMAGE_1D_ARRAY = 0x9052;
+        public const int GL_IMAGE_2D_ARRAY = 0x9053;
+        public const int GL_IMAGE_CUBE_MAP_ARRAY = 0x9054;
+        public const int GL_IMAGE_2D_MULTISAMPLE = 0x9055;
+        public const int GL_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9056;
+        public const int GL_INT_IMAGE_1D = 0x9057;
+        public const int GL_INT_IMAGE_2D = 0x9058;
+        public const int GL_INT_IMAGE_3D = 0x9059;
+        public const int GL_INT_IMAGE_2D_RECT = 0x905A;
+        public const int GL_INT_IMAGE_CUBE = 0x905B;
+        public const int GL_INT_IMAGE_BUFFER = 0x905C;
+        public const int GL_INT_IMAGE_1D_ARRAY = 0x905D;
+        public const int GL_INT_IMAGE_2D_ARRAY = 0x905E;
+        public const int GL_INT_IMAGE_CUBE_MAP_ARRAY = 0x905F;
+        public const int GL_INT_IMAGE_2D_MULTISAMPLE = 0x9060;
+        public const int GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9061;
+        public const int GL_UNSIGNED_INT_IMAGE_1D = 0x9062;
+        public const int GL_UNSIGNED_INT_IMAGE_2D = 0x9063;
+        public const int GL_UNSIGNED_INT_IMAGE_3D = 0x9064;
+        public const int GL_UNSIGNED_INT_IMAGE_2D_RECT = 0x9065;
+        public const int GL_UNSIGNED_INT_IMAGE_CUBE = 0x9066;
+        public const int GL_UNSIGNED_INT_IMAGE_BUFFER = 0x9067;
+        public const int GL_UNSIGNED_INT_IMAGE_1D_ARRAY = 0x9068;
+        public const int GL_UNSIGNED_INT_IMAGE_2D_ARRAY = 0x9069;
+        public const int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 0x906A;
+        public const int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = 0x906B;
+        public const int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x906C;
+        public const int GL_MAX_IMAGE_SAMPLES = 0x906D;
+        public const int GL_IMAGE_BINDING_FORMAT = 0x906E;
+        public const int GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7;
+        public const int GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = 0x90C8;
+        public const int GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = 0x90C9;
+        public const int GL_MAX_VERTEX_IMAGE_UNIFORMS = 0x90CA;
+        public const int GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB;
+        public const int GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC;
+        public const int GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD;
+        public const int GL_MAX_FRAGMENT_IMAGE_UNIFORMS = 0x90CE;
+        public const int GL_MAX_COMBINED_IMAGE_UNIFORMS = 0x90CF;
+        public const int GL_COMPRESSED_RGBA_BPTC_UNORM = 0x8E8C;
+        public const int GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM = 0x8E8D;
+        public const int GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT = 0x8E8E;
+        public const int GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT = 0x8E8F;
+        public const int GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F;
+        public const int GL_VERSION_4_3 = 1;
+        public const int GL_NUM_SHADING_LANGUAGE_VERSIONS = 0x82E9;
+        public const int GL_VERTEX_ATTRIB_ARRAY_LONG = 0x874E;
+        public const int GL_COMPRESSED_RGB8_ETC2 = 0x9274;
+        public const int GL_COMPRESSED_SRGB8_ETC2 = 0x9275;
+        public const int GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276;
+        public const int GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277;
+        public const int GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279;
+        public const int GL_COMPRESSED_R11_EAC = 0x9270;
+        public const int GL_COMPRESSED_SIGNED_R11_EAC = 0x9271;
+        public const int GL_COMPRESSED_RG11_EAC = 0x9272;
+        public const int GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273;
+        public const int GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69;
+        public const int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A;
+        public const int GL_MAX_ELEMENT_INDEX = 0x8D6B;
+        public const int GL_COMPUTE_SHADER = 0x91B9;
+        public const int GL_MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB;
+        public const int GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC;
+        public const int GL_MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD;
+        public const int GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262;
+        public const int GL_MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263;
+        public const int GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264;
+        public const int GL_MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265;
+        public const int GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266;
+        public const int GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = 0x90EB;
+        public const int GL_MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE;
+        public const int GL_MAX_COMPUTE_WORK_GROUP_SIZE = 0x91BF;
+        public const int GL_COMPUTE_WORK_GROUP_SIZE = 0x8267;
+        public const int GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = 0x90EC;
+        public const int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = 0x90ED;
+        public const int GL_DISPATCH_INDIRECT_BUFFER = 0x90EE;
+        public const int GL_DISPATCH_INDIRECT_BUFFER_BINDING = 0x90EF;
+        public const int GL_COMPUTE_SHADER_BIT = 0x00000020;
+        public const int GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242;
+        public const int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243;
+        public const int GL_DEBUG_CALLBACK_FUNCTION = 0x8244;
+        public const int GL_DEBUG_CALLBACK_USER_PARAM = 0x8245;
+        public const int GL_DEBUG_SOURCE_API = 0x8246;
+        public const int GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247;
+        public const int GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248;
+        public const int GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249;
+        public const int GL_DEBUG_SOURCE_APPLICATION = 0x824A;
+        public const int GL_DEBUG_SOURCE_OTHER = 0x824B;
+        public const int GL_DEBUG_TYPE_ERROR = 0x824C;
+        public const int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D;
+        public const int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E;
+        public const int GL_DEBUG_TYPE_PORTABILITY = 0x824F;
+        public const int GL_DEBUG_TYPE_PERFORMANCE = 0x8250;
+        public const int GL_DEBUG_TYPE_OTHER = 0x8251;
+        public const int GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143;
+        public const int GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144;
+        public const int GL_DEBUG_LOGGED_MESSAGES = 0x9145;
+        public const int GL_DEBUG_SEVERITY_HIGH = 0x9146;
+        public const int GL_DEBUG_SEVERITY_MEDIUM = 0x9147;
+        public const int GL_DEBUG_SEVERITY_LOW = 0x9148;
+        public const int GL_DEBUG_TYPE_MARKER = 0x8268;
+        public const int GL_DEBUG_TYPE_PUSH_GROUP = 0x8269;
+        public const int GL_DEBUG_TYPE_POP_GROUP = 0x826A;
+        public const int GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B;
+        public const int GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C;
+        public const int GL_DEBUG_GROUP_STACK_DEPTH = 0x826D;
+        public const int GL_BUFFER = 0x82E0;
+        public const int GL_SHADER = 0x82E1;
+        public const int GL_PROGRAM = 0x82E2;
+        public const int GL_QUERY = 0x82E3;
+        public const int GL_PROGRAM_PIPELINE = 0x82E4;
+        public const int GL_SAMPLER = 0x82E6;
+        public const int GL_MAX_LABEL_LENGTH = 0x82E8;
+        public const int GL_DEBUG_OUTPUT = 0x92E0;
+        public const int GL_CONTEXT_FLAG_DEBUG_BIT = 0x00000002;
+        public const int GL_MAX_UNIFORM_LOCATIONS = 0x826E;
+        public const int GL_FRAMEBUFFER_DEFAULT_WIDTH = 0x9310;
+        public const int GL_FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311;
+        public const int GL_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312;
+        public const int GL_FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313;
+        public const int GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314;
+        public const int GL_MAX_FRAMEBUFFER_WIDTH = 0x9315;
+        public const int GL_MAX_FRAMEBUFFER_HEIGHT = 0x9316;
+        public const int GL_MAX_FRAMEBUFFER_LAYERS = 0x9317;
+        public const int GL_MAX_FRAMEBUFFER_SAMPLES = 0x9318;
+        public const int GL_INTERNALFORMAT_SUPPORTED = 0x826F;
+        public const int GL_INTERNALFORMAT_PREFERRED = 0x8270;
+        public const int GL_INTERNALFORMAT_RED_SIZE = 0x8271;
+        public const int GL_INTERNALFORMAT_GREEN_SIZE = 0x8272;
+        public const int GL_INTERNALFORMAT_BLUE_SIZE = 0x8273;
+        public const int GL_INTERNALFORMAT_ALPHA_SIZE = 0x8274;
+        public const int GL_INTERNALFORMAT_DEPTH_SIZE = 0x8275;
+        public const int GL_INTERNALFORMAT_STENCIL_SIZE = 0x8276;
+        public const int GL_INTERNALFORMAT_SHARED_SIZE = 0x8277;
+        public const int GL_INTERNALFORMAT_RED_TYPE = 0x8278;
+        public const int GL_INTERNALFORMAT_GREEN_TYPE = 0x8279;
+        public const int GL_INTERNALFORMAT_BLUE_TYPE = 0x827A;
+        public const int GL_INTERNALFORMAT_ALPHA_TYPE = 0x827B;
+        public const int GL_INTERNALFORMAT_DEPTH_TYPE = 0x827C;
+        public const int GL_INTERNALFORMAT_STENCIL_TYPE = 0x827D;
+        public const int GL_MAX_WIDTH = 0x827E;
+        public const int GL_MAX_HEIGHT = 0x827F;
+        public const int GL_MAX_DEPTH = 0x8280;
+        public const int GL_MAX_LAYERS = 0x8281;
+        public const int GL_MAX_COMBINED_DIMENSIONS = 0x8282;
+        public const int GL_COLOR_COMPONENTS = 0x8283;
+        public const int GL_DEPTH_COMPONENTS = 0x8284;
+        public const int GL_STENCIL_COMPONENTS = 0x8285;
+        public const int GL_COLOR_RENDERABLE = 0x8286;
+        public const int GL_DEPTH_RENDERABLE = 0x8287;
+        public const int GL_STENCIL_RENDERABLE = 0x8288;
+        public const int GL_FRAMEBUFFER_RENDERABLE = 0x8289;
+        public const int GL_FRAMEBUFFER_RENDERABLE_LAYERED = 0x828A;
+        public const int GL_FRAMEBUFFER_BLEND = 0x828B;
+        public const int GL_READ_PIXELS = 0x828C;
+        public const int GL_READ_PIXELS_FORMAT = 0x828D;
+        public const int GL_READ_PIXELS_TYPE = 0x828E;
+        public const int GL_TEXTURE_IMAGE_FORMAT = 0x828F;
+        public const int GL_TEXTURE_IMAGE_TYPE = 0x8290;
+        public const int GL_GET_TEXTURE_IMAGE_FORMAT = 0x8291;
+        public const int GL_GET_TEXTURE_IMAGE_TYPE = 0x8292;
+        public const int GL_MIPMAP = 0x8293;
+        public const int GL_MANUAL_GENERATE_MIPMAP = 0x8294;
+        public const int GL_AUTO_GENERATE_MIPMAP = 0x8295;
+        public const int GL_COLOR_ENCODING = 0x8296;
+        public const int GL_SRGB_READ = 0x8297;
+        public const int GL_SRGB_WRITE = 0x8298;
+        public const int GL_FILTER = 0x829A;
+        public const int GL_VERTEX_TEXTURE = 0x829B;
+        public const int GL_TESS_CONTROL_TEXTURE = 0x829C;
+        public const int GL_TESS_EVALUATION_TEXTURE = 0x829D;
+        public const int GL_GEOMETRY_TEXTURE = 0x829E;
+        public const int GL_FRAGMENT_TEXTURE = 0x829F;
+        public const int GL_COMPUTE_TEXTURE = 0x82A0;
+        public const int GL_TEXTURE_SHADOW = 0x82A1;
+        public const int GL_TEXTURE_GATHER = 0x82A2;
+        public const int GL_TEXTURE_GATHER_SHADOW = 0x82A3;
+        public const int GL_SHADER_IMAGE_LOAD = 0x82A4;
+        public const int GL_SHADER_IMAGE_STORE = 0x82A5;
+        public const int GL_SHADER_IMAGE_ATOMIC = 0x82A6;
+        public const int GL_IMAGE_TEXEL_SIZE = 0x82A7;
+        public const int GL_IMAGE_COMPATIBILITY_CLASS = 0x82A8;
+        public const int GL_IMAGE_PIXEL_FORMAT = 0x82A9;
+        public const int GL_IMAGE_PIXEL_TYPE = 0x82AA;
+        public const int GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = 0x82AC;
+        public const int GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = 0x82AD;
+        public const int GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = 0x82AE;
+        public const int GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = 0x82AF;
+        public const int GL_TEXTURE_COMPRESSED_BLOCK_WIDTH = 0x82B1;
+        public const int GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT = 0x82B2;
+        public const int GL_TEXTURE_COMPRESSED_BLOCK_SIZE = 0x82B3;
+        public const int GL_CLEAR_BUFFER = 0x82B4;
+        public const int GL_TEXTURE_VIEW = 0x82B5;
+        public const int GL_VIEW_COMPATIBILITY_CLASS = 0x82B6;
+        public const int GL_FULL_SUPPORT = 0x82B7;
+        public const int GL_CAVEAT_SUPPORT = 0x82B8;
+        public const int GL_IMAGE_CLASS_4_X_32 = 0x82B9;
+        public const int GL_IMAGE_CLASS_2_X_32 = 0x82BA;
+        public const int GL_IMAGE_CLASS_1_X_32 = 0x82BB;
+        public const int GL_IMAGE_CLASS_4_X_16 = 0x82BC;
+        public const int GL_IMAGE_CLASS_2_X_16 = 0x82BD;
+        public const int GL_IMAGE_CLASS_1_X_16 = 0x82BE;
+        public const int GL_IMAGE_CLASS_4_X_8 = 0x82BF;
+        public const int GL_IMAGE_CLASS_2_X_8 = 0x82C0;
+        public const int GL_IMAGE_CLASS_1_X_8 = 0x82C1;
+        public const int GL_IMAGE_CLASS_11_11_10 = 0x82C2;
+        public const int GL_IMAGE_CLASS_10_10_10_2 = 0x82C3;
+        public const int GL_VIEW_CLASS_128_BITS = 0x82C4;
+        public const int GL_VIEW_CLASS_96_BITS = 0x82C5;
+        public const int GL_VIEW_CLASS_64_BITS = 0x82C6;
+        public const int GL_VIEW_CLASS_48_BITS = 0x82C7;
+        public const int GL_VIEW_CLASS_32_BITS = 0x82C8;
+        public const int GL_VIEW_CLASS_24_BITS = 0x82C9;
+        public const int GL_VIEW_CLASS_16_BITS = 0x82CA;
+        public const int GL_VIEW_CLASS_8_BITS = 0x82CB;
+        public const int GL_VIEW_CLASS_S3TC_DXT1_RGB = 0x82CC;
+        public const int GL_VIEW_CLASS_S3TC_DXT1_RGBA = 0x82CD;
+        public const int GL_VIEW_CLASS_S3TC_DXT3_RGBA = 0x82CE;
+        public const int GL_VIEW_CLASS_S3TC_DXT5_RGBA = 0x82CF;
+        public const int GL_VIEW_CLASS_RGTC1_RED = 0x82D0;
+        public const int GL_VIEW_CLASS_RGTC2_RG = 0x82D1;
+        public const int GL_VIEW_CLASS_BPTC_UNORM = 0x82D2;
+        public const int GL_VIEW_CLASS_BPTC_FLOAT = 0x82D3;
+        public const int GL_UNIFORM = 0x92E1;
+        public const int GL_UNIFORM_BLOCK = 0x92E2;
+        public const int GL_PROGRAM_INPUT = 0x92E3;
+        public const int GL_PROGRAM_OUTPUT = 0x92E4;
+        public const int GL_BUFFER_VARIABLE = 0x92E5;
+        public const int GL_SHADER_STORAGE_BLOCK = 0x92E6;
+        public const int GL_VERTEX_SUBROUTINE = 0x92E8;
+        public const int GL_TESS_CONTROL_SUBROUTINE = 0x92E9;
+        public const int GL_TESS_EVALUATION_SUBROUTINE = 0x92EA;
+        public const int GL_GEOMETRY_SUBROUTINE = 0x92EB;
+        public const int GL_FRAGMENT_SUBROUTINE = 0x92EC;
+        public const int GL_COMPUTE_SUBROUTINE = 0x92ED;
+        public const int GL_VERTEX_SUBROUTINE_UNIFORM = 0x92EE;
+        public const int GL_TESS_CONTROL_SUBROUTINE_UNIFORM = 0x92EF;
+        public const int GL_TESS_EVALUATION_SUBROUTINE_UNIFORM = 0x92F0;
+        public const int GL_GEOMETRY_SUBROUTINE_UNIFORM = 0x92F1;
+        public const int GL_FRAGMENT_SUBROUTINE_UNIFORM = 0x92F2;
+        public const int GL_COMPUTE_SUBROUTINE_UNIFORM = 0x92F3;
+        public const int GL_TRANSFORM_FEEDBACK_VARYING = 0x92F4;
+        public const int GL_ACTIVE_RESOURCES = 0x92F5;
+        public const int GL_MAX_NAME_LENGTH = 0x92F6;
+        public const int GL_MAX_NUM_ACTIVE_VARIABLES = 0x92F7;
+        public const int GL_MAX_NUM_COMPATIBLE_SUBROUTINES = 0x92F8;
+        public const int GL_NAME_LENGTH = 0x92F9;
+        public const int GL_TYPE = 0x92FA;
+        public const int GL_ARRAY_SIZE = 0x92FB;
+        public const int GL_OFFSET = 0x92FC;
+        public const int GL_BLOCK_INDEX = 0x92FD;
+        public const int GL_ARRAY_STRIDE = 0x92FE;
+        public const int GL_MATRIX_STRIDE = 0x92FF;
+        public const int GL_IS_ROW_MAJOR = 0x9300;
+        public const int GL_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301;
+        public const int GL_BUFFER_BINDING = 0x9302;
+        public const int GL_BUFFER_DATA_SIZE = 0x9303;
+        public const int GL_NUM_ACTIVE_VARIABLES = 0x9304;
+        public const int GL_ACTIVE_VARIABLES = 0x9305;
+        public const int GL_REFERENCED_BY_VERTEX_SHADER = 0x9306;
+        public const int GL_REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307;
+        public const int GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308;
+        public const int GL_REFERENCED_BY_GEOMETRY_SHADER = 0x9309;
+        public const int GL_REFERENCED_BY_FRAGMENT_SHADER = 0x930A;
+        public const int GL_REFERENCED_BY_COMPUTE_SHADER = 0x930B;
+        public const int GL_TOP_LEVEL_ARRAY_SIZE = 0x930C;
+        public const int GL_TOP_LEVEL_ARRAY_STRIDE = 0x930D;
+        public const int GL_LOCATION = 0x930E;
+        public const int GL_LOCATION_INDEX = 0x930F;
+        public const int GL_IS_PER_PATCH = 0x92E7;
+        public const int GL_SHADER_STORAGE_BUFFER = 0x90D2;
+        public const int GL_SHADER_STORAGE_BUFFER_BINDING = 0x90D3;
+        public const int GL_SHADER_STORAGE_BUFFER_START = 0x90D4;
+        public const int GL_SHADER_STORAGE_BUFFER_SIZE = 0x90D5;
+        public const int GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = 0x90D6;
+        public const int GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7;
+        public const int GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8;
+        public const int GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9;
+        public const int GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 0x90DA;
+        public const int GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 0x90DB;
+        public const int GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = 0x90DC;
+        public const int GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = 0x90DD;
+        public const int GL_MAX_SHADER_STORAGE_BLOCK_SIZE = 0x90DE;
+        public const int GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = 0x90DF;
+        public const int GL_SHADER_STORAGE_BARRIER_BIT = 0x00002000;
+        public const int GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = 0x8F39;
+        public const int GL_DEPTH_STENCIL_TEXTURE_MODE = 0x90EA;
+        public const int GL_TEXTURE_BUFFER_OFFSET = 0x919D;
+        public const int GL_TEXTURE_BUFFER_SIZE = 0x919E;
+        public const int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 0x919F;
+        public const int GL_TEXTURE_VIEW_MIN_LEVEL = 0x82DB;
+        public const int GL_TEXTURE_VIEW_NUM_LEVELS = 0x82DC;
+        public const int GL_TEXTURE_VIEW_MIN_LAYER = 0x82DD;
+        public const int GL_TEXTURE_VIEW_NUM_LAYERS = 0x82DE;
+        public const int GL_TEXTURE_IMMUTABLE_LEVELS = 0x82DF;
+        public const int GL_VERTEX_ATTRIB_BINDING = 0x82D4;
+        public const int GL_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D5;
+        public const int GL_VERTEX_BINDING_DIVISOR = 0x82D6;
+        public const int GL_VERTEX_BINDING_OFFSET = 0x82D7;
+        public const int GL_VERTEX_BINDING_STRIDE = 0x82D8;
+        public const int GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D9;
+        public const int GL_MAX_VERTEX_ATTRIB_BINDINGS = 0x82DA;
+        public const int GL_VERTEX_BINDING_BUFFER = 0x8F4F;
+        public const int GL_DISPLAY_LIST = 0x82E7;
+        public const int GL_VERSION_4_4 = 1;
+        public const int GL_MAX_VERTEX_ATTRIB_STRIDE = 0x82E5;
+        public const int GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED = 0x8221;
+        public const int GL_TEXTURE_BUFFER_BINDING = 0x8C2A;
+        public const int GL_MAP_PERSISTENT_BIT = 0x0040;
+        public const int GL_MAP_COHERENT_BIT = 0x0080;
+        public const int GL_DYNAMIC_STORAGE_BIT = 0x0100;
+        public const int GL_CLIENT_STORAGE_BIT = 0x0200;
+        public const int GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT = 0x00004000;
+        public const int GL_BUFFER_IMMUTABLE_STORAGE = 0x821F;
+        public const int GL_BUFFER_STORAGE_FLAGS = 0x8220;
+        public const int GL_CLEAR_TEXTURE = 0x9365;
+        public const int GL_LOCATION_COMPONENT = 0x934A;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_INDEX = 0x934B;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE = 0x934C;
+        public const int GL_QUERY_BUFFER = 0x9192;
+        public const int GL_QUERY_BUFFER_BARRIER_BIT = 0x00008000;
+        public const int GL_QUERY_BUFFER_BINDING = 0x9193;
+        public const int GL_QUERY_RESULT_NO_WAIT = 0x9194;
+        public const int GL_MIRROR_CLAMP_TO_EDGE = 0x8743;
+        public const int GL_NEGATIVE_ONE_TO_ONE = 0x935E;
+        public const int GL_ZERO_TO_ONE = 0x935F;
+        public const int GL_CLIP_ORIGIN = 0x935C;
+        public const int GL_CLIP_DEPTH_MODE = 0x935D;
+        public const int GL_QUERY_WAIT_INVERTED = 0x8E17;
+        public const int GL_QUERY_NO_WAIT_INVERTED = 0x8E18;
+        public const int GL_QUERY_BY_REGION_WAIT_INVERTED = 0x8E19;
+        public const int GL_QUERY_BY_REGION_NO_WAIT_INVERTED = 0x8E1A;
+        public const int GL_MAX_CULL_DISTANCES = 0x82F9;
+        public const int GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES = 0x82FA;
+        public const int GL_TEXTURE_TARGET = 0x1006;
+        public const int GL_QUERY_TARGET = 0x82EA;
+        public const int GL_GUILTY_CONTEXT_RESET = 0x8253;
+        public const int GL_INNOCENT_CONTEXT_RESET = 0x8254;
+        public const int GL_UNKNOWN_CONTEXT_RESET = 0x8255;
+        public const int GL_RESET_NOTIFICATION_STRATEGY = 0x8256;
+        public const int GL_LOSE_CONTEXT_ON_RESET = 0x8252;
+        public const int GL_NO_RESET_NOTIFICATION = 0x8261;
+        public const int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT = 0x00000004;
+        public const int GL_CONTEXT_RELEASE_BEHAVIOR = 0x82FB;
+        public const int GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x82FC;
+        public const int GL_VERSION_4_6 = 1;
+        public const int GL_SHADER_BINARY_FORMAT_SPIR_V = 0x9551;
+        public const int GL_SPIR_V_BINARY = 0x9552;
+        public const int GL_PARAMETER_BUFFER = 0x80EE;
+        public const int GL_PARAMETER_BUFFER_BINDING = 0x80EF;
+        public const int GL_CONTEXT_FLAG_NO_ERROR_BIT = 0x00000008;
+        public const int GL_VERTICES_SUBMITTED = 0x82EE;
+        public const int GL_PRIMITIVES_SUBMITTED = 0x82EF;
+        public const int GL_VERTEX_SHADER_INVOCATIONS = 0x82F0;
+        public const int GL_TESS_CONTROL_SHADER_PATCHES = 0x82F1;
+        public const int GL_TESS_EVALUATION_SHADER_INVOCATIONS = 0x82F2;
+        public const int GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED = 0x82F3;
+        public const int GL_FRAGMENT_SHADER_INVOCATIONS = 0x82F4;
+        public const int GL_COMPUTE_SHADER_INVOCATIONS = 0x82F5;
+        public const int GL_CLIPPING_INPUT_PRIMITIVES = 0x82F6;
+        public const int GL_CLIPPING_OUTPUT_PRIMITIVES = 0x82F7;
+        public const int GL_POLYGON_OFFSET_CLAMP = 0x8E1B;
+        public const int GL_SPIR_V_EXTENSIONS = 0x9553;
+        public const int GL_NUM_SPIR_V_EXTENSIONS = 0x9554;
+        public const int GL_TEXTURE_MAX_ANISOTROPY = 0x84FE;
+        public const int GL_MAX_TEXTURE_MAX_ANISOTROPY = 0x84FF;
+        public const int GL_TRANSFORM_FEEDBACK_OVERFLOW = 0x82EC;
+        public const int GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW = 0x82ED;
+        public const int GL_ARB_ES2_compatibility = 1;
+        public const int GL_ARB_ES3_1_compatibility = 1;
+        public const int GL_ARB_ES3_2_compatibility = 1;
+        public const int GL_PRIMITIVE_BOUNDING_BOX_ARB = 0x92BE;
+        public const int GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB = 0x9381;
+        public const int GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB = 0x9382;
+        public const int GL_ARB_ES3_compatibility = 1;
+        public const int GL_ARB_arrays_of_arrays = 1;
+        public const int GL_ARB_base_instance = 1;
+        public const int GL_ARB_bindless_texture = 1;
+        public const int GL_UNSIGNED_INT64_ARB = 0x140F;
+        public const int GL_ARB_blend_func_extended = 1;
+        public const int GL_ARB_buffer_storage = 1;
+        public const int GL_ARB_cl_event = 1;
+        public const int GL_SYNC_CL_EVENT_ARB = 0x8240;
+        public const int GL_SYNC_CL_EVENT_COMPLETE_ARB = 0x8241;
+        public const int GL_ARB_clear_buffer_object = 1;
+        public const int GL_ARB_clear_texture = 1;
+        public const int GL_ARB_clip_control = 1;
+        public const int GL_ARB_color_buffer_float = 1;
+        public const int GL_RGBA_FLOAT_MODE_ARB = 0x8820;
+        public const int GL_CLAMP_VERTEX_COLOR_ARB = 0x891A;
+        public const int GL_CLAMP_FRAGMENT_COLOR_ARB = 0x891B;
+        public const int GL_CLAMP_READ_COLOR_ARB = 0x891C;
+        public const int GL_FIXED_ONLY_ARB = 0x891D;
+        public const int GL_ARB_compatibility = 1;
+        public const int GL_ARB_compressed_texture_pixel_storage = 1;
+        public const int GL_ARB_compute_shader = 1;
+        public const int GL_ARB_compute_variable_group_size = 1;
+        public const int GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB = 0x9344;
+        public const int GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB = 0x90EB;
+        public const int GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB = 0x9345;
+        public const int GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB = 0x91BF;
+        public const int GL_ARB_conditional_render_inverted = 1;
+        public const int GL_ARB_conservative_depth = 1;
+        public const int GL_ARB_copy_buffer = 1;
+        public const int GL_ARB_copy_image = 1;
+        public const int GL_ARB_cull_distance = 1;
+        public const int GL_ARB_debug_output = 1;
+        public const int GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB = 0x8242;
+        public const int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB = 0x8243;
+        public const int GL_DEBUG_CALLBACK_FUNCTION_ARB = 0x8244;
+        public const int GL_DEBUG_CALLBACK_USER_PARAM_ARB = 0x8245;
+        public const int GL_DEBUG_SOURCE_API_ARB = 0x8246;
+        public const int GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB = 0x8247;
+        public const int GL_DEBUG_SOURCE_SHADER_COMPILER_ARB = 0x8248;
+        public const int GL_DEBUG_SOURCE_THIRD_PARTY_ARB = 0x8249;
+        public const int GL_DEBUG_SOURCE_APPLICATION_ARB = 0x824A;
+        public const int GL_DEBUG_SOURCE_OTHER_ARB = 0x824B;
+        public const int GL_DEBUG_TYPE_ERROR_ARB = 0x824C;
+        public const int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB = 0x824D;
+        public const int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB = 0x824E;
+        public const int GL_DEBUG_TYPE_PORTABILITY_ARB = 0x824F;
+        public const int GL_DEBUG_TYPE_PERFORMANCE_ARB = 0x8250;
+        public const int GL_DEBUG_TYPE_OTHER_ARB = 0x8251;
+        public const int GL_MAX_DEBUG_MESSAGE_LENGTH_ARB = 0x9143;
+        public const int GL_MAX_DEBUG_LOGGED_MESSAGES_ARB = 0x9144;
+        public const int GL_DEBUG_LOGGED_MESSAGES_ARB = 0x9145;
+        public const int GL_DEBUG_SEVERITY_HIGH_ARB = 0x9146;
+        public const int GL_DEBUG_SEVERITY_MEDIUM_ARB = 0x9147;
+        public const int GL_DEBUG_SEVERITY_LOW_ARB = 0x9148;
+        public const int GL_ARB_depth_buffer_float = 1;
+        public const int GL_ARB_depth_clamp = 1;
+        public const int GL_ARB_depth_texture = 1;
+        public const int GL_DEPTH_COMPONENT16_ARB = 0x81A5;
+        public const int GL_DEPTH_COMPONENT24_ARB = 0x81A6;
+        public const int GL_DEPTH_COMPONENT32_ARB = 0x81A7;
+        public const int GL_TEXTURE_DEPTH_SIZE_ARB = 0x884A;
+        public const int GL_DEPTH_TEXTURE_MODE_ARB = 0x884B;
+        public const int GL_ARB_derivative_control = 1;
+        public const int GL_ARB_direct_state_access = 1;
+        public const int GL_ARB_draw_buffers = 1;
+        public const int GL_MAX_DRAW_BUFFERS_ARB = 0x8824;
+        public const int GL_DRAW_BUFFER0_ARB = 0x8825;
+        public const int GL_DRAW_BUFFER1_ARB = 0x8826;
+        public const int GL_DRAW_BUFFER2_ARB = 0x8827;
+        public const int GL_DRAW_BUFFER3_ARB = 0x8828;
+        public const int GL_DRAW_BUFFER4_ARB = 0x8829;
+        public const int GL_DRAW_BUFFER5_ARB = 0x882A;
+        public const int GL_DRAW_BUFFER6_ARB = 0x882B;
+        public const int GL_DRAW_BUFFER7_ARB = 0x882C;
+        public const int GL_DRAW_BUFFER8_ARB = 0x882D;
+        public const int GL_DRAW_BUFFER9_ARB = 0x882E;
+        public const int GL_DRAW_BUFFER10_ARB = 0x882F;
+        public const int GL_DRAW_BUFFER11_ARB = 0x8830;
+        public const int GL_DRAW_BUFFER12_ARB = 0x8831;
+        public const int GL_DRAW_BUFFER13_ARB = 0x8832;
+        public const int GL_DRAW_BUFFER14_ARB = 0x8833;
+        public const int GL_DRAW_BUFFER15_ARB = 0x8834;
+        public const int GL_ARB_draw_buffers_blend = 1;
+        public const int GL_ARB_draw_elements_base_vertex = 1;
+        public const int GL_ARB_draw_indirect = 1;
+        public const int GL_ARB_draw_instanced = 1;
+        public const int GL_ARB_enhanced_layouts = 1;
+        public const int GL_ARB_explicit_attrib_location = 1;
+        public const int GL_ARB_explicit_uniform_location = 1;
+        public const int GL_ARB_fragment_coord_conventions = 1;
+        public const int GL_ARB_fragment_layer_viewport = 1;
+        public const int GL_ARB_fragment_program = 1;
+        public const int GL_FRAGMENT_PROGRAM_ARB = 0x8804;
+        public const int GL_PROGRAM_FORMAT_ASCII_ARB = 0x8875;
+        public const int GL_PROGRAM_LENGTH_ARB = 0x8627;
+        public const int GL_PROGRAM_FORMAT_ARB = 0x8876;
+        public const int GL_PROGRAM_BINDING_ARB = 0x8677;
+        public const int GL_PROGRAM_INSTRUCTIONS_ARB = 0x88A0;
+        public const int GL_MAX_PROGRAM_INSTRUCTIONS_ARB = 0x88A1;
+        public const int GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A2;
+        public const int GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A3;
+        public const int GL_PROGRAM_TEMPORARIES_ARB = 0x88A4;
+        public const int GL_MAX_PROGRAM_TEMPORARIES_ARB = 0x88A5;
+        public const int GL_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A6;
+        public const int GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A7;
+        public const int GL_PROGRAM_PARAMETERS_ARB = 0x88A8;
+        public const int GL_MAX_PROGRAM_PARAMETERS_ARB = 0x88A9;
+        public const int GL_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AA;
+        public const int GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AB;
+        public const int GL_PROGRAM_ATTRIBS_ARB = 0x88AC;
+        public const int GL_MAX_PROGRAM_ATTRIBS_ARB = 0x88AD;
+        public const int GL_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AE;
+        public const int GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AF;
+        public const int GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB = 0x88B4;
+        public const int GL_MAX_PROGRAM_ENV_PARAMETERS_ARB = 0x88B5;
+        public const int GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB = 0x88B6;
+        public const int GL_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x8805;
+        public const int GL_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x8806;
+        public const int GL_PROGRAM_TEX_INDIRECTIONS_ARB = 0x8807;
+        public const int GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x8808;
+        public const int GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x8809;
+        public const int GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x880A;
+        public const int GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x880B;
+        public const int GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x880C;
+        public const int GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = 0x880D;
+        public const int GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x880E;
+        public const int GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x880F;
+        public const int GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x8810;
+        public const int GL_PROGRAM_STRING_ARB = 0x8628;
+        public const int GL_PROGRAM_ERROR_POSITION_ARB = 0x864B;
+        public const int GL_CURRENT_MATRIX_ARB = 0x8641;
+        public const int GL_TRANSPOSE_CURRENT_MATRIX_ARB = 0x88B7;
+        public const int GL_CURRENT_MATRIX_STACK_DEPTH_ARB = 0x8640;
+        public const int GL_MAX_PROGRAM_MATRICES_ARB = 0x862F;
+        public const int GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = 0x862E;
+        public const int GL_MAX_TEXTURE_COORDS_ARB = 0x8871;
+        public const int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872;
+        public const int GL_PROGRAM_ERROR_STRING_ARB = 0x8874;
+        public const int GL_MATRIX0_ARB = 0x88C0;
+        public const int GL_MATRIX1_ARB = 0x88C1;
+        public const int GL_MATRIX2_ARB = 0x88C2;
+        public const int GL_MATRIX3_ARB = 0x88C3;
+        public const int GL_MATRIX4_ARB = 0x88C4;
+        public const int GL_MATRIX5_ARB = 0x88C5;
+        public const int GL_MATRIX6_ARB = 0x88C6;
+        public const int GL_MATRIX7_ARB = 0x88C7;
+        public const int GL_MATRIX8_ARB = 0x88C8;
+        public const int GL_MATRIX9_ARB = 0x88C9;
+        public const int GL_MATRIX10_ARB = 0x88CA;
+        public const int GL_MATRIX11_ARB = 0x88CB;
+        public const int GL_MATRIX12_ARB = 0x88CC;
+        public const int GL_MATRIX13_ARB = 0x88CD;
+        public const int GL_MATRIX14_ARB = 0x88CE;
+        public const int GL_MATRIX15_ARB = 0x88CF;
+        public const int GL_MATRIX16_ARB = 0x88D0;
+        public const int GL_MATRIX17_ARB = 0x88D1;
+        public const int GL_MATRIX18_ARB = 0x88D2;
+        public const int GL_MATRIX19_ARB = 0x88D3;
+        public const int GL_MATRIX20_ARB = 0x88D4;
+        public const int GL_MATRIX21_ARB = 0x88D5;
+        public const int GL_MATRIX22_ARB = 0x88D6;
+        public const int GL_MATRIX23_ARB = 0x88D7;
+        public const int GL_MATRIX24_ARB = 0x88D8;
+        public const int GL_MATRIX25_ARB = 0x88D9;
+        public const int GL_MATRIX26_ARB = 0x88DA;
+        public const int GL_MATRIX27_ARB = 0x88DB;
+        public const int GL_MATRIX28_ARB = 0x88DC;
+        public const int GL_MATRIX29_ARB = 0x88DD;
+        public const int GL_MATRIX30_ARB = 0x88DE;
+        public const int GL_MATRIX31_ARB = 0x88DF;
+        public const int GL_ARB_fragment_program_shadow = 1;
+        public const int GL_ARB_fragment_shader = 1;
+        public const int GL_FRAGMENT_SHADER_ARB = 0x8B30;
+        public const int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB = 0x8B49;
+        public const int GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB = 0x8B8B;
+        public const int GL_ARB_fragment_shader_interlock = 1;
+        public const int GL_ARB_framebuffer_no_attachments = 1;
+        public const int GL_ARB_framebuffer_object = 1;
+        public const int GL_ARB_framebuffer_sRGB = 1;
+        public const int GL_ARB_geometry_shader4 = 1;
+        public const int GL_LINES_ADJACENCY_ARB = 0x000A;
+        public const int GL_LINE_STRIP_ADJACENCY_ARB = 0x000B;
+        public const int GL_TRIANGLES_ADJACENCY_ARB = 0x000C;
+        public const int GL_TRIANGLE_STRIP_ADJACENCY_ARB = 0x000D;
+        public const int GL_PROGRAM_POINT_SIZE_ARB = 0x8642;
+        public const int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB = 0x8C29;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB = 0x8DA7;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB = 0x8DA8;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB = 0x8DA9;
+        public const int GL_GEOMETRY_SHADER_ARB = 0x8DD9;
+        public const int GL_GEOMETRY_VERTICES_OUT_ARB = 0x8DDA;
+        public const int GL_GEOMETRY_INPUT_TYPE_ARB = 0x8DDB;
+        public const int GL_GEOMETRY_OUTPUT_TYPE_ARB = 0x8DDC;
+        public const int GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB = 0x8DDD;
+        public const int GL_MAX_VERTEX_VARYING_COMPONENTS_ARB = 0x8DDE;
+        public const int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB = 0x8DDF;
+        public const int GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB = 0x8DE0;
+        public const int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB = 0x8DE1;
+        public const int GL_ARB_get_program_binary = 1;
+        public const int GL_ARB_get_texture_sub_image = 1;
+        public const int GL_ARB_gl_spirv = 1;
+        public const int GL_SHADER_BINARY_FORMAT_SPIR_V_ARB = 0x9551;
+        public const int GL_SPIR_V_BINARY_ARB = 0x9552;
+        public const int GL_ARB_gpu_shader5 = 1;
+        public const int GL_ARB_gpu_shader_fp64 = 1;
+        public const int GL_ARB_gpu_shader_int64 = 1;
+        public const int GL_INT64_ARB = 0x140E;
+        public const int GL_INT64_VEC2_ARB = 0x8FE9;
+        public const int GL_INT64_VEC3_ARB = 0x8FEA;
+        public const int GL_INT64_VEC4_ARB = 0x8FEB;
+        public const int GL_UNSIGNED_INT64_VEC2_ARB = 0x8FF5;
+        public const int GL_UNSIGNED_INT64_VEC3_ARB = 0x8FF6;
+        public const int GL_UNSIGNED_INT64_VEC4_ARB = 0x8FF7;
+        public const int GL_ARB_half_float_pixel = 1;
+        public const int GL_HALF_FLOAT_ARB = 0x140B;
+        public const int GL_ARB_half_float_vertex = 1;
+        public const int GL_ARB_imaging = 1;
+        public const int GL_ARB_indirect_parameters = 1;
+        public const int GL_PARAMETER_BUFFER_ARB = 0x80EE;
+        public const int GL_PARAMETER_BUFFER_BINDING_ARB = 0x80EF;
+        public const int GL_ARB_instanced_arrays = 1;
+        public const int GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB = 0x88FE;
+        public const int GL_ARB_internalformat_query = 1;
+        public const int GL_ARB_internalformat_query2 = 1;
+        public const int GL_SRGB_DECODE_ARB = 0x8299;
+        public const int GL_ARB_invalidate_subdata = 1;
+        public const int GL_ARB_map_buffer_alignment = 1;
+        public const int GL_ARB_map_buffer_range = 1;
+        public const int GL_ARB_matrix_palette = 1;
+        public const int GL_MATRIX_PALETTE_ARB = 0x8840;
+        public const int GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = 0x8841;
+        public const int GL_MAX_PALETTE_MATRICES_ARB = 0x8842;
+        public const int GL_CURRENT_PALETTE_MATRIX_ARB = 0x8843;
+        public const int GL_MATRIX_INDEX_ARRAY_ARB = 0x8844;
+        public const int GL_CURRENT_MATRIX_INDEX_ARB = 0x8845;
+        public const int GL_MATRIX_INDEX_ARRAY_SIZE_ARB = 0x8846;
+        public const int GL_MATRIX_INDEX_ARRAY_TYPE_ARB = 0x8847;
+        public const int GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = 0x8848;
+        public const int GL_MATRIX_INDEX_ARRAY_POINTER_ARB = 0x8849;
+        public const int GL_ARB_multi_bind = 1;
+        public const int GL_ARB_multi_draw_indirect = 1;
+        public const int GL_ARB_multisample = 1;
+        public const int GL_MULTISAMPLE_ARB = 0x809D;
+        public const int GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E;
+        public const int GL_SAMPLE_ALPHA_TO_ONE_ARB = 0x809F;
+        public const int GL_SAMPLE_COVERAGE_ARB = 0x80A0;
+        public const int GL_SAMPLE_BUFFERS_ARB = 0x80A8;
+        public const int GL_SAMPLES_ARB = 0x80A9;
+        public const int GL_SAMPLE_COVERAGE_VALUE_ARB = 0x80AA;
+        public const int GL_SAMPLE_COVERAGE_INVERT_ARB = 0x80AB;
+        public const int GL_MULTISAMPLE_BIT_ARB = 0x20000000;
+        public const int GL_ARB_occlusion_query = 1;
+        public const int GL_QUERY_COUNTER_BITS_ARB = 0x8864;
+        public const int GL_CURRENT_QUERY_ARB = 0x8865;
+        public const int GL_QUERY_RESULT_ARB = 0x8866;
+        public const int GL_QUERY_RESULT_AVAILABLE_ARB = 0x8867;
+        public const int GL_SAMPLES_PASSED_ARB = 0x8914;
+        public const int GL_ARB_occlusion_query2 = 1;
+        public const int GL_ARB_parallel_shader_compile = 1;
+        public const int GL_MAX_SHADER_COMPILER_THREADS_ARB = 0x91B0;
+        public const int GL_COMPLETION_STATUS_ARB = 0x91B1;
+        public const int GL_ARB_pipeline_statistics_query = 1;
+        public const int GL_VERTICES_SUBMITTED_ARB = 0x82EE;
+        public const int GL_PRIMITIVES_SUBMITTED_ARB = 0x82EF;
+        public const int GL_VERTEX_SHADER_INVOCATIONS_ARB = 0x82F0;
+        public const int GL_TESS_CONTROL_SHADER_PATCHES_ARB = 0x82F1;
+        public const int GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB = 0x82F2;
+        public const int GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB = 0x82F3;
+        public const int GL_FRAGMENT_SHADER_INVOCATIONS_ARB = 0x82F4;
+        public const int GL_COMPUTE_SHADER_INVOCATIONS_ARB = 0x82F5;
+        public const int GL_CLIPPING_INPUT_PRIMITIVES_ARB = 0x82F6;
+        public const int GL_CLIPPING_OUTPUT_PRIMITIVES_ARB = 0x82F7;
+        public const int GL_ARB_pixel_buffer_object = 1;
+        public const int GL_PIXEL_PACK_BUFFER_ARB = 0x88EB;
+        public const int GL_PIXEL_UNPACK_BUFFER_ARB = 0x88EC;
+        public const int GL_PIXEL_PACK_BUFFER_BINDING_ARB = 0x88ED;
+        public const int GL_PIXEL_UNPACK_BUFFER_BINDING_ARB = 0x88EF;
+        public const int GL_ARB_point_parameters = 1;
+        public const int GL_POINT_SIZE_MIN_ARB = 0x8126;
+        public const int GL_POINT_SIZE_MAX_ARB = 0x8127;
+        public const int GL_POINT_FADE_THRESHOLD_SIZE_ARB = 0x8128;
+        public const int GL_POINT_DISTANCE_ATTENUATION_ARB = 0x8129;
+        public const int GL_ARB_point_sprite = 1;
+        public const int GL_POINT_SPRITE_ARB = 0x8861;
+        public const int GL_COORD_REPLACE_ARB = 0x8862;
+        public const int GL_ARB_polygon_offset_clamp = 1;
+        public const int GL_ARB_post_depth_coverage = 1;
+        public const int GL_ARB_program_interface_query = 1;
+        public const int GL_ARB_provoking_vertex = 1;
+        public const int GL_ARB_query_buffer_object = 1;
+        public const int GL_ARB_robust_buffer_access_behavior = 1;
+        public const int GL_ARB_robustness = 1;
+        public const int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB = 0x00000004;
+        public const int GL_LOSE_CONTEXT_ON_RESET_ARB = 0x8252;
+        public const int GL_GUILTY_CONTEXT_RESET_ARB = 0x8253;
+        public const int GL_INNOCENT_CONTEXT_RESET_ARB = 0x8254;
+        public const int GL_UNKNOWN_CONTEXT_RESET_ARB = 0x8255;
+        public const int GL_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256;
+        public const int GL_NO_RESET_NOTIFICATION_ARB = 0x8261;
+        public const int GL_ARB_robustness_isolation = 1;
+        public const int GL_ARB_sample_locations = 1;
+        public const int GL_SAMPLE_LOCATION_SUBPIXEL_BITS_ARB = 0x933D;
+        public const int GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB = 0x933E;
+        public const int GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB = 0x933F;
+        public const int GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB = 0x9340;
+        public const int GL_SAMPLE_LOCATION_ARB = 0x8E50;
+        public const int GL_PROGRAMMABLE_SAMPLE_LOCATION_ARB = 0x9341;
+        public const int GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB = 0x9342;
+        public const int GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB = 0x9343;
+        public const int GL_ARB_sample_shading = 1;
+        public const int GL_SAMPLE_SHADING_ARB = 0x8C36;
+        public const int GL_MIN_SAMPLE_SHADING_VALUE_ARB = 0x8C37;
+        public const int GL_ARB_sampler_objects = 1;
+        public const int GL_ARB_seamless_cube_map = 1;
+        public const int GL_ARB_seamless_cubemap_per_texture = 1;
+        public const int GL_ARB_separate_shader_objects = 1;
+        public const int GL_ARB_shader_atomic_counter_ops = 1;
+        public const int GL_ARB_shader_atomic_counters = 1;
+        public const int GL_ARB_shader_ballot = 1;
+        public const int GL_ARB_shader_bit_encoding = 1;
+        public const int GL_ARB_shader_clock = 1;
+        public const int GL_ARB_shader_draw_parameters = 1;
+        public const int GL_ARB_shader_group_vote = 1;
+        public const int GL_ARB_shader_image_load_store = 1;
+        public const int GL_ARB_shader_image_size = 1;
+        public const int GL_ARB_shader_objects = 1;
+        public const int GL_PROGRAM_OBJECT_ARB = 0x8B40;
+        public const int GL_SHADER_OBJECT_ARB = 0x8B48;
+        public const int GL_OBJECT_TYPE_ARB = 0x8B4E;
+        public const int GL_OBJECT_SUBTYPE_ARB = 0x8B4F;
+        public const int GL_FLOAT_VEC2_ARB = 0x8B50;
+        public const int GL_FLOAT_VEC3_ARB = 0x8B51;
+        public const int GL_FLOAT_VEC4_ARB = 0x8B52;
+        public const int GL_INT_VEC2_ARB = 0x8B53;
+        public const int GL_INT_VEC3_ARB = 0x8B54;
+        public const int GL_INT_VEC4_ARB = 0x8B55;
+        public const int GL_BOOL_ARB = 0x8B56;
+        public const int GL_BOOL_VEC2_ARB = 0x8B57;
+        public const int GL_BOOL_VEC3_ARB = 0x8B58;
+        public const int GL_BOOL_VEC4_ARB = 0x8B59;
+        public const int GL_FLOAT_MAT2_ARB = 0x8B5A;
+        public const int GL_FLOAT_MAT3_ARB = 0x8B5B;
+        public const int GL_FLOAT_MAT4_ARB = 0x8B5C;
+        public const int GL_SAMPLER_1D_ARB = 0x8B5D;
+        public const int GL_SAMPLER_2D_ARB = 0x8B5E;
+        public const int GL_SAMPLER_3D_ARB = 0x8B5F;
+        public const int GL_SAMPLER_CUBE_ARB = 0x8B60;
+        public const int GL_SAMPLER_1D_SHADOW_ARB = 0x8B61;
+        public const int GL_SAMPLER_2D_SHADOW_ARB = 0x8B62;
+        public const int GL_SAMPLER_2D_RECT_ARB = 0x8B63;
+        public const int GL_SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64;
+        public const int GL_OBJECT_DELETE_STATUS_ARB = 0x8B80;
+        public const int GL_OBJECT_COMPILE_STATUS_ARB = 0x8B81;
+        public const int GL_OBJECT_LINK_STATUS_ARB = 0x8B82;
+        public const int GL_OBJECT_VALIDATE_STATUS_ARB = 0x8B83;
+        public const int GL_OBJECT_INFO_LOG_LENGTH_ARB = 0x8B84;
+        public const int GL_OBJECT_ATTACHED_OBJECTS_ARB = 0x8B85;
+        public const int GL_OBJECT_ACTIVE_UNIFORMS_ARB = 0x8B86;
+        public const int GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB = 0x8B87;
+        public const int GL_OBJECT_SHADER_SOURCE_LENGTH_ARB = 0x8B88;
+        public const int GL_ARB_shader_precision = 1;
+        public const int GL_ARB_shader_stencil_export = 1;
+        public const int GL_ARB_shader_storage_buffer_object = 1;
+        public const int GL_ARB_shader_subroutine = 1;
+        public const int GL_ARB_shader_texture_image_samples = 1;
+        public const int GL_ARB_shader_texture_lod = 1;
+        public const int GL_ARB_shader_viewport_layer_array = 1;
+        public const int GL_ARB_shading_language_100 = 1;
+        public const int GL_SHADING_LANGUAGE_VERSION_ARB = 0x8B8C;
+        public const int GL_ARB_shading_language_420pack = 1;
+        public const int GL_ARB_shading_language_include = 1;
+        public const int GL_SHADER_INCLUDE_ARB = 0x8DAE;
+        public const int GL_NAMED_STRING_LENGTH_ARB = 0x8DE9;
+        public const int GL_NAMED_STRING_TYPE_ARB = 0x8DEA;
+        public const int GL_ARB_shading_language_packing = 1;
+        public const int GL_ARB_shadow = 1;
+        public const int GL_TEXTURE_COMPARE_MODE_ARB = 0x884C;
+        public const int GL_TEXTURE_COMPARE_FUNC_ARB = 0x884D;
+        public const int GL_COMPARE_R_TO_TEXTURE_ARB = 0x884E;
+        public const int GL_ARB_shadow_ambient = 1;
+        public const int GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = 0x80BF;
+        public const int GL_ARB_sparse_buffer = 1;
+        public const int GL_SPARSE_STORAGE_BIT_ARB = 0x0400;
+        public const int GL_SPARSE_BUFFER_PAGE_SIZE_ARB = 0x82F8;
+        public const int GL_ARB_sparse_texture = 1;
+        public const int GL_TEXTURE_SPARSE_ARB = 0x91A6;
+        public const int GL_VIRTUAL_PAGE_SIZE_INDEX_ARB = 0x91A7;
+        public const int GL_NUM_SPARSE_LEVELS_ARB = 0x91AA;
+        public const int GL_NUM_VIRTUAL_PAGE_SIZES_ARB = 0x91A8;
+        public const int GL_VIRTUAL_PAGE_SIZE_X_ARB = 0x9195;
+        public const int GL_VIRTUAL_PAGE_SIZE_Y_ARB = 0x9196;
+        public const int GL_VIRTUAL_PAGE_SIZE_Z_ARB = 0x9197;
+        public const int GL_MAX_SPARSE_TEXTURE_SIZE_ARB = 0x9198;
+        public const int GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB = 0x9199;
+        public const int GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB = 0x919A;
+        public const int GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB = 0x91A9;
+        public const int GL_ARB_sparse_texture2 = 1;
+        public const int GL_ARB_sparse_texture_clamp = 1;
+        public const int GL_ARB_spirv_extensions = 1;
+        public const int GL_ARB_stencil_texturing = 1;
+        public const int GL_ARB_sync = 1;
+        public const int GL_ARB_tessellation_shader = 1;
+        public const int GL_ARB_texture_barrier = 1;
+        public const int GL_ARB_texture_border_clamp = 1;
+        public const int GL_CLAMP_TO_BORDER_ARB = 0x812D;
+        public const int GL_ARB_texture_buffer_object = 1;
+        public const int GL_TEXTURE_BUFFER_ARB = 0x8C2A;
+        public const int GL_MAX_TEXTURE_BUFFER_SIZE_ARB = 0x8C2B;
+        public const int GL_TEXTURE_BINDING_BUFFER_ARB = 0x8C2C;
+        public const int GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB = 0x8C2D;
+        public const int GL_TEXTURE_BUFFER_FORMAT_ARB = 0x8C2E;
+        public const int GL_ARB_texture_buffer_object_rgb32 = 1;
+        public const int GL_ARB_texture_buffer_range = 1;
+        public const int GL_ARB_texture_compression = 1;
+        public const int GL_COMPRESSED_ALPHA_ARB = 0x84E9;
+        public const int GL_COMPRESSED_LUMINANCE_ARB = 0x84EA;
+        public const int GL_COMPRESSED_LUMINANCE_ALPHA_ARB = 0x84EB;
+        public const int GL_COMPRESSED_INTENSITY_ARB = 0x84EC;
+        public const int GL_COMPRESSED_RGB_ARB = 0x84ED;
+        public const int GL_COMPRESSED_RGBA_ARB = 0x84EE;
+        public const int GL_TEXTURE_COMPRESSION_HINT_ARB = 0x84EF;
+        public const int GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = 0x86A0;
+        public const int GL_TEXTURE_COMPRESSED_ARB = 0x86A1;
+        public const int GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A2;
+        public const int GL_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A3;
+        public const int GL_ARB_texture_compression_bptc = 1;
+        public const int GL_COMPRESSED_RGBA_BPTC_UNORM_ARB = 0x8E8C;
+        public const int GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB = 0x8E8D;
+        public const int GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB = 0x8E8E;
+        public const int GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB = 0x8E8F;
+        public const int GL_ARB_texture_compression_rgtc = 1;
+        public const int GL_ARB_texture_cube_map = 1;
+        public const int GL_NORMAL_MAP_ARB = 0x8511;
+        public const int GL_REFLECTION_MAP_ARB = 0x8512;
+        public const int GL_TEXTURE_CUBE_MAP_ARB = 0x8513;
+        public const int GL_TEXTURE_BINDING_CUBE_MAP_ARB = 0x8514;
+        public const int GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x8515;
+        public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x8516;
+        public const int GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x8517;
+        public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x8518;
+        public const int GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x8519;
+        public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x851A;
+        public const int GL_PROXY_TEXTURE_CUBE_MAP_ARB = 0x851B;
+        public const int GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB = 0x851C;
+        public const int GL_ARB_texture_cube_map_array = 1;
+        public const int GL_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x9009;
+        public const int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB = 0x900A;
+        public const int GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x900B;
+        public const int GL_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900C;
+        public const int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB = 0x900D;
+        public const int GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900E;
+        public const int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900F;
+        public const int GL_ARB_texture_env_add = 1;
+        public const int GL_ARB_texture_env_combine = 1;
+        public const int GL_COMBINE_ARB = 0x8570;
+        public const int GL_COMBINE_RGB_ARB = 0x8571;
+        public const int GL_COMBINE_ALPHA_ARB = 0x8572;
+        public const int GL_SOURCE0_RGB_ARB = 0x8580;
+        public const int GL_SOURCE1_RGB_ARB = 0x8581;
+        public const int GL_SOURCE2_RGB_ARB = 0x8582;
+        public const int GL_SOURCE0_ALPHA_ARB = 0x8588;
+        public const int GL_SOURCE1_ALPHA_ARB = 0x8589;
+        public const int GL_SOURCE2_ALPHA_ARB = 0x858A;
+        public const int GL_OPERAND0_RGB_ARB = 0x8590;
+        public const int GL_OPERAND1_RGB_ARB = 0x8591;
+        public const int GL_OPERAND2_RGB_ARB = 0x8592;
+        public const int GL_OPERAND0_ALPHA_ARB = 0x8598;
+        public const int GL_OPERAND1_ALPHA_ARB = 0x8599;
+        public const int GL_OPERAND2_ALPHA_ARB = 0x859A;
+        public const int GL_RGB_SCALE_ARB = 0x8573;
+        public const int GL_ADD_SIGNED_ARB = 0x8574;
+        public const int GL_INTERPOLATE_ARB = 0x8575;
+        public const int GL_SUBTRACT_ARB = 0x84E7;
+        public const int GL_CONSTANT_ARB = 0x8576;
+        public const int GL_PRIMARY_COLOR_ARB = 0x8577;
+        public const int GL_PREVIOUS_ARB = 0x8578;
+        public const int GL_ARB_texture_env_crossbar = 1;
+        public const int GL_ARB_texture_env_dot3 = 1;
+        public const int GL_DOT3_RGB_ARB = 0x86AE;
+        public const int GL_DOT3_RGBA_ARB = 0x86AF;
+        public const int GL_ARB_texture_filter_anisotropic = 1;
+        public const int GL_ARB_texture_filter_minmax = 1;
+        public const int GL_TEXTURE_REDUCTION_MODE_ARB = 0x9366;
+        public const int GL_WEIGHTED_AVERAGE_ARB = 0x9367;
+        public const int GL_ARB_texture_float = 1;
+        public const int GL_TEXTURE_RED_TYPE_ARB = 0x8C10;
+        public const int GL_TEXTURE_GREEN_TYPE_ARB = 0x8C11;
+        public const int GL_TEXTURE_BLUE_TYPE_ARB = 0x8C12;
+        public const int GL_TEXTURE_ALPHA_TYPE_ARB = 0x8C13;
+        public const int GL_TEXTURE_LUMINANCE_TYPE_ARB = 0x8C14;
+        public const int GL_TEXTURE_INTENSITY_TYPE_ARB = 0x8C15;
+        public const int GL_TEXTURE_DEPTH_TYPE_ARB = 0x8C16;
+        public const int GL_UNSIGNED_NORMALIZED_ARB = 0x8C17;
+        public const int GL_RGBA32F_ARB = 0x8814;
+        public const int GL_RGB32F_ARB = 0x8815;
+        public const int GL_ALPHA32F_ARB = 0x8816;
+        public const int GL_INTENSITY32F_ARB = 0x8817;
+        public const int GL_LUMINANCE32F_ARB = 0x8818;
+        public const int GL_LUMINANCE_ALPHA32F_ARB = 0x8819;
+        public const int GL_RGBA16F_ARB = 0x881A;
+        public const int GL_RGB16F_ARB = 0x881B;
+        public const int GL_ALPHA16F_ARB = 0x881C;
+        public const int GL_INTENSITY16F_ARB = 0x881D;
+        public const int GL_LUMINANCE16F_ARB = 0x881E;
+        public const int GL_LUMINANCE_ALPHA16F_ARB = 0x881F;
+        public const int GL_ARB_texture_gather = 1;
+        public const int GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5E;
+        public const int GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5F;
+        public const int GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB = 0x8F9F;
+        public const int GL_ARB_texture_mirror_clamp_to_edge = 1;
+        public const int GL_ARB_texture_mirrored_repeat = 1;
+        public const int GL_MIRRORED_REPEAT_ARB = 0x8370;
+        public const int GL_ARB_texture_multisample = 1;
+        public const int GL_ARB_texture_non_power_of_two = 1;
+        public const int GL_ARB_texture_query_levels = 1;
+        public const int GL_ARB_texture_query_lod = 1;
+        public const int GL_ARB_texture_rectangle = 1;
+        public const int GL_TEXTURE_RECTANGLE_ARB = 0x84F5;
+        public const int GL_TEXTURE_BINDING_RECTANGLE_ARB = 0x84F6;
+        public const int GL_PROXY_TEXTURE_RECTANGLE_ARB = 0x84F7;
+        public const int GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB = 0x84F8;
+        public const int GL_ARB_texture_rg = 1;
+        public const int GL_ARB_texture_rgb10_a2ui = 1;
+        public const int GL_ARB_texture_stencil8 = 1;
+        public const int GL_ARB_texture_storage = 1;
+        public const int GL_ARB_texture_storage_multisample = 1;
+        public const int GL_ARB_texture_swizzle = 1;
+        public const int GL_ARB_texture_view = 1;
+        public const int GL_ARB_timer_query = 1;
+        public const int GL_ARB_transform_feedback2 = 1;
+        public const int GL_ARB_transform_feedback3 = 1;
+        public const int GL_ARB_transform_feedback_instanced = 1;
+        public const int GL_ARB_transform_feedback_overflow_query = 1;
+        public const int GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB = 0x82EC;
+        public const int GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB = 0x82ED;
+        public const int GL_ARB_transpose_matrix = 1;
+        public const int GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = 0x84E3;
+        public const int GL_TRANSPOSE_PROJECTION_MATRIX_ARB = 0x84E4;
+        public const int GL_TRANSPOSE_TEXTURE_MATRIX_ARB = 0x84E5;
+        public const int GL_TRANSPOSE_COLOR_MATRIX_ARB = 0x84E6;
+        public const int GL_ARB_uniform_buffer_object = 1;
+        public const int GL_ARB_vertex_array_bgra = 1;
+        public const int GL_ARB_vertex_array_object = 1;
+        public const int GL_ARB_vertex_attrib_64bit = 1;
+        public const int GL_ARB_vertex_attrib_binding = 1;
+        public const int GL_ARB_vertex_blend = 1;
+        public const int GL_MAX_VERTEX_UNITS_ARB = 0x86A4;
+        public const int GL_ACTIVE_VERTEX_UNITS_ARB = 0x86A5;
+        public const int GL_WEIGHT_SUM_UNITY_ARB = 0x86A6;
+        public const int GL_VERTEX_BLEND_ARB = 0x86A7;
+        public const int GL_CURRENT_WEIGHT_ARB = 0x86A8;
+        public const int GL_WEIGHT_ARRAY_TYPE_ARB = 0x86A9;
+        public const int GL_WEIGHT_ARRAY_STRIDE_ARB = 0x86AA;
+        public const int GL_WEIGHT_ARRAY_SIZE_ARB = 0x86AB;
+        public const int GL_WEIGHT_ARRAY_POINTER_ARB = 0x86AC;
+        public const int GL_WEIGHT_ARRAY_ARB = 0x86AD;
+        public const int GL_MODELVIEW0_ARB = 0x1700;
+        public const int GL_MODELVIEW1_ARB = 0x850A;
+        public const int GL_MODELVIEW2_ARB = 0x8722;
+        public const int GL_MODELVIEW3_ARB = 0x8723;
+        public const int GL_MODELVIEW4_ARB = 0x8724;
+        public const int GL_MODELVIEW5_ARB = 0x8725;
+        public const int GL_MODELVIEW6_ARB = 0x8726;
+        public const int GL_MODELVIEW7_ARB = 0x8727;
+        public const int GL_MODELVIEW8_ARB = 0x8728;
+        public const int GL_MODELVIEW9_ARB = 0x8729;
+        public const int GL_MODELVIEW10_ARB = 0x872A;
+        public const int GL_MODELVIEW11_ARB = 0x872B;
+        public const int GL_MODELVIEW12_ARB = 0x872C;
+        public const int GL_MODELVIEW13_ARB = 0x872D;
+        public const int GL_MODELVIEW14_ARB = 0x872E;
+        public const int GL_MODELVIEW15_ARB = 0x872F;
+        public const int GL_MODELVIEW16_ARB = 0x8730;
+        public const int GL_MODELVIEW17_ARB = 0x8731;
+        public const int GL_MODELVIEW18_ARB = 0x8732;
+        public const int GL_MODELVIEW19_ARB = 0x8733;
+        public const int GL_MODELVIEW20_ARB = 0x8734;
+        public const int GL_MODELVIEW21_ARB = 0x8735;
+        public const int GL_MODELVIEW22_ARB = 0x8736;
+        public const int GL_MODELVIEW23_ARB = 0x8737;
+        public const int GL_MODELVIEW24_ARB = 0x8738;
+        public const int GL_MODELVIEW25_ARB = 0x8739;
+        public const int GL_MODELVIEW26_ARB = 0x873A;
+        public const int GL_MODELVIEW27_ARB = 0x873B;
+        public const int GL_MODELVIEW28_ARB = 0x873C;
+        public const int GL_MODELVIEW29_ARB = 0x873D;
+        public const int GL_MODELVIEW30_ARB = 0x873E;
+        public const int GL_MODELVIEW31_ARB = 0x873F;
+        public const int GL_ARB_vertex_buffer_object = 1;
+        public const int GL_BUFFER_SIZE_ARB = 0x8764;
+        public const int GL_BUFFER_USAGE_ARB = 0x8765;
+        public const int GL_ARRAY_BUFFER_ARB = 0x8892;
+        public const int GL_ELEMENT_ARRAY_BUFFER_ARB = 0x8893;
+        public const int GL_ARRAY_BUFFER_BINDING_ARB = 0x8894;
+        public const int GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB = 0x8895;
+        public const int GL_VERTEX_ARRAY_BUFFER_BINDING_ARB = 0x8896;
+        public const int GL_NORMAL_ARRAY_BUFFER_BINDING_ARB = 0x8897;
+        public const int GL_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x8898;
+        public const int GL_INDEX_ARRAY_BUFFER_BINDING_ARB = 0x8899;
+        public const int GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB = 0x889A;
+        public const int GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB = 0x889B;
+        public const int GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x889C;
+        public const int GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = 0x889D;
+        public const int GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB = 0x889E;
+        public const int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = 0x889F;
+        public const int GL_READ_ONLY_ARB = 0x88B8;
+        public const int GL_WRITE_ONLY_ARB = 0x88B9;
+        public const int GL_READ_WRITE_ARB = 0x88BA;
+        public const int GL_BUFFER_ACCESS_ARB = 0x88BB;
+        public const int GL_BUFFER_MAPPED_ARB = 0x88BC;
+        public const int GL_BUFFER_MAP_POINTER_ARB = 0x88BD;
+        public const int GL_STREAM_DRAW_ARB = 0x88E0;
+        public const int GL_STREAM_READ_ARB = 0x88E1;
+        public const int GL_STREAM_COPY_ARB = 0x88E2;
+        public const int GL_STATIC_DRAW_ARB = 0x88E4;
+        public const int GL_STATIC_READ_ARB = 0x88E5;
+        public const int GL_STATIC_COPY_ARB = 0x88E6;
+        public const int GL_DYNAMIC_DRAW_ARB = 0x88E8;
+        public const int GL_DYNAMIC_READ_ARB = 0x88E9;
+        public const int GL_DYNAMIC_COPY_ARB = 0x88EA;
+        public const int GL_ARB_vertex_program = 1;
+        public const int GL_COLOR_SUM_ARB = 0x8458;
+        public const int GL_VERTEX_PROGRAM_ARB = 0x8620;
+        public const int GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622;
+        public const int GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623;
+        public const int GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624;
+        public const int GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625;
+        public const int GL_CURRENT_VERTEX_ATTRIB_ARB = 0x8626;
+        public const int GL_VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642;
+        public const int GL_VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643;
+        public const int GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645;
+        public const int GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869;
+        public const int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A;
+        public const int GL_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B0;
+        public const int GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1;
+        public const int GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2;
+        public const int GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B3;
+        public const int GL_ARB_vertex_shader = 1;
+        public const int GL_VERTEX_SHADER_ARB = 0x8B31;
+        public const int GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB = 0x8B4A;
+        public const int GL_MAX_VARYING_FLOATS_ARB = 0x8B4B;
+        public const int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = 0x8B4C;
+        public const int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = 0x8B4D;
+        public const int GL_OBJECT_ACTIVE_ATTRIBUTES_ARB = 0x8B89;
+        public const int GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = 0x8B8A;
+        public const int GL_ARB_vertex_type_10f_11f_11f_rev = 1;
+        public const int GL_ARB_vertex_type_2_10_10_10_rev = 1;
+        public const int GL_ARB_viewport_array = 1;
+        public const int GL_ARB_window_pos = 1;
+        public const int GL_KHR_blend_equation_advanced = 1;
+        public const int GL_MULTIPLY_KHR = 0x9294;
+        public const int GL_SCREEN_KHR = 0x9295;
+        public const int GL_OVERLAY_KHR = 0x9296;
+        public const int GL_DARKEN_KHR = 0x9297;
+        public const int GL_LIGHTEN_KHR = 0x9298;
+        public const int GL_COLORDODGE_KHR = 0x9299;
+        public const int GL_COLORBURN_KHR = 0x929A;
+        public const int GL_HARDLIGHT_KHR = 0x929B;
+        public const int GL_SOFTLIGHT_KHR = 0x929C;
+        public const int GL_DIFFERENCE_KHR = 0x929E;
+        public const int GL_EXCLUSION_KHR = 0x92A0;
+        public const int GL_HSL_HUE_KHR = 0x92AD;
+        public const int GL_HSL_SATURATION_KHR = 0x92AE;
+        public const int GL_HSL_COLOR_KHR = 0x92AF;
+        public const int GL_HSL_LUMINOSITY_KHR = 0x92B0;
+        public const int GL_KHR_blend_equation_advanced_coherent = 1;
+        public const int GL_BLEND_ADVANCED_COHERENT_KHR = 0x9285;
+        public const int GL_KHR_context_flush_control = 1;
+        public const int GL_KHR_debug = 1;
+        public const int GL_KHR_no_error = 1;
+        public const int GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR = 0x00000008;
+        public const int GL_KHR_parallel_shader_compile = 1;
+        public const int GL_MAX_SHADER_COMPILER_THREADS_KHR = 0x91B0;
+        public const int GL_COMPLETION_STATUS_KHR = 0x91B1;
+        public const int GL_KHR_robust_buffer_access_behavior = 1;
+        public const int GL_KHR_robustness = 1;
+        public const int GL_CONTEXT_ROBUST_ACCESS = 0x90F3;
+        public const int GL_KHR_texture_compression_astc_hdr = 1;
+        public const int GL_COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0;
+        public const int GL_COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1;
+        public const int GL_COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2;
+        public const int GL_COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3;
+        public const int GL_COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4;
+        public const int GL_COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5;
+        public const int GL_COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6;
+        public const int GL_COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7;
+        public const int GL_COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8;
+        public const int GL_COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9;
+        public const int GL_COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA;
+        public const int GL_COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB;
+        public const int GL_COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC;
+        public const int GL_COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC;
+        public const int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD;
+        public const int GL_KHR_texture_compression_astc_ldr = 1;
+        public const int GL_KHR_texture_compression_astc_sliced_3d = 1;
+        public const int GL_OES_byte_coordinates = 1;
+        public const int GL_OES_compressed_paletted_texture = 1;
+        public const int GL_PALETTE4_RGB8_OES = 0x8B90;
+        public const int GL_PALETTE4_RGBA8_OES = 0x8B91;
+        public const int GL_PALETTE4_R5_G6_B5_OES = 0x8B92;
+        public const int GL_PALETTE4_RGBA4_OES = 0x8B93;
+        public const int GL_PALETTE4_RGB5_A1_OES = 0x8B94;
+        public const int GL_PALETTE8_RGB8_OES = 0x8B95;
+        public const int GL_PALETTE8_RGBA8_OES = 0x8B96;
+        public const int GL_PALETTE8_R5_G6_B5_OES = 0x8B97;
+        public const int GL_PALETTE8_RGBA4_OES = 0x8B98;
+        public const int GL_PALETTE8_RGB5_A1_OES = 0x8B99;
+        public const int GL_OES_fixed_point = 1;
+        public const int GL_FIXED_OES = 0x140C;
+        public const int GL_OES_query_matrix = 1;
+        public const int GL_OES_read_format = 1;
+        public const int GL_IMPLEMENTATION_COLOR_READ_TYPE_OES = 0x8B9A;
+        public const int GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES = 0x8B9B;
+        public const int GL_OES_single_precision = 1;
+        public const int GL_3DFX_multisample = 1;
+        public const int GL_MULTISAMPLE_3DFX = 0x86B2;
+        public const int GL_SAMPLE_BUFFERS_3DFX = 0x86B3;
+        public const int GL_SAMPLES_3DFX = 0x86B4;
+        public const int GL_MULTISAMPLE_BIT_3DFX = 0x20000000;
+        public const int GL_3DFX_tbuffer = 1;
+        public const int GL_3DFX_texture_compression_FXT1 = 1;
+        public const int GL_COMPRESSED_RGB_FXT1_3DFX = 0x86B0;
+        public const int GL_COMPRESSED_RGBA_FXT1_3DFX = 0x86B1;
+        public const int GL_AMD_blend_minmax_factor = 1;
+        public const int GL_FACTOR_MIN_AMD = 0x901C;
+        public const int GL_FACTOR_MAX_AMD = 0x901D;
+        public const int GL_AMD_conservative_depth = 1;
+        public const int GL_AMD_debug_output = 1;
+        public const int GL_MAX_DEBUG_MESSAGE_LENGTH_AMD = 0x9143;
+        public const int GL_MAX_DEBUG_LOGGED_MESSAGES_AMD = 0x9144;
+        public const int GL_DEBUG_LOGGED_MESSAGES_AMD = 0x9145;
+        public const int GL_DEBUG_SEVERITY_HIGH_AMD = 0x9146;
+        public const int GL_DEBUG_SEVERITY_MEDIUM_AMD = 0x9147;
+        public const int GL_DEBUG_SEVERITY_LOW_AMD = 0x9148;
+        public const int GL_DEBUG_CATEGORY_API_ERROR_AMD = 0x9149;
+        public const int GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD = 0x914A;
+        public const int GL_DEBUG_CATEGORY_DEPRECATION_AMD = 0x914B;
+        public const int GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD = 0x914C;
+        public const int GL_DEBUG_CATEGORY_PERFORMANCE_AMD = 0x914D;
+        public const int GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD = 0x914E;
+        public const int GL_DEBUG_CATEGORY_APPLICATION_AMD = 0x914F;
+        public const int GL_DEBUG_CATEGORY_OTHER_AMD = 0x9150;
+        public const int GL_AMD_depth_clamp_separate = 1;
+        public const int GL_DEPTH_CLAMP_NEAR_AMD = 0x901E;
+        public const int GL_DEPTH_CLAMP_FAR_AMD = 0x901F;
+        public const int GL_AMD_draw_buffers_blend = 1;
+        public const int GL_AMD_framebuffer_multisample_advanced = 1;
+        public const int GL_RENDERBUFFER_STORAGE_SAMPLES_AMD = 0x91B2;
+        public const int GL_MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD = 0x91B3;
+        public const int GL_MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD = 0x91B4;
+        public const int GL_MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD = 0x91B5;
+        public const int GL_NUM_SUPPORTED_MULTISAMPLE_MODES_AMD = 0x91B6;
+        public const int GL_SUPPORTED_MULTISAMPLE_MODES_AMD = 0x91B7;
+        public const int GL_AMD_framebuffer_sample_positions = 1;
+        public const int GL_SUBSAMPLE_DISTANCE_AMD = 0x883F;
+        public const int GL_PIXELS_PER_SAMPLE_PATTERN_X_AMD = 0x91AE;
+        public const int GL_PIXELS_PER_SAMPLE_PATTERN_Y_AMD = 0x91AF;
+        public const int GL_ALL_PIXELS_AMD = -1;
+        public const int GL_AMD_gcn_shader = 1;
+        public const int GL_AMD_gpu_shader_half_float = 1;
+        public const int GL_FLOAT16_NV = 0x8FF8;
+        public const int GL_FLOAT16_VEC2_NV = 0x8FF9;
+        public const int GL_FLOAT16_VEC3_NV = 0x8FFA;
+        public const int GL_FLOAT16_VEC4_NV = 0x8FFB;
+        public const int GL_FLOAT16_MAT2_AMD = 0x91C5;
+        public const int GL_FLOAT16_MAT3_AMD = 0x91C6;
+        public const int GL_FLOAT16_MAT4_AMD = 0x91C7;
+        public const int GL_FLOAT16_MAT2x3_AMD = 0x91C8;
+        public const int GL_FLOAT16_MAT2x4_AMD = 0x91C9;
+        public const int GL_FLOAT16_MAT3x2_AMD = 0x91CA;
+        public const int GL_FLOAT16_MAT3x4_AMD = 0x91CB;
+        public const int GL_FLOAT16_MAT4x2_AMD = 0x91CC;
+        public const int GL_FLOAT16_MAT4x3_AMD = 0x91CD;
+        public const int GL_AMD_gpu_shader_int16 = 1;
+        public const int GL_AMD_gpu_shader_int64 = 1;
+        public const int GL_INT64_NV = 0x140E;
+        public const int GL_UNSIGNED_INT64_NV = 0x140F;
+        public const int GL_INT8_NV = 0x8FE0;
+        public const int GL_INT8_VEC2_NV = 0x8FE1;
+        public const int GL_INT8_VEC3_NV = 0x8FE2;
+        public const int GL_INT8_VEC4_NV = 0x8FE3;
+        public const int GL_INT16_NV = 0x8FE4;
+        public const int GL_INT16_VEC2_NV = 0x8FE5;
+        public const int GL_INT16_VEC3_NV = 0x8FE6;
+        public const int GL_INT16_VEC4_NV = 0x8FE7;
+        public const int GL_INT64_VEC2_NV = 0x8FE9;
+        public const int GL_INT64_VEC3_NV = 0x8FEA;
+        public const int GL_INT64_VEC4_NV = 0x8FEB;
+        public const int GL_UNSIGNED_INT8_NV = 0x8FEC;
+        public const int GL_UNSIGNED_INT8_VEC2_NV = 0x8FED;
+        public const int GL_UNSIGNED_INT8_VEC3_NV = 0x8FEE;
+        public const int GL_UNSIGNED_INT8_VEC4_NV = 0x8FEF;
+        public const int GL_UNSIGNED_INT16_NV = 0x8FF0;
+        public const int GL_UNSIGNED_INT16_VEC2_NV = 0x8FF1;
+        public const int GL_UNSIGNED_INT16_VEC3_NV = 0x8FF2;
+        public const int GL_UNSIGNED_INT16_VEC4_NV = 0x8FF3;
+        public const int GL_UNSIGNED_INT64_VEC2_NV = 0x8FF5;
+        public const int GL_UNSIGNED_INT64_VEC3_NV = 0x8FF6;
+        public const int GL_UNSIGNED_INT64_VEC4_NV = 0x8FF7;
+        public const int GL_AMD_interleaved_elements = 1;
+        public const int GL_VERTEX_ELEMENT_SWIZZLE_AMD = 0x91A4;
+        public const int GL_VERTEX_ID_SWIZZLE_AMD = 0x91A5;
+        public const int GL_AMD_multi_draw_indirect = 1;
+        public const int GL_AMD_name_gen_delete = 1;
+        public const int GL_DATA_BUFFER_AMD = 0x9151;
+        public const int GL_PERFORMANCE_MONITOR_AMD = 0x9152;
+        public const int GL_QUERY_OBJECT_AMD = 0x9153;
+        public const int GL_VERTEX_ARRAY_OBJECT_AMD = 0x9154;
+        public const int GL_SAMPLER_OBJECT_AMD = 0x9155;
+        public const int GL_AMD_occlusion_query_event = 1;
+        public const int GL_OCCLUSION_QUERY_EVENT_MASK_AMD = 0x874F;
+        public const int GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD = 0x00000001;
+        public const int GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD = 0x00000002;
+        public const int GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD = 0x00000004;
+        public const int GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD = 0x00000008;
+        public const int GL_QUERY_ALL_EVENT_BITS_AMD = -1;
+        public const int GL_AMD_performance_monitor = 1;
+        public const int GL_COUNTER_TYPE_AMD = 0x8BC0;
+        public const int GL_COUNTER_RANGE_AMD = 0x8BC1;
+        public const int GL_UNSIGNED_INT64_AMD = 0x8BC2;
+        public const int GL_PERCENTAGE_AMD = 0x8BC3;
+        public const int GL_PERFMON_RESULT_AVAILABLE_AMD = 0x8BC4;
+        public const int GL_PERFMON_RESULT_SIZE_AMD = 0x8BC5;
+        public const int GL_PERFMON_RESULT_AMD = 0x8BC6;
+        public const int GL_AMD_pinned_memory = 1;
+        public const int GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD = 0x9160;
+        public const int GL_AMD_query_buffer_object = 1;
+        public const int GL_QUERY_BUFFER_AMD = 0x9192;
+        public const int GL_QUERY_BUFFER_BINDING_AMD = 0x9193;
+        public const int GL_QUERY_RESULT_NO_WAIT_AMD = 0x9194;
+        public const int GL_AMD_sample_positions = 1;
+        public const int GL_AMD_seamless_cubemap_per_texture = 1;
+        public const int GL_AMD_shader_atomic_counter_ops = 1;
+        public const int GL_AMD_shader_ballot = 1;
+        public const int GL_AMD_shader_explicit_vertex_parameter = 1;
+        public const int GL_AMD_shader_gpu_shader_half_float_fetch = 1;
+        public const int GL_AMD_shader_image_load_store_lod = 1;
+        public const int GL_AMD_shader_stencil_export = 1;
+        public const int GL_AMD_shader_trinary_minmax = 1;
+        public const int GL_AMD_sparse_texture = 1;
+        public const int GL_VIRTUAL_PAGE_SIZE_X_AMD = 0x9195;
+        public const int GL_VIRTUAL_PAGE_SIZE_Y_AMD = 0x9196;
+        public const int GL_VIRTUAL_PAGE_SIZE_Z_AMD = 0x9197;
+        public const int GL_MAX_SPARSE_TEXTURE_SIZE_AMD = 0x9198;
+        public const int GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD = 0x9199;
+        public const int GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS = 0x919A;
+        public const int GL_MIN_SPARSE_LEVEL_AMD = 0x919B;
+        public const int GL_MIN_LOD_WARNING_AMD = 0x919C;
+        public const int GL_TEXTURE_STORAGE_SPARSE_BIT_AMD = 0x00000001;
+        public const int GL_AMD_stencil_operation_extended = 1;
+        public const int GL_SET_AMD = 0x874A;
+        public const int GL_REPLACE_VALUE_AMD = 0x874B;
+        public const int GL_STENCIL_OP_VALUE_AMD = 0x874C;
+        public const int GL_STENCIL_BACK_OP_VALUE_AMD = 0x874D;
+        public const int GL_AMD_texture_gather_bias_lod = 1;
+        public const int GL_AMD_texture_texture4 = 1;
+        public const int GL_AMD_transform_feedback3_lines_triangles = 1;
+        public const int GL_AMD_transform_feedback4 = 1;
+        public const int GL_STREAM_RASTERIZATION_AMD = 0x91A0;
+        public const int GL_AMD_vertex_shader_layer = 1;
+        public const int GL_AMD_vertex_shader_tessellator = 1;
+        public const int GL_SAMPLER_BUFFER_AMD = 0x9001;
+        public const int GL_INT_SAMPLER_BUFFER_AMD = 0x9002;
+        public const int GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD = 0x9003;
+        public const int GL_TESSELLATION_MODE_AMD = 0x9004;
+        public const int GL_TESSELLATION_FACTOR_AMD = 0x9005;
+        public const int GL_DISCRETE_AMD = 0x9006;
+        public const int GL_CONTINUOUS_AMD = 0x9007;
+        public const int GL_AMD_vertex_shader_viewport_index = 1;
+        public const int GL_APPLE_aux_depth_stencil = 1;
+        public const int GL_AUX_DEPTH_STENCIL_APPLE = 0x8A14;
+        public const int GL_APPLE_client_storage = 1;
+        public const int GL_UNPACK_CLIENT_STORAGE_APPLE = 0x85B2;
+        public const int GL_APPLE_element_array = 1;
+        public const int GL_ELEMENT_ARRAY_APPLE = 0x8A0C;
+        public const int GL_ELEMENT_ARRAY_TYPE_APPLE = 0x8A0D;
+        public const int GL_ELEMENT_ARRAY_POINTER_APPLE = 0x8A0E;
+        public const int GL_APPLE_fence = 1;
+        public const int GL_DRAW_PIXELS_APPLE = 0x8A0A;
+        public const int GL_FENCE_APPLE = 0x8A0B;
+        public const int GL_APPLE_float_pixels = 1;
+        public const int GL_HALF_APPLE = 0x140B;
+        public const int GL_RGBA_FLOAT32_APPLE = 0x8814;
+        public const int GL_RGB_FLOAT32_APPLE = 0x8815;
+        public const int GL_ALPHA_FLOAT32_APPLE = 0x8816;
+        public const int GL_INTENSITY_FLOAT32_APPLE = 0x8817;
+        public const int GL_LUMINANCE_FLOAT32_APPLE = 0x8818;
+        public const int GL_LUMINANCE_ALPHA_FLOAT32_APPLE = 0x8819;
+        public const int GL_RGBA_FLOAT16_APPLE = 0x881A;
+        public const int GL_RGB_FLOAT16_APPLE = 0x881B;
+        public const int GL_ALPHA_FLOAT16_APPLE = 0x881C;
+        public const int GL_INTENSITY_FLOAT16_APPLE = 0x881D;
+        public const int GL_LUMINANCE_FLOAT16_APPLE = 0x881E;
+        public const int GL_LUMINANCE_ALPHA_FLOAT16_APPLE = 0x881F;
+        public const int GL_COLOR_FLOAT_APPLE = 0x8A0F;
+        public const int GL_APPLE_flush_buffer_range = 1;
+        public const int GL_BUFFER_SERIALIZED_MODIFY_APPLE = 0x8A12;
+        public const int GL_BUFFER_FLUSHING_UNMAP_APPLE = 0x8A13;
+        public const int GL_APPLE_object_purgeable = 1;
+        public const int GL_BUFFER_OBJECT_APPLE = 0x85B3;
+        public const int GL_RELEASED_APPLE = 0x8A19;
+        public const int GL_VOLATILE_APPLE = 0x8A1A;
+        public const int GL_RETAINED_APPLE = 0x8A1B;
+        public const int GL_UNDEFINED_APPLE = 0x8A1C;
+        public const int GL_PURGEABLE_APPLE = 0x8A1D;
+        public const int GL_APPLE_rgb_422 = 1;
+        public const int GL_RGB_422_APPLE = 0x8A1F;
+        public const int GL_UNSIGNED_SHORT_8_8_APPLE = 0x85BA;
+        public const int GL_UNSIGNED_SHORT_8_8_REV_APPLE = 0x85BB;
+        public const int GL_RGB_RAW_422_APPLE = 0x8A51;
+        public const int GL_APPLE_row_bytes = 1;
+        public const int GL_PACK_ROW_BYTES_APPLE = 0x8A15;
+        public const int GL_UNPACK_ROW_BYTES_APPLE = 0x8A16;
+        public const int GL_APPLE_specular_vector = 1;
+        public const int GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE = 0x85B0;
+        public const int GL_APPLE_texture_range = 1;
+        public const int GL_TEXTURE_RANGE_LENGTH_APPLE = 0x85B7;
+        public const int GL_TEXTURE_RANGE_POINTER_APPLE = 0x85B8;
+        public const int GL_TEXTURE_STORAGE_HINT_APPLE = 0x85BC;
+        public const int GL_STORAGE_PRIVATE_APPLE = 0x85BD;
+        public const int GL_STORAGE_CACHED_APPLE = 0x85BE;
+        public const int GL_STORAGE_SHARED_APPLE = 0x85BF;
+        public const int GL_APPLE_transform_hint = 1;
+        public const int GL_TRANSFORM_HINT_APPLE = 0x85B1;
+        public const int GL_APPLE_vertex_array_object = 1;
+        public const int GL_VERTEX_ARRAY_BINDING_APPLE = 0x85B5;
+        public const int GL_APPLE_vertex_array_range = 1;
+        public const int GL_VERTEX_ARRAY_RANGE_APPLE = 0x851D;
+        public const int GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE = 0x851E;
+        public const int GL_VERTEX_ARRAY_STORAGE_HINT_APPLE = 0x851F;
+        public const int GL_VERTEX_ARRAY_RANGE_POINTER_APPLE = 0x8521;
+        public const int GL_STORAGE_CLIENT_APPLE = 0x85B4;
+        public const int GL_APPLE_vertex_program_evaluators = 1;
+        public const int GL_VERTEX_ATTRIB_MAP1_APPLE = 0x8A00;
+        public const int GL_VERTEX_ATTRIB_MAP2_APPLE = 0x8A01;
+        public const int GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE = 0x8A02;
+        public const int GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE = 0x8A03;
+        public const int GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE = 0x8A04;
+        public const int GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE = 0x8A05;
+        public const int GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE = 0x8A06;
+        public const int GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE = 0x8A07;
+        public const int GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE = 0x8A08;
+        public const int GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE = 0x8A09;
+        public const int GL_APPLE_ycbcr_422 = 1;
+        public const int GL_YCBCR_422_APPLE = 0x85B9;
+        public const int GL_ATI_draw_buffers = 1;
+        public const int GL_MAX_DRAW_BUFFERS_ATI = 0x8824;
+        public const int GL_DRAW_BUFFER0_ATI = 0x8825;
+        public const int GL_DRAW_BUFFER1_ATI = 0x8826;
+        public const int GL_DRAW_BUFFER2_ATI = 0x8827;
+        public const int GL_DRAW_BUFFER3_ATI = 0x8828;
+        public const int GL_DRAW_BUFFER4_ATI = 0x8829;
+        public const int GL_DRAW_BUFFER5_ATI = 0x882A;
+        public const int GL_DRAW_BUFFER6_ATI = 0x882B;
+        public const int GL_DRAW_BUFFER7_ATI = 0x882C;
+        public const int GL_DRAW_BUFFER8_ATI = 0x882D;
+        public const int GL_DRAW_BUFFER9_ATI = 0x882E;
+        public const int GL_DRAW_BUFFER10_ATI = 0x882F;
+        public const int GL_DRAW_BUFFER11_ATI = 0x8830;
+        public const int GL_DRAW_BUFFER12_ATI = 0x8831;
+        public const int GL_DRAW_BUFFER13_ATI = 0x8832;
+        public const int GL_DRAW_BUFFER14_ATI = 0x8833;
+        public const int GL_DRAW_BUFFER15_ATI = 0x8834;
+        public const int GL_ATI_element_array = 1;
+        public const int GL_ELEMENT_ARRAY_ATI = 0x8768;
+        public const int GL_ELEMENT_ARRAY_TYPE_ATI = 0x8769;
+        public const int GL_ELEMENT_ARRAY_POINTER_ATI = 0x876A;
+        public const int GL_ATI_envmap_bumpmap = 1;
+        public const int GL_BUMP_ROT_MATRIX_ATI = 0x8775;
+        public const int GL_BUMP_ROT_MATRIX_SIZE_ATI = 0x8776;
+        public const int GL_BUMP_NUM_TEX_UNITS_ATI = 0x8777;
+        public const int GL_BUMP_TEX_UNITS_ATI = 0x8778;
+        public const int GL_DUDV_ATI = 0x8779;
+        public const int GL_DU8DV8_ATI = 0x877A;
+        public const int GL_BUMP_ENVMAP_ATI = 0x877B;
+        public const int GL_BUMP_TARGET_ATI = 0x877C;
+        public const int GL_ATI_fragment_shader = 1;
+        public const int GL_FRAGMENT_SHADER_ATI = 0x8920;
+        public const int GL_REG_0_ATI = 0x8921;
+        public const int GL_REG_1_ATI = 0x8922;
+        public const int GL_REG_2_ATI = 0x8923;
+        public const int GL_REG_3_ATI = 0x8924;
+        public const int GL_REG_4_ATI = 0x8925;
+        public const int GL_REG_5_ATI = 0x8926;
+        public const int GL_REG_6_ATI = 0x8927;
+        public const int GL_REG_7_ATI = 0x8928;
+        public const int GL_REG_8_ATI = 0x8929;
+        public const int GL_REG_9_ATI = 0x892A;
+        public const int GL_REG_10_ATI = 0x892B;
+        public const int GL_REG_11_ATI = 0x892C;
+        public const int GL_REG_12_ATI = 0x892D;
+        public const int GL_REG_13_ATI = 0x892E;
+        public const int GL_REG_14_ATI = 0x892F;
+        public const int GL_REG_15_ATI = 0x8930;
+        public const int GL_REG_16_ATI = 0x8931;
+        public const int GL_REG_17_ATI = 0x8932;
+        public const int GL_REG_18_ATI = 0x8933;
+        public const int GL_REG_19_ATI = 0x8934;
+        public const int GL_REG_20_ATI = 0x8935;
+        public const int GL_REG_21_ATI = 0x8936;
+        public const int GL_REG_22_ATI = 0x8937;
+        public const int GL_REG_23_ATI = 0x8938;
+        public const int GL_REG_24_ATI = 0x8939;
+        public const int GL_REG_25_ATI = 0x893A;
+        public const int GL_REG_26_ATI = 0x893B;
+        public const int GL_REG_27_ATI = 0x893C;
+        public const int GL_REG_28_ATI = 0x893D;
+        public const int GL_REG_29_ATI = 0x893E;
+        public const int GL_REG_30_ATI = 0x893F;
+        public const int GL_REG_31_ATI = 0x8940;
+        public const int GL_CON_0_ATI = 0x8941;
+        public const int GL_CON_1_ATI = 0x8942;
+        public const int GL_CON_2_ATI = 0x8943;
+        public const int GL_CON_3_ATI = 0x8944;
+        public const int GL_CON_4_ATI = 0x8945;
+        public const int GL_CON_5_ATI = 0x8946;
+        public const int GL_CON_6_ATI = 0x8947;
+        public const int GL_CON_7_ATI = 0x8948;
+        public const int GL_CON_8_ATI = 0x8949;
+        public const int GL_CON_9_ATI = 0x894A;
+        public const int GL_CON_10_ATI = 0x894B;
+        public const int GL_CON_11_ATI = 0x894C;
+        public const int GL_CON_12_ATI = 0x894D;
+        public const int GL_CON_13_ATI = 0x894E;
+        public const int GL_CON_14_ATI = 0x894F;
+        public const int GL_CON_15_ATI = 0x8950;
+        public const int GL_CON_16_ATI = 0x8951;
+        public const int GL_CON_17_ATI = 0x8952;
+        public const int GL_CON_18_ATI = 0x8953;
+        public const int GL_CON_19_ATI = 0x8954;
+        public const int GL_CON_20_ATI = 0x8955;
+        public const int GL_CON_21_ATI = 0x8956;
+        public const int GL_CON_22_ATI = 0x8957;
+        public const int GL_CON_23_ATI = 0x8958;
+        public const int GL_CON_24_ATI = 0x8959;
+        public const int GL_CON_25_ATI = 0x895A;
+        public const int GL_CON_26_ATI = 0x895B;
+        public const int GL_CON_27_ATI = 0x895C;
+        public const int GL_CON_28_ATI = 0x895D;
+        public const int GL_CON_29_ATI = 0x895E;
+        public const int GL_CON_30_ATI = 0x895F;
+        public const int GL_CON_31_ATI = 0x8960;
+        public const int GL_MOV_ATI = 0x8961;
+        public const int GL_ADD_ATI = 0x8963;
+        public const int GL_MUL_ATI = 0x8964;
+        public const int GL_SUB_ATI = 0x8965;
+        public const int GL_DOT3_ATI = 0x8966;
+        public const int GL_DOT4_ATI = 0x8967;
+        public const int GL_MAD_ATI = 0x8968;
+        public const int GL_LERP_ATI = 0x8969;
+        public const int GL_CND_ATI = 0x896A;
+        public const int GL_CND0_ATI = 0x896B;
+        public const int GL_DOT2_ADD_ATI = 0x896C;
+        public const int GL_SECONDARY_INTERPOLATOR_ATI = 0x896D;
+        public const int GL_NUM_FRAGMENT_REGISTERS_ATI = 0x896E;
+        public const int GL_NUM_FRAGMENT_CONSTANTS_ATI = 0x896F;
+        public const int GL_NUM_PASSES_ATI = 0x8970;
+        public const int GL_NUM_INSTRUCTIONS_PER_PASS_ATI = 0x8971;
+        public const int GL_NUM_INSTRUCTIONS_TOTAL_ATI = 0x8972;
+        public const int GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI = 0x8973;
+        public const int GL_NUM_LOOPBACK_COMPONENTS_ATI = 0x8974;
+        public const int GL_COLOR_ALPHA_PAIRING_ATI = 0x8975;
+        public const int GL_SWIZZLE_STR_ATI = 0x8976;
+        public const int GL_SWIZZLE_STQ_ATI = 0x8977;
+        public const int GL_SWIZZLE_STR_DR_ATI = 0x8978;
+        public const int GL_SWIZZLE_STQ_DQ_ATI = 0x8979;
+        public const int GL_SWIZZLE_STRQ_ATI = 0x897A;
+        public const int GL_SWIZZLE_STRQ_DQ_ATI = 0x897B;
+        public const int GL_RED_BIT_ATI = 0x00000001;
+        public const int GL_GREEN_BIT_ATI = 0x00000002;
+        public const int GL_BLUE_BIT_ATI = 0x00000004;
+        public const int GL_2X_BIT_ATI = 0x00000001;
+        public const int GL_4X_BIT_ATI = 0x00000002;
+        public const int GL_8X_BIT_ATI = 0x00000004;
+        public const int GL_HALF_BIT_ATI = 0x00000008;
+        public const int GL_QUARTER_BIT_ATI = 0x00000010;
+        public const int GL_EIGHTH_BIT_ATI = 0x00000020;
+        public const int GL_SATURATE_BIT_ATI = 0x00000040;
+        public const int GL_COMP_BIT_ATI = 0x00000002;
+        public const int GL_NEGATE_BIT_ATI = 0x00000004;
+        public const int GL_BIAS_BIT_ATI = 0x00000008;
+        public const int GL_ATI_map_object_buffer = 1;
+        public const int GL_ATI_meminfo = 1;
+        public const int GL_VBO_FREE_MEMORY_ATI = 0x87FB;
+        public const int GL_TEXTURE_FREE_MEMORY_ATI = 0x87FC;
+        public const int GL_RENDERBUFFER_FREE_MEMORY_ATI = 0x87FD;
+        public const int GL_ATI_pixel_format_float = 1;
+        public const int GL_RGBA_FLOAT_MODE_ATI = 0x8820;
+        public const int GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI = 0x8835;
+        public const int GL_ATI_pn_triangles = 1;
+        public const int GL_PN_TRIANGLES_ATI = 0x87F0;
+        public const int GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F1;
+        public const int GL_PN_TRIANGLES_POINT_MODE_ATI = 0x87F2;
+        public const int GL_PN_TRIANGLES_NORMAL_MODE_ATI = 0x87F3;
+        public const int GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F4;
+        public const int GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI = 0x87F5;
+        public const int GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI = 0x87F6;
+        public const int GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI = 0x87F7;
+        public const int GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI = 0x87F8;
+        public const int GL_ATI_separate_stencil = 1;
+        public const int GL_STENCIL_BACK_FUNC_ATI = 0x8800;
+        public const int GL_STENCIL_BACK_FAIL_ATI = 0x8801;
+        public const int GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI = 0x8802;
+        public const int GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI = 0x8803;
+        public const int GL_ATI_text_fragment_shader = 1;
+        public const int GL_TEXT_FRAGMENT_SHADER_ATI = 0x8200;
+        public const int GL_ATI_texture_env_combine3 = 1;
+        public const int GL_MODULATE_ADD_ATI = 0x8744;
+        public const int GL_MODULATE_SIGNED_ADD_ATI = 0x8745;
+        public const int GL_MODULATE_SUBTRACT_ATI = 0x8746;
+        public const int GL_ATI_texture_float = 1;
+        public const int GL_RGBA_FLOAT32_ATI = 0x8814;
+        public const int GL_RGB_FLOAT32_ATI = 0x8815;
+        public const int GL_ALPHA_FLOAT32_ATI = 0x8816;
+        public const int GL_INTENSITY_FLOAT32_ATI = 0x8817;
+        public const int GL_LUMINANCE_FLOAT32_ATI = 0x8818;
+        public const int GL_LUMINANCE_ALPHA_FLOAT32_ATI = 0x8819;
+        public const int GL_RGBA_FLOAT16_ATI = 0x881A;
+        public const int GL_RGB_FLOAT16_ATI = 0x881B;
+        public const int GL_ALPHA_FLOAT16_ATI = 0x881C;
+        public const int GL_INTENSITY_FLOAT16_ATI = 0x881D;
+        public const int GL_LUMINANCE_FLOAT16_ATI = 0x881E;
+        public const int GL_LUMINANCE_ALPHA_FLOAT16_ATI = 0x881F;
+        public const int GL_ATI_texture_mirror_once = 1;
+        public const int GL_MIRROR_CLAMP_ATI = 0x8742;
+        public const int GL_MIRROR_CLAMP_TO_EDGE_ATI = 0x8743;
+        public const int GL_ATI_vertex_array_object = 1;
+        public const int GL_STATIC_ATI = 0x8760;
+        public const int GL_DYNAMIC_ATI = 0x8761;
+        public const int GL_PRESERVE_ATI = 0x8762;
+        public const int GL_DISCARD_ATI = 0x8763;
+        public const int GL_OBJECT_BUFFER_SIZE_ATI = 0x8764;
+        public const int GL_OBJECT_BUFFER_USAGE_ATI = 0x8765;
+        public const int GL_ARRAY_OBJECT_BUFFER_ATI = 0x8766;
+        public const int GL_ARRAY_OBJECT_OFFSET_ATI = 0x8767;
+        public const int GL_ATI_vertex_attrib_array_object = 1;
+        public const int GL_ATI_vertex_streams = 1;
+        public const int GL_MAX_VERTEX_STREAMS_ATI = 0x876B;
+        public const int GL_VERTEX_STREAM0_ATI = 0x876C;
+        public const int GL_VERTEX_STREAM1_ATI = 0x876D;
+        public const int GL_VERTEX_STREAM2_ATI = 0x876E;
+        public const int GL_VERTEX_STREAM3_ATI = 0x876F;
+        public const int GL_VERTEX_STREAM4_ATI = 0x8770;
+        public const int GL_VERTEX_STREAM5_ATI = 0x8771;
+        public const int GL_VERTEX_STREAM6_ATI = 0x8772;
+        public const int GL_VERTEX_STREAM7_ATI = 0x8773;
+        public const int GL_VERTEX_SOURCE_ATI = 0x8774;
+        public const int GL_EXT_422_pixels = 1;
+        public const int GL_422_EXT = 0x80CC;
+        public const int GL_422_REV_EXT = 0x80CD;
+        public const int GL_422_AVERAGE_EXT = 0x80CE;
+        public const int GL_422_REV_AVERAGE_EXT = 0x80CF;
+        public const int GL_EXT_EGL_image_storage = 1;
+        public const int GL_EXT_abgr = 1;
+        public const int GL_ABGR_EXT = 0x8000;
+        public const int GL_EXT_bgra = 1;
+        public const int GL_BGR_EXT = 0x80E0;
+        public const int GL_BGRA_EXT = 0x80E1;
+        public const int GL_EXT_bindable_uniform = 1;
+        public const int GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT = 0x8DE2;
+        public const int GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT = 0x8DE3;
+        public const int GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT = 0x8DE4;
+        public const int GL_MAX_BINDABLE_UNIFORM_SIZE_EXT = 0x8DED;
+        public const int GL_UNIFORM_BUFFER_EXT = 0x8DEE;
+        public const int GL_UNIFORM_BUFFER_BINDING_EXT = 0x8DEF;
+        public const int GL_EXT_blend_color = 1;
+        public const int GL_CONSTANT_COLOR_EXT = 0x8001;
+        public const int GL_ONE_MINUS_CONSTANT_COLOR_EXT = 0x8002;
+        public const int GL_CONSTANT_ALPHA_EXT = 0x8003;
+        public const int GL_ONE_MINUS_CONSTANT_ALPHA_EXT = 0x8004;
+        public const int GL_BLEND_COLOR_EXT = 0x8005;
+        public const int GL_EXT_blend_equation_separate = 1;
+        public const int GL_BLEND_EQUATION_RGB_EXT = 0x8009;
+        public const int GL_BLEND_EQUATION_ALPHA_EXT = 0x883D;
+        public const int GL_EXT_blend_func_separate = 1;
+        public const int GL_BLEND_DST_RGB_EXT = 0x80C8;
+        public const int GL_BLEND_SRC_RGB_EXT = 0x80C9;
+        public const int GL_BLEND_DST_ALPHA_EXT = 0x80CA;
+        public const int GL_BLEND_SRC_ALPHA_EXT = 0x80CB;
+        public const int GL_EXT_blend_logic_op = 1;
+        public const int GL_EXT_blend_minmax = 1;
+        public const int GL_MIN_EXT = 0x8007;
+        public const int GL_MAX_EXT = 0x8008;
+        public const int GL_FUNC_ADD_EXT = 0x8006;
+        public const int GL_BLEND_EQUATION_EXT = 0x8009;
+        public const int GL_EXT_blend_subtract = 1;
+        public const int GL_FUNC_SUBTRACT_EXT = 0x800A;
+        public const int GL_FUNC_REVERSE_SUBTRACT_EXT = 0x800B;
+        public const int GL_EXT_clip_volume_hint = 1;
+        public const int GL_CLIP_VOLUME_CLIPPING_HINT_EXT = 0x80F0;
+        public const int GL_EXT_cmyka = 1;
+        public const int GL_CMYK_EXT = 0x800C;
+        public const int GL_CMYKA_EXT = 0x800D;
+        public const int GL_PACK_CMYK_HINT_EXT = 0x800E;
+        public const int GL_UNPACK_CMYK_HINT_EXT = 0x800F;
+        public const int GL_EXT_color_subtable = 1;
+        public const int GL_EXT_compiled_vertex_array = 1;
+        public const int GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = 0x81A8;
+        public const int GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = 0x81A9;
+        public const int GL_EXT_convolution = 1;
+        public const int GL_CONVOLUTION_1D_EXT = 0x8010;
+        public const int GL_CONVOLUTION_2D_EXT = 0x8011;
+        public const int GL_SEPARABLE_2D_EXT = 0x8012;
+        public const int GL_CONVOLUTION_BORDER_MODE_EXT = 0x8013;
+        public const int GL_CONVOLUTION_FILTER_SCALE_EXT = 0x8014;
+        public const int GL_CONVOLUTION_FILTER_BIAS_EXT = 0x8015;
+        public const int GL_REDUCE_EXT = 0x8016;
+        public const int GL_CONVOLUTION_FORMAT_EXT = 0x8017;
+        public const int GL_CONVOLUTION_WIDTH_EXT = 0x8018;
+        public const int GL_CONVOLUTION_HEIGHT_EXT = 0x8019;
+        public const int GL_MAX_CONVOLUTION_WIDTH_EXT = 0x801A;
+        public const int GL_MAX_CONVOLUTION_HEIGHT_EXT = 0x801B;
+        public const int GL_POST_CONVOLUTION_RED_SCALE_EXT = 0x801C;
+        public const int GL_POST_CONVOLUTION_GREEN_SCALE_EXT = 0x801D;
+        public const int GL_POST_CONVOLUTION_BLUE_SCALE_EXT = 0x801E;
+        public const int GL_POST_CONVOLUTION_ALPHA_SCALE_EXT = 0x801F;
+        public const int GL_POST_CONVOLUTION_RED_BIAS_EXT = 0x8020;
+        public const int GL_POST_CONVOLUTION_GREEN_BIAS_EXT = 0x8021;
+        public const int GL_POST_CONVOLUTION_BLUE_BIAS_EXT = 0x8022;
+        public const int GL_POST_CONVOLUTION_ALPHA_BIAS_EXT = 0x8023;
+        public const int GL_EXT_coordinate_frame = 1;
+        public const int GL_TANGENT_ARRAY_EXT = 0x8439;
+        public const int GL_BINORMAL_ARRAY_EXT = 0x843A;
+        public const int GL_CURRENT_TANGENT_EXT = 0x843B;
+        public const int GL_CURRENT_BINORMAL_EXT = 0x843C;
+        public const int GL_TANGENT_ARRAY_TYPE_EXT = 0x843E;
+        public const int GL_TANGENT_ARRAY_STRIDE_EXT = 0x843F;
+        public const int GL_BINORMAL_ARRAY_TYPE_EXT = 0x8440;
+        public const int GL_BINORMAL_ARRAY_STRIDE_EXT = 0x8441;
+        public const int GL_TANGENT_ARRAY_POINTER_EXT = 0x8442;
+        public const int GL_BINORMAL_ARRAY_POINTER_EXT = 0x8443;
+        public const int GL_MAP1_TANGENT_EXT = 0x8444;
+        public const int GL_MAP2_TANGENT_EXT = 0x8445;
+        public const int GL_MAP1_BINORMAL_EXT = 0x8446;
+        public const int GL_MAP2_BINORMAL_EXT = 0x8447;
+        public const int GL_EXT_copy_texture = 1;
+        public const int GL_EXT_cull_vertex = 1;
+        public const int GL_CULL_VERTEX_EXT = 0x81AA;
+        public const int GL_CULL_VERTEX_EYE_POSITION_EXT = 0x81AB;
+        public const int GL_CULL_VERTEX_OBJECT_POSITION_EXT = 0x81AC;
+        public const int GL_EXT_debug_label = 1;
+        public const int GL_PROGRAM_PIPELINE_OBJECT_EXT = 0x8A4F;
+        public const int GL_PROGRAM_OBJECT_EXT = 0x8B40;
+        public const int GL_SHADER_OBJECT_EXT = 0x8B48;
+        public const int GL_BUFFER_OBJECT_EXT = 0x9151;
+        public const int GL_QUERY_OBJECT_EXT = 0x9153;
+        public const int GL_VERTEX_ARRAY_OBJECT_EXT = 0x9154;
+        public const int GL_EXT_debug_marker = 1;
+        public const int GL_EXT_depth_bounds_test = 1;
+        public const int GL_DEPTH_BOUNDS_TEST_EXT = 0x8890;
+        public const int GL_DEPTH_BOUNDS_EXT = 0x8891;
+        public const int GL_EXT_direct_state_access = 1;
+        public const int GL_PROGRAM_MATRIX_EXT = 0x8E2D;
+        public const int GL_TRANSPOSE_PROGRAM_MATRIX_EXT = 0x8E2E;
+        public const int GL_PROGRAM_MATRIX_STACK_DEPTH_EXT = 0x8E2F;
+        public const int GL_EXT_draw_buffers2 = 1;
+        public const int GL_EXT_draw_instanced = 1;
+        public const int GL_EXT_draw_range_elements = 1;
+        public const int GL_MAX_ELEMENTS_VERTICES_EXT = 0x80E8;
+        public const int GL_MAX_ELEMENTS_INDICES_EXT = 0x80E9;
+        public const int GL_EXT_external_buffer = 1;
+        public const int GL_EXT_fog_coord = 1;
+        public const int GL_FOG_COORDINATE_SOURCE_EXT = 0x8450;
+        public const int GL_FOG_COORDINATE_EXT = 0x8451;
+        public const int GL_FRAGMENT_DEPTH_EXT = 0x8452;
+        public const int GL_CURRENT_FOG_COORDINATE_EXT = 0x8453;
+        public const int GL_FOG_COORDINATE_ARRAY_TYPE_EXT = 0x8454;
+        public const int GL_FOG_COORDINATE_ARRAY_STRIDE_EXT = 0x8455;
+        public const int GL_FOG_COORDINATE_ARRAY_POINTER_EXT = 0x8456;
+        public const int GL_FOG_COORDINATE_ARRAY_EXT = 0x8457;
+        public const int GL_EXT_framebuffer_blit = 1;
+        public const int GL_READ_FRAMEBUFFER_EXT = 0x8CA8;
+        public const int GL_DRAW_FRAMEBUFFER_EXT = 0x8CA9;
+        public const int GL_DRAW_FRAMEBUFFER_BINDING_EXT = 0x8CA6;
+        public const int GL_READ_FRAMEBUFFER_BINDING_EXT = 0x8CAA;
+        public const int GL_EXT_framebuffer_multisample = 1;
+        public const int GL_RENDERBUFFER_SAMPLES_EXT = 0x8CAB;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x8D56;
+        public const int GL_MAX_SAMPLES_EXT = 0x8D57;
+        public const int GL_EXT_framebuffer_multisample_blit_scaled = 1;
+        public const int GL_SCALED_RESOLVE_FASTEST_EXT = 0x90BA;
+        public const int GL_SCALED_RESOLVE_NICEST_EXT = 0x90BB;
+        public const int GL_EXT_framebuffer_object = 1;
+        public const int GL_INVALID_FRAMEBUFFER_OPERATION_EXT = 0x0506;
+        public const int GL_MAX_RENDERBUFFER_SIZE_EXT = 0x84E8;
+        public const int GL_FRAMEBUFFER_BINDING_EXT = 0x8CA6;
+        public const int GL_RENDERBUFFER_BINDING_EXT = 0x8CA7;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT = 0x8CD0;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT = 0x8CD1;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT = 0x8CD2;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT = 0x8CD3;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT = 0x8CD4;
+        public const int GL_FRAMEBUFFER_COMPLETE_EXT = 0x8CD5;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT = 0x8CD6;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT = 0x8CD7;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT = 0x8CD9;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT = 0x8CDA;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT = 0x8CDB;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT = 0x8CDC;
+        public const int GL_FRAMEBUFFER_UNSUPPORTED_EXT = 0x8CDD;
+        public const int GL_MAX_COLOR_ATTACHMENTS_EXT = 0x8CDF;
+        public const int GL_COLOR_ATTACHMENT0_EXT = 0x8CE0;
+        public const int GL_COLOR_ATTACHMENT1_EXT = 0x8CE1;
+        public const int GL_COLOR_ATTACHMENT2_EXT = 0x8CE2;
+        public const int GL_COLOR_ATTACHMENT3_EXT = 0x8CE3;
+        public const int GL_COLOR_ATTACHMENT4_EXT = 0x8CE4;
+        public const int GL_COLOR_ATTACHMENT5_EXT = 0x8CE5;
+        public const int GL_COLOR_ATTACHMENT6_EXT = 0x8CE6;
+        public const int GL_COLOR_ATTACHMENT7_EXT = 0x8CE7;
+        public const int GL_COLOR_ATTACHMENT8_EXT = 0x8CE8;
+        public const int GL_COLOR_ATTACHMENT9_EXT = 0x8CE9;
+        public const int GL_COLOR_ATTACHMENT10_EXT = 0x8CEA;
+        public const int GL_COLOR_ATTACHMENT11_EXT = 0x8CEB;
+        public const int GL_COLOR_ATTACHMENT12_EXT = 0x8CEC;
+        public const int GL_COLOR_ATTACHMENT13_EXT = 0x8CED;
+        public const int GL_COLOR_ATTACHMENT14_EXT = 0x8CEE;
+        public const int GL_COLOR_ATTACHMENT15_EXT = 0x8CEF;
+        public const int GL_DEPTH_ATTACHMENT_EXT = 0x8D00;
+        public const int GL_STENCIL_ATTACHMENT_EXT = 0x8D20;
+        public const int GL_FRAMEBUFFER_EXT = 0x8D40;
+        public const int GL_RENDERBUFFER_EXT = 0x8D41;
+        public const int GL_RENDERBUFFER_WIDTH_EXT = 0x8D42;
+        public const int GL_RENDERBUFFER_HEIGHT_EXT = 0x8D43;
+        public const int GL_RENDERBUFFER_INTERNAL_FORMAT_EXT = 0x8D44;
+        public const int GL_STENCIL_INDEX1_EXT = 0x8D46;
+        public const int GL_STENCIL_INDEX4_EXT = 0x8D47;
+        public const int GL_STENCIL_INDEX8_EXT = 0x8D48;
+        public const int GL_STENCIL_INDEX16_EXT = 0x8D49;
+        public const int GL_RENDERBUFFER_RED_SIZE_EXT = 0x8D50;
+        public const int GL_RENDERBUFFER_GREEN_SIZE_EXT = 0x8D51;
+        public const int GL_RENDERBUFFER_BLUE_SIZE_EXT = 0x8D52;
+        public const int GL_RENDERBUFFER_ALPHA_SIZE_EXT = 0x8D53;
+        public const int GL_RENDERBUFFER_DEPTH_SIZE_EXT = 0x8D54;
+        public const int GL_RENDERBUFFER_STENCIL_SIZE_EXT = 0x8D55;
+        public const int GL_EXT_framebuffer_sRGB = 1;
+        public const int GL_FRAMEBUFFER_SRGB_EXT = 0x8DB9;
+        public const int GL_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x8DBA;
+        public const int GL_EXT_geometry_shader4 = 1;
+        public const int GL_GEOMETRY_SHADER_EXT = 0x8DD9;
+        public const int GL_GEOMETRY_VERTICES_OUT_EXT = 0x8DDA;
+        public const int GL_GEOMETRY_INPUT_TYPE_EXT = 0x8DDB;
+        public const int GL_GEOMETRY_OUTPUT_TYPE_EXT = 0x8DDC;
+        public const int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT = 0x8C29;
+        public const int GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT = 0x8DDD;
+        public const int GL_MAX_VERTEX_VARYING_COMPONENTS_EXT = 0x8DDE;
+        public const int GL_MAX_VARYING_COMPONENTS_EXT = 0x8B4B;
+        public const int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT = 0x8DDF;
+        public const int GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT = 0x8DE0;
+        public const int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT = 0x8DE1;
+        public const int GL_LINES_ADJACENCY_EXT = 0x000A;
+        public const int GL_LINE_STRIP_ADJACENCY_EXT = 0x000B;
+        public const int GL_TRIANGLES_ADJACENCY_EXT = 0x000C;
+        public const int GL_TRIANGLE_STRIP_ADJACENCY_EXT = 0x000D;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT = 0x8DA8;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT = 0x8DA9;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT = 0x8DA7;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = 0x8CD4;
+        public const int GL_PROGRAM_POINT_SIZE_EXT = 0x8642;
+        public const int GL_EXT_gpu_program_parameters = 1;
+        public const int GL_EXT_gpu_shader4 = 1;
+        public const int GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT = 0x88FD;
+        public const int GL_SAMPLER_1D_ARRAY_EXT = 0x8DC0;
+        public const int GL_SAMPLER_2D_ARRAY_EXT = 0x8DC1;
+        public const int GL_SAMPLER_BUFFER_EXT = 0x8DC2;
+        public const int GL_SAMPLER_1D_ARRAY_SHADOW_EXT = 0x8DC3;
+        public const int GL_SAMPLER_2D_ARRAY_SHADOW_EXT = 0x8DC4;
+        public const int GL_SAMPLER_CUBE_SHADOW_EXT = 0x8DC5;
+        public const int GL_UNSIGNED_INT_VEC2_EXT = 0x8DC6;
+        public const int GL_UNSIGNED_INT_VEC3_EXT = 0x8DC7;
+        public const int GL_UNSIGNED_INT_VEC4_EXT = 0x8DC8;
+        public const int GL_INT_SAMPLER_1D_EXT = 0x8DC9;
+        public const int GL_INT_SAMPLER_2D_EXT = 0x8DCA;
+        public const int GL_INT_SAMPLER_3D_EXT = 0x8DCB;
+        public const int GL_INT_SAMPLER_CUBE_EXT = 0x8DCC;
+        public const int GL_INT_SAMPLER_2D_RECT_EXT = 0x8DCD;
+        public const int GL_INT_SAMPLER_1D_ARRAY_EXT = 0x8DCE;
+        public const int GL_INT_SAMPLER_2D_ARRAY_EXT = 0x8DCF;
+        public const int GL_INT_SAMPLER_BUFFER_EXT = 0x8DD0;
+        public const int GL_UNSIGNED_INT_SAMPLER_1D_EXT = 0x8DD1;
+        public const int GL_UNSIGNED_INT_SAMPLER_2D_EXT = 0x8DD2;
+        public const int GL_UNSIGNED_INT_SAMPLER_3D_EXT = 0x8DD3;
+        public const int GL_UNSIGNED_INT_SAMPLER_CUBE_EXT = 0x8DD4;
+        public const int GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT = 0x8DD5;
+        public const int GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT = 0x8DD6;
+        public const int GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT = 0x8DD7;
+        public const int GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT = 0x8DD8;
+        public const int GL_MIN_PROGRAM_TEXEL_OFFSET_EXT = 0x8904;
+        public const int GL_MAX_PROGRAM_TEXEL_OFFSET_EXT = 0x8905;
+        public const int GL_EXT_histogram = 1;
+        public const int GL_HISTOGRAM_EXT = 0x8024;
+        public const int GL_PROXY_HISTOGRAM_EXT = 0x8025;
+        public const int GL_HISTOGRAM_WIDTH_EXT = 0x8026;
+        public const int GL_HISTOGRAM_FORMAT_EXT = 0x8027;
+        public const int GL_HISTOGRAM_RED_SIZE_EXT = 0x8028;
+        public const int GL_HISTOGRAM_GREEN_SIZE_EXT = 0x8029;
+        public const int GL_HISTOGRAM_BLUE_SIZE_EXT = 0x802A;
+        public const int GL_HISTOGRAM_ALPHA_SIZE_EXT = 0x802B;
+        public const int GL_HISTOGRAM_LUMINANCE_SIZE_EXT = 0x802C;
+        public const int GL_HISTOGRAM_SINK_EXT = 0x802D;
+        public const int GL_MINMAX_EXT = 0x802E;
+        public const int GL_MINMAX_FORMAT_EXT = 0x802F;
+        public const int GL_MINMAX_SINK_EXT = 0x8030;
+        public const int GL_TABLE_TOO_LARGE_EXT = 0x8031;
+        public const int GL_EXT_index_array_formats = 1;
+        public const int GL_IUI_V2F_EXT = 0x81AD;
+        public const int GL_IUI_V3F_EXT = 0x81AE;
+        public const int GL_IUI_N3F_V2F_EXT = 0x81AF;
+        public const int GL_IUI_N3F_V3F_EXT = 0x81B0;
+        public const int GL_T2F_IUI_V2F_EXT = 0x81B1;
+        public const int GL_T2F_IUI_V3F_EXT = 0x81B2;
+        public const int GL_T2F_IUI_N3F_V2F_EXT = 0x81B3;
+        public const int GL_T2F_IUI_N3F_V3F_EXT = 0x81B4;
+        public const int GL_EXT_index_func = 1;
+        public const int GL_INDEX_TEST_EXT = 0x81B5;
+        public const int GL_INDEX_TEST_FUNC_EXT = 0x81B6;
+        public const int GL_INDEX_TEST_REF_EXT = 0x81B7;
+        public const int GL_EXT_index_material = 1;
+        public const int GL_INDEX_MATERIAL_EXT = 0x81B8;
+        public const int GL_INDEX_MATERIAL_PARAMETER_EXT = 0x81B9;
+        public const int GL_INDEX_MATERIAL_FACE_EXT = 0x81BA;
+        public const int GL_EXT_index_texture = 1;
+        public const int GL_EXT_light_texture = 1;
+        public const int GL_FRAGMENT_MATERIAL_EXT = 0x8349;
+        public const int GL_FRAGMENT_NORMAL_EXT = 0x834A;
+        public const int GL_FRAGMENT_COLOR_EXT = 0x834C;
+        public const int GL_ATTENUATION_EXT = 0x834D;
+        public const int GL_SHADOW_ATTENUATION_EXT = 0x834E;
+        public const int GL_TEXTURE_APPLICATION_MODE_EXT = 0x834F;
+        public const int GL_TEXTURE_LIGHT_EXT = 0x8350;
+        public const int GL_TEXTURE_MATERIAL_FACE_EXT = 0x8351;
+        public const int GL_TEXTURE_MATERIAL_PARAMETER_EXT = 0x8352;
+        public const int GL_EXT_memory_object = 1;
+        public const int GL_TEXTURE_TILING_EXT = 0x9580;
+        public const int GL_DEDICATED_MEMORY_OBJECT_EXT = 0x9581;
+        public const int GL_PROTECTED_MEMORY_OBJECT_EXT = 0x959B;
+        public const int GL_NUM_TILING_TYPES_EXT = 0x9582;
+        public const int GL_TILING_TYPES_EXT = 0x9583;
+        public const int GL_OPTIMAL_TILING_EXT = 0x9584;
+        public const int GL_LINEAR_TILING_EXT = 0x9585;
+        public const int GL_NUM_DEVICE_UUIDS_EXT = 0x9596;
+        public const int GL_DEVICE_UUID_EXT = 0x9597;
+        public const int GL_DRIVER_UUID_EXT = 0x9598;
+        public const int GL_UUID_SIZE_EXT = 16;
+        public const int GL_EXT_memory_object_fd = 1;
+        public const int GL_HANDLE_TYPE_OPAQUE_FD_EXT = 0x9586;
+        public const int GL_EXT_memory_object_win32 = 1;
+        public const int GL_HANDLE_TYPE_OPAQUE_WIN32_EXT = 0x9587;
+        public const int GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT = 0x9588;
+        public const int GL_DEVICE_LUID_EXT = 0x9599;
+        public const int GL_DEVICE_NODE_MASK_EXT = 0x959A;
+        public const int GL_LUID_SIZE_EXT = 8;
+        public const int GL_HANDLE_TYPE_D3D12_TILEPOOL_EXT = 0x9589;
+        public const int GL_HANDLE_TYPE_D3D12_RESOURCE_EXT = 0x958A;
+        public const int GL_HANDLE_TYPE_D3D11_IMAGE_EXT = 0x958B;
+        public const int GL_HANDLE_TYPE_D3D11_IMAGE_KMT_EXT = 0x958C;
+        public const int GL_EXT_misc_attribute = 1;
+        public const int GL_EXT_multi_draw_arrays = 1;
+        public const int GL_EXT_multisample = 1;
+        public const int GL_MULTISAMPLE_EXT = 0x809D;
+        public const int GL_SAMPLE_ALPHA_TO_MASK_EXT = 0x809E;
+        public const int GL_SAMPLE_ALPHA_TO_ONE_EXT = 0x809F;
+        public const int GL_SAMPLE_MASK_EXT = 0x80A0;
+        public const int GL_1PASS_EXT = 0x80A1;
+        public const int GL_2PASS_0_EXT = 0x80A2;
+        public const int GL_2PASS_1_EXT = 0x80A3;
+        public const int GL_4PASS_0_EXT = 0x80A4;
+        public const int GL_4PASS_1_EXT = 0x80A5;
+        public const int GL_4PASS_2_EXT = 0x80A6;
+        public const int GL_4PASS_3_EXT = 0x80A7;
+        public const int GL_SAMPLE_BUFFERS_EXT = 0x80A8;
+        public const int GL_SAMPLES_EXT = 0x80A9;
+        public const int GL_SAMPLE_MASK_VALUE_EXT = 0x80AA;
+        public const int GL_SAMPLE_MASK_INVERT_EXT = 0x80AB;
+        public const int GL_SAMPLE_PATTERN_EXT = 0x80AC;
+        public const int GL_MULTISAMPLE_BIT_EXT = 0x20000000;
+        public const int GL_EXT_packed_depth_stencil = 1;
+        public const int GL_DEPTH_STENCIL_EXT = 0x84F9;
+        public const int GL_UNSIGNED_INT_24_8_EXT = 0x84FA;
+        public const int GL_DEPTH24_STENCIL8_EXT = 0x88F0;
+        public const int GL_TEXTURE_STENCIL_SIZE_EXT = 0x88F1;
+        public const int GL_EXT_packed_float = 1;
+        public const int GL_R11F_G11F_B10F_EXT = 0x8C3A;
+        public const int GL_UNSIGNED_INT_10F_11F_11F_REV_EXT = 0x8C3B;
+        public const int GL_RGBA_SIGNED_COMPONENTS_EXT = 0x8C3C;
+        public const int GL_EXT_packed_pixels = 1;
+        public const int GL_UNSIGNED_BYTE_3_3_2_EXT = 0x8032;
+        public const int GL_UNSIGNED_SHORT_4_4_4_4_EXT = 0x8033;
+        public const int GL_UNSIGNED_SHORT_5_5_5_1_EXT = 0x8034;
+        public const int GL_UNSIGNED_INT_8_8_8_8_EXT = 0x8035;
+        public const int GL_UNSIGNED_INT_10_10_10_2_EXT = 0x8036;
+        public const int GL_EXT_paletted_texture = 1;
+        public const int GL_COLOR_INDEX1_EXT = 0x80E2;
+        public const int GL_COLOR_INDEX2_EXT = 0x80E3;
+        public const int GL_COLOR_INDEX4_EXT = 0x80E4;
+        public const int GL_COLOR_INDEX8_EXT = 0x80E5;
+        public const int GL_COLOR_INDEX12_EXT = 0x80E6;
+        public const int GL_COLOR_INDEX16_EXT = 0x80E7;
+        public const int GL_TEXTURE_INDEX_SIZE_EXT = 0x80ED;
+        public const int GL_EXT_pixel_buffer_object = 1;
+        public const int GL_PIXEL_PACK_BUFFER_EXT = 0x88EB;
+        public const int GL_PIXEL_UNPACK_BUFFER_EXT = 0x88EC;
+        public const int GL_PIXEL_PACK_BUFFER_BINDING_EXT = 0x88ED;
+        public const int GL_PIXEL_UNPACK_BUFFER_BINDING_EXT = 0x88EF;
+        public const int GL_EXT_pixel_transform = 1;
+        public const int GL_PIXEL_TRANSFORM_2D_EXT = 0x8330;
+        public const int GL_PIXEL_MAG_FILTER_EXT = 0x8331;
+        public const int GL_PIXEL_MIN_FILTER_EXT = 0x8332;
+        public const int GL_PIXEL_CUBIC_WEIGHT_EXT = 0x8333;
+        public const int GL_CUBIC_EXT = 0x8334;
+        public const int GL_AVERAGE_EXT = 0x8335;
+        public const int GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT = 0x8336;
+        public const int GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT = 0x8337;
+        public const int GL_PIXEL_TRANSFORM_2D_MATRIX_EXT = 0x8338;
+        public const int GL_EXT_pixel_transform_color_table = 1;
+        public const int GL_EXT_point_parameters = 1;
+        public const int GL_POINT_SIZE_MIN_EXT = 0x8126;
+        public const int GL_POINT_SIZE_MAX_EXT = 0x8127;
+        public const int GL_POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128;
+        public const int GL_DISTANCE_ATTENUATION_EXT = 0x8129;
+        public const int GL_EXT_polygon_offset = 1;
+        public const int GL_POLYGON_OFFSET_EXT = 0x8037;
+        public const int GL_POLYGON_OFFSET_FACTOR_EXT = 0x8038;
+        public const int GL_POLYGON_OFFSET_BIAS_EXT = 0x8039;
+        public const int GL_EXT_polygon_offset_clamp = 1;
+        public const int GL_POLYGON_OFFSET_CLAMP_EXT = 0x8E1B;
+        public const int GL_EXT_post_depth_coverage = 1;
+        public const int GL_EXT_provoking_vertex = 1;
+        public const int GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT = 0x8E4C;
+        public const int GL_FIRST_VERTEX_CONVENTION_EXT = 0x8E4D;
+        public const int GL_LAST_VERTEX_CONVENTION_EXT = 0x8E4E;
+        public const int GL_PROVOKING_VERTEX_EXT = 0x8E4F;
+        public const int GL_EXT_raster_multisample = 1;
+        public const int GL_RASTER_MULTISAMPLE_EXT = 0x9327;
+        public const int GL_RASTER_SAMPLES_EXT = 0x9328;
+        public const int GL_MAX_RASTER_SAMPLES_EXT = 0x9329;
+        public const int GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT = 0x932A;
+        public const int GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT = 0x932B;
+        public const int GL_EFFECTIVE_RASTER_SAMPLES_EXT = 0x932C;
+        public const int GL_EXT_rescale_normal = 1;
+        public const int GL_RESCALE_NORMAL_EXT = 0x803A;
+        public const int GL_EXT_secondary_color = 1;
+        public const int GL_COLOR_SUM_EXT = 0x8458;
+        public const int GL_CURRENT_SECONDARY_COLOR_EXT = 0x8459;
+        public const int GL_SECONDARY_COLOR_ARRAY_SIZE_EXT = 0x845A;
+        public const int GL_SECONDARY_COLOR_ARRAY_TYPE_EXT = 0x845B;
+        public const int GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT = 0x845C;
+        public const int GL_SECONDARY_COLOR_ARRAY_POINTER_EXT = 0x845D;
+        public const int GL_SECONDARY_COLOR_ARRAY_EXT = 0x845E;
+        public const int GL_EXT_semaphore = 1;
+        public const int GL_LAYOUT_GENERAL_EXT = 0x958D;
+        public const int GL_LAYOUT_COLOR_ATTACHMENT_EXT = 0x958E;
+        public const int GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT = 0x958F;
+        public const int GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT = 0x9590;
+        public const int GL_LAYOUT_SHADER_READ_ONLY_EXT = 0x9591;
+        public const int GL_LAYOUT_TRANSFER_SRC_EXT = 0x9592;
+        public const int GL_LAYOUT_TRANSFER_DST_EXT = 0x9593;
+        public const int GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT = 0x9530;
+        public const int GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT = 0x9531;
+        public const int GL_EXT_semaphore_fd = 1;
+        public const int GL_EXT_semaphore_win32 = 1;
+        public const int GL_HANDLE_TYPE_D3D12_FENCE_EXT = 0x9594;
+        public const int GL_D3D12_FENCE_VALUE_EXT = 0x9595;
+        public const int GL_EXT_separate_shader_objects = 1;
+        public const int GL_ACTIVE_PROGRAM_EXT = 0x8B8D;
+        public const int GL_EXT_separate_specular_color = 1;
+        public const int GL_LIGHT_MODEL_COLOR_CONTROL_EXT = 0x81F8;
+        public const int GL_SINGLE_COLOR_EXT = 0x81F9;
+        public const int GL_SEPARATE_SPECULAR_COLOR_EXT = 0x81FA;
+        public const int GL_EXT_shader_framebuffer_fetch = 1;
+        public const int GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT = 0x8A52;
+        public const int GL_EXT_shader_framebuffer_fetch_non_coherent = 1;
+        public const int GL_EXT_shader_image_load_formatted = 1;
+        public const int GL_EXT_shader_image_load_store = 1;
+        public const int GL_MAX_IMAGE_UNITS_EXT = 0x8F38;
+        public const int GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT = 0x8F39;
+        public const int GL_IMAGE_BINDING_NAME_EXT = 0x8F3A;
+        public const int GL_IMAGE_BINDING_LEVEL_EXT = 0x8F3B;
+        public const int GL_IMAGE_BINDING_LAYERED_EXT = 0x8F3C;
+        public const int GL_IMAGE_BINDING_LAYER_EXT = 0x8F3D;
+        public const int GL_IMAGE_BINDING_ACCESS_EXT = 0x8F3E;
+        public const int GL_IMAGE_1D_EXT = 0x904C;
+        public const int GL_IMAGE_2D_EXT = 0x904D;
+        public const int GL_IMAGE_3D_EXT = 0x904E;
+        public const int GL_IMAGE_2D_RECT_EXT = 0x904F;
+        public const int GL_IMAGE_CUBE_EXT = 0x9050;
+        public const int GL_IMAGE_BUFFER_EXT = 0x9051;
+        public const int GL_IMAGE_1D_ARRAY_EXT = 0x9052;
+        public const int GL_IMAGE_2D_ARRAY_EXT = 0x9053;
+        public const int GL_IMAGE_CUBE_MAP_ARRAY_EXT = 0x9054;
+        public const int GL_IMAGE_2D_MULTISAMPLE_EXT = 0x9055;
+        public const int GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x9056;
+        public const int GL_INT_IMAGE_1D_EXT = 0x9057;
+        public const int GL_INT_IMAGE_2D_EXT = 0x9058;
+        public const int GL_INT_IMAGE_3D_EXT = 0x9059;
+        public const int GL_INT_IMAGE_2D_RECT_EXT = 0x905A;
+        public const int GL_INT_IMAGE_CUBE_EXT = 0x905B;
+        public const int GL_INT_IMAGE_BUFFER_EXT = 0x905C;
+        public const int GL_INT_IMAGE_1D_ARRAY_EXT = 0x905D;
+        public const int GL_INT_IMAGE_2D_ARRAY_EXT = 0x905E;
+        public const int GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT = 0x905F;
+        public const int GL_INT_IMAGE_2D_MULTISAMPLE_EXT = 0x9060;
+        public const int GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x9061;
+        public const int GL_UNSIGNED_INT_IMAGE_1D_EXT = 0x9062;
+        public const int GL_UNSIGNED_INT_IMAGE_2D_EXT = 0x9063;
+        public const int GL_UNSIGNED_INT_IMAGE_3D_EXT = 0x9064;
+        public const int GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT = 0x9065;
+        public const int GL_UNSIGNED_INT_IMAGE_CUBE_EXT = 0x9066;
+        public const int GL_UNSIGNED_INT_IMAGE_BUFFER_EXT = 0x9067;
+        public const int GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT = 0x9068;
+        public const int GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT = 0x9069;
+        public const int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT = 0x906A;
+        public const int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT = 0x906B;
+        public const int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x906C;
+        public const int GL_MAX_IMAGE_SAMPLES_EXT = 0x906D;
+        public const int GL_IMAGE_BINDING_FORMAT_EXT = 0x906E;
+        public const int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT = 0x00000001;
+        public const int GL_ELEMENT_ARRAY_BARRIER_BIT_EXT = 0x00000002;
+        public const int GL_UNIFORM_BARRIER_BIT_EXT = 0x00000004;
+        public const int GL_TEXTURE_FETCH_BARRIER_BIT_EXT = 0x00000008;
+        public const int GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT = 0x00000020;
+        public const int GL_COMMAND_BARRIER_BIT_EXT = 0x00000040;
+        public const int GL_PIXEL_BUFFER_BARRIER_BIT_EXT = 0x00000080;
+        public const int GL_TEXTURE_UPDATE_BARRIER_BIT_EXT = 0x00000100;
+        public const int GL_BUFFER_UPDATE_BARRIER_BIT_EXT = 0x00000200;
+        public const int GL_FRAMEBUFFER_BARRIER_BIT_EXT = 0x00000400;
+        public const int GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT = 0x00000800;
+        public const int GL_ATOMIC_COUNTER_BARRIER_BIT_EXT = 0x00001000;
+        public const int GL_ALL_BARRIER_BITS_EXT = -1;
+        public const int GL_EXT_shader_integer_mix = 1;
+        public const int GL_EXT_shadow_funcs = 1;
+        public const int GL_EXT_shared_texture_palette = 1;
+        public const int GL_SHARED_TEXTURE_PALETTE_EXT = 0x81FB;
+        public const int GL_EXT_sparse_texture2 = 1;
+        public const int GL_EXT_stencil_clear_tag = 1;
+        public const int GL_STENCIL_TAG_BITS_EXT = 0x88F2;
+        public const int GL_STENCIL_CLEAR_TAG_VALUE_EXT = 0x88F3;
+        public const int GL_EXT_stencil_two_side = 1;
+        public const int GL_STENCIL_TEST_TWO_SIDE_EXT = 0x8910;
+        public const int GL_ACTIVE_STENCIL_FACE_EXT = 0x8911;
+        public const int GL_EXT_stencil_wrap = 1;
+        public const int GL_INCR_WRAP_EXT = 0x8507;
+        public const int GL_DECR_WRAP_EXT = 0x8508;
+        public const int GL_EXT_subtexture = 1;
+        public const int GL_EXT_texture = 1;
+        public const int GL_ALPHA4_EXT = 0x803B;
+        public const int GL_ALPHA8_EXT = 0x803C;
+        public const int GL_ALPHA12_EXT = 0x803D;
+        public const int GL_ALPHA16_EXT = 0x803E;
+        public const int GL_LUMINANCE4_EXT = 0x803F;
+        public const int GL_LUMINANCE8_EXT = 0x8040;
+        public const int GL_LUMINANCE12_EXT = 0x8041;
+        public const int GL_LUMINANCE16_EXT = 0x8042;
+        public const int GL_LUMINANCE4_ALPHA4_EXT = 0x8043;
+        public const int GL_LUMINANCE6_ALPHA2_EXT = 0x8044;
+        public const int GL_LUMINANCE8_ALPHA8_EXT = 0x8045;
+        public const int GL_LUMINANCE12_ALPHA4_EXT = 0x8046;
+        public const int GL_LUMINANCE12_ALPHA12_EXT = 0x8047;
+        public const int GL_LUMINANCE16_ALPHA16_EXT = 0x8048;
+        public const int GL_INTENSITY_EXT = 0x8049;
+        public const int GL_INTENSITY4_EXT = 0x804A;
+        public const int GL_INTENSITY8_EXT = 0x804B;
+        public const int GL_INTENSITY12_EXT = 0x804C;
+        public const int GL_INTENSITY16_EXT = 0x804D;
+        public const int GL_RGB2_EXT = 0x804E;
+        public const int GL_RGB4_EXT = 0x804F;
+        public const int GL_RGB5_EXT = 0x8050;
+        public const int GL_RGB8_EXT = 0x8051;
+        public const int GL_RGB10_EXT = 0x8052;
+        public const int GL_RGB12_EXT = 0x8053;
+        public const int GL_RGB16_EXT = 0x8054;
+        public const int GL_RGBA2_EXT = 0x8055;
+        public const int GL_RGBA4_EXT = 0x8056;
+        public const int GL_RGB5_A1_EXT = 0x8057;
+        public const int GL_RGBA8_EXT = 0x8058;
+        public const int GL_RGB10_A2_EXT = 0x8059;
+        public const int GL_RGBA12_EXT = 0x805A;
+        public const int GL_RGBA16_EXT = 0x805B;
+        public const int GL_TEXTURE_RED_SIZE_EXT = 0x805C;
+        public const int GL_TEXTURE_GREEN_SIZE_EXT = 0x805D;
+        public const int GL_TEXTURE_BLUE_SIZE_EXT = 0x805E;
+        public const int GL_TEXTURE_ALPHA_SIZE_EXT = 0x805F;
+        public const int GL_TEXTURE_LUMINANCE_SIZE_EXT = 0x8060;
+        public const int GL_TEXTURE_INTENSITY_SIZE_EXT = 0x8061;
+        public const int GL_REPLACE_EXT = 0x8062;
+        public const int GL_PROXY_TEXTURE_1D_EXT = 0x8063;
+        public const int GL_PROXY_TEXTURE_2D_EXT = 0x8064;
+        public const int GL_TEXTURE_TOO_LARGE_EXT = 0x8065;
+        public const int GL_EXT_texture3D = 1;
+        public const int GL_PACK_SKIP_IMAGES_EXT = 0x806B;
+        public const int GL_PACK_IMAGE_HEIGHT_EXT = 0x806C;
+        public const int GL_UNPACK_SKIP_IMAGES_EXT = 0x806D;
+        public const int GL_UNPACK_IMAGE_HEIGHT_EXT = 0x806E;
+        public const int GL_TEXTURE_3D_EXT = 0x806F;
+        public const int GL_PROXY_TEXTURE_3D_EXT = 0x8070;
+        public const int GL_TEXTURE_DEPTH_EXT = 0x8071;
+        public const int GL_TEXTURE_WRAP_R_EXT = 0x8072;
+        public const int GL_MAX_3D_TEXTURE_SIZE_EXT = 0x8073;
+        public const int GL_EXT_texture_array = 1;
+        public const int GL_TEXTURE_1D_ARRAY_EXT = 0x8C18;
+        public const int GL_PROXY_TEXTURE_1D_ARRAY_EXT = 0x8C19;
+        public const int GL_TEXTURE_2D_ARRAY_EXT = 0x8C1A;
+        public const int GL_PROXY_TEXTURE_2D_ARRAY_EXT = 0x8C1B;
+        public const int GL_TEXTURE_BINDING_1D_ARRAY_EXT = 0x8C1C;
+        public const int GL_TEXTURE_BINDING_2D_ARRAY_EXT = 0x8C1D;
+        public const int GL_MAX_ARRAY_TEXTURE_LAYERS_EXT = 0x88FF;
+        public const int GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT = 0x884E;
+        public const int GL_EXT_texture_buffer_object = 1;
+        public const int GL_TEXTURE_BUFFER_EXT = 0x8C2A;
+        public const int GL_MAX_TEXTURE_BUFFER_SIZE_EXT = 0x8C2B;
+        public const int GL_TEXTURE_BINDING_BUFFER_EXT = 0x8C2C;
+        public const int GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT = 0x8C2D;
+        public const int GL_TEXTURE_BUFFER_FORMAT_EXT = 0x8C2E;
+        public const int GL_EXT_texture_compression_latc = 1;
+        public const int GL_COMPRESSED_LUMINANCE_LATC1_EXT = 0x8C70;
+        public const int GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT = 0x8C71;
+        public const int GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C72;
+        public const int GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C73;
+        public const int GL_EXT_texture_compression_rgtc = 1;
+        public const int GL_COMPRESSED_RED_RGTC1_EXT = 0x8DBB;
+        public const int GL_COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC;
+        public const int GL_COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD;
+        public const int GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE;
+        public const int GL_EXT_texture_compression_s3tc = 1;
+        public const int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
+        public const int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
+        public const int GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2;
+        public const int GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3;
+        public const int GL_EXT_texture_cube_map = 1;
+        public const int GL_NORMAL_MAP_EXT = 0x8511;
+        public const int GL_REFLECTION_MAP_EXT = 0x8512;
+        public const int GL_TEXTURE_CUBE_MAP_EXT = 0x8513;
+        public const int GL_TEXTURE_BINDING_CUBE_MAP_EXT = 0x8514;
+        public const int GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT = 0x8515;
+        public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT = 0x8516;
+        public const int GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT = 0x8517;
+        public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT = 0x8518;
+        public const int GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT = 0x8519;
+        public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT = 0x851A;
+        public const int GL_PROXY_TEXTURE_CUBE_MAP_EXT = 0x851B;
+        public const int GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT = 0x851C;
+        public const int GL_EXT_texture_env_add = 1;
+        public const int GL_EXT_texture_env_combine = 1;
+        public const int GL_COMBINE_EXT = 0x8570;
+        public const int GL_COMBINE_RGB_EXT = 0x8571;
+        public const int GL_COMBINE_ALPHA_EXT = 0x8572;
+        public const int GL_RGB_SCALE_EXT = 0x8573;
+        public const int GL_ADD_SIGNED_EXT = 0x8574;
+        public const int GL_INTERPOLATE_EXT = 0x8575;
+        public const int GL_CONSTANT_EXT = 0x8576;
+        public const int GL_PRIMARY_COLOR_EXT = 0x8577;
+        public const int GL_PREVIOUS_EXT = 0x8578;
+        public const int GL_SOURCE0_RGB_EXT = 0x8580;
+        public const int GL_SOURCE1_RGB_EXT = 0x8581;
+        public const int GL_SOURCE2_RGB_EXT = 0x8582;
+        public const int GL_SOURCE0_ALPHA_EXT = 0x8588;
+        public const int GL_SOURCE1_ALPHA_EXT = 0x8589;
+        public const int GL_SOURCE2_ALPHA_EXT = 0x858A;
+        public const int GL_OPERAND0_RGB_EXT = 0x8590;
+        public const int GL_OPERAND1_RGB_EXT = 0x8591;
+        public const int GL_OPERAND2_RGB_EXT = 0x8592;
+        public const int GL_OPERAND0_ALPHA_EXT = 0x8598;
+        public const int GL_OPERAND1_ALPHA_EXT = 0x8599;
+        public const int GL_OPERAND2_ALPHA_EXT = 0x859A;
+        public const int GL_EXT_texture_env_dot3 = 1;
+        public const int GL_DOT3_RGB_EXT = 0x8740;
+        public const int GL_DOT3_RGBA_EXT = 0x8741;
+        public const int GL_EXT_texture_filter_anisotropic = 1;
+        public const int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
+        public const int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
+        public const int GL_EXT_texture_filter_minmax = 1;
+        public const int GL_TEXTURE_REDUCTION_MODE_EXT = 0x9366;
+        public const int GL_WEIGHTED_AVERAGE_EXT = 0x9367;
+        public const int GL_EXT_texture_integer = 1;
+        public const int GL_RGBA32UI_EXT = 0x8D70;
+        public const int GL_RGB32UI_EXT = 0x8D71;
+        public const int GL_ALPHA32UI_EXT = 0x8D72;
+        public const int GL_INTENSITY32UI_EXT = 0x8D73;
+        public const int GL_LUMINANCE32UI_EXT = 0x8D74;
+        public const int GL_LUMINANCE_ALPHA32UI_EXT = 0x8D75;
+        public const int GL_RGBA16UI_EXT = 0x8D76;
+        public const int GL_RGB16UI_EXT = 0x8D77;
+        public const int GL_ALPHA16UI_EXT = 0x8D78;
+        public const int GL_INTENSITY16UI_EXT = 0x8D79;
+        public const int GL_LUMINANCE16UI_EXT = 0x8D7A;
+        public const int GL_LUMINANCE_ALPHA16UI_EXT = 0x8D7B;
+        public const int GL_RGBA8UI_EXT = 0x8D7C;
+        public const int GL_RGB8UI_EXT = 0x8D7D;
+        public const int GL_ALPHA8UI_EXT = 0x8D7E;
+        public const int GL_INTENSITY8UI_EXT = 0x8D7F;
+        public const int GL_LUMINANCE8UI_EXT = 0x8D80;
+        public const int GL_LUMINANCE_ALPHA8UI_EXT = 0x8D81;
+        public const int GL_RGBA32I_EXT = 0x8D82;
+        public const int GL_RGB32I_EXT = 0x8D83;
+        public const int GL_ALPHA32I_EXT = 0x8D84;
+        public const int GL_INTENSITY32I_EXT = 0x8D85;
+        public const int GL_LUMINANCE32I_EXT = 0x8D86;
+        public const int GL_LUMINANCE_ALPHA32I_EXT = 0x8D87;
+        public const int GL_RGBA16I_EXT = 0x8D88;
+        public const int GL_RGB16I_EXT = 0x8D89;
+        public const int GL_ALPHA16I_EXT = 0x8D8A;
+        public const int GL_INTENSITY16I_EXT = 0x8D8B;
+        public const int GL_LUMINANCE16I_EXT = 0x8D8C;
+        public const int GL_LUMINANCE_ALPHA16I_EXT = 0x8D8D;
+        public const int GL_RGBA8I_EXT = 0x8D8E;
+        public const int GL_RGB8I_EXT = 0x8D8F;
+        public const int GL_ALPHA8I_EXT = 0x8D90;
+        public const int GL_INTENSITY8I_EXT = 0x8D91;
+        public const int GL_LUMINANCE8I_EXT = 0x8D92;
+        public const int GL_LUMINANCE_ALPHA8I_EXT = 0x8D93;
+        public const int GL_RED_INTEGER_EXT = 0x8D94;
+        public const int GL_GREEN_INTEGER_EXT = 0x8D95;
+        public const int GL_BLUE_INTEGER_EXT = 0x8D96;
+        public const int GL_ALPHA_INTEGER_EXT = 0x8D97;
+        public const int GL_RGB_INTEGER_EXT = 0x8D98;
+        public const int GL_RGBA_INTEGER_EXT = 0x8D99;
+        public const int GL_BGR_INTEGER_EXT = 0x8D9A;
+        public const int GL_BGRA_INTEGER_EXT = 0x8D9B;
+        public const int GL_LUMINANCE_INTEGER_EXT = 0x8D9C;
+        public const int GL_LUMINANCE_ALPHA_INTEGER_EXT = 0x8D9D;
+        public const int GL_RGBA_INTEGER_MODE_EXT = 0x8D9E;
+        public const int GL_EXT_texture_lod_bias = 1;
+        public const int GL_MAX_TEXTURE_LOD_BIAS_EXT = 0x84FD;
+        public const int GL_TEXTURE_FILTER_CONTROL_EXT = 0x8500;
+        public const int GL_TEXTURE_LOD_BIAS_EXT = 0x8501;
+        public const int GL_EXT_texture_mirror_clamp = 1;
+        public const int GL_MIRROR_CLAMP_EXT = 0x8742;
+        public const int GL_MIRROR_CLAMP_TO_EDGE_EXT = 0x8743;
+        public const int GL_MIRROR_CLAMP_TO_BORDER_EXT = 0x8912;
+        public const int GL_EXT_texture_object = 1;
+        public const int GL_TEXTURE_PRIORITY_EXT = 0x8066;
+        public const int GL_TEXTURE_RESIDENT_EXT = 0x8067;
+        public const int GL_TEXTURE_1D_BINDING_EXT = 0x8068;
+        public const int GL_TEXTURE_2D_BINDING_EXT = 0x8069;
+        public const int GL_TEXTURE_3D_BINDING_EXT = 0x806A;
+        public const int GL_EXT_texture_perturb_normal = 1;
+        public const int GL_PERTURB_EXT = 0x85AE;
+        public const int GL_TEXTURE_NORMAL_EXT = 0x85AF;
+        public const int GL_EXT_texture_sRGB = 1;
+        public const int GL_SRGB_EXT = 0x8C40;
+        public const int GL_SRGB8_EXT = 0x8C41;
+        public const int GL_SRGB_ALPHA_EXT = 0x8C42;
+        public const int GL_SRGB8_ALPHA8_EXT = 0x8C43;
+        public const int GL_SLUMINANCE_ALPHA_EXT = 0x8C44;
+        public const int GL_SLUMINANCE8_ALPHA8_EXT = 0x8C45;
+        public const int GL_SLUMINANCE_EXT = 0x8C46;
+        public const int GL_SLUMINANCE8_EXT = 0x8C47;
+        public const int GL_COMPRESSED_SRGB_EXT = 0x8C48;
+        public const int GL_COMPRESSED_SRGB_ALPHA_EXT = 0x8C49;
+        public const int GL_COMPRESSED_SLUMINANCE_EXT = 0x8C4A;
+        public const int GL_COMPRESSED_SLUMINANCE_ALPHA_EXT = 0x8C4B;
+        public const int GL_COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C;
+        public const int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D;
+        public const int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E;
+        public const int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F;
+        public const int GL_EXT_texture_sRGB_decode = 1;
+        public const int GL_TEXTURE_SRGB_DECODE_EXT = 0x8A48;
+        public const int GL_DECODE_EXT = 0x8A49;
+        public const int GL_SKIP_DECODE_EXT = 0x8A4A;
+        public const int GL_EXT_texture_shared_exponent = 1;
+        public const int GL_RGB9_E5_EXT = 0x8C3D;
+        public const int GL_UNSIGNED_INT_5_9_9_9_REV_EXT = 0x8C3E;
+        public const int GL_TEXTURE_SHARED_SIZE_EXT = 0x8C3F;
+        public const int GL_EXT_texture_snorm = 1;
+        public const int GL_ALPHA_SNORM = 0x9010;
+        public const int GL_LUMINANCE_SNORM = 0x9011;
+        public const int GL_LUMINANCE_ALPHA_SNORM = 0x9012;
+        public const int GL_INTENSITY_SNORM = 0x9013;
+        public const int GL_ALPHA8_SNORM = 0x9014;
+        public const int GL_LUMINANCE8_SNORM = 0x9015;
+        public const int GL_LUMINANCE8_ALPHA8_SNORM = 0x9016;
+        public const int GL_INTENSITY8_SNORM = 0x9017;
+        public const int GL_ALPHA16_SNORM = 0x9018;
+        public const int GL_LUMINANCE16_SNORM = 0x9019;
+        public const int GL_LUMINANCE16_ALPHA16_SNORM = 0x901A;
+        public const int GL_INTENSITY16_SNORM = 0x901B;
+        public const int GL_RED_SNORM = 0x8F90;
+        public const int GL_RG_SNORM = 0x8F91;
+        public const int GL_RGB_SNORM = 0x8F92;
+        public const int GL_RGBA_SNORM = 0x8F93;
+        public const int GL_EXT_texture_swizzle = 1;
+        public const int GL_TEXTURE_SWIZZLE_R_EXT = 0x8E42;
+        public const int GL_TEXTURE_SWIZZLE_G_EXT = 0x8E43;
+        public const int GL_TEXTURE_SWIZZLE_B_EXT = 0x8E44;
+        public const int GL_TEXTURE_SWIZZLE_A_EXT = 0x8E45;
+        public const int GL_TEXTURE_SWIZZLE_RGBA_EXT = 0x8E46;
+        public const int GL_EXT_timer_query = 1;
+        public const int GL_TIME_ELAPSED_EXT = 0x88BF;
+        public const int GL_EXT_transform_feedback = 1;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_EXT = 0x8C8E;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT = 0x8C84;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT = 0x8C85;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT = 0x8C8F;
+        public const int GL_INTERLEAVED_ATTRIBS_EXT = 0x8C8C;
+        public const int GL_SEPARATE_ATTRIBS_EXT = 0x8C8D;
+        public const int GL_PRIMITIVES_GENERATED_EXT = 0x8C87;
+        public const int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT = 0x8C88;
+        public const int GL_RASTERIZER_DISCARD_EXT = 0x8C89;
+        public const int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT = 0x8C8A;
+        public const int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT = 0x8C8B;
+        public const int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT = 0x8C80;
+        public const int GL_TRANSFORM_FEEDBACK_VARYINGS_EXT = 0x8C83;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT = 0x8C7F;
+        public const int GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT = 0x8C76;
+        public const int GL_EXT_vertex_array = 1;
+        public const int GL_VERTEX_ARRAY_EXT = 0x8074;
+        public const int GL_NORMAL_ARRAY_EXT = 0x8075;
+        public const int GL_COLOR_ARRAY_EXT = 0x8076;
+        public const int GL_INDEX_ARRAY_EXT = 0x8077;
+        public const int GL_TEXTURE_COORD_ARRAY_EXT = 0x8078;
+        public const int GL_EDGE_FLAG_ARRAY_EXT = 0x8079;
+        public const int GL_VERTEX_ARRAY_SIZE_EXT = 0x807A;
+        public const int GL_VERTEX_ARRAY_TYPE_EXT = 0x807B;
+        public const int GL_VERTEX_ARRAY_STRIDE_EXT = 0x807C;
+        public const int GL_VERTEX_ARRAY_COUNT_EXT = 0x807D;
+        public const int GL_NORMAL_ARRAY_TYPE_EXT = 0x807E;
+        public const int GL_NORMAL_ARRAY_STRIDE_EXT = 0x807F;
+        public const int GL_NORMAL_ARRAY_COUNT_EXT = 0x8080;
+        public const int GL_COLOR_ARRAY_SIZE_EXT = 0x8081;
+        public const int GL_COLOR_ARRAY_TYPE_EXT = 0x8082;
+        public const int GL_COLOR_ARRAY_STRIDE_EXT = 0x8083;
+        public const int GL_COLOR_ARRAY_COUNT_EXT = 0x8084;
+        public const int GL_INDEX_ARRAY_TYPE_EXT = 0x8085;
+        public const int GL_INDEX_ARRAY_STRIDE_EXT = 0x8086;
+        public const int GL_INDEX_ARRAY_COUNT_EXT = 0x8087;
+        public const int GL_TEXTURE_COORD_ARRAY_SIZE_EXT = 0x8088;
+        public const int GL_TEXTURE_COORD_ARRAY_TYPE_EXT = 0x8089;
+        public const int GL_TEXTURE_COORD_ARRAY_STRIDE_EXT = 0x808A;
+        public const int GL_TEXTURE_COORD_ARRAY_COUNT_EXT = 0x808B;
+        public const int GL_EDGE_FLAG_ARRAY_STRIDE_EXT = 0x808C;
+        public const int GL_EDGE_FLAG_ARRAY_COUNT_EXT = 0x808D;
+        public const int GL_VERTEX_ARRAY_POINTER_EXT = 0x808E;
+        public const int GL_NORMAL_ARRAY_POINTER_EXT = 0x808F;
+        public const int GL_COLOR_ARRAY_POINTER_EXT = 0x8090;
+        public const int GL_INDEX_ARRAY_POINTER_EXT = 0x8091;
+        public const int GL_TEXTURE_COORD_ARRAY_POINTER_EXT = 0x8092;
+        public const int GL_EDGE_FLAG_ARRAY_POINTER_EXT = 0x8093;
+        public const int GL_EXT_vertex_array_bgra = 1;
+        public const int GL_EXT_vertex_attrib_64bit = 1;
+        public const int GL_DOUBLE_VEC2_EXT = 0x8FFC;
+        public const int GL_DOUBLE_VEC3_EXT = 0x8FFD;
+        public const int GL_DOUBLE_VEC4_EXT = 0x8FFE;
+        public const int GL_DOUBLE_MAT2_EXT = 0x8F46;
+        public const int GL_DOUBLE_MAT3_EXT = 0x8F47;
+        public const int GL_DOUBLE_MAT4_EXT = 0x8F48;
+        public const int GL_DOUBLE_MAT2x3_EXT = 0x8F49;
+        public const int GL_DOUBLE_MAT2x4_EXT = 0x8F4A;
+        public const int GL_DOUBLE_MAT3x2_EXT = 0x8F4B;
+        public const int GL_DOUBLE_MAT3x4_EXT = 0x8F4C;
+        public const int GL_DOUBLE_MAT4x2_EXT = 0x8F4D;
+        public const int GL_DOUBLE_MAT4x3_EXT = 0x8F4E;
+        public const int GL_EXT_vertex_shader = 1;
+        public const int GL_VERTEX_SHADER_EXT = 0x8780;
+        public const int GL_VERTEX_SHADER_BINDING_EXT = 0x8781;
+        public const int GL_OP_INDEX_EXT = 0x8782;
+        public const int GL_OP_NEGATE_EXT = 0x8783;
+        public const int GL_OP_DOT3_EXT = 0x8784;
+        public const int GL_OP_DOT4_EXT = 0x8785;
+        public const int GL_OP_MUL_EXT = 0x8786;
+        public const int GL_OP_ADD_EXT = 0x8787;
+        public const int GL_OP_MADD_EXT = 0x8788;
+        public const int GL_OP_FRAC_EXT = 0x8789;
+        public const int GL_OP_MAX_EXT = 0x878A;
+        public const int GL_OP_MIN_EXT = 0x878B;
+        public const int GL_OP_SET_GE_EXT = 0x878C;
+        public const int GL_OP_SET_LT_EXT = 0x878D;
+        public const int GL_OP_CLAMP_EXT = 0x878E;
+        public const int GL_OP_FLOOR_EXT = 0x878F;
+        public const int GL_OP_ROUND_EXT = 0x8790;
+        public const int GL_OP_EXP_BASE_2_EXT = 0x8791;
+        public const int GL_OP_LOG_BASE_2_EXT = 0x8792;
+        public const int GL_OP_POWER_EXT = 0x8793;
+        public const int GL_OP_RECIP_EXT = 0x8794;
+        public const int GL_OP_RECIP_SQRT_EXT = 0x8795;
+        public const int GL_OP_SUB_EXT = 0x8796;
+        public const int GL_OP_CROSS_PRODUCT_EXT = 0x8797;
+        public const int GL_OP_MULTIPLY_MATRIX_EXT = 0x8798;
+        public const int GL_OP_MOV_EXT = 0x8799;
+        public const int GL_OUTPUT_VERTEX_EXT = 0x879A;
+        public const int GL_OUTPUT_COLOR0_EXT = 0x879B;
+        public const int GL_OUTPUT_COLOR1_EXT = 0x879C;
+        public const int GL_OUTPUT_TEXTURE_COORD0_EXT = 0x879D;
+        public const int GL_OUTPUT_TEXTURE_COORD1_EXT = 0x879E;
+        public const int GL_OUTPUT_TEXTURE_COORD2_EXT = 0x879F;
+        public const int GL_OUTPUT_TEXTURE_COORD3_EXT = 0x87A0;
+        public const int GL_OUTPUT_TEXTURE_COORD4_EXT = 0x87A1;
+        public const int GL_OUTPUT_TEXTURE_COORD5_EXT = 0x87A2;
+        public const int GL_OUTPUT_TEXTURE_COORD6_EXT = 0x87A3;
+        public const int GL_OUTPUT_TEXTURE_COORD7_EXT = 0x87A4;
+        public const int GL_OUTPUT_TEXTURE_COORD8_EXT = 0x87A5;
+        public const int GL_OUTPUT_TEXTURE_COORD9_EXT = 0x87A6;
+        public const int GL_OUTPUT_TEXTURE_COORD10_EXT = 0x87A7;
+        public const int GL_OUTPUT_TEXTURE_COORD11_EXT = 0x87A8;
+        public const int GL_OUTPUT_TEXTURE_COORD12_EXT = 0x87A9;
+        public const int GL_OUTPUT_TEXTURE_COORD13_EXT = 0x87AA;
+        public const int GL_OUTPUT_TEXTURE_COORD14_EXT = 0x87AB;
+        public const int GL_OUTPUT_TEXTURE_COORD15_EXT = 0x87AC;
+        public const int GL_OUTPUT_TEXTURE_COORD16_EXT = 0x87AD;
+        public const int GL_OUTPUT_TEXTURE_COORD17_EXT = 0x87AE;
+        public const int GL_OUTPUT_TEXTURE_COORD18_EXT = 0x87AF;
+        public const int GL_OUTPUT_TEXTURE_COORD19_EXT = 0x87B0;
+        public const int GL_OUTPUT_TEXTURE_COORD20_EXT = 0x87B1;
+        public const int GL_OUTPUT_TEXTURE_COORD21_EXT = 0x87B2;
+        public const int GL_OUTPUT_TEXTURE_COORD22_EXT = 0x87B3;
+        public const int GL_OUTPUT_TEXTURE_COORD23_EXT = 0x87B4;
+        public const int GL_OUTPUT_TEXTURE_COORD24_EXT = 0x87B5;
+        public const int GL_OUTPUT_TEXTURE_COORD25_EXT = 0x87B6;
+        public const int GL_OUTPUT_TEXTURE_COORD26_EXT = 0x87B7;
+        public const int GL_OUTPUT_TEXTURE_COORD27_EXT = 0x87B8;
+        public const int GL_OUTPUT_TEXTURE_COORD28_EXT = 0x87B9;
+        public const int GL_OUTPUT_TEXTURE_COORD29_EXT = 0x87BA;
+        public const int GL_OUTPUT_TEXTURE_COORD30_EXT = 0x87BB;
+        public const int GL_OUTPUT_TEXTURE_COORD31_EXT = 0x87BC;
+        public const int GL_OUTPUT_FOG_EXT = 0x87BD;
+        public const int GL_SCALAR_EXT = 0x87BE;
+        public const int GL_VECTOR_EXT = 0x87BF;
+        public const int GL_MATRIX_EXT = 0x87C0;
+        public const int GL_VARIANT_EXT = 0x87C1;
+        public const int GL_INVARIANT_EXT = 0x87C2;
+        public const int GL_LOCAL_CONSTANT_EXT = 0x87C3;
+        public const int GL_LOCAL_EXT = 0x87C4;
+        public const int GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87C5;
+        public const int GL_MAX_VERTEX_SHADER_VARIANTS_EXT = 0x87C6;
+        public const int GL_MAX_VERTEX_SHADER_INVARIANTS_EXT = 0x87C7;
+        public const int GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87C8;
+        public const int GL_MAX_VERTEX_SHADER_LOCALS_EXT = 0x87C9;
+        public const int GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CA;
+        public const int GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT = 0x87CB;
+        public const int GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87CC;
+        public const int GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT = 0x87CD;
+        public const int GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT = 0x87CE;
+        public const int GL_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CF;
+        public const int GL_VERTEX_SHADER_VARIANTS_EXT = 0x87D0;
+        public const int GL_VERTEX_SHADER_INVARIANTS_EXT = 0x87D1;
+        public const int GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87D2;
+        public const int GL_VERTEX_SHADER_LOCALS_EXT = 0x87D3;
+        public const int GL_VERTEX_SHADER_OPTIMIZED_EXT = 0x87D4;
+        public const int GL_X_EXT = 0x87D5;
+        public const int GL_Y_EXT = 0x87D6;
+        public const int GL_Z_EXT = 0x87D7;
+        public const int GL_W_EXT = 0x87D8;
+        public const int GL_NEGATIVE_X_EXT = 0x87D9;
+        public const int GL_NEGATIVE_Y_EXT = 0x87DA;
+        public const int GL_NEGATIVE_Z_EXT = 0x87DB;
+        public const int GL_NEGATIVE_W_EXT = 0x87DC;
+        public const int GL_ZERO_EXT = 0x87DD;
+        public const int GL_ONE_EXT = 0x87DE;
+        public const int GL_NEGATIVE_ONE_EXT = 0x87DF;
+        public const int GL_NORMALIZED_RANGE_EXT = 0x87E0;
+        public const int GL_FULL_RANGE_EXT = 0x87E1;
+        public const int GL_CURRENT_VERTEX_EXT = 0x87E2;
+        public const int GL_MVP_MATRIX_EXT = 0x87E3;
+        public const int GL_VARIANT_VALUE_EXT = 0x87E4;
+        public const int GL_VARIANT_DATATYPE_EXT = 0x87E5;
+        public const int GL_VARIANT_ARRAY_STRIDE_EXT = 0x87E6;
+        public const int GL_VARIANT_ARRAY_TYPE_EXT = 0x87E7;
+        public const int GL_VARIANT_ARRAY_EXT = 0x87E8;
+        public const int GL_VARIANT_ARRAY_POINTER_EXT = 0x87E9;
+        public const int GL_INVARIANT_VALUE_EXT = 0x87EA;
+        public const int GL_INVARIANT_DATATYPE_EXT = 0x87EB;
+        public const int GL_LOCAL_CONSTANT_VALUE_EXT = 0x87EC;
+        public const int GL_LOCAL_CONSTANT_DATATYPE_EXT = 0x87ED;
+        public const int GL_EXT_vertex_weighting = 1;
+        public const int GL_MODELVIEW0_STACK_DEPTH_EXT = 0x0BA3;
+        public const int GL_MODELVIEW1_STACK_DEPTH_EXT = 0x8502;
+        public const int GL_MODELVIEW0_MATRIX_EXT = 0x0BA6;
+        public const int GL_MODELVIEW1_MATRIX_EXT = 0x8506;
+        public const int GL_VERTEX_WEIGHTING_EXT = 0x8509;
+        public const int GL_MODELVIEW0_EXT = 0x1700;
+        public const int GL_MODELVIEW1_EXT = 0x850A;
+        public const int GL_CURRENT_VERTEX_WEIGHT_EXT = 0x850B;
+        public const int GL_VERTEX_WEIGHT_ARRAY_EXT = 0x850C;
+        public const int GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT = 0x850D;
+        public const int GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT = 0x850E;
+        public const int GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT = 0x850F;
+        public const int GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT = 0x8510;
+        public const int GL_EXT_win32_keyed_mutex = 1;
+        public const int GL_EXT_window_rectangles = 1;
+        public const int GL_INCLUSIVE_EXT = 0x8F10;
+        public const int GL_EXCLUSIVE_EXT = 0x8F11;
+        public const int GL_WINDOW_RECTANGLE_EXT = 0x8F12;
+        public const int GL_WINDOW_RECTANGLE_MODE_EXT = 0x8F13;
+        public const int GL_MAX_WINDOW_RECTANGLES_EXT = 0x8F14;
+        public const int GL_NUM_WINDOW_RECTANGLES_EXT = 0x8F15;
+        public const int GL_EXT_x11_sync_object = 1;
+        public const int GL_SYNC_X11_FENCE_EXT = 0x90E1;
+        public const int GL_GREMEDY_frame_terminator = 1;
+        public const int GL_GREMEDY_string_marker = 1;
+        public const int GL_HP_convolution_border_modes = 1;
+        public const int GL_IGNORE_BORDER_HP = 0x8150;
+        public const int GL_CONSTANT_BORDER_HP = 0x8151;
+        public const int GL_REPLICATE_BORDER_HP = 0x8153;
+        public const int GL_CONVOLUTION_BORDER_COLOR_HP = 0x8154;
+        public const int GL_HP_image_transform = 1;
+        public const int GL_IMAGE_SCALE_X_HP = 0x8155;
+        public const int GL_IMAGE_SCALE_Y_HP = 0x8156;
+        public const int GL_IMAGE_TRANSLATE_X_HP = 0x8157;
+        public const int GL_IMAGE_TRANSLATE_Y_HP = 0x8158;
+        public const int GL_IMAGE_ROTATE_ANGLE_HP = 0x8159;
+        public const int GL_IMAGE_ROTATE_ORIGIN_X_HP = 0x815A;
+        public const int GL_IMAGE_ROTATE_ORIGIN_Y_HP = 0x815B;
+        public const int GL_IMAGE_MAG_FILTER_HP = 0x815C;
+        public const int GL_IMAGE_MIN_FILTER_HP = 0x815D;
+        public const int GL_IMAGE_CUBIC_WEIGHT_HP = 0x815E;
+        public const int GL_CUBIC_HP = 0x815F;
+        public const int GL_AVERAGE_HP = 0x8160;
+        public const int GL_IMAGE_TRANSFORM_2D_HP = 0x8161;
+        public const int GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP = 0x8162;
+        public const int GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP = 0x8163;
+        public const int GL_HP_occlusion_test = 1;
+        public const int GL_OCCLUSION_TEST_HP = 0x8165;
+        public const int GL_OCCLUSION_TEST_RESULT_HP = 0x8166;
+        public const int GL_HP_texture_lighting = 1;
+        public const int GL_TEXTURE_LIGHTING_MODE_HP = 0x8167;
+        public const int GL_TEXTURE_POST_SPECULAR_HP = 0x8168;
+        public const int GL_TEXTURE_PRE_SPECULAR_HP = 0x8169;
+        public const int GL_IBM_cull_vertex = 1;
+        public const int GL_CULL_VERTEX_IBM = 103050;
+        public const int GL_IBM_multimode_draw_arrays = 1;
+        public const int GL_IBM_rasterpos_clip = 1;
+        public const int GL_RASTER_POSITION_UNCLIPPED_IBM = 0x19262;
+        public const int GL_IBM_static_data = 1;
+        public const int GL_ALL_STATIC_DATA_IBM = 103060;
+        public const int GL_STATIC_VERTEX_ARRAY_IBM = 103061;
+        public const int GL_IBM_texture_mirrored_repeat = 1;
+        public const int GL_MIRRORED_REPEAT_IBM = 0x8370;
+        public const int GL_IBM_vertex_array_lists = 1;
+        public const int GL_VERTEX_ARRAY_LIST_IBM = 103070;
+        public const int GL_NORMAL_ARRAY_LIST_IBM = 103071;
+        public const int GL_COLOR_ARRAY_LIST_IBM = 103072;
+        public const int GL_INDEX_ARRAY_LIST_IBM = 103073;
+        public const int GL_TEXTURE_COORD_ARRAY_LIST_IBM = 103074;
+        public const int GL_EDGE_FLAG_ARRAY_LIST_IBM = 103075;
+        public const int GL_FOG_COORDINATE_ARRAY_LIST_IBM = 103076;
+        public const int GL_SECONDARY_COLOR_ARRAY_LIST_IBM = 103077;
+        public const int GL_VERTEX_ARRAY_LIST_STRIDE_IBM = 103080;
+        public const int GL_NORMAL_ARRAY_LIST_STRIDE_IBM = 103081;
+        public const int GL_COLOR_ARRAY_LIST_STRIDE_IBM = 103082;
+        public const int GL_INDEX_ARRAY_LIST_STRIDE_IBM = 103083;
+        public const int GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM = 103084;
+        public const int GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM = 103085;
+        public const int GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM = 103086;
+        public const int GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM = 103087;
+        public const int GL_INGR_blend_func_separate = 1;
+        public const int GL_INGR_color_clamp = 1;
+        public const int GL_RED_MIN_CLAMP_INGR = 0x8560;
+        public const int GL_GREEN_MIN_CLAMP_INGR = 0x8561;
+        public const int GL_BLUE_MIN_CLAMP_INGR = 0x8562;
+        public const int GL_ALPHA_MIN_CLAMP_INGR = 0x8563;
+        public const int GL_RED_MAX_CLAMP_INGR = 0x8564;
+        public const int GL_GREEN_MAX_CLAMP_INGR = 0x8565;
+        public const int GL_BLUE_MAX_CLAMP_INGR = 0x8566;
+        public const int GL_ALPHA_MAX_CLAMP_INGR = 0x8567;
+        public const int GL_INGR_interlace_read = 1;
+        public const int GL_INTERLACE_READ_INGR = 0x8568;
+        public const int GL_INTEL_blackhole_render = 1;
+        public const int GL_BLACKHOLE_RENDER_INTEL = 0x83FC;
+        public const int GL_INTEL_conservative_rasterization = 1;
+        public const int GL_CONSERVATIVE_RASTERIZATION_INTEL = 0x83FE;
+        public const int GL_INTEL_fragment_shader_ordering = 1;
+        public const int GL_INTEL_framebuffer_CMAA = 1;
+        public const int GL_INTEL_map_texture = 1;
+        public const int GL_TEXTURE_MEMORY_LAYOUT_INTEL = 0x83FF;
+        public const int GL_LAYOUT_DEFAULT_INTEL = 0;
+        public const int GL_LAYOUT_LINEAR_INTEL = 1;
+        public const int GL_LAYOUT_LINEAR_CPU_CACHED_INTEL = 2;
+        public const int GL_INTEL_parallel_arrays = 1;
+        public const int GL_PARALLEL_ARRAYS_INTEL = 0x83F4;
+        public const int GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F5;
+        public const int GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F6;
+        public const int GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F7;
+        public const int GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F8;
+        public const int GL_INTEL_performance_query = 1;
+        public const int GL_PERFQUERY_SINGLE_CONTEXT_INTEL = 0x00000000;
+        public const int GL_PERFQUERY_GLOBAL_CONTEXT_INTEL = 0x00000001;
+        public const int GL_PERFQUERY_WAIT_INTEL = 0x83FB;
+        public const int GL_PERFQUERY_FLUSH_INTEL = 0x83FA;
+        public const int GL_PERFQUERY_DONOT_FLUSH_INTEL = 0x83F9;
+        public const int GL_PERFQUERY_COUNTER_EVENT_INTEL = 0x94F0;
+        public const int GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL = 0x94F1;
+        public const int GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL = 0x94F2;
+        public const int GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL = 0x94F3;
+        public const int GL_PERFQUERY_COUNTER_RAW_INTEL = 0x94F4;
+        public const int GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL = 0x94F5;
+        public const int GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL = 0x94F8;
+        public const int GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL = 0x94F9;
+        public const int GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL = 0x94FA;
+        public const int GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL = 0x94FB;
+        public const int GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL = 0x94FC;
+        public const int GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL = 0x94FD;
+        public const int GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL = 0x94FE;
+        public const int GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL = 0x94FF;
+        public const int GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL = 0x9500;
+        public const int GL_MESAX_texture_stack = 1;
+        public const int GL_TEXTURE_1D_STACK_MESAX = 0x8759;
+        public const int GL_TEXTURE_2D_STACK_MESAX = 0x875A;
+        public const int GL_PROXY_TEXTURE_1D_STACK_MESAX = 0x875B;
+        public const int GL_PROXY_TEXTURE_2D_STACK_MESAX = 0x875C;
+        public const int GL_TEXTURE_1D_STACK_BINDING_MESAX = 0x875D;
+        public const int GL_TEXTURE_2D_STACK_BINDING_MESAX = 0x875E;
+        public const int GL_MESA_pack_invert = 1;
+        public const int GL_PACK_INVERT_MESA = 0x8758;
+        public const int GL_MESA_program_binary_formats = 1;
+        public const int GL_PROGRAM_BINARY_FORMAT_MESA = 0x875F;
+        public const int GL_MESA_resize_buffers = 1;
+        public const int GL_MESA_shader_integer_functions = 1;
+        public const int GL_MESA_tile_raster_order = 1;
+        public const int GL_TILE_RASTER_ORDER_FIXED_MESA = 0x8BB8;
+        public const int GL_TILE_RASTER_ORDER_INCREASING_X_MESA = 0x8BB9;
+        public const int GL_TILE_RASTER_ORDER_INCREASING_Y_MESA = 0x8BBA;
+        public const int GL_MESA_window_pos = 1;
+        public const int GL_MESA_ycbcr_texture = 1;
+        public const int GL_UNSIGNED_SHORT_8_8_MESA = 0x85BA;
+        public const int GL_UNSIGNED_SHORT_8_8_REV_MESA = 0x85BB;
+        public const int GL_YCBCR_MESA = 0x8757;
+        public const int GL_NVX_blend_equation_advanced_multi_draw_buffers = 1;
+        public const int GL_NVX_conditional_render = 1;
+        public const int GL_NVX_gpu_memory_info = 1;
+        public const int GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX = 0x9047;
+        public const int GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX = 0x9048;
+        public const int GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX = 0x9049;
+        public const int GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX = 0x904A;
+        public const int GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX = 0x904B;
+        public const int GL_NVX_linked_gpu_multicast = 1;
+        public const int GL_LGPU_SEPARATE_STORAGE_BIT_NVX = 0x0800;
+        public const int GL_MAX_LGPU_GPUS_NVX = 0x92BA;
+        public const int GL_NV_alpha_to_coverage_dither_control = 1;
+        public const int GL_ALPHA_TO_COVERAGE_DITHER_DEFAULT_NV = 0x934D;
+        public const int GL_ALPHA_TO_COVERAGE_DITHER_ENABLE_NV = 0x934E;
+        public const int GL_ALPHA_TO_COVERAGE_DITHER_DISABLE_NV = 0x934F;
+        public const int GL_ALPHA_TO_COVERAGE_DITHER_MODE_NV = 0x92BF;
+        public const int GL_NV_bindless_multi_draw_indirect = 1;
+        public const int GL_NV_bindless_multi_draw_indirect_count = 1;
+        public const int GL_NV_bindless_texture = 1;
+        public const int GL_NV_blend_equation_advanced = 1;
+        public const int GL_BLEND_OVERLAP_NV = 0x9281;
+        public const int GL_BLEND_PREMULTIPLIED_SRC_NV = 0x9280;
+        public const int GL_BLUE_NV = 0x1905;
+        public const int GL_COLORBURN_NV = 0x929A;
+        public const int GL_COLORDODGE_NV = 0x9299;
+        public const int GL_CONJOINT_NV = 0x9284;
+        public const int GL_CONTRAST_NV = 0x92A1;
+        public const int GL_DARKEN_NV = 0x9297;
+        public const int GL_DIFFERENCE_NV = 0x929E;
+        public const int GL_DISJOINT_NV = 0x9283;
+        public const int GL_DST_ATOP_NV = 0x928F;
+        public const int GL_DST_IN_NV = 0x928B;
+        public const int GL_DST_NV = 0x9287;
+        public const int GL_DST_OUT_NV = 0x928D;
+        public const int GL_DST_OVER_NV = 0x9289;
+        public const int GL_EXCLUSION_NV = 0x92A0;
+        public const int GL_GREEN_NV = 0x1904;
+        public const int GL_HARDLIGHT_NV = 0x929B;
+        public const int GL_HARDMIX_NV = 0x92A9;
+        public const int GL_HSL_COLOR_NV = 0x92AF;
+        public const int GL_HSL_HUE_NV = 0x92AD;
+        public const int GL_HSL_LUMINOSITY_NV = 0x92B0;
+        public const int GL_HSL_SATURATION_NV = 0x92AE;
+        public const int GL_INVERT_OVG_NV = 0x92B4;
+        public const int GL_INVERT_RGB_NV = 0x92A3;
+        public const int GL_LIGHTEN_NV = 0x9298;
+        public const int GL_LINEARBURN_NV = 0x92A5;
+        public const int GL_LINEARDODGE_NV = 0x92A4;
+        public const int GL_LINEARLIGHT_NV = 0x92A7;
+        public const int GL_MINUS_CLAMPED_NV = 0x92B3;
+        public const int GL_MINUS_NV = 0x929F;
+        public const int GL_MULTIPLY_NV = 0x9294;
+        public const int GL_OVERLAY_NV = 0x9296;
+        public const int GL_PINLIGHT_NV = 0x92A8;
+        public const int GL_PLUS_CLAMPED_ALPHA_NV = 0x92B2;
+        public const int GL_PLUS_CLAMPED_NV = 0x92B1;
+        public const int GL_PLUS_DARKER_NV = 0x9292;
+        public const int GL_PLUS_NV = 0x9291;
+        public const int GL_RED_NV = 0x1903;
+        public const int GL_SCREEN_NV = 0x9295;
+        public const int GL_SOFTLIGHT_NV = 0x929C;
+        public const int GL_SRC_ATOP_NV = 0x928E;
+        public const int GL_SRC_IN_NV = 0x928A;
+        public const int GL_SRC_NV = 0x9286;
+        public const int GL_SRC_OUT_NV = 0x928C;
+        public const int GL_SRC_OVER_NV = 0x9288;
+        public const int GL_UNCORRELATED_NV = 0x9282;
+        public const int GL_VIVIDLIGHT_NV = 0x92A6;
+        public const int GL_XOR_NV = 0x1506;
+        public const int GL_NV_blend_equation_advanced_coherent = 1;
+        public const int GL_BLEND_ADVANCED_COHERENT_NV = 0x9285;
+        public const int GL_NV_blend_minmax_factor = 1;
+        public const int GL_NV_blend_square = 1;
+        public const int GL_NV_clip_space_w_scaling = 1;
+        public const int GL_VIEWPORT_POSITION_W_SCALE_NV = 0x937C;
+        public const int GL_VIEWPORT_POSITION_W_SCALE_X_COEFF_NV = 0x937D;
+        public const int GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV = 0x937E;
+        public const int GL_NV_command_list = 1;
+        public const int GL_TERMINATE_SEQUENCE_COMMAND_NV = 0x0000;
+        public const int GL_NOP_COMMAND_NV = 0x0001;
+        public const int GL_DRAW_ELEMENTS_COMMAND_NV = 0x0002;
+        public const int GL_DRAW_ARRAYS_COMMAND_NV = 0x0003;
+        public const int GL_DRAW_ELEMENTS_STRIP_COMMAND_NV = 0x0004;
+        public const int GL_DRAW_ARRAYS_STRIP_COMMAND_NV = 0x0005;
+        public const int GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV = 0x0006;
+        public const int GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV = 0x0007;
+        public const int GL_ELEMENT_ADDRESS_COMMAND_NV = 0x0008;
+        public const int GL_ATTRIBUTE_ADDRESS_COMMAND_NV = 0x0009;
+        public const int GL_UNIFORM_ADDRESS_COMMAND_NV = 0x000A;
+        public const int GL_BLEND_COLOR_COMMAND_NV = 0x000B;
+        public const int GL_STENCIL_REF_COMMAND_NV = 0x000C;
+        public const int GL_LINE_WIDTH_COMMAND_NV = 0x000D;
+        public const int GL_POLYGON_OFFSET_COMMAND_NV = 0x000E;
+        public const int GL_ALPHA_REF_COMMAND_NV = 0x000F;
+        public const int GL_VIEWPORT_COMMAND_NV = 0x0010;
+        public const int GL_SCISSOR_COMMAND_NV = 0x0011;
+        public const int GL_FRONT_FACE_COMMAND_NV = 0x0012;
+        public const int GL_NV_compute_program5 = 1;
+        public const int GL_COMPUTE_PROGRAM_NV = 0x90FB;
+        public const int GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV = 0x90FC;
+        public const int GL_NV_conditional_render = 1;
+        public const int GL_QUERY_WAIT_NV = 0x8E13;
+        public const int GL_QUERY_NO_WAIT_NV = 0x8E14;
+        public const int GL_QUERY_BY_REGION_WAIT_NV = 0x8E15;
+        public const int GL_QUERY_BY_REGION_NO_WAIT_NV = 0x8E16;
+        public const int GL_NV_conservative_raster = 1;
+        public const int GL_CONSERVATIVE_RASTERIZATION_NV = 0x9346;
+        public const int GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV = 0x9347;
+        public const int GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV = 0x9348;
+        public const int GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV = 0x9349;
+        public const int GL_NV_conservative_raster_dilate = 1;
+        public const int GL_CONSERVATIVE_RASTER_DILATE_NV = 0x9379;
+        public const int GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV = 0x937A;
+        public const int GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV = 0x937B;
+        public const int GL_NV_conservative_raster_pre_snap = 1;
+        public const int GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV = 0x9550;
+        public const int GL_NV_conservative_raster_pre_snap_triangles = 1;
+        public const int GL_CONSERVATIVE_RASTER_MODE_NV = 0x954D;
+        public const int GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV = 0x954E;
+        public const int GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV = 0x954F;
+        public const int GL_NV_conservative_raster_underestimation = 1;
+        public const int GL_NV_copy_depth_to_color = 1;
+        public const int GL_DEPTH_STENCIL_TO_RGBA_NV = 0x886E;
+        public const int GL_DEPTH_STENCIL_TO_BGRA_NV = 0x886F;
+        public const int GL_NV_copy_image = 1;
+        public const int GL_NV_deep_texture3D = 1;
+        public const int GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV = 0x90D0;
+        public const int GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV = 0x90D1;
+        public const int GL_NV_depth_buffer_float = 1;
+        public const int GL_DEPTH_COMPONENT32F_NV = 0x8DAB;
+        public const int GL_DEPTH32F_STENCIL8_NV = 0x8DAC;
+        public const int GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV = 0x8DAD;
+        public const int GL_DEPTH_BUFFER_FLOAT_MODE_NV = 0x8DAF;
+        public const int GL_NV_depth_clamp = 1;
+        public const int GL_DEPTH_CLAMP_NV = 0x864F;
+        public const int GL_NV_draw_texture = 1;
+        public const int GL_NV_draw_vulkan_image = 1;
+        public const int GL_NV_evaluators = 1;
+        public const int GL_EVAL_2D_NV = 0x86C0;
+        public const int GL_EVAL_TRIANGULAR_2D_NV = 0x86C1;
+        public const int GL_MAP_TESSELLATION_NV = 0x86C2;
+        public const int GL_MAP_ATTRIB_U_ORDER_NV = 0x86C3;
+        public const int GL_MAP_ATTRIB_V_ORDER_NV = 0x86C4;
+        public const int GL_EVAL_FRACTIONAL_TESSELLATION_NV = 0x86C5;
+        public const int GL_EVAL_VERTEX_ATTRIB0_NV = 0x86C6;
+        public const int GL_EVAL_VERTEX_ATTRIB1_NV = 0x86C7;
+        public const int GL_EVAL_VERTEX_ATTRIB2_NV = 0x86C8;
+        public const int GL_EVAL_VERTEX_ATTRIB3_NV = 0x86C9;
+        public const int GL_EVAL_VERTEX_ATTRIB4_NV = 0x86CA;
+        public const int GL_EVAL_VERTEX_ATTRIB5_NV = 0x86CB;
+        public const int GL_EVAL_VERTEX_ATTRIB6_NV = 0x86CC;
+        public const int GL_EVAL_VERTEX_ATTRIB7_NV = 0x86CD;
+        public const int GL_EVAL_VERTEX_ATTRIB8_NV = 0x86CE;
+        public const int GL_EVAL_VERTEX_ATTRIB9_NV = 0x86CF;
+        public const int GL_EVAL_VERTEX_ATTRIB10_NV = 0x86D0;
+        public const int GL_EVAL_VERTEX_ATTRIB11_NV = 0x86D1;
+        public const int GL_EVAL_VERTEX_ATTRIB12_NV = 0x86D2;
+        public const int GL_EVAL_VERTEX_ATTRIB13_NV = 0x86D3;
+        public const int GL_EVAL_VERTEX_ATTRIB14_NV = 0x86D4;
+        public const int GL_EVAL_VERTEX_ATTRIB15_NV = 0x86D5;
+        public const int GL_MAX_MAP_TESSELLATION_NV = 0x86D6;
+        public const int GL_MAX_RATIONAL_EVAL_ORDER_NV = 0x86D7;
+        public const int GL_NV_explicit_multisample = 1;
+        public const int GL_SAMPLE_POSITION_NV = 0x8E50;
+        public const int GL_SAMPLE_MASK_NV = 0x8E51;
+        public const int GL_SAMPLE_MASK_VALUE_NV = 0x8E52;
+        public const int GL_TEXTURE_BINDING_RENDERBUFFER_NV = 0x8E53;
+        public const int GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV = 0x8E54;
+        public const int GL_TEXTURE_RENDERBUFFER_NV = 0x8E55;
+        public const int GL_SAMPLER_RENDERBUFFER_NV = 0x8E56;
+        public const int GL_INT_SAMPLER_RENDERBUFFER_NV = 0x8E57;
+        public const int GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV = 0x8E58;
+        public const int GL_MAX_SAMPLE_MASK_WORDS_NV = 0x8E59;
+        public const int GL_NV_fence = 1;
+        public const int GL_ALL_COMPLETED_NV = 0x84F2;
+        public const int GL_FENCE_STATUS_NV = 0x84F3;
+        public const int GL_FENCE_CONDITION_NV = 0x84F4;
+        public const int GL_NV_fill_rectangle = 1;
+        public const int GL_FILL_RECTANGLE_NV = 0x933C;
+        public const int GL_NV_float_buffer = 1;
+        public const int GL_FLOAT_R_NV = 0x8880;
+        public const int GL_FLOAT_RG_NV = 0x8881;
+        public const int GL_FLOAT_RGB_NV = 0x8882;
+        public const int GL_FLOAT_RGBA_NV = 0x8883;
+        public const int GL_FLOAT_R16_NV = 0x8884;
+        public const int GL_FLOAT_R32_NV = 0x8885;
+        public const int GL_FLOAT_RG16_NV = 0x8886;
+        public const int GL_FLOAT_RG32_NV = 0x8887;
+        public const int GL_FLOAT_RGB16_NV = 0x8888;
+        public const int GL_FLOAT_RGB32_NV = 0x8889;
+        public const int GL_FLOAT_RGBA16_NV = 0x888A;
+        public const int GL_FLOAT_RGBA32_NV = 0x888B;
+        public const int GL_TEXTURE_FLOAT_COMPONENTS_NV = 0x888C;
+        public const int GL_FLOAT_CLEAR_COLOR_VALUE_NV = 0x888D;
+        public const int GL_FLOAT_RGBA_MODE_NV = 0x888E;
+        public const int GL_NV_fog_distance = 1;
+        public const int GL_FOG_DISTANCE_MODE_NV = 0x855A;
+        public const int GL_EYE_RADIAL_NV = 0x855B;
+        public const int GL_EYE_PLANE_ABSOLUTE_NV = 0x855C;
+        public const int GL_NV_fragment_coverage_to_color = 1;
+        public const int GL_FRAGMENT_COVERAGE_TO_COLOR_NV = 0x92DD;
+        public const int GL_FRAGMENT_COVERAGE_COLOR_NV = 0x92DE;
+        public const int GL_NV_fragment_program = 1;
+        public const int GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = 0x8868;
+        public const int GL_FRAGMENT_PROGRAM_NV = 0x8870;
+        public const int GL_MAX_TEXTURE_COORDS_NV = 0x8871;
+        public const int GL_MAX_TEXTURE_IMAGE_UNITS_NV = 0x8872;
+        public const int GL_FRAGMENT_PROGRAM_BINDING_NV = 0x8873;
+        public const int GL_PROGRAM_ERROR_STRING_NV = 0x8874;
+        public const int GL_NV_fragment_program2 = 1;
+        public const int GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = 0x88F4;
+        public const int GL_MAX_PROGRAM_CALL_DEPTH_NV = 0x88F5;
+        public const int GL_MAX_PROGRAM_IF_DEPTH_NV = 0x88F6;
+        public const int GL_MAX_PROGRAM_LOOP_DEPTH_NV = 0x88F7;
+        public const int GL_MAX_PROGRAM_LOOP_COUNT_NV = 0x88F8;
+        public const int GL_NV_fragment_program4 = 1;
+        public const int GL_NV_fragment_program_option = 1;
+        public const int GL_NV_fragment_shader_interlock = 1;
+        public const int GL_NV_framebuffer_mixed_samples = 1;
+        public const int GL_COVERAGE_MODULATION_TABLE_NV = 0x9331;
+        public const int GL_COLOR_SAMPLES_NV = 0x8E20;
+        public const int GL_DEPTH_SAMPLES_NV = 0x932D;
+        public const int GL_STENCIL_SAMPLES_NV = 0x932E;
+        public const int GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV = 0x932F;
+        public const int GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV = 0x9330;
+        public const int GL_COVERAGE_MODULATION_NV = 0x9332;
+        public const int GL_COVERAGE_MODULATION_TABLE_SIZE_NV = 0x9333;
+        public const int GL_NV_framebuffer_multisample_coverage = 1;
+        public const int GL_RENDERBUFFER_COVERAGE_SAMPLES_NV = 0x8CAB;
+        public const int GL_RENDERBUFFER_COLOR_SAMPLES_NV = 0x8E10;
+        public const int GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV = 0x8E11;
+        public const int GL_MULTISAMPLE_COVERAGE_MODES_NV = 0x8E12;
+        public const int GL_NV_geometry_program4 = 1;
+        public const int GL_GEOMETRY_PROGRAM_NV = 0x8C26;
+        public const int GL_MAX_PROGRAM_OUTPUT_VERTICES_NV = 0x8C27;
+        public const int GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV = 0x8C28;
+        public const int GL_NV_geometry_shader4 = 1;
+        public const int GL_NV_geometry_shader_passthrough = 1;
+        public const int GL_NV_gpu_multicast = 1;
+        public const int GL_PER_GPU_STORAGE_BIT_NV = 0x0800;
+        public const int GL_MULTICAST_GPUS_NV = 0x92BA;
+        public const int GL_RENDER_GPU_MASK_NV = 0x9558;
+        public const int GL_PER_GPU_STORAGE_NV = 0x9548;
+        public const int GL_MULTICAST_PROGRAMMABLE_SAMPLE_LOCATION_NV = 0x9549;
+        public const int GL_NV_gpu_program4 = 1;
+        public const int GL_MIN_PROGRAM_TEXEL_OFFSET_NV = 0x8904;
+        public const int GL_MAX_PROGRAM_TEXEL_OFFSET_NV = 0x8905;
+        public const int GL_PROGRAM_ATTRIB_COMPONENTS_NV = 0x8906;
+        public const int GL_PROGRAM_RESULT_COMPONENTS_NV = 0x8907;
+        public const int GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV = 0x8908;
+        public const int GL_MAX_PROGRAM_RESULT_COMPONENTS_NV = 0x8909;
+        public const int GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV = 0x8DA5;
+        public const int GL_MAX_PROGRAM_GENERIC_RESULTS_NV = 0x8DA6;
+        public const int GL_NV_gpu_program5 = 1;
+        public const int GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV = 0x8E5A;
+        public const int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV = 0x8E5B;
+        public const int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV = 0x8E5C;
+        public const int GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV = 0x8E5D;
+        public const int GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV = 0x8E5E;
+        public const int GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV = 0x8E5F;
+        public const int GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV = 0x8F44;
+        public const int GL_MAX_PROGRAM_SUBROUTINE_NUM_NV = 0x8F45;
+        public const int GL_NV_gpu_program5_mem_extended = 1;
+        public const int GL_NV_gpu_shader5 = 1;
+        public const int GL_NV_half_float = 1;
+        public const int GL_HALF_FLOAT_NV = 0x140B;
+        public const int GL_NV_internalformat_sample_query = 1;
+        public const int GL_MULTISAMPLES_NV = 0x9371;
+        public const int GL_SUPERSAMPLE_SCALE_X_NV = 0x9372;
+        public const int GL_SUPERSAMPLE_SCALE_Y_NV = 0x9373;
+        public const int GL_CONFORMANT_NV = 0x9374;
+        public const int GL_NV_light_max_exponent = 1;
+        public const int GL_MAX_SHININESS_NV = 0x8504;
+        public const int GL_MAX_SPOT_EXPONENT_NV = 0x8505;
+        public const int GL_NV_multisample_coverage = 1;
+        public const int GL_NV_multisample_filter_hint = 1;
+        public const int GL_MULTISAMPLE_FILTER_HINT_NV = 0x8534;
+        public const int GL_NV_occlusion_query = 1;
+        public const int GL_PIXEL_COUNTER_BITS_NV = 0x8864;
+        public const int GL_CURRENT_OCCLUSION_QUERY_ID_NV = 0x8865;
+        public const int GL_PIXEL_COUNT_NV = 0x8866;
+        public const int GL_PIXEL_COUNT_AVAILABLE_NV = 0x8867;
+        public const int GL_NV_packed_depth_stencil = 1;
+        public const int GL_DEPTH_STENCIL_NV = 0x84F9;
+        public const int GL_UNSIGNED_INT_24_8_NV = 0x84FA;
+        public const int GL_NV_parameter_buffer_object = 1;
+        public const int GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV = 0x8DA0;
+        public const int GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV = 0x8DA1;
+        public const int GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA2;
+        public const int GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA3;
+        public const int GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA4;
+        public const int GL_NV_parameter_buffer_object2 = 1;
+        public const int GL_NV_path_rendering = 1;
+        public const int GL_PATH_FORMAT_SVG_NV = 0x9070;
+        public const int GL_PATH_FORMAT_PS_NV = 0x9071;
+        public const int GL_STANDARD_FONT_NAME_NV = 0x9072;
+        public const int GL_SYSTEM_FONT_NAME_NV = 0x9073;
+        public const int GL_FILE_NAME_NV = 0x9074;
+        public const int GL_PATH_STROKE_WIDTH_NV = 0x9075;
+        public const int GL_PATH_END_CAPS_NV = 0x9076;
+        public const int GL_PATH_INITIAL_END_CAP_NV = 0x9077;
+        public const int GL_PATH_TERMINAL_END_CAP_NV = 0x9078;
+        public const int GL_PATH_JOIN_STYLE_NV = 0x9079;
+        public const int GL_PATH_MITER_LIMIT_NV = 0x907A;
+        public const int GL_PATH_DASH_CAPS_NV = 0x907B;
+        public const int GL_PATH_INITIAL_DASH_CAP_NV = 0x907C;
+        public const int GL_PATH_TERMINAL_DASH_CAP_NV = 0x907D;
+        public const int GL_PATH_DASH_OFFSET_NV = 0x907E;
+        public const int GL_PATH_CLIENT_LENGTH_NV = 0x907F;
+        public const int GL_PATH_FILL_MODE_NV = 0x9080;
+        public const int GL_PATH_FILL_MASK_NV = 0x9081;
+        public const int GL_PATH_FILL_COVER_MODE_NV = 0x9082;
+        public const int GL_PATH_STROKE_COVER_MODE_NV = 0x9083;
+        public const int GL_PATH_STROKE_MASK_NV = 0x9084;
+        public const int GL_COUNT_UP_NV = 0x9088;
+        public const int GL_COUNT_DOWN_NV = 0x9089;
+        public const int GL_PATH_OBJECT_BOUNDING_BOX_NV = 0x908A;
+        public const int GL_CONVEX_HULL_NV = 0x908B;
+        public const int GL_BOUNDING_BOX_NV = 0x908D;
+        public const int GL_TRANSLATE_X_NV = 0x908E;
+        public const int GL_TRANSLATE_Y_NV = 0x908F;
+        public const int GL_TRANSLATE_2D_NV = 0x9090;
+        public const int GL_TRANSLATE_3D_NV = 0x9091;
+        public const int GL_AFFINE_2D_NV = 0x9092;
+        public const int GL_AFFINE_3D_NV = 0x9094;
+        public const int GL_TRANSPOSE_AFFINE_2D_NV = 0x9096;
+        public const int GL_TRANSPOSE_AFFINE_3D_NV = 0x9098;
+        public const int GL_UTF8_NV = 0x909A;
+        public const int GL_UTF16_NV = 0x909B;
+        public const int GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV = 0x909C;
+        public const int GL_PATH_COMMAND_COUNT_NV = 0x909D;
+        public const int GL_PATH_COORD_COUNT_NV = 0x909E;
+        public const int GL_PATH_DASH_ARRAY_COUNT_NV = 0x909F;
+        public const int GL_PATH_COMPUTED_LENGTH_NV = 0x90A0;
+        public const int GL_PATH_FILL_BOUNDING_BOX_NV = 0x90A1;
+        public const int GL_PATH_STROKE_BOUNDING_BOX_NV = 0x90A2;
+        public const int GL_SQUARE_NV = 0x90A3;
+        public const int GL_ROUND_NV = 0x90A4;
+        public const int GL_TRIANGULAR_NV = 0x90A5;
+        public const int GL_BEVEL_NV = 0x90A6;
+        public const int GL_MITER_REVERT_NV = 0x90A7;
+        public const int GL_MITER_TRUNCATE_NV = 0x90A8;
+        public const int GL_SKIP_MISSING_GLYPH_NV = 0x90A9;
+        public const int GL_USE_MISSING_GLYPH_NV = 0x90AA;
+        public const int GL_PATH_ERROR_POSITION_NV = 0x90AB;
+        public const int GL_ACCUM_ADJACENT_PAIRS_NV = 0x90AD;
+        public const int GL_ADJACENT_PAIRS_NV = 0x90AE;
+        public const int GL_FIRST_TO_REST_NV = 0x90AF;
+        public const int GL_PATH_GEN_MODE_NV = 0x90B0;
+        public const int GL_PATH_GEN_COEFF_NV = 0x90B1;
+        public const int GL_PATH_GEN_COMPONENTS_NV = 0x90B3;
+        public const int GL_PATH_STENCIL_FUNC_NV = 0x90B7;
+        public const int GL_PATH_STENCIL_REF_NV = 0x90B8;
+        public const int GL_PATH_STENCIL_VALUE_MASK_NV = 0x90B9;
+        public const int GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV = 0x90BD;
+        public const int GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV = 0x90BE;
+        public const int GL_PATH_COVER_DEPTH_FUNC_NV = 0x90BF;
+        public const int GL_PATH_DASH_OFFSET_RESET_NV = 0x90B4;
+        public const int GL_MOVE_TO_RESETS_NV = 0x90B5;
+        public const int GL_MOVE_TO_CONTINUES_NV = 0x90B6;
+        public const int GL_CLOSE_PATH_NV = 0x00;
+        public const int GL_MOVE_TO_NV = 0x02;
+        public const int GL_RELATIVE_MOVE_TO_NV = 0x03;
+        public const int GL_LINE_TO_NV = 0x04;
+        public const int GL_RELATIVE_LINE_TO_NV = 0x05;
+        public const int GL_HORIZONTAL_LINE_TO_NV = 0x06;
+        public const int GL_RELATIVE_HORIZONTAL_LINE_TO_NV = 0x07;
+        public const int GL_VERTICAL_LINE_TO_NV = 0x08;
+        public const int GL_RELATIVE_VERTICAL_LINE_TO_NV = 0x09;
+        public const int GL_QUADRATIC_CURVE_TO_NV = 0x0A;
+        public const int GL_RELATIVE_QUADRATIC_CURVE_TO_NV = 0x0B;
+        public const int GL_CUBIC_CURVE_TO_NV = 0x0C;
+        public const int GL_RELATIVE_CUBIC_CURVE_TO_NV = 0x0D;
+        public const int GL_SMOOTH_QUADRATIC_CURVE_TO_NV = 0x0E;
+        public const int GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV = 0x0F;
+        public const int GL_SMOOTH_CUBIC_CURVE_TO_NV = 0x10;
+        public const int GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV = 0x11;
+        public const int GL_SMALL_CCW_ARC_TO_NV = 0x12;
+        public const int GL_RELATIVE_SMALL_CCW_ARC_TO_NV = 0x13;
+        public const int GL_SMALL_CW_ARC_TO_NV = 0x14;
+        public const int GL_RELATIVE_SMALL_CW_ARC_TO_NV = 0x15;
+        public const int GL_LARGE_CCW_ARC_TO_NV = 0x16;
+        public const int GL_RELATIVE_LARGE_CCW_ARC_TO_NV = 0x17;
+        public const int GL_LARGE_CW_ARC_TO_NV = 0x18;
+        public const int GL_RELATIVE_LARGE_CW_ARC_TO_NV = 0x19;
+        public const int GL_RESTART_PATH_NV = 0xF0;
+        public const int GL_DUP_FIRST_CUBIC_CURVE_TO_NV = 0xF2;
+        public const int GL_DUP_LAST_CUBIC_CURVE_TO_NV = 0xF4;
+        public const int GL_RECT_NV = 0xF6;
+        public const int GL_CIRCULAR_CCW_ARC_TO_NV = 0xF8;
+        public const int GL_CIRCULAR_CW_ARC_TO_NV = 0xFA;
+        public const int GL_CIRCULAR_TANGENT_ARC_TO_NV = 0xFC;
+        public const int GL_ARC_TO_NV = 0xFE;
+        public const int GL_RELATIVE_ARC_TO_NV = 0xFF;
+        public const int GL_BOLD_BIT_NV = 0x01;
+        public const int GL_ITALIC_BIT_NV = 0x02;
+        public const int GL_GLYPH_WIDTH_BIT_NV = 0x01;
+        public const int GL_GLYPH_HEIGHT_BIT_NV = 0x02;
+        public const int GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV = 0x04;
+        public const int GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV = 0x08;
+        public const int GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV = 0x10;
+        public const int GL_GLYPH_VERTICAL_BEARING_X_BIT_NV = 0x20;
+        public const int GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV = 0x40;
+        public const int GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV = 0x80;
+        public const int GL_GLYPH_HAS_KERNING_BIT_NV = 0x100;
+        public const int GL_FONT_X_MIN_BOUNDS_BIT_NV = 0x00010000;
+        public const int GL_FONT_Y_MIN_BOUNDS_BIT_NV = 0x00020000;
+        public const int GL_FONT_X_MAX_BOUNDS_BIT_NV = 0x00040000;
+        public const int GL_FONT_Y_MAX_BOUNDS_BIT_NV = 0x00080000;
+        public const int GL_FONT_UNITS_PER_EM_BIT_NV = 0x00100000;
+        public const int GL_FONT_ASCENDER_BIT_NV = 0x00200000;
+        public const int GL_FONT_DESCENDER_BIT_NV = 0x00400000;
+        public const int GL_FONT_HEIGHT_BIT_NV = 0x00800000;
+        public const int GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV = 0x01000000;
+        public const int GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV = 0x02000000;
+        public const int GL_FONT_UNDERLINE_POSITION_BIT_NV = 0x04000000;
+        public const int GL_FONT_UNDERLINE_THICKNESS_BIT_NV = 0x08000000;
+        public const int GL_FONT_HAS_KERNING_BIT_NV = 0x10000000;
+        public const int GL_ROUNDED_RECT_NV = 0xE8;
+        public const int GL_RELATIVE_ROUNDED_RECT_NV = 0xE9;
+        public const int GL_ROUNDED_RECT2_NV = 0xEA;
+        public const int GL_RELATIVE_ROUNDED_RECT2_NV = 0xEB;
+        public const int GL_ROUNDED_RECT4_NV = 0xEC;
+        public const int GL_RELATIVE_ROUNDED_RECT4_NV = 0xED;
+        public const int GL_ROUNDED_RECT8_NV = 0xEE;
+        public const int GL_RELATIVE_ROUNDED_RECT8_NV = 0xEF;
+        public const int GL_RELATIVE_RECT_NV = 0xF7;
+        public const int GL_FONT_GLYPHS_AVAILABLE_NV = 0x9368;
+        public const int GL_FONT_TARGET_UNAVAILABLE_NV = 0x9369;
+        public const int GL_FONT_UNAVAILABLE_NV = 0x936A;
+        public const int GL_FONT_UNINTELLIGIBLE_NV = 0x936B;
+        public const int GL_CONIC_CURVE_TO_NV = 0x1A;
+        public const int GL_RELATIVE_CONIC_CURVE_TO_NV = 0x1B;
+        public const int GL_FONT_NUM_GLYPH_INDICES_BIT_NV = 0x20000000;
+        public const int GL_STANDARD_FONT_FORMAT_NV = 0x936C;
+        public const int GL_2_BYTES_NV = 0x1407;
+        public const int GL_3_BYTES_NV = 0x1408;
+        public const int GL_4_BYTES_NV = 0x1409;
+        public const int GL_EYE_LINEAR_NV = 0x2400;
+        public const int GL_OBJECT_LINEAR_NV = 0x2401;
+        public const int GL_CONSTANT_NV = 0x8576;
+        public const int GL_PATH_FOG_GEN_MODE_NV = 0x90AC;
+        public const int GL_PRIMARY_COLOR_NV = 0x852C;
+        public const int GL_SECONDARY_COLOR_NV = 0x852D;
+        public const int GL_PATH_GEN_COLOR_FORMAT_NV = 0x90B2;
+        public const int GL_PATH_PROJECTION_NV = 0x1701;
+        public const int GL_PATH_MODELVIEW_NV = 0x1700;
+        public const int GL_PATH_MODELVIEW_STACK_DEPTH_NV = 0x0BA3;
+        public const int GL_PATH_MODELVIEW_MATRIX_NV = 0x0BA6;
+        public const int GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV = 0x0D36;
+        public const int GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV = 0x84E3;
+        public const int GL_PATH_PROJECTION_STACK_DEPTH_NV = 0x0BA4;
+        public const int GL_PATH_PROJECTION_MATRIX_NV = 0x0BA7;
+        public const int GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV = 0x0D38;
+        public const int GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV = 0x84E4;
+        public const int GL_FRAGMENT_INPUT_NV = 0x936D;
+        public const int GL_NV_path_rendering_shared_edge = 1;
+        public const int GL_SHARED_EDGE_NV = 0xC0;
+        public const int GL_NV_pixel_data_range = 1;
+        public const int GL_WRITE_PIXEL_DATA_RANGE_NV = 0x8878;
+        public const int GL_READ_PIXEL_DATA_RANGE_NV = 0x8879;
+        public const int GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV = 0x887A;
+        public const int GL_READ_PIXEL_DATA_RANGE_LENGTH_NV = 0x887B;
+        public const int GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV = 0x887C;
+        public const int GL_READ_PIXEL_DATA_RANGE_POINTER_NV = 0x887D;
+        public const int GL_NV_point_sprite = 1;
+        public const int GL_POINT_SPRITE_NV = 0x8861;
+        public const int GL_COORD_REPLACE_NV = 0x8862;
+        public const int GL_POINT_SPRITE_R_MODE_NV = 0x8863;
+        public const int GL_NV_present_video = 1;
+        public const int GL_FRAME_NV = 0x8E26;
+        public const int GL_FIELDS_NV = 0x8E27;
+        public const int GL_CURRENT_TIME_NV = 0x8E28;
+        public const int GL_NUM_FILL_STREAMS_NV = 0x8E29;
+        public const int GL_PRESENT_TIME_NV = 0x8E2A;
+        public const int GL_PRESENT_DURATION_NV = 0x8E2B;
+        public const int GL_NV_primitive_restart = 1;
+        public const int GL_PRIMITIVE_RESTART_NV = 0x8558;
+        public const int GL_PRIMITIVE_RESTART_INDEX_NV = 0x8559;
+        public const int GL_NV_query_resource = 1;
+        public const int GL_QUERY_RESOURCE_TYPE_VIDMEM_ALLOC_NV = 0x9540;
+        public const int GL_QUERY_RESOURCE_MEMTYPE_VIDMEM_NV = 0x9542;
+        public const int GL_QUERY_RESOURCE_SYS_RESERVED_NV = 0x9544;
+        public const int GL_QUERY_RESOURCE_TEXTURE_NV = 0x9545;
+        public const int GL_QUERY_RESOURCE_RENDERBUFFER_NV = 0x9546;
+        public const int GL_QUERY_RESOURCE_BUFFEROBJECT_NV = 0x9547;
+        public const int GL_NV_query_resource_tag = 1;
+        public const int GL_NV_register_combiners = 1;
+        public const int GL_REGISTER_COMBINERS_NV = 0x8522;
+        public const int GL_VARIABLE_A_NV = 0x8523;
+        public const int GL_VARIABLE_B_NV = 0x8524;
+        public const int GL_VARIABLE_C_NV = 0x8525;
+        public const int GL_VARIABLE_D_NV = 0x8526;
+        public const int GL_VARIABLE_E_NV = 0x8527;
+        public const int GL_VARIABLE_F_NV = 0x8528;
+        public const int GL_VARIABLE_G_NV = 0x8529;
+        public const int GL_CONSTANT_COLOR0_NV = 0x852A;
+        public const int GL_CONSTANT_COLOR1_NV = 0x852B;
+        public const int GL_SPARE0_NV = 0x852E;
+        public const int GL_SPARE1_NV = 0x852F;
+        public const int GL_DISCARD_NV = 0x8530;
+        public const int GL_E_TIMES_F_NV = 0x8531;
+        public const int GL_SPARE0_PLUS_SECONDARY_COLOR_NV = 0x8532;
+        public const int GL_UNSIGNED_IDENTITY_NV = 0x8536;
+        public const int GL_UNSIGNED_INVERT_NV = 0x8537;
+        public const int GL_EXPAND_NORMAL_NV = 0x8538;
+        public const int GL_EXPAND_NEGATE_NV = 0x8539;
+        public const int GL_HALF_BIAS_NORMAL_NV = 0x853A;
+        public const int GL_HALF_BIAS_NEGATE_NV = 0x853B;
+        public const int GL_SIGNED_IDENTITY_NV = 0x853C;
+        public const int GL_SIGNED_NEGATE_NV = 0x853D;
+        public const int GL_SCALE_BY_TWO_NV = 0x853E;
+        public const int GL_SCALE_BY_FOUR_NV = 0x853F;
+        public const int GL_SCALE_BY_ONE_HALF_NV = 0x8540;
+        public const int GL_BIAS_BY_NEGATIVE_ONE_HALF_NV = 0x8541;
+        public const int GL_COMBINER_INPUT_NV = 0x8542;
+        public const int GL_COMBINER_MAPPING_NV = 0x8543;
+        public const int GL_COMBINER_COMPONENT_USAGE_NV = 0x8544;
+        public const int GL_COMBINER_AB_DOT_PRODUCT_NV = 0x8545;
+        public const int GL_COMBINER_CD_DOT_PRODUCT_NV = 0x8546;
+        public const int GL_COMBINER_MUX_SUM_NV = 0x8547;
+        public const int GL_COMBINER_SCALE_NV = 0x8548;
+        public const int GL_COMBINER_BIAS_NV = 0x8549;
+        public const int GL_COMBINER_AB_OUTPUT_NV = 0x854A;
+        public const int GL_COMBINER_CD_OUTPUT_NV = 0x854B;
+        public const int GL_COMBINER_SUM_OUTPUT_NV = 0x854C;
+        public const int GL_MAX_GENERAL_COMBINERS_NV = 0x854D;
+        public const int GL_NUM_GENERAL_COMBINERS_NV = 0x854E;
+        public const int GL_COLOR_SUM_CLAMP_NV = 0x854F;
+        public const int GL_COMBINER0_NV = 0x8550;
+        public const int GL_COMBINER1_NV = 0x8551;
+        public const int GL_COMBINER2_NV = 0x8552;
+        public const int GL_COMBINER3_NV = 0x8553;
+        public const int GL_COMBINER4_NV = 0x8554;
+        public const int GL_COMBINER5_NV = 0x8555;
+        public const int GL_COMBINER6_NV = 0x8556;
+        public const int GL_COMBINER7_NV = 0x8557;
+        public const int GL_NV_register_combiners2 = 1;
+        public const int GL_PER_STAGE_CONSTANTS_NV = 0x8535;
+        public const int GL_NV_robustness_video_memory_purge = 1;
+        public const int GL_PURGED_CONTEXT_RESET_NV = 0x92BB;
+        public const int GL_NV_sample_locations = 1;
+        public const int GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV = 0x933D;
+        public const int GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV = 0x933E;
+        public const int GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV = 0x933F;
+        public const int GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV = 0x9340;
+        public const int GL_SAMPLE_LOCATION_NV = 0x8E50;
+        public const int GL_PROGRAMMABLE_SAMPLE_LOCATION_NV = 0x9341;
+        public const int GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV = 0x9342;
+        public const int GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV = 0x9343;
+        public const int GL_NV_sample_mask_override_coverage = 1;
+        public const int GL_NV_shader_atomic_counters = 1;
+        public const int GL_NV_shader_atomic_float = 1;
+        public const int GL_NV_shader_atomic_float64 = 1;
+        public const int GL_NV_shader_atomic_fp16_vector = 1;
+        public const int GL_NV_shader_atomic_int64 = 1;
+        public const int GL_NV_shader_buffer_load = 1;
+        public const int GL_BUFFER_GPU_ADDRESS_NV = 0x8F1D;
+        public const int GL_GPU_ADDRESS_NV = 0x8F34;
+        public const int GL_MAX_SHADER_BUFFER_ADDRESS_NV = 0x8F35;
+        public const int GL_NV_shader_buffer_store = 1;
+        public const int GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV = 0x00000010;
+        public const int GL_NV_shader_storage_buffer_object = 1;
+        public const int GL_NV_shader_thread_group = 1;
+        public const int GL_WARP_SIZE_NV = 0x9339;
+        public const int GL_WARPS_PER_SM_NV = 0x933A;
+        public const int GL_SM_COUNT_NV = 0x933B;
+        public const int GL_NV_shader_thread_shuffle = 1;
+        public const int GL_NV_stereo_view_rendering = 1;
+        public const int GL_NV_tessellation_program5 = 1;
+        public const int GL_MAX_PROGRAM_PATCH_ATTRIBS_NV = 0x86D8;
+        public const int GL_TESS_CONTROL_PROGRAM_NV = 0x891E;
+        public const int GL_TESS_EVALUATION_PROGRAM_NV = 0x891F;
+        public const int GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV = 0x8C74;
+        public const int GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV = 0x8C75;
+        public const int GL_NV_texgen_emboss = 1;
+        public const int GL_EMBOSS_LIGHT_NV = 0x855D;
+        public const int GL_EMBOSS_CONSTANT_NV = 0x855E;
+        public const int GL_EMBOSS_MAP_NV = 0x855F;
+        public const int GL_NV_texgen_reflection = 1;
+        public const int GL_NORMAL_MAP_NV = 0x8511;
+        public const int GL_REFLECTION_MAP_NV = 0x8512;
+        public const int GL_NV_texture_barrier = 1;
+        public const int GL_NV_texture_compression_vtc = 1;
+        public const int GL_NV_texture_env_combine4 = 1;
+        public const int GL_COMBINE4_NV = 0x8503;
+        public const int GL_SOURCE3_RGB_NV = 0x8583;
+        public const int GL_SOURCE3_ALPHA_NV = 0x858B;
+        public const int GL_OPERAND3_RGB_NV = 0x8593;
+        public const int GL_OPERAND3_ALPHA_NV = 0x859B;
+        public const int GL_NV_texture_expand_normal = 1;
+        public const int GL_TEXTURE_UNSIGNED_REMAP_MODE_NV = 0x888F;
+        public const int GL_NV_texture_multisample = 1;
+        public const int GL_TEXTURE_COVERAGE_SAMPLES_NV = 0x9045;
+        public const int GL_TEXTURE_COLOR_SAMPLES_NV = 0x9046;
+        public const int GL_NV_texture_rectangle = 1;
+        public const int GL_TEXTURE_RECTANGLE_NV = 0x84F5;
+        public const int GL_TEXTURE_BINDING_RECTANGLE_NV = 0x84F6;
+        public const int GL_PROXY_TEXTURE_RECTANGLE_NV = 0x84F7;
+        public const int GL_MAX_RECTANGLE_TEXTURE_SIZE_NV = 0x84F8;
+        public const int GL_NV_texture_rectangle_compressed = 1;
+        public const int GL_NV_texture_shader = 1;
+        public const int GL_OFFSET_TEXTURE_RECTANGLE_NV = 0x864C;
+        public const int GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV = 0x864D;
+        public const int GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV = 0x864E;
+        public const int GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = 0x86D9;
+        public const int GL_UNSIGNED_INT_S8_S8_8_8_NV = 0x86DA;
+        public const int GL_UNSIGNED_INT_8_8_S8_S8_REV_NV = 0x86DB;
+        public const int GL_DSDT_MAG_INTENSITY_NV = 0x86DC;
+        public const int GL_SHADER_CONSISTENT_NV = 0x86DD;
+        public const int GL_TEXTURE_SHADER_NV = 0x86DE;
+        public const int GL_SHADER_OPERATION_NV = 0x86DF;
+        public const int GL_CULL_MODES_NV = 0x86E0;
+        public const int GL_OFFSET_TEXTURE_MATRIX_NV = 0x86E1;
+        public const int GL_OFFSET_TEXTURE_SCALE_NV = 0x86E2;
+        public const int GL_OFFSET_TEXTURE_BIAS_NV = 0x86E3;
+        public const int GL_OFFSET_TEXTURE_2D_MATRIX_NV = 0x86E1;
+        public const int GL_OFFSET_TEXTURE_2D_SCALE_NV = 0x86E2;
+        public const int GL_OFFSET_TEXTURE_2D_BIAS_NV = 0x86E3;
+        public const int GL_PREVIOUS_TEXTURE_INPUT_NV = 0x86E4;
+        public const int GL_CONST_EYE_NV = 0x86E5;
+        public const int GL_PASS_THROUGH_NV = 0x86E6;
+        public const int GL_CULL_FRAGMENT_NV = 0x86E7;
+        public const int GL_OFFSET_TEXTURE_2D_NV = 0x86E8;
+        public const int GL_DEPENDENT_AR_TEXTURE_2D_NV = 0x86E9;
+        public const int GL_DEPENDENT_GB_TEXTURE_2D_NV = 0x86EA;
+        public const int GL_DOT_PRODUCT_NV = 0x86EC;
+        public const int GL_DOT_PRODUCT_DEPTH_REPLACE_NV = 0x86ED;
+        public const int GL_DOT_PRODUCT_TEXTURE_2D_NV = 0x86EE;
+        public const int GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV = 0x86F0;
+        public const int GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV = 0x86F1;
+        public const int GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV = 0x86F2;
+        public const int GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV = 0x86F3;
+        public const int GL_HILO_NV = 0x86F4;
+        public const int GL_DSDT_NV = 0x86F5;
+        public const int GL_DSDT_MAG_NV = 0x86F6;
+        public const int GL_DSDT_MAG_VIB_NV = 0x86F7;
+        public const int GL_HILO16_NV = 0x86F8;
+        public const int GL_SIGNED_HILO_NV = 0x86F9;
+        public const int GL_SIGNED_HILO16_NV = 0x86FA;
+        public const int GL_SIGNED_RGBA_NV = 0x86FB;
+        public const int GL_SIGNED_RGBA8_NV = 0x86FC;
+        public const int GL_SIGNED_RGB_NV = 0x86FE;
+        public const int GL_SIGNED_RGB8_NV = 0x86FF;
+        public const int GL_SIGNED_LUMINANCE_NV = 0x8701;
+        public const int GL_SIGNED_LUMINANCE8_NV = 0x8702;
+        public const int GL_SIGNED_LUMINANCE_ALPHA_NV = 0x8703;
+        public const int GL_SIGNED_LUMINANCE8_ALPHA8_NV = 0x8704;
+        public const int GL_SIGNED_ALPHA_NV = 0x8705;
+        public const int GL_SIGNED_ALPHA8_NV = 0x8706;
+        public const int GL_SIGNED_INTENSITY_NV = 0x8707;
+        public const int GL_SIGNED_INTENSITY8_NV = 0x8708;
+        public const int GL_DSDT8_NV = 0x8709;
+        public const int GL_DSDT8_MAG8_NV = 0x870A;
+        public const int GL_DSDT8_MAG8_INTENSITY8_NV = 0x870B;
+        public const int GL_SIGNED_RGB_UNSIGNED_ALPHA_NV = 0x870C;
+        public const int GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV = 0x870D;
+        public const int GL_HI_SCALE_NV = 0x870E;
+        public const int GL_LO_SCALE_NV = 0x870F;
+        public const int GL_DS_SCALE_NV = 0x8710;
+        public const int GL_DT_SCALE_NV = 0x8711;
+        public const int GL_MAGNITUDE_SCALE_NV = 0x8712;
+        public const int GL_VIBRANCE_SCALE_NV = 0x8713;
+        public const int GL_HI_BIAS_NV = 0x8714;
+        public const int GL_LO_BIAS_NV = 0x8715;
+        public const int GL_DS_BIAS_NV = 0x8716;
+        public const int GL_DT_BIAS_NV = 0x8717;
+        public const int GL_MAGNITUDE_BIAS_NV = 0x8718;
+        public const int GL_VIBRANCE_BIAS_NV = 0x8719;
+        public const int GL_TEXTURE_BORDER_VALUES_NV = 0x871A;
+        public const int GL_TEXTURE_HI_SIZE_NV = 0x871B;
+        public const int GL_TEXTURE_LO_SIZE_NV = 0x871C;
+        public const int GL_TEXTURE_DS_SIZE_NV = 0x871D;
+        public const int GL_TEXTURE_DT_SIZE_NV = 0x871E;
+        public const int GL_TEXTURE_MAG_SIZE_NV = 0x871F;
+        public const int GL_NV_texture_shader2 = 1;
+        public const int GL_DOT_PRODUCT_TEXTURE_3D_NV = 0x86EF;
+        public const int GL_NV_texture_shader3 = 1;
+        public const int GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV = 0x8850;
+        public const int GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = 0x8851;
+        public const int GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8852;
+        public const int GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV = 0x8853;
+        public const int GL_OFFSET_HILO_TEXTURE_2D_NV = 0x8854;
+        public const int GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV = 0x8855;
+        public const int GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV = 0x8856;
+        public const int GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8857;
+        public const int GL_DEPENDENT_HILO_TEXTURE_2D_NV = 0x8858;
+        public const int GL_DEPENDENT_RGB_TEXTURE_3D_NV = 0x8859;
+        public const int GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV = 0x885A;
+        public const int GL_DOT_PRODUCT_PASS_THROUGH_NV = 0x885B;
+        public const int GL_DOT_PRODUCT_TEXTURE_1D_NV = 0x885C;
+        public const int GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV = 0x885D;
+        public const int GL_HILO8_NV = 0x885E;
+        public const int GL_SIGNED_HILO8_NV = 0x885F;
+        public const int GL_FORCE_BLUE_TO_ONE_NV = 0x8860;
+        public const int GL_NV_transform_feedback = 1;
+        public const int GL_BACK_PRIMARY_COLOR_NV = 0x8C77;
+        public const int GL_BACK_SECONDARY_COLOR_NV = 0x8C78;
+        public const int GL_TEXTURE_COORD_NV = 0x8C79;
+        public const int GL_CLIP_DISTANCE_NV = 0x8C7A;
+        public const int GL_VERTEX_ID_NV = 0x8C7B;
+        public const int GL_PRIMITIVE_ID_NV = 0x8C7C;
+        public const int GL_GENERIC_ATTRIB_NV = 0x8C7D;
+        public const int GL_TRANSFORM_FEEDBACK_ATTRIBS_NV = 0x8C7E;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV = 0x8C7F;
+        public const int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV = 0x8C80;
+        public const int GL_ACTIVE_VARYINGS_NV = 0x8C81;
+        public const int GL_ACTIVE_VARYING_MAX_LENGTH_NV = 0x8C82;
+        public const int GL_TRANSFORM_FEEDBACK_VARYINGS_NV = 0x8C83;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_START_NV = 0x8C84;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV = 0x8C85;
+        public const int GL_TRANSFORM_FEEDBACK_RECORD_NV = 0x8C86;
+        public const int GL_PRIMITIVES_GENERATED_NV = 0x8C87;
+        public const int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV = 0x8C88;
+        public const int GL_RASTERIZER_DISCARD_NV = 0x8C89;
+        public const int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV = 0x8C8A;
+        public const int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV = 0x8C8B;
+        public const int GL_INTERLEAVED_ATTRIBS_NV = 0x8C8C;
+        public const int GL_SEPARATE_ATTRIBS_NV = 0x8C8D;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_NV = 0x8C8E;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV = 0x8C8F;
+        public const int GL_LAYER_NV = 0x8DAA;
+        public const int GL_NEXT_BUFFER_NV = -2;
+        public const int GL_SKIP_COMPONENTS4_NV = -3;
+        public const int GL_SKIP_COMPONENTS3_NV = -4;
+        public const int GL_SKIP_COMPONENTS2_NV = -5;
+        public const int GL_SKIP_COMPONENTS1_NV = -6;
+        public const int GL_NV_transform_feedback2 = 1;
+        public const int GL_TRANSFORM_FEEDBACK_NV = 0x8E22;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV = 0x8E23;
+        public const int GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV = 0x8E24;
+        public const int GL_TRANSFORM_FEEDBACK_BINDING_NV = 0x8E25;
+        public const int GL_NV_uniform_buffer_unified_memory = 1;
+        public const int GL_UNIFORM_BUFFER_UNIFIED_NV = 0x936E;
+        public const int GL_UNIFORM_BUFFER_ADDRESS_NV = 0x936F;
+        public const int GL_UNIFORM_BUFFER_LENGTH_NV = 0x9370;
+        public const int GL_NV_vdpau_interop = 1;
+        public const int GL_SURFACE_STATE_NV = 0x86EB;
+        public const int GL_SURFACE_REGISTERED_NV = 0x86FD;
+        public const int GL_SURFACE_MAPPED_NV = 0x8700;
+        public const int GL_WRITE_DISCARD_NV = 0x88BE;
+        public const int GL_NV_vertex_array_range = 1;
+        public const int GL_VERTEX_ARRAY_RANGE_NV = 0x851D;
+        public const int GL_VERTEX_ARRAY_RANGE_LENGTH_NV = 0x851E;
+        public const int GL_VERTEX_ARRAY_RANGE_VALID_NV = 0x851F;
+        public const int GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = 0x8520;
+        public const int GL_VERTEX_ARRAY_RANGE_POINTER_NV = 0x8521;
+        public const int GL_NV_vertex_array_range2 = 1;
+        public const int GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = 0x8533;
+        public const int GL_NV_vertex_attrib_integer_64bit = 1;
+        public const int GL_NV_vertex_buffer_unified_memory = 1;
+        public const int GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV = 0x8F1E;
+        public const int GL_ELEMENT_ARRAY_UNIFIED_NV = 0x8F1F;
+        public const int GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV = 0x8F20;
+        public const int GL_VERTEX_ARRAY_ADDRESS_NV = 0x8F21;
+        public const int GL_NORMAL_ARRAY_ADDRESS_NV = 0x8F22;
+        public const int GL_COLOR_ARRAY_ADDRESS_NV = 0x8F23;
+        public const int GL_INDEX_ARRAY_ADDRESS_NV = 0x8F24;
+        public const int GL_TEXTURE_COORD_ARRAY_ADDRESS_NV = 0x8F25;
+        public const int GL_EDGE_FLAG_ARRAY_ADDRESS_NV = 0x8F26;
+        public const int GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV = 0x8F27;
+        public const int GL_FOG_COORD_ARRAY_ADDRESS_NV = 0x8F28;
+        public const int GL_ELEMENT_ARRAY_ADDRESS_NV = 0x8F29;
+        public const int GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV = 0x8F2A;
+        public const int GL_VERTEX_ARRAY_LENGTH_NV = 0x8F2B;
+        public const int GL_NORMAL_ARRAY_LENGTH_NV = 0x8F2C;
+        public const int GL_COLOR_ARRAY_LENGTH_NV = 0x8F2D;
+        public const int GL_INDEX_ARRAY_LENGTH_NV = 0x8F2E;
+        public const int GL_TEXTURE_COORD_ARRAY_LENGTH_NV = 0x8F2F;
+        public const int GL_EDGE_FLAG_ARRAY_LENGTH_NV = 0x8F30;
+        public const int GL_SECONDARY_COLOR_ARRAY_LENGTH_NV = 0x8F31;
+        public const int GL_FOG_COORD_ARRAY_LENGTH_NV = 0x8F32;
+        public const int GL_ELEMENT_ARRAY_LENGTH_NV = 0x8F33;
+        public const int GL_DRAW_INDIRECT_UNIFIED_NV = 0x8F40;
+        public const int GL_DRAW_INDIRECT_ADDRESS_NV = 0x8F41;
+        public const int GL_DRAW_INDIRECT_LENGTH_NV = 0x8F42;
+        public const int GL_NV_vertex_program = 1;
+        public const int GL_VERTEX_PROGRAM_NV = 0x8620;
+        public const int GL_VERTEX_STATE_PROGRAM_NV = 0x8621;
+        public const int GL_ATTRIB_ARRAY_SIZE_NV = 0x8623;
+        public const int GL_ATTRIB_ARRAY_STRIDE_NV = 0x8624;
+        public const int GL_ATTRIB_ARRAY_TYPE_NV = 0x8625;
+        public const int GL_CURRENT_ATTRIB_NV = 0x8626;
+        public const int GL_PROGRAM_LENGTH_NV = 0x8627;
+        public const int GL_PROGRAM_STRING_NV = 0x8628;
+        public const int GL_MODELVIEW_PROJECTION_NV = 0x8629;
+        public const int GL_IDENTITY_NV = 0x862A;
+        public const int GL_INVERSE_NV = 0x862B;
+        public const int GL_TRANSPOSE_NV = 0x862C;
+        public const int GL_INVERSE_TRANSPOSE_NV = 0x862D;
+        public const int GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV = 0x862E;
+        public const int GL_MAX_TRACK_MATRICES_NV = 0x862F;
+        public const int GL_MATRIX0_NV = 0x8630;
+        public const int GL_MATRIX1_NV = 0x8631;
+        public const int GL_MATRIX2_NV = 0x8632;
+        public const int GL_MATRIX3_NV = 0x8633;
+        public const int GL_MATRIX4_NV = 0x8634;
+        public const int GL_MATRIX5_NV = 0x8635;
+        public const int GL_MATRIX6_NV = 0x8636;
+        public const int GL_MATRIX7_NV = 0x8637;
+        public const int GL_CURRENT_MATRIX_STACK_DEPTH_NV = 0x8640;
+        public const int GL_CURRENT_MATRIX_NV = 0x8641;
+        public const int GL_VERTEX_PROGRAM_POINT_SIZE_NV = 0x8642;
+        public const int GL_VERTEX_PROGRAM_TWO_SIDE_NV = 0x8643;
+        public const int GL_PROGRAM_PARAMETER_NV = 0x8644;
+        public const int GL_ATTRIB_ARRAY_POINTER_NV = 0x8645;
+        public const int GL_PROGRAM_TARGET_NV = 0x8646;
+        public const int GL_PROGRAM_RESIDENT_NV = 0x8647;
+        public const int GL_TRACK_MATRIX_NV = 0x8648;
+        public const int GL_TRACK_MATRIX_TRANSFORM_NV = 0x8649;
+        public const int GL_VERTEX_PROGRAM_BINDING_NV = 0x864A;
+        public const int GL_PROGRAM_ERROR_POSITION_NV = 0x864B;
+        public const int GL_VERTEX_ATTRIB_ARRAY0_NV = 0x8650;
+        public const int GL_VERTEX_ATTRIB_ARRAY1_NV = 0x8651;
+        public const int GL_VERTEX_ATTRIB_ARRAY2_NV = 0x8652;
+        public const int GL_VERTEX_ATTRIB_ARRAY3_NV = 0x8653;
+        public const int GL_VERTEX_ATTRIB_ARRAY4_NV = 0x8654;
+        public const int GL_VERTEX_ATTRIB_ARRAY5_NV = 0x8655;
+        public const int GL_VERTEX_ATTRIB_ARRAY6_NV = 0x8656;
+        public const int GL_VERTEX_ATTRIB_ARRAY7_NV = 0x8657;
+        public const int GL_VERTEX_ATTRIB_ARRAY8_NV = 0x8658;
+        public const int GL_VERTEX_ATTRIB_ARRAY9_NV = 0x8659;
+        public const int GL_VERTEX_ATTRIB_ARRAY10_NV = 0x865A;
+        public const int GL_VERTEX_ATTRIB_ARRAY11_NV = 0x865B;
+        public const int GL_VERTEX_ATTRIB_ARRAY12_NV = 0x865C;
+        public const int GL_VERTEX_ATTRIB_ARRAY13_NV = 0x865D;
+        public const int GL_VERTEX_ATTRIB_ARRAY14_NV = 0x865E;
+        public const int GL_VERTEX_ATTRIB_ARRAY15_NV = 0x865F;
+        public const int GL_MAP1_VERTEX_ATTRIB0_4_NV = 0x8660;
+        public const int GL_MAP1_VERTEX_ATTRIB1_4_NV = 0x8661;
+        public const int GL_MAP1_VERTEX_ATTRIB2_4_NV = 0x8662;
+        public const int GL_MAP1_VERTEX_ATTRIB3_4_NV = 0x8663;
+        public const int GL_MAP1_VERTEX_ATTRIB4_4_NV = 0x8664;
+        public const int GL_MAP1_VERTEX_ATTRIB5_4_NV = 0x8665;
+        public const int GL_MAP1_VERTEX_ATTRIB6_4_NV = 0x8666;
+        public const int GL_MAP1_VERTEX_ATTRIB7_4_NV = 0x8667;
+        public const int GL_MAP1_VERTEX_ATTRIB8_4_NV = 0x8668;
+        public const int GL_MAP1_VERTEX_ATTRIB9_4_NV = 0x8669;
+        public const int GL_MAP1_VERTEX_ATTRIB10_4_NV = 0x866A;
+        public const int GL_MAP1_VERTEX_ATTRIB11_4_NV = 0x866B;
+        public const int GL_MAP1_VERTEX_ATTRIB12_4_NV = 0x866C;
+        public const int GL_MAP1_VERTEX_ATTRIB13_4_NV = 0x866D;
+        public const int GL_MAP1_VERTEX_ATTRIB14_4_NV = 0x866E;
+        public const int GL_MAP1_VERTEX_ATTRIB15_4_NV = 0x866F;
+        public const int GL_MAP2_VERTEX_ATTRIB0_4_NV = 0x8670;
+        public const int GL_MAP2_VERTEX_ATTRIB1_4_NV = 0x8671;
+        public const int GL_MAP2_VERTEX_ATTRIB2_4_NV = 0x8672;
+        public const int GL_MAP2_VERTEX_ATTRIB3_4_NV = 0x8673;
+        public const int GL_MAP2_VERTEX_ATTRIB4_4_NV = 0x8674;
+        public const int GL_MAP2_VERTEX_ATTRIB5_4_NV = 0x8675;
+        public const int GL_MAP2_VERTEX_ATTRIB6_4_NV = 0x8676;
+        public const int GL_MAP2_VERTEX_ATTRIB7_4_NV = 0x8677;
+        public const int GL_MAP2_VERTEX_ATTRIB8_4_NV = 0x8678;
+        public const int GL_MAP2_VERTEX_ATTRIB9_4_NV = 0x8679;
+        public const int GL_MAP2_VERTEX_ATTRIB10_4_NV = 0x867A;
+        public const int GL_MAP2_VERTEX_ATTRIB11_4_NV = 0x867B;
+        public const int GL_MAP2_VERTEX_ATTRIB12_4_NV = 0x867C;
+        public const int GL_MAP2_VERTEX_ATTRIB13_4_NV = 0x867D;
+        public const int GL_MAP2_VERTEX_ATTRIB14_4_NV = 0x867E;
+        public const int GL_MAP2_VERTEX_ATTRIB15_4_NV = 0x867F;
+        public const int GL_NV_vertex_program1_1 = 1;
+        public const int GL_NV_vertex_program2 = 1;
+        public const int GL_NV_vertex_program2_option = 1;
+        public const int GL_NV_vertex_program3 = 1;
+        public const int GL_NV_vertex_program4 = 1;
+        public const int GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV = 0x88FD;
+        public const int GL_NV_video_capture = 1;
+        public const int GL_VIDEO_BUFFER_NV = 0x9020;
+        public const int GL_VIDEO_BUFFER_BINDING_NV = 0x9021;
+        public const int GL_FIELD_UPPER_NV = 0x9022;
+        public const int GL_FIELD_LOWER_NV = 0x9023;
+        public const int GL_NUM_VIDEO_CAPTURE_STREAMS_NV = 0x9024;
+        public const int GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV = 0x9025;
+        public const int GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV = 0x9026;
+        public const int GL_LAST_VIDEO_CAPTURE_STATUS_NV = 0x9027;
+        public const int GL_VIDEO_BUFFER_PITCH_NV = 0x9028;
+        public const int GL_VIDEO_COLOR_CONVERSION_MATRIX_NV = 0x9029;
+        public const int GL_VIDEO_COLOR_CONVERSION_MAX_NV = 0x902A;
+        public const int GL_VIDEO_COLOR_CONVERSION_MIN_NV = 0x902B;
+        public const int GL_VIDEO_COLOR_CONVERSION_OFFSET_NV = 0x902C;
+        public const int GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV = 0x902D;
+        public const int GL_PARTIAL_SUCCESS_NV = 0x902E;
+        public const int GL_SUCCESS_NV = 0x902F;
+        public const int GL_FAILURE_NV = 0x9030;
+        public const int GL_YCBYCR8_422_NV = 0x9031;
+        public const int GL_YCBAYCR8A_4224_NV = 0x9032;
+        public const int GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV = 0x9033;
+        public const int GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV = 0x9034;
+        public const int GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV = 0x9035;
+        public const int GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV = 0x9036;
+        public const int GL_Z4Y12Z4CB12Z4CR12_444_NV = 0x9037;
+        public const int GL_VIDEO_CAPTURE_FRAME_WIDTH_NV = 0x9038;
+        public const int GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV = 0x9039;
+        public const int GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV = 0x903A;
+        public const int GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV = 0x903B;
+        public const int GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV = 0x903C;
+        public const int GL_NV_viewport_array2 = 1;
+        public const int GL_NV_viewport_swizzle = 1;
+        public const int GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV = 0x9350;
+        public const int GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV = 0x9351;
+        public const int GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV = 0x9352;
+        public const int GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV = 0x9353;
+        public const int GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV = 0x9354;
+        public const int GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV = 0x9355;
+        public const int GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV = 0x9356;
+        public const int GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV = 0x9357;
+        public const int GL_VIEWPORT_SWIZZLE_X_NV = 0x9358;
+        public const int GL_VIEWPORT_SWIZZLE_Y_NV = 0x9359;
+        public const int GL_VIEWPORT_SWIZZLE_Z_NV = 0x935A;
+        public const int GL_VIEWPORT_SWIZZLE_W_NV = 0x935B;
+        public const int GL_OML_interlace = 1;
+        public const int GL_INTERLACE_OML = 0x8980;
+        public const int GL_INTERLACE_READ_OML = 0x8981;
+        public const int GL_OML_resample = 1;
+        public const int GL_PACK_RESAMPLE_OML = 0x8984;
+        public const int GL_UNPACK_RESAMPLE_OML = 0x8985;
+        public const int GL_RESAMPLE_REPLICATE_OML = 0x8986;
+        public const int GL_RESAMPLE_ZERO_FILL_OML = 0x8987;
+        public const int GL_RESAMPLE_AVERAGE_OML = 0x8988;
+        public const int GL_RESAMPLE_DECIMATE_OML = 0x8989;
+        public const int GL_OML_subsample = 1;
+        public const int GL_FORMAT_SUBSAMPLE_24_24_OML = 0x8982;
+        public const int GL_FORMAT_SUBSAMPLE_244_244_OML = 0x8983;
+        public const int GL_OVR_multiview = 1;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR = 0x9630;
+        public const int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR = 0x9632;
+        public const int GL_MAX_VIEWS_OVR = 0x9631;
+        public const int GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR = 0x9633;
+        public const int GL_OVR_multiview2 = 1;
+        public const int GL_PGI_misc_hints = 1;
+        public const int GL_PREFER_DOUBLEBUFFER_HINT_PGI = 0x1A1F8;
+        public const int GL_CONSERVE_MEMORY_HINT_PGI = 0x1A1FD;
+        public const int GL_RECLAIM_MEMORY_HINT_PGI = 0x1A1FE;
+        public const int GL_NATIVE_GRAPHICS_HANDLE_PGI = 0x1A202;
+        public const int GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI = 0x1A203;
+        public const int GL_NATIVE_GRAPHICS_END_HINT_PGI = 0x1A204;
+        public const int GL_ALWAYS_FAST_HINT_PGI = 0x1A20C;
+        public const int GL_ALWAYS_SOFT_HINT_PGI = 0x1A20D;
+        public const int GL_ALLOW_DRAW_OBJ_HINT_PGI = 0x1A20E;
+        public const int GL_ALLOW_DRAW_WIN_HINT_PGI = 0x1A20F;
+        public const int GL_ALLOW_DRAW_FRG_HINT_PGI = 0x1A210;
+        public const int GL_ALLOW_DRAW_MEM_HINT_PGI = 0x1A211;
+        public const int GL_STRICT_DEPTHFUNC_HINT_PGI = 0x1A216;
+        public const int GL_STRICT_LIGHTING_HINT_PGI = 0x1A217;
+        public const int GL_STRICT_SCISSOR_HINT_PGI = 0x1A218;
+        public const int GL_FULL_STIPPLE_HINT_PGI = 0x1A219;
+        public const int GL_CLIP_NEAR_HINT_PGI = 0x1A220;
+        public const int GL_CLIP_FAR_HINT_PGI = 0x1A221;
+        public const int GL_WIDE_LINE_HINT_PGI = 0x1A222;
+        public const int GL_BACK_NORMALS_HINT_PGI = 0x1A223;
+        public const int GL_PGI_vertex_hints = 1;
+        public const int GL_VERTEX_DATA_HINT_PGI = 0x1A22A;
+        public const int GL_VERTEX_CONSISTENT_HINT_PGI = 0x1A22B;
+        public const int GL_MATERIAL_SIDE_HINT_PGI = 0x1A22C;
+        public const int GL_MAX_VERTEX_HINT_PGI = 0x1A22D;
+        public const int GL_COLOR3_BIT_PGI = 0x00010000;
+        public const int GL_COLOR4_BIT_PGI = 0x00020000;
+        public const int GL_EDGEFLAG_BIT_PGI = 0x00040000;
+        public const int GL_INDEX_BIT_PGI = 0x00080000;
+        public const int GL_MAT_AMBIENT_BIT_PGI = 0x00100000;
+        public const int GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI = 0x00200000;
+        public const int GL_MAT_DIFFUSE_BIT_PGI = 0x00400000;
+        public const int GL_MAT_EMISSION_BIT_PGI = 0x00800000;
+        public const int GL_MAT_COLOR_INDEXES_BIT_PGI = 0x01000000;
+        public const int GL_MAT_SHININESS_BIT_PGI = 0x02000000;
+        public const int GL_MAT_SPECULAR_BIT_PGI = 0x04000000;
+        public const int GL_NORMAL_BIT_PGI = 0x08000000;
+        public const int GL_TEXCOORD1_BIT_PGI = 0x10000000;
+        public const int GL_TEXCOORD2_BIT_PGI = 0x20000000;
+        public const int GL_TEXCOORD3_BIT_PGI = 0x40000000;
+        public const int GL_TEXCOORD4_BIT_PGI = unchecked((int)0x80000000);
+        public const int GL_VERTEX23_BIT_PGI = 0x00000004;
+        public const int GL_VERTEX4_BIT_PGI = 0x00000008;
+        public const int GL_REND_screen_coordinates = 1;
+        public const int GL_SCREEN_COORDINATES_REND = 0x8490;
+        public const int GL_INVERTED_SCREEN_W_REND = 0x8491;
+        public const int GL_S3_s3tc = 1;
+        public const int GL_RGB_S3TC = 0x83A0;
+        public const int GL_RGB4_S3TC = 0x83A1;
+        public const int GL_RGBA_S3TC = 0x83A2;
+        public const int GL_RGBA4_S3TC = 0x83A3;
+        public const int GL_RGBA_DXT5_S3TC = 0x83A4;
+        public const int GL_RGBA4_DXT5_S3TC = 0x83A5;
+        public const int GL_SGIS_detail_texture = 1;
+        public const int GL_DETAIL_TEXTURE_2D_SGIS = 0x8095;
+        public const int GL_DETAIL_TEXTURE_2D_BINDING_SGIS = 0x8096;
+        public const int GL_LINEAR_DETAIL_SGIS = 0x8097;
+        public const int GL_LINEAR_DETAIL_ALPHA_SGIS = 0x8098;
+        public const int GL_LINEAR_DETAIL_COLOR_SGIS = 0x8099;
+        public const int GL_DETAIL_TEXTURE_LEVEL_SGIS = 0x809A;
+        public const int GL_DETAIL_TEXTURE_MODE_SGIS = 0x809B;
+        public const int GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS = 0x809C;
+        public const int GL_SGIS_fog_function = 1;
+        public const int GL_FOG_FUNC_SGIS = 0x812A;
+        public const int GL_FOG_FUNC_POINTS_SGIS = 0x812B;
+        public const int GL_MAX_FOG_FUNC_POINTS_SGIS = 0x812C;
+        public const int GL_SGIS_generate_mipmap = 1;
+        public const int GL_GENERATE_MIPMAP_SGIS = 0x8191;
+        public const int GL_GENERATE_MIPMAP_HINT_SGIS = 0x8192;
+        public const int GL_SGIS_multisample = 1;
+        public const int GL_MULTISAMPLE_SGIS = 0x809D;
+        public const int GL_SAMPLE_ALPHA_TO_MASK_SGIS = 0x809E;
+        public const int GL_SAMPLE_ALPHA_TO_ONE_SGIS = 0x809F;
+        public const int GL_SAMPLE_MASK_SGIS = 0x80A0;
+        public const int GL_1PASS_SGIS = 0x80A1;
+        public const int GL_2PASS_0_SGIS = 0x80A2;
+        public const int GL_2PASS_1_SGIS = 0x80A3;
+        public const int GL_4PASS_0_SGIS = 0x80A4;
+        public const int GL_4PASS_1_SGIS = 0x80A5;
+        public const int GL_4PASS_2_SGIS = 0x80A6;
+        public const int GL_4PASS_3_SGIS = 0x80A7;
+        public const int GL_SAMPLE_BUFFERS_SGIS = 0x80A8;
+        public const int GL_SAMPLES_SGIS = 0x80A9;
+        public const int GL_SAMPLE_MASK_VALUE_SGIS = 0x80AA;
+        public const int GL_SAMPLE_MASK_INVERT_SGIS = 0x80AB;
+        public const int GL_SAMPLE_PATTERN_SGIS = 0x80AC;
+        public const int GL_SGIS_pixel_texture = 1;
+        public const int GL_PIXEL_TEXTURE_SGIS = 0x8353;
+        public const int GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS = 0x8354;
+        public const int GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS = 0x8355;
+        public const int GL_PIXEL_GROUP_COLOR_SGIS = 0x8356;
+        public const int GL_SGIS_point_line_texgen = 1;
+        public const int GL_EYE_DISTANCE_TO_POINT_SGIS = 0x81F0;
+        public const int GL_OBJECT_DISTANCE_TO_POINT_SGIS = 0x81F1;
+        public const int GL_EYE_DISTANCE_TO_LINE_SGIS = 0x81F2;
+        public const int GL_OBJECT_DISTANCE_TO_LINE_SGIS = 0x81F3;
+        public const int GL_EYE_POINT_SGIS = 0x81F4;
+        public const int GL_OBJECT_POINT_SGIS = 0x81F5;
+        public const int GL_EYE_LINE_SGIS = 0x81F6;
+        public const int GL_OBJECT_LINE_SGIS = 0x81F7;
+        public const int GL_SGIS_point_parameters = 1;
+        public const int GL_POINT_SIZE_MIN_SGIS = 0x8126;
+        public const int GL_POINT_SIZE_MAX_SGIS = 0x8127;
+        public const int GL_POINT_FADE_THRESHOLD_SIZE_SGIS = 0x8128;
+        public const int GL_DISTANCE_ATTENUATION_SGIS = 0x8129;
+        public const int GL_SGIS_sharpen_texture = 1;
+        public const int GL_LINEAR_SHARPEN_SGIS = 0x80AD;
+        public const int GL_LINEAR_SHARPEN_ALPHA_SGIS = 0x80AE;
+        public const int GL_LINEAR_SHARPEN_COLOR_SGIS = 0x80AF;
+        public const int GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS = 0x80B0;
+        public const int GL_SGIS_texture4D = 1;
+        public const int GL_PACK_SKIP_VOLUMES_SGIS = 0x8130;
+        public const int GL_PACK_IMAGE_DEPTH_SGIS = 0x8131;
+        public const int GL_UNPACK_SKIP_VOLUMES_SGIS = 0x8132;
+        public const int GL_UNPACK_IMAGE_DEPTH_SGIS = 0x8133;
+        public const int GL_TEXTURE_4D_SGIS = 0x8134;
+        public const int GL_PROXY_TEXTURE_4D_SGIS = 0x8135;
+        public const int GL_TEXTURE_4DSIZE_SGIS = 0x8136;
+        public const int GL_TEXTURE_WRAP_Q_SGIS = 0x8137;
+        public const int GL_MAX_4D_TEXTURE_SIZE_SGIS = 0x8138;
+        public const int GL_TEXTURE_4D_BINDING_SGIS = 0x814F;
+        public const int GL_SGIS_texture_border_clamp = 1;
+        public const int GL_CLAMP_TO_BORDER_SGIS = 0x812D;
+        public const int GL_SGIS_texture_color_mask = 1;
+        public const int GL_TEXTURE_COLOR_WRITEMASK_SGIS = 0x81EF;
+        public const int GL_SGIS_texture_edge_clamp = 1;
+        public const int GL_CLAMP_TO_EDGE_SGIS = 0x812F;
+        public const int GL_SGIS_texture_filter4 = 1;
+        public const int GL_FILTER4_SGIS = 0x8146;
+        public const int GL_TEXTURE_FILTER4_SIZE_SGIS = 0x8147;
+        public const int GL_SGIS_texture_lod = 1;
+        public const int GL_TEXTURE_MIN_LOD_SGIS = 0x813A;
+        public const int GL_TEXTURE_MAX_LOD_SGIS = 0x813B;
+        public const int GL_TEXTURE_BASE_LEVEL_SGIS = 0x813C;
+        public const int GL_TEXTURE_MAX_LEVEL_SGIS = 0x813D;
+        public const int GL_SGIS_texture_select = 1;
+        public const int GL_DUAL_ALPHA4_SGIS = 0x8110;
+        public const int GL_DUAL_ALPHA8_SGIS = 0x8111;
+        public const int GL_DUAL_ALPHA12_SGIS = 0x8112;
+        public const int GL_DUAL_ALPHA16_SGIS = 0x8113;
+        public const int GL_DUAL_LUMINANCE4_SGIS = 0x8114;
+        public const int GL_DUAL_LUMINANCE8_SGIS = 0x8115;
+        public const int GL_DUAL_LUMINANCE12_SGIS = 0x8116;
+        public const int GL_DUAL_LUMINANCE16_SGIS = 0x8117;
+        public const int GL_DUAL_INTENSITY4_SGIS = 0x8118;
+        public const int GL_DUAL_INTENSITY8_SGIS = 0x8119;
+        public const int GL_DUAL_INTENSITY12_SGIS = 0x811A;
+        public const int GL_DUAL_INTENSITY16_SGIS = 0x811B;
+        public const int GL_DUAL_LUMINANCE_ALPHA4_SGIS = 0x811C;
+        public const int GL_DUAL_LUMINANCE_ALPHA8_SGIS = 0x811D;
+        public const int GL_QUAD_ALPHA4_SGIS = 0x811E;
+        public const int GL_QUAD_ALPHA8_SGIS = 0x811F;
+        public const int GL_QUAD_LUMINANCE4_SGIS = 0x8120;
+        public const int GL_QUAD_LUMINANCE8_SGIS = 0x8121;
+        public const int GL_QUAD_INTENSITY4_SGIS = 0x8122;
+        public const int GL_QUAD_INTENSITY8_SGIS = 0x8123;
+        public const int GL_DUAL_TEXTURE_SELECT_SGIS = 0x8124;
+        public const int GL_QUAD_TEXTURE_SELECT_SGIS = 0x8125;
+        public const int GL_SGIX_async = 1;
+        public const int GL_ASYNC_MARKER_SGIX = 0x8329;
+        public const int GL_SGIX_async_histogram = 1;
+        public const int GL_ASYNC_HISTOGRAM_SGIX = 0x832C;
+        public const int GL_MAX_ASYNC_HISTOGRAM_SGIX = 0x832D;
+        public const int GL_SGIX_async_pixel = 1;
+        public const int GL_ASYNC_TEX_IMAGE_SGIX = 0x835C;
+        public const int GL_ASYNC_DRAW_PIXELS_SGIX = 0x835D;
+        public const int GL_ASYNC_READ_PIXELS_SGIX = 0x835E;
+        public const int GL_MAX_ASYNC_TEX_IMAGE_SGIX = 0x835F;
+        public const int GL_MAX_ASYNC_DRAW_PIXELS_SGIX = 0x8360;
+        public const int GL_MAX_ASYNC_READ_PIXELS_SGIX = 0x8361;
+        public const int GL_SGIX_blend_alpha_minmax = 1;
+        public const int GL_ALPHA_MIN_SGIX = 0x8320;
+        public const int GL_ALPHA_MAX_SGIX = 0x8321;
+        public const int GL_SGIX_calligraphic_fragment = 1;
+        public const int GL_CALLIGRAPHIC_FRAGMENT_SGIX = 0x8183;
+        public const int GL_SGIX_clipmap = 1;
+        public const int GL_LINEAR_CLIPMAP_LINEAR_SGIX = 0x8170;
+        public const int GL_TEXTURE_CLIPMAP_CENTER_SGIX = 0x8171;
+        public const int GL_TEXTURE_CLIPMAP_FRAME_SGIX = 0x8172;
+        public const int GL_TEXTURE_CLIPMAP_OFFSET_SGIX = 0x8173;
+        public const int GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX = 0x8174;
+        public const int GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX = 0x8175;
+        public const int GL_TEXTURE_CLIPMAP_DEPTH_SGIX = 0x8176;
+        public const int GL_MAX_CLIPMAP_DEPTH_SGIX = 0x8177;
+        public const int GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX = 0x8178;
+        public const int GL_NEAREST_CLIPMAP_NEAREST_SGIX = 0x844D;
+        public const int GL_NEAREST_CLIPMAP_LINEAR_SGIX = 0x844E;
+        public const int GL_LINEAR_CLIPMAP_NEAREST_SGIX = 0x844F;
+        public const int GL_SGIX_convolution_accuracy = 1;
+        public const int GL_CONVOLUTION_HINT_SGIX = 0x8316;
+        public const int GL_SGIX_depth_pass_instrument = 1;
+        public const int GL_SGIX_depth_texture = 1;
+        public const int GL_DEPTH_COMPONENT16_SGIX = 0x81A5;
+        public const int GL_DEPTH_COMPONENT24_SGIX = 0x81A6;
+        public const int GL_DEPTH_COMPONENT32_SGIX = 0x81A7;
+        public const int GL_SGIX_flush_raster = 1;
+        public const int GL_SGIX_fog_offset = 1;
+        public const int GL_FOG_OFFSET_SGIX = 0x8198;
+        public const int GL_FOG_OFFSET_VALUE_SGIX = 0x8199;
+        public const int GL_SGIX_fragment_lighting = 1;
+        public const int GL_FRAGMENT_LIGHTING_SGIX = 0x8400;
+        public const int GL_FRAGMENT_COLOR_MATERIAL_SGIX = 0x8401;
+        public const int GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX = 0x8402;
+        public const int GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX = 0x8403;
+        public const int GL_MAX_FRAGMENT_LIGHTS_SGIX = 0x8404;
+        public const int GL_MAX_ACTIVE_LIGHTS_SGIX = 0x8405;
+        public const int GL_CURRENT_RASTER_NORMAL_SGIX = 0x8406;
+        public const int GL_LIGHT_ENV_MODE_SGIX = 0x8407;
+        public const int GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX = 0x8408;
+        public const int GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX = 0x8409;
+        public const int GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX = 0x840A;
+        public const int GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX = 0x840B;
+        public const int GL_FRAGMENT_LIGHT0_SGIX = 0x840C;
+        public const int GL_FRAGMENT_LIGHT1_SGIX = 0x840D;
+        public const int GL_FRAGMENT_LIGHT2_SGIX = 0x840E;
+        public const int GL_FRAGMENT_LIGHT3_SGIX = 0x840F;
+        public const int GL_FRAGMENT_LIGHT4_SGIX = 0x8410;
+        public const int GL_FRAGMENT_LIGHT5_SGIX = 0x8411;
+        public const int GL_FRAGMENT_LIGHT6_SGIX = 0x8412;
+        public const int GL_FRAGMENT_LIGHT7_SGIX = 0x8413;
+        public const int GL_SGIX_framezoom = 1;
+        public const int GL_FRAMEZOOM_SGIX = 0x818B;
+        public const int GL_FRAMEZOOM_FACTOR_SGIX = 0x818C;
+        public const int GL_MAX_FRAMEZOOM_FACTOR_SGIX = 0x818D;
+        public const int GL_SGIX_igloo_interface = 1;
+        public const int GL_SGIX_instruments = 1;
+        public const int GL_INSTRUMENT_BUFFER_POINTER_SGIX = 0x8180;
+        public const int GL_INSTRUMENT_MEASUREMENTS_SGIX = 0x8181;
+        public const int GL_SGIX_interlace = 1;
+        public const int GL_INTERLACE_SGIX = 0x8094;
+        public const int GL_SGIX_ir_instrument1 = 1;
+        public const int GL_IR_INSTRUMENT1_SGIX = 0x817F;
+        public const int GL_SGIX_list_priority = 1;
+        public const int GL_LIST_PRIORITY_SGIX = 0x8182;
+        public const int GL_SGIX_pixel_texture = 1;
+        public const int GL_PIXEL_TEX_GEN_SGIX = 0x8139;
+        public const int GL_PIXEL_TEX_GEN_MODE_SGIX = 0x832B;
+        public const int GL_SGIX_pixel_tiles = 1;
+        public const int GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX = 0x813E;
+        public const int GL_PIXEL_TILE_CACHE_INCREMENT_SGIX = 0x813F;
+        public const int GL_PIXEL_TILE_WIDTH_SGIX = 0x8140;
+        public const int GL_PIXEL_TILE_HEIGHT_SGIX = 0x8141;
+        public const int GL_PIXEL_TILE_GRID_WIDTH_SGIX = 0x8142;
+        public const int GL_PIXEL_TILE_GRID_HEIGHT_SGIX = 0x8143;
+        public const int GL_PIXEL_TILE_GRID_DEPTH_SGIX = 0x8144;
+        public const int GL_PIXEL_TILE_CACHE_SIZE_SGIX = 0x8145;
+        public const int GL_SGIX_polynomial_ffd = 1;
+        public const int GL_TEXTURE_DEFORMATION_BIT_SGIX = 0x00000001;
+        public const int GL_GEOMETRY_DEFORMATION_BIT_SGIX = 0x00000002;
+        public const int GL_GEOMETRY_DEFORMATION_SGIX = 0x8194;
+        public const int GL_TEXTURE_DEFORMATION_SGIX = 0x8195;
+        public const int GL_DEFORMATIONS_MASK_SGIX = 0x8196;
+        public const int GL_MAX_DEFORMATION_ORDER_SGIX = 0x8197;
+        public const int GL_SGIX_reference_plane = 1;
+        public const int GL_REFERENCE_PLANE_SGIX = 0x817D;
+        public const int GL_REFERENCE_PLANE_EQUATION_SGIX = 0x817E;
+        public const int GL_SGIX_resample = 1;
+        public const int GL_PACK_RESAMPLE_SGIX = 0x842E;
+        public const int GL_UNPACK_RESAMPLE_SGIX = 0x842F;
+        public const int GL_RESAMPLE_REPLICATE_SGIX = 0x8433;
+        public const int GL_RESAMPLE_ZERO_FILL_SGIX = 0x8434;
+        public const int GL_RESAMPLE_DECIMATE_SGIX = 0x8430;
+        public const int GL_SGIX_scalebias_hint = 1;
+        public const int GL_SCALEBIAS_HINT_SGIX = 0x8322;
+        public const int GL_SGIX_shadow = 1;
+        public const int GL_TEXTURE_COMPARE_SGIX = 0x819A;
+        public const int GL_TEXTURE_COMPARE_OPERATOR_SGIX = 0x819B;
+        public const int GL_TEXTURE_LEQUAL_R_SGIX = 0x819C;
+        public const int GL_TEXTURE_GEQUAL_R_SGIX = 0x819D;
+        public const int GL_SGIX_shadow_ambient = 1;
+        public const int GL_SHADOW_AMBIENT_SGIX = 0x80BF;
+        public const int GL_SGIX_sprite = 1;
+        public const int GL_SPRITE_SGIX = 0x8148;
+        public const int GL_SPRITE_MODE_SGIX = 0x8149;
+        public const int GL_SPRITE_AXIS_SGIX = 0x814A;
+        public const int GL_SPRITE_TRANSLATION_SGIX = 0x814B;
+        public const int GL_SPRITE_AXIAL_SGIX = 0x814C;
+        public const int GL_SPRITE_OBJECT_ALIGNED_SGIX = 0x814D;
+        public const int GL_SPRITE_EYE_ALIGNED_SGIX = 0x814E;
+        public const int GL_SGIX_subsample = 1;
+        public const int GL_PACK_SUBSAMPLE_RATE_SGIX = 0x85A0;
+        public const int GL_UNPACK_SUBSAMPLE_RATE_SGIX = 0x85A1;
+        public const int GL_PIXEL_SUBSAMPLE_4444_SGIX = 0x85A2;
+        public const int GL_PIXEL_SUBSAMPLE_2424_SGIX = 0x85A3;
+        public const int GL_PIXEL_SUBSAMPLE_4242_SGIX = 0x85A4;
+        public const int GL_SGIX_tag_sample_buffer = 1;
+        public const int GL_SGIX_texture_add_env = 1;
+        public const int GL_TEXTURE_ENV_BIAS_SGIX = 0x80BE;
+        public const int GL_SGIX_texture_coordinate_clamp = 1;
+        public const int GL_TEXTURE_MAX_CLAMP_S_SGIX = 0x8369;
+        public const int GL_TEXTURE_MAX_CLAMP_T_SGIX = 0x836A;
+        public const int GL_TEXTURE_MAX_CLAMP_R_SGIX = 0x836B;
+        public const int GL_SGIX_texture_lod_bias = 1;
+        public const int GL_TEXTURE_LOD_BIAS_S_SGIX = 0x818E;
+        public const int GL_TEXTURE_LOD_BIAS_T_SGIX = 0x818F;
+        public const int GL_TEXTURE_LOD_BIAS_R_SGIX = 0x8190;
+        public const int GL_SGIX_texture_multi_buffer = 1;
+        public const int GL_TEXTURE_MULTI_BUFFER_HINT_SGIX = 0x812E;
+        public const int GL_SGIX_texture_scale_bias = 1;
+        public const int GL_POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179;
+        public const int GL_POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A;
+        public const int GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B;
+        public const int GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C;
+        public const int GL_SGIX_vertex_preclip = 1;
+        public const int GL_VERTEX_PRECLIP_SGIX = 0x83EE;
+        public const int GL_VERTEX_PRECLIP_HINT_SGIX = 0x83EF;
+        public const int GL_SGIX_ycrcb = 1;
+        public const int GL_YCRCB_422_SGIX = 0x81BB;
+        public const int GL_YCRCB_444_SGIX = 0x81BC;
+        public const int GL_SGIX_ycrcb_subsample = 1;
+        public const int GL_SGIX_ycrcba = 1;
+        public const int GL_YCRCB_SGIX = 0x8318;
+        public const int GL_YCRCBA_SGIX = 0x8319;
+        public const int GL_SGI_color_matrix = 1;
+        public const int GL_COLOR_MATRIX_SGI = 0x80B1;
+        public const int GL_COLOR_MATRIX_STACK_DEPTH_SGI = 0x80B2;
+        public const int GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI = 0x80B3;
+        public const int GL_POST_COLOR_MATRIX_RED_SCALE_SGI = 0x80B4;
+        public const int GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI = 0x80B5;
+        public const int GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI = 0x80B6;
+        public const int GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI = 0x80B7;
+        public const int GL_POST_COLOR_MATRIX_RED_BIAS_SGI = 0x80B8;
+        public const int GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI = 0x80B9;
+        public const int GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI = 0x80BA;
+        public const int GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI = 0x80BB;
+        public const int GL_SGI_color_table = 1;
+        public const int GL_COLOR_TABLE_SGI = 0x80D0;
+        public const int GL_POST_CONVOLUTION_COLOR_TABLE_SGI = 0x80D1;
+        public const int GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI = 0x80D2;
+        public const int GL_PROXY_COLOR_TABLE_SGI = 0x80D3;
+        public const int GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI = 0x80D4;
+        public const int GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI = 0x80D5;
+        public const int GL_COLOR_TABLE_SCALE_SGI = 0x80D6;
+        public const int GL_COLOR_TABLE_BIAS_SGI = 0x80D7;
+        public const int GL_COLOR_TABLE_FORMAT_SGI = 0x80D8;
+        public const int GL_COLOR_TABLE_WIDTH_SGI = 0x80D9;
+        public const int GL_COLOR_TABLE_RED_SIZE_SGI = 0x80DA;
+        public const int GL_COLOR_TABLE_GREEN_SIZE_SGI = 0x80DB;
+        public const int GL_COLOR_TABLE_BLUE_SIZE_SGI = 0x80DC;
+        public const int GL_COLOR_TABLE_ALPHA_SIZE_SGI = 0x80DD;
+        public const int GL_COLOR_TABLE_LUMINANCE_SIZE_SGI = 0x80DE;
+        public const int GL_COLOR_TABLE_INTENSITY_SIZE_SGI = 0x80DF;
+        public const int GL_SGI_texture_color_table = 1;
+        public const int GL_TEXTURE_COLOR_TABLE_SGI = 0x80BC;
+        public const int GL_PROXY_TEXTURE_COLOR_TABLE_SGI = 0x80BD;
+        public const int GL_SUNX_constant_data = 1;
+        public const int GL_UNPACK_CONSTANT_DATA_SUNX = 0x81D5;
+        public const int GL_TEXTURE_CONSTANT_DATA_SUNX = 0x81D6;
+        public const int GL_SUN_convolution_border_modes = 1;
+        public const int GL_WRAP_BORDER_SUN = 0x81D4;
+        public const int GL_SUN_global_alpha = 1;
+        public const int GL_GLOBAL_ALPHA_SUN = 0x81D9;
+        public const int GL_GLOBAL_ALPHA_FACTOR_SUN = 0x81DA;
+        public const int GL_SUN_mesh_array = 1;
+        public const int GL_QUAD_MESH_SUN = 0x8614;
+        public const int GL_TRIANGLE_MESH_SUN = 0x8615;
+        public const int GL_SUN_slice_accum = 1;
+        public const int GL_SLICE_ACCUM_SUN = 0x85CC;
+        public const int GL_SUN_triangle_list = 1;
+        public const int GL_RESTART_SUN = 0x0001;
+        public const int GL_REPLACE_MIDDLE_SUN = 0x0002;
+        public const int GL_REPLACE_OLDEST_SUN = 0x0003;
+        public const int GL_TRIANGLE_LIST_SUN = 0x81D7;
+        public const int GL_REPLACEMENT_CODE_SUN = 0x81D8;
+        public const int GL_REPLACEMENT_CODE_ARRAY_SUN = 0x85C0;
+        public const int GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN = 0x85C1;
+        public const int GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN = 0x85C2;
+        public const int GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN = 0x85C3;
+        public const int GL_R1UI_V3F_SUN = 0x85C4;
+        public const int GL_R1UI_C4UB_V3F_SUN = 0x85C5;
+        public const int GL_R1UI_C3F_V3F_SUN = 0x85C6;
+        public const int GL_R1UI_N3F_V3F_SUN = 0x85C7;
+        public const int GL_R1UI_C4F_N3F_V3F_SUN = 0x85C8;
+        public const int GL_R1UI_T2F_V3F_SUN = 0x85C9;
+        public const int GL_R1UI_T2F_N3F_V3F_SUN = 0x85CA;
+        public const int GL_R1UI_T2F_C4F_N3F_V3F_SUN = 0x85CB;
+        public const int GL_SUN_vertex = 1;
+        public const int GL_WIN_phong_shading = 1;
+        public const int GL_PHONG_WIN = 0x80EA;
+        public const int GL_PHONG_HINT_WIN = 0x80EB;
+        public const int GL_WIN_specular_fog = 1;
+        public const int GL_FOG_SPECULAR_TEXTURE_WIN = 0x80EC;
     }
 }

+ 0 - 8
src/Avalonia.OpenGL/GlDisplayType.cs

@@ -1,8 +0,0 @@
-namespace Avalonia.OpenGL
-{
-    public enum GlDisplayType
-    {
-        OpenGL2,
-        OpenGLES2
-    }
-}

+ 107 - 6
src/Avalonia.OpenGL/GlEntryPointAttribute.cs

@@ -2,16 +2,117 @@ using System;
 
 namespace Avalonia.OpenGL
 {
+    public interface IGlEntryPointAttribute
+    {
+        IntPtr GetProcAddress(Func<string, IntPtr> getProcAddress);
+    }
+    
+    public interface IGlEntryPointAttribute<in TContext>
+    {
+        IntPtr GetProcAddress(TContext context, Func<string, IntPtr> getProcAddress);
+    }
+
     [AttributeUsage(AttributeTargets.Property)]
-    public class GlEntryPointAttribute : Attribute
+    public class GlOptionalEntryPoint : Attribute
+    {
+        
+    }
+    
+    [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
+    public class GlEntryPointAttribute : Attribute, IGlEntryPointAttribute
+    {
+        public string[] EntryPoints { get; }
+
+        public GlEntryPointAttribute(string entryPoint)
+        {
+            EntryPoints = new []{entryPoint};
+        }
+/*
+        public GlEntryPointAttribute(params string[] entryPoints)
+        {
+            EntryPoints = entryPoints;
+        }
+*/
+        public IntPtr GetProcAddress(Func<string, IntPtr> getProcAddress)
+        {
+            foreach (var name in EntryPoints)
+            {
+                var rv = getProcAddress(name);
+                if (rv != IntPtr.Zero)
+                    return rv;
+            }
+            return IntPtr.Zero;
+        }
+    }
+    
+    [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
+    public class GlMinVersionEntryPoint : Attribute, IGlEntryPointAttribute<GlInterface.GlContextInfo>
     {
-        public string EntryPoint { get; }
-        public bool Optional { get; }
+        private readonly string _entry;
+        private readonly GlProfileType? _profile;
+        private readonly int _minVersionMajor;
+        private readonly int _minVersionMinor;
 
-        public GlEntryPointAttribute(string entryPoint, bool optional = false)
+        public GlMinVersionEntryPoint(string entry, GlProfileType profile, int minVersionMajor,
+            int minVersionMinor)
         {
-            EntryPoint = entryPoint;
-            Optional = optional;
+            _entry = entry;
+            _profile = profile;
+            _minVersionMajor = minVersionMajor;
+            _minVersionMinor = minVersionMinor;
+        }
+        
+        public GlMinVersionEntryPoint(string entry, int minVersionMajor,
+            int minVersionMinor)
+        {
+            _entry = entry;
+            _minVersionMajor = minVersionMajor;
+            _minVersionMinor = minVersionMinor;
+        }
+        
+        public IntPtr GetProcAddress(GlInterface.GlContextInfo context, Func<string, IntPtr> getProcAddress)
+        {
+            if(_profile.HasValue && context.Version.Type != _profile)
+                return IntPtr.Zero;
+            if(context.Version.Major<_minVersionMajor)
+                return IntPtr.Zero;
+            if (context.Version.Major == _minVersionMajor && context.Version.Minor < _minVersionMinor)
+                return IntPtr.Zero;
+            return getProcAddress(_entry);
+        }
+    }
+    
+    [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
+    public class GlExtensionEntryPoint : Attribute, IGlEntryPointAttribute<GlInterface.GlContextInfo>
+    {
+        private readonly string _entry;
+        private readonly GlProfileType? _profile;
+        private readonly string _extension;
+
+        public GlExtensionEntryPoint(string entry, GlProfileType profile, string extension)
+        {
+            _entry = entry;
+            _profile = profile;
+            _extension = extension;
+        }
+        
+        public GlExtensionEntryPoint(string entry, string extension)
+        {
+            _entry = entry;
+            _extension = extension;
+        }
+        
+        public IntPtr GetProcAddress(GlInterface.GlContextInfo context, Func<string, IntPtr> getProcAddress)
+        {
+            // Ignore different profile type
+            if (_profile.HasValue && _profile != context.Version.Type)
+                return IntPtr.Zero;
+
+            // Check if extension is supported by the current context
+            if (!context.Extensions.Contains(_extension))
+                return IntPtr.Zero;
+
+            return getProcAddress(_entry);
         }
     }
 }

+ 278 - 6
src/Avalonia.OpenGL/GlInterface.cs

@@ -1,31 +1,60 @@
 using System;
+using System.Collections.Generic;
 using System.Runtime.InteropServices;
+using System.Text;
 using Avalonia.Platform.Interop;
+using static Avalonia.OpenGL.GlConsts;
 
 namespace Avalonia.OpenGL
 {
     public delegate IntPtr GlGetProcAddressDelegate(string procName);
     
-    public class GlInterface : GlInterfaceBase
+    public unsafe class GlInterface : GlBasicInfoInterface<GlInterface.GlContextInfo>
     {
         public string Version { get; }
         public string Vendor { get; }
         public string Renderer { get; }
+        public GlContextInfo ContextInfo { get; }
 
-        public GlInterface(Func<string, bool, IntPtr> getProcAddress) : base(getProcAddress)
+        public class GlContextInfo
         {
+            public GlVersion Version { get; }
+            public HashSet<string> Extensions { get; }
+
+            public GlContextInfo(GlVersion version, HashSet<string> extensions)
+            {
+                Version = version;
+                Extensions = extensions;
+            }
+
+            public static GlContextInfo Create(GlVersion version, Func<string, IntPtr> getProcAddress)
+            {
+                var basicInfoInterface = new GlBasicInfoInterface(getProcAddress);
+                var exts = basicInfoInterface.GetExtensions();
+                return new GlContextInfo(version, new HashSet<string>(exts));
+            }
+        }
+
+        private GlInterface(GlContextInfo info, Func<string, IntPtr> getProcAddress) : base(getProcAddress, info)
+        {
+            ContextInfo = info;
             Version = GetString(GlConsts.GL_VERSION);
             Renderer = GetString(GlConsts.GL_RENDERER);
-            Vendor = GetString(GlConsts.GL_VENDOR);
+            Vendor = GetString(GlConsts.GL_VENDOR);   
         }
 
-        public GlInterface(Func<Utf8Buffer, IntPtr> n) : this(ConvertNative(n))
+        public GlInterface(GlVersion version, Func<string, IntPtr> getProcAddress) : this(
+            GlContextInfo.Create(version, getProcAddress), getProcAddress)
+        {
+        }
+
+        public GlInterface(GlVersion version, Func<Utf8Buffer, IntPtr> n) : this(version, ConvertNative(n))
         {
             
         }
 
-        public static GlInterface FromNativeUtf8GetProcAddress(Func<Utf8Buffer, IntPtr> getProcAddress) =>
-            new GlInterface(getProcAddress);
+        public static GlInterface FromNativeUtf8GetProcAddress(GlVersion version, Func<Utf8Buffer, IntPtr> getProcAddress) =>
+            new GlInterface(version, getProcAddress);
 
         
         public T GetProcAddress<T>(string proc) => Marshal.GetDelegateForFunctionPointer<T>(GetProcAddress(proc));
@@ -70,6 +99,249 @@ namespace Avalonia.OpenGL
         [GlEntryPoint("glGetIntegerv")]
         public GlGetIntegerv GetIntegerv { get; }
 
+        public delegate void GlGenFramebuffers(int count, int[] res);
+        [GlEntryPoint("glGenFramebuffers")]
+        public GlGenFramebuffers GenFramebuffers { get; }
+        
+        public delegate void GlDeleteFramebuffers(int count, int[] framebuffers);
+        [GlEntryPoint("glDeleteFramebuffers")]
+        public GlDeleteFramebuffers DeleteFramebuffers { get; }
+        
+        public delegate void GlBindFramebuffer(int target, int fb);
+        [GlEntryPoint("glBindFramebuffer")]
+        public GlBindFramebuffer BindFramebuffer { get; }
+        
+        public delegate int GlCheckFramebufferStatus(int target);
+        [GlEntryPoint("glCheckFramebufferStatus")]
+        public GlCheckFramebufferStatus CheckFramebufferStatus { get; }
+        
+        public delegate void GlGenRenderbuffers(int count, int[] res);
+        [GlEntryPoint("glGenRenderbuffers")]
+        public GlGenRenderbuffers GenRenderbuffers { get; }
+        
+        public delegate void GlDeleteRenderbuffers(int count, int[] renderbuffers);
+        [GlEntryPoint("glDeleteRenderbuffers")]
+        public GlDeleteTextures DeleteRenderbuffers { get; }
+        
+        public delegate void GlBindRenderbuffer(int target, int fb);
+        [GlEntryPoint("glBindRenderbuffer")]
+        public GlBindRenderbuffer BindRenderbuffer { get; }
+        
+        public delegate void GlRenderbufferStorage(int target, int internalFormat, int width, int height);
+        [GlEntryPoint("glRenderbufferStorage")]
+        public GlRenderbufferStorage RenderbufferStorage { get; }
+
+        public delegate void GlFramebufferRenderbuffer(int target, int attachment,
+            int renderbufferTarget, int renderbuffer);
+        [GlEntryPoint("glFramebufferRenderbuffer")]
+        public GlFramebufferRenderbuffer FramebufferRenderbuffer { get; }
+        
+        public delegate void GlGenTextures(int count, int[] res);
+        [GlEntryPoint("glGenTextures")]
+        public GlGenTextures GenTextures { get; }
+        
+        public delegate void GlBindTexture(int target, int fb);
+        [GlEntryPoint("glBindTexture")]
+        public GlBindTexture BindTexture { get; }
+        
+        public delegate void GlDeleteTextures(int count, int[] textures);
+        [GlEntryPoint("glDeleteTextures")]
+        public GlDeleteTextures DeleteTextures { get; }
+
+
+        public delegate void GlTexImage2D(int target, int level, int internalFormat, int width, int height, int border,
+            int format, int type, IntPtr data);
+        [GlEntryPoint("glTexImage2D")]
+        public GlTexImage2D TexImage2D { get; }
+
+        public delegate void GlTexParameteri(int target, int name, int value);
+        [GlEntryPoint("glTexParameteri")]
+        public GlTexParameteri TexParameteri { get; }
+
+        public delegate void GlFramebufferTexture2D(int target, int attachment,
+            int texTarget, int texture, int level);
+        [GlEntryPoint("glFramebufferTexture2D")]
+        public GlFramebufferTexture2D FramebufferTexture2D { get; }
+        
+        public delegate int GlCreateShader(int shaderType);
+        [GlEntryPoint("glCreateShader")]
+        public GlCreateShader CreateShader { get; }
+
+        public delegate void GlShaderSource(int shader, int count, IntPtr strings, IntPtr lengths);
+        [GlEntryPoint("glShaderSource")]
+        public GlShaderSource ShaderSource { get; }
+
+        public void ShaderSourceString(int shader, string source)
+        {
+            using (var b = new Utf8Buffer(source))
+            {
+                var ptr = b.DangerousGetHandle();
+                var len = new IntPtr(b.ByteLen);
+                ShaderSource(shader, 1, new IntPtr(&ptr), new IntPtr(&len));
+            }
+        }
+
+        public delegate void GlCompileShader(int shader);
+        [GlEntryPoint("glCompileShader")]
+        public GlCompileShader CompileShader { get; }
+        
+        public delegate void GlGetShaderiv(int shader, int name, int* parameters);
+        [GlEntryPoint("glGetShaderiv")]
+        public GlGetShaderiv GetShaderiv { get; }
+
+        public delegate void GlGetShaderInfoLog(int shader, int maxLength, out int length, void*infoLog);
+        [GlEntryPoint("glGetShaderInfoLog")]
+        public GlGetShaderInfoLog GetShaderInfoLog { get; }
+
+        public unsafe string CompileShaderAndGetError(int shader, string source)
+        {
+            ShaderSourceString(shader, source);
+            CompileShader(shader);
+            int compiled;
+            GetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
+            if (compiled != 0)
+                return null;
+            int logLength;
+            GetShaderiv(shader, GL_INFO_LOG_LENGTH, &logLength);
+            if (logLength == 0)
+                logLength = 4096;
+            var logData = new byte[logLength];
+            int len;
+            fixed (void* ptr = logData)
+                GetShaderInfoLog(shader, logLength, out len, ptr);
+            return Encoding.UTF8.GetString(logData,0, len);
+        }
+        
+        public delegate int GlCreateProgram();
+        [GlEntryPoint("glCreateProgram")]
+        public GlCreateProgram CreateProgram { get; }
+
+        public delegate void GlAttachShader(int program, int shader);
+        [GlEntryPoint("glAttachShader")]
+        public GlAttachShader AttachShader { get; }
+
+        public delegate void GlLinkProgram(int program);
+        [GlEntryPoint("glLinkProgram")]
+        public GlLinkProgram LinkProgram { get; }
+        
+        public delegate void GlGetProgramiv(int program, int name, int* parameters);
+        [GlEntryPoint("glGetProgramiv")]
+        public GlGetProgramiv GetProgramiv { get; }
+
+        public delegate void GlGetProgramInfoLog(int program, int maxLength, out int len, void* infoLog);
+        [GlEntryPoint("glGetProgramInfoLog")]
+        public GlGetProgramInfoLog GetProgramInfoLog { get; }
+
+        public unsafe string LinkProgramAndGetError(int program)
+        {
+            LinkProgram(program);
+            int compiled;
+            GetProgramiv(program, GL_LINK_STATUS, &compiled);
+            if (compiled != 0)
+                return null;
+            int logLength;
+            GetProgramiv(program, GL_INFO_LOG_LENGTH, &logLength);
+            var logData = new byte[logLength];
+            int len;
+            fixed (void* ptr = logData)
+                GetProgramInfoLog(program, logLength, out len, ptr);
+            return Encoding.UTF8.GetString(logData,0, len);
+        }
+
+        public delegate void GlBindAttribLocation(int program, int index, IntPtr name);
+        [GlEntryPoint("glBindAttribLocation")]
+        public GlBindAttribLocation BindAttribLocation { get; }
+
+        public void BindAttribLocationString(int program, int index, string name)
+        {
+            using (var b = new Utf8Buffer(name))
+                BindAttribLocation(program, index, b.DangerousGetHandle());
+        }
+        
+        public delegate void GlGenBuffers(int len, int[] rv);
+        [GlEntryPoint("glGenBuffers")]
+        public GlGenBuffers GenBuffers { get; }
+
+        public int GenBuffer()
+        {
+            var rv = new int[1];
+            GenBuffers(1, rv);
+            return rv[0];
+        }
+        
+        public delegate void GlBindBuffer(int target, int buffer);
+        [GlEntryPoint("glBindBuffer")]
+        public GlBindBuffer BindBuffer { get; }
+
+        public delegate void GlBufferData(int target, IntPtr size, IntPtr data, int usage);
+        [GlEntryPoint("glBufferData")]
+        public GlBufferData BufferData { get; }
+        
+        public delegate int GlGetAttribLocation(int program, IntPtr name);
+        [GlEntryPoint("glGetAttribLocation")]
+        public GlGetAttribLocation GetAttribLocation { get; }
+
+        public int GetAttribLocationString(int program, string name)
+        {
+            using (var b = new Utf8Buffer(name))
+                return GetAttribLocation(program, b.DangerousGetHandle());
+        }
+
+        public delegate void GlVertexAttribPointer(int index, int size, int type,
+            int normalized, int stride, IntPtr pointer);
+        [GlEntryPoint("glVertexAttribPointer")]
+        public GlVertexAttribPointer VertexAttribPointer { get; }
+        
+        public delegate void GlEnableVertexAttribArray(int index);
+        [GlEntryPoint("glEnableVertexAttribArray")]
+        public GlEnableVertexAttribArray EnableVertexAttribArray { get; }
+
+        public delegate void GlUseProgram(int program);
+        [GlEntryPoint("glUseProgram")]
+        public GlUseProgram UseProgram { get; }
+        
+        public delegate void GlDrawArrays(int mode, int first, IntPtr count);
+        [GlEntryPoint("glDrawArrays")]
+        public GlDrawArrays DrawArrays { get; }
+        
+        public delegate void GlDrawElements(int mode, int count, int type, IntPtr indices);
+        [GlEntryPoint("glDrawElements")]
+        public GlDrawElements DrawElements { get; }
+
+        public delegate int GlGetUniformLocation(int program, IntPtr name);
+        [GlEntryPoint("glGetUniformLocation")]
+        public GlGetUniformLocation GetUniformLocation { get; }
+
+        public int GetUniformLocationString(int program, string name)
+        {
+            using (var b = new Utf8Buffer(name))
+                return GetUniformLocation(program, b.DangerousGetHandle());
+        }
+        
+        public delegate void GlUniform1f(int location, float falue);
+        [GlEntryPoint("glUniform1f")]
+        public GlUniform1f Uniform1f { get; }
+
+        
+        public delegate void GlUniformMatrix4fv(int location, int count, bool transpose, void* value);
+        [GlEntryPoint("glUniformMatrix4fv")]
+        public GlUniformMatrix4fv UniformMatrix4fv { get; }
+        
+        public delegate void GlEnable(int what);
+        [GlEntryPoint("glEnable")]
+        public GlEnable Enable { get; }
+
+        public delegate void GlDeleteBuffers(int count, int[] buffers);
+        [GlEntryPoint("glDeleteBuffers")]
+        public GlDeleteBuffers DeleteBuffers { get; }
+
+        public delegate void GlDeleteProgram(int program);
+        [GlEntryPoint("glDeleteProgram")]
+        public GlDeleteProgram DeleteProgram { get; }
+
+        public delegate void GlDeleteShader(int shader);
+        [GlEntryPoint("glDeleteShader")]
+        public GlDeleteShader DeleteShader { get; }
         // ReSharper restore UnassignedGetOnlyAutoProperty
     }
 }

+ 47 - 21
src/Avalonia.OpenGL/GlInterfaceBase.cs

@@ -1,53 +1,79 @@
 using System;
+using System.Linq;
 using System.Reflection;
 using System.Runtime.InteropServices;
 using Avalonia.Platform.Interop;
 
 namespace Avalonia.OpenGL
 {
-    public class GlInterfaceBase
+    public class GlInterfaceBase : GlInterfaceBase<object>
     {
-        
-        private readonly Func<string, bool, IntPtr> _getProcAddress;
-        public GlInterfaceBase(Func<string, bool, IntPtr> getProcAddress)
+        public GlInterfaceBase(Func<string, IntPtr> getProcAddress) : base(getProcAddress, null)
+        {
+        }
+
+        public GlInterfaceBase(Func<Utf8Buffer, IntPtr> nativeGetProcAddress) : base(nativeGetProcAddress, null)
+        {
+        }
+    }
+
+    public class GlInterfaceBase<TContext>
+    {
+        private readonly Func<string, IntPtr> _getProcAddress;
+        public GlInterfaceBase(Func<string, IntPtr> getProcAddress, TContext context)
         {
             _getProcAddress = getProcAddress;
             foreach (var prop in this.GetType().GetProperties())
             {
-                var a = prop.GetCustomAttribute<GlEntryPointAttribute>();
-                if (a != null)
+                var attrs = prop.GetCustomAttributes()
+                    .Where(a =>
+                        a is IGlEntryPointAttribute || a is IGlEntryPointAttribute<TContext>)
+                    .ToList();
+                if(attrs.Count == 0)
+                    continue;
+                
+                var isOptional = prop.GetCustomAttribute<GlOptionalEntryPoint>() != null;
+                
+                var fieldName = $"<{prop.Name}>k__BackingField";
+                var field = prop.DeclaringType.GetField(fieldName,
+                    BindingFlags.Instance | BindingFlags.NonPublic);
+                if (field == null)
+                    throw new InvalidProgramException($"Expected property {prop.Name} to have {fieldName}");
+                
+                
+                IntPtr proc = IntPtr.Zero;
+                foreach (var attr in attrs)
                 {
-                    var fieldName = $"<{prop.Name}>k__BackingField";
-                    var field = prop.DeclaringType.GetField(fieldName,
-                        BindingFlags.Instance | BindingFlags.NonPublic);
-                    if (field == null)
-                        throw new InvalidProgramException($"Expected property {prop.Name} to have {fieldName}");
-                    var proc = getProcAddress(a.EntryPoint, a.Optional);
+                    if (attr is IGlEntryPointAttribute<TContext> typed)
+                        proc = typed.GetProcAddress(context, getProcAddress);
+                    else if (attr is IGlEntryPointAttribute untyped)
+                        proc = untyped.GetProcAddress(getProcAddress);
                     if (proc != IntPtr.Zero)
-                        field.SetValue(this, Marshal.GetDelegateForFunctionPointer(proc, prop.PropertyType));
+                        break;
                 }
+                
+                if (proc != IntPtr.Zero)
+                    field.SetValue(this, Marshal.GetDelegateForFunctionPointer(proc, prop.PropertyType));
+                else if (!isOptional)
+                    throw new OpenGlException("Unable to find a suitable GL function for " + prop.Name);
             }
         }
 
-        protected static Func<string, bool, IntPtr> ConvertNative(Func<Utf8Buffer, IntPtr> func) =>
-            (proc, optional) =>
+        protected static Func<string, IntPtr> ConvertNative(Func<Utf8Buffer, IntPtr> func) =>
+            (proc) =>
             {
                 using (var u = new Utf8Buffer(proc))
                 {
                     var rv = func(u);
-                    if (rv == IntPtr.Zero && !optional)
-                        throw new OpenGlException("Missing function " + proc);
                     return rv;
                 }
             };
         
-        public GlInterfaceBase(Func<Utf8Buffer, IntPtr> nativeGetProcAddress) : this(ConvertNative(nativeGetProcAddress))
+        public GlInterfaceBase(Func<Utf8Buffer, IntPtr> nativeGetProcAddress, TContext context) : this(ConvertNative(nativeGetProcAddress), context)
         {
             
         }
         
-        public IntPtr GetProcAddress(string proc) => _getProcAddress(proc, true);
-        public IntPtr GetProcAddress(string proc, bool optional) => _getProcAddress(proc, optional);
-
+        public IntPtr GetProcAddress(string proc) => _getProcAddress(proc);
     }
 }

+ 22 - 0
src/Avalonia.OpenGL/GlVersion.cs

@@ -0,0 +1,22 @@
+namespace Avalonia.OpenGL
+{
+    public enum GlProfileType
+    {
+        OpenGL,
+        OpenGLES
+    }
+    
+    public struct GlVersion
+    {
+        public GlProfileType Type { get; }
+        public int Major { get; }
+        public int Minor { get; }
+
+        public GlVersion(GlProfileType type, int major, int minor)
+        {
+            Type = type;
+            Major = major;
+            Minor = minor;
+        }
+    }
+}

+ 8 - 3
src/Avalonia.OpenGL/IGlContext.cs

@@ -1,8 +1,13 @@
+using System;
+
 namespace Avalonia.OpenGL
 {
-    public interface IGlContext
+    public interface IGlContext : IDisposable
     {
-        IGlDisplay Display { get; }
-        void MakeCurrent();
+        GlVersion Version { get; }
+        GlInterface GlInterface { get; }
+        int SampleCount { get; }
+        int StencilSize { get; }
+        IDisposable MakeCurrent();
     }
 }

+ 0 - 11
src/Avalonia.OpenGL/IGlDisplay.cs

@@ -1,11 +0,0 @@
-namespace Avalonia.OpenGL
-{
-    public interface IGlDisplay
-    {
-        GlDisplayType Type { get; }
-        GlInterface GlInterface { get; }
-        void ClearContext();
-        int SampleCount { get; }
-        int StencilSize { get; }
-    }
-}

+ 1 - 1
src/Avalonia.OpenGL/IGlPlatformSurfaceRenderingSession.cs

@@ -4,7 +4,7 @@ namespace Avalonia.OpenGL
 {
     public interface IGlPlatformSurfaceRenderingSession : IDisposable
     {
-        IGlDisplay Display { get; }
+        IGlContext Context { get; }
         PixelSize Size { get; }
         double Scaling { get; }
         bool IsYFlipped { get; }

+ 9 - 0
src/Avalonia.OpenGL/IOpenGlAwarePlatformRenderInterface.cs

@@ -0,0 +1,9 @@
+using Avalonia.OpenGL.Imaging;
+
+namespace Avalonia.OpenGL
+{
+    public interface IOpenGlAwarePlatformRenderInterface
+    {
+        IOpenGlTextureBitmapImpl CreateOpenGlTextureBitmap();
+    }
+}

+ 2 - 1
src/Avalonia.OpenGL/IWindowingPlatformGlFeature.cs

@@ -2,6 +2,7 @@ namespace Avalonia.OpenGL
 {
     public interface IWindowingPlatformGlFeature
     {
-        IGlContext ImmediateContext { get; }
+        IGlContext CreateContext();
+        IGlContext MainContext { get; }
     }
 }

+ 13 - 0
src/Avalonia.OpenGL/Imaging/IOpenGlTextureBitmapImpl.cs

@@ -0,0 +1,13 @@
+using System;
+using Avalonia.Media.Imaging;
+using Avalonia.Platform;
+
+namespace Avalonia.OpenGL.Imaging
+{
+    public interface IOpenGlTextureBitmapImpl : IBitmapImpl
+    {
+        IDisposable Lock();
+        void SetBackBuffer(int textureId, int internalFormat, PixelSize pixelSize, double dpiScaling);
+        void SetDirty();
+    }
+}

+ 46 - 0
src/Avalonia.OpenGL/Imaging/OpenGlTextureBitmap.cs

@@ -0,0 +1,46 @@
+using System;
+using Avalonia.Media;
+using Avalonia.Media.Imaging;
+using Avalonia.Platform;
+using Avalonia.Threading;
+
+namespace Avalonia.OpenGL.Imaging
+{
+    public class OpenGlTextureBitmap : Bitmap, IAffectsRender
+    {
+        private IOpenGlTextureBitmapImpl _impl;
+        static IOpenGlTextureBitmapImpl CreateOrThrow()
+        {
+            if (!(AvaloniaLocator.Current.GetService<IPlatformRenderInterface>() is IOpenGlAwarePlatformRenderInterface
+                glAware))
+                throw new PlatformNotSupportedException("Rendering platform does not support OpenGL integration");
+            return glAware.CreateOpenGlTextureBitmap();
+        }
+        
+        public OpenGlTextureBitmap() 
+            : base(CreateOrThrow())
+        {
+            _impl = (IOpenGlTextureBitmapImpl)PlatformImpl.Item;
+        }
+
+        public IDisposable Lock() => _impl.Lock();
+
+        public void SetTexture(int textureId, int internalFormat, PixelSize size, double dpiScaling)
+        {
+            _impl.SetBackBuffer(textureId, internalFormat, size, dpiScaling);
+            SetIsDirty();
+        }
+
+        public void SetIsDirty()
+        {
+            if (Dispatcher.UIThread.CheckAccess())
+                CallInvalidated();
+            else
+                Dispatcher.UIThread.Post(CallInvalidated);
+        }
+
+        private void CallInvalidated() => Invalidated?.Invoke(this, EventArgs.Empty);
+
+        public event EventHandler Invalidated;
+    }
+}

+ 215 - 0
src/Avalonia.OpenGL/OpenGlControlBase.cs

@@ -0,0 +1,215 @@
+using System;
+using Avalonia.Controls;
+using Avalonia.Logging;
+using Avalonia.Media;
+using Avalonia.OpenGL.Imaging;
+using Avalonia.Rendering;
+using Avalonia.VisualTree;
+using static Avalonia.OpenGL.GlConsts;
+
+namespace Avalonia.OpenGL
+{
+    public abstract class OpenGlControlBase : Control
+    {
+        private IGlContext _context;
+        private int _fb, _texture, _renderBuffer;
+        private OpenGlTextureBitmap _bitmap;
+        private PixelSize _oldSize;
+        private bool _glFailed;
+        protected GlVersion GlVersion { get; private set; }
+        public sealed override void Render(DrawingContext context)
+        {
+            if(!EnsureInitialized())
+                return;
+                
+            using (_context.MakeCurrent())
+            {
+                using (_bitmap.Lock())
+                {
+                    var gl = _context.GlInterface;
+                    gl.BindFramebuffer(GL_FRAMEBUFFER, _fb);
+                    if (_oldSize != GetPixelSize())
+                        ResizeTexture(gl);
+
+                    OnOpenGlRender(gl, _fb);
+                    gl.Flush();
+                }
+            }
+
+            context.DrawImage(_bitmap, new Rect(_bitmap.Size), Bounds);
+            base.Render(context);
+        }
+
+        void DoCleanup(bool callUserDeinit)
+        {
+            if (_context != null)
+            {
+                using (_context.MakeCurrent())
+                {
+                    var gl = _context.GlInterface;
+                    gl.BindTexture(GL_TEXTURE_2D, 0);
+                    gl.BindFramebuffer(GL_FRAMEBUFFER, 0);
+                    gl.DeleteFramebuffers(1, new[] { _fb });
+                    using (_bitmap.Lock()) 
+                        _bitmap.SetTexture(0, 0, new PixelSize(1, 1), 1);
+                    gl.DeleteTextures(1, new[] { _texture });
+                    gl.DeleteRenderbuffers(1, new[] { _renderBuffer });
+                    _bitmap.Dispose();
+                    
+                    try
+                    {
+                        if (callUserDeinit)
+                            OnOpenGlDeinit(_context.GlInterface, _fb);
+                    }
+                    finally
+                    {
+                        _context.Dispose();
+                        _context = null;
+                    }
+                }
+            }
+        }
+
+        protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
+        {
+            DoCleanup(true);
+            base.OnDetachedFromVisualTree(e);
+        }
+
+        bool EnsureInitialized()
+        {
+            if (_context != null)
+                return true;
+            
+            if (_glFailed)
+                return false;
+            
+            var feature = AvaloniaLocator.Current.GetService<IWindowingPlatformGlFeature>();
+            if (feature == null)
+                return false;
+            try
+            {
+                _context = feature.CreateContext();
+
+            }
+            catch (Exception e)
+            {
+                Logger.TryGet(LogEventLevel.Error)?.Log("OpenGL", "OpenGlControlBase",
+                    "Unable to initialize OpenGL: unable to create additional OpenGL context: {exception}", e);
+                _glFailed = true;
+                return false;
+            }
+
+            GlVersion = _context.Version;
+            try
+            {
+                _bitmap = new OpenGlTextureBitmap();
+            }
+            catch (Exception e)
+            {
+                _context.Dispose();
+                _context = null;
+                Logger.TryGet(LogEventLevel.Error)?.Log("OpenGL", "OpenGlControlBase",
+                    "Unable to initialize OpenGL: unable to create OpenGlTextureBitmap: {exception}", e);
+                _glFailed = true;
+                return false;
+            }
+
+            using (_context.MakeCurrent())
+            {
+                try
+                {
+                    _oldSize = GetPixelSize();
+                    var gl = _context.GlInterface;
+                    var oneArr = new int[1];
+                    gl.GenFramebuffers(1, oneArr);
+                    _fb = oneArr[0];
+                    gl.BindFramebuffer(GL_FRAMEBUFFER, _fb);
+
+                    gl.GenTextures(1, oneArr);
+                    _texture = oneArr[0];
+                    
+                    ResizeTexture(gl);
+
+                    gl.FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _texture, 0);
+
+                    var status = gl.CheckFramebufferStatus(GL_FRAMEBUFFER);
+                    if (status != GL_FRAMEBUFFER_COMPLETE)
+                    {
+                        int code;
+                        while ((code = gl.GetError()) != 0)
+                            Logger.TryGet(LogEventLevel.Error)?.Log("OpenGL", "OpenGlControlBase",
+                                "Unable to initialize OpenGL FBO: {code}", code);
+
+                        _glFailed = true;
+                        return false;
+                    }
+                }
+                catch(Exception e)
+                {
+                    Logger.TryGet(LogEventLevel.Error)?.Log("OpenGL", "OpenGlControlBase",
+                        "Unable to initialize OpenGL FBO: {exception}", e);
+                    _glFailed = true;
+                }
+
+                if (!_glFailed)
+                    OnOpenGlInit(_context.GlInterface, _fb);
+            }
+
+            if (_glFailed)
+            {
+                DoCleanup(false);
+            }
+
+            return true;
+        }
+
+        void ResizeTexture(GlInterface gl)
+        {
+            var size = GetPixelSize();
+
+            gl.GetIntegerv( GL_TEXTURE_BINDING_2D, out var oldTexture);
+            gl.BindTexture(GL_TEXTURE_2D, _texture);
+            gl.TexImage2D(GL_TEXTURE_2D, 0, 
+                GlVersion.Type == GlProfileType.OpenGLES ? GL_RGBA : GL_RGBA8,
+                size.Width, size.Height, 0, GL_RGBA, GL_UNSIGNED_BYTE, IntPtr.Zero);
+            gl.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+            gl.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+            gl.BindTexture(GL_TEXTURE_2D, oldTexture);
+
+            gl.GetIntegerv(GL_RENDERBUFFER_BINDING, out var oldRenderBuffer);
+            gl.DeleteRenderbuffers(1, new[] { _renderBuffer });
+            var oneArr = new int[1];
+            gl.GenRenderbuffers(1, oneArr);
+            _renderBuffer = oneArr[0];
+            gl.BindRenderbuffer(GL_RENDERBUFFER, _renderBuffer);
+            gl.RenderbufferStorage(GL_RENDERBUFFER,
+                GlVersion.Type == GlProfileType.OpenGLES ? GL_DEPTH_COMPONENT16 : GL_DEPTH_COMPONENT,
+                size.Width, size.Height);
+            gl.FramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, _renderBuffer);
+            gl.BindRenderbuffer(GL_RENDERBUFFER, oldRenderBuffer);
+            using (_bitmap.Lock())
+                _bitmap.SetTexture(_texture, GL_RGBA8, size, 1);
+        }
+        
+        PixelSize GetPixelSize()
+        {
+            var scaling = VisualRoot.RenderScaling;
+            return new PixelSize(Math.Max(1, (int)(Bounds.Width * scaling)),
+                Math.Max(1, (int)(Bounds.Height * scaling)));
+        }
+
+
+        protected virtual void OnOpenGlInit(GlInterface gl, int fb)
+        {
+            
+        }
+
+        protected virtual void OnOpenGlDeinit(GlInterface gl, int fb)
+        {
+            
+        }
+        
+        protected abstract void OnOpenGlRender(GlInterface gl, int fb);
+    }
+}

+ 3 - 42
src/Avalonia.Visuals/Rendering/ManagedDeferredRendererLock.cs

@@ -1,50 +1,11 @@
 using System;
 using System.Threading;
+using Avalonia.Utilities;
 
 namespace Avalonia.Rendering
 {
-    public class ManagedDeferredRendererLock : IDeferredRendererLock
+    public class ManagedDeferredRendererLock : DisposableLock, IDeferredRendererLock
     {
-        private readonly object _lock = new object();
-
-        /// <summary>
-        /// Tries to lock the target surface or window
-        /// </summary>
-        /// <returns>IDisposable if succeeded to obtain the lock</returns>
-        public IDisposable TryLock()
-        {
-            if (Monitor.TryEnter(_lock))
-                return new UnlockDisposable(_lock);
-            return null;
-        }
-
-        /// <summary>
-        /// Enters a waiting lock, only use from platform code, not from the renderer
-        /// </summary>
-        public IDisposable Lock()
-        {
-            Monitor.Enter(_lock);
-            return new UnlockDisposable(_lock);
-        }
-
-        private sealed class UnlockDisposable : IDisposable
-        {
-            private object _lock;
-
-            public UnlockDisposable(object @lock)
-            {
-                _lock = @lock;
-            }
-
-            public void Dispose()
-            {
-                object @lock = Interlocked.Exchange(ref _lock, null);
-
-                if (@lock != null)
-                {
-                    Monitor.Exit(@lock);
-                }
-            }
-        }
+       
     }
 }

+ 36 - 5
src/Avalonia.X11/Glx/Glx.cs

@@ -15,11 +15,30 @@ namespace Avalonia.X11.Glx
         public GlxMakeContextCurrent MakeContextCurrent { get; }
         public delegate bool GlxMakeContextCurrent(IntPtr display, IntPtr draw, IntPtr read, IntPtr context);
 
+        [GlEntryPoint("glXGetCurrentContext")]
+        public GlxGetCurrentContext GetCurrentContext { get; }
+        public delegate IntPtr GlxGetCurrentContext();
+
+        [GlEntryPoint("glXGetCurrentDisplay")]
+        public GlxGetCurrentDisplay GetCurrentDisplay { get; }
+        public delegate IntPtr GlxGetCurrentDisplay();
+        
+        [GlEntryPoint("glXGetCurrentDrawable")]
+        public GlxGetCurrentDrawable GetCurrentDrawable { get; }
+        public delegate IntPtr GlxGetCurrentDrawable();
+        
+        [GlEntryPoint("glXGetCurrentReadDrawable")]
+        public GlxGetCurrentReadDrawable GetCurrentReadDrawable { get; }
+        public delegate IntPtr GlxGetCurrentReadDrawable();
+        
         [GlEntryPoint("glXCreatePbuffer")]
         public GlxCreatePbuffer CreatePbuffer { get; }
-
         public delegate IntPtr GlxCreatePbuffer(IntPtr dpy, IntPtr fbc, int[] attrib_list);
         
+        [GlEntryPoint("glXDestroyPbuffer")]
+        public GlxDestroyPbuffer DestroyPbuffer { get; }
+        public delegate IntPtr GlxDestroyPbuffer(IntPtr dpy, IntPtr fb);
+        
         [GlEntryPointAttribute("glXChooseVisual")]
         public GlxChooseVisual ChooseVisual { get; }
         public delegate  XVisualInfo* GlxChooseVisual(IntPtr dpy, int screen, int[] attribList);
@@ -78,12 +97,16 @@ namespace Avalonia.X11.Glx
         
         [GlEntryPointAttribute("glXWaitGL")]
         public GlxWaitGL WaitGL { get; }
-        public delegate  void GlxWaitGL();
+        public delegate void GlxWaitGL();
         
         public delegate int GlGetError();
         [GlEntryPoint("glGetError")]
         public GlGetError GetError { get; }
 
+        public delegate IntPtr GlxQueryExtensionsString(IntPtr display, int screen);
+        [GlEntryPoint("glXQueryExtensionsString")]
+        public GlxQueryExtensionsString QueryExtensionsString { get; }
+
         public GlxInterface() : base(SafeGetProcAddress)
         {
         }
@@ -92,16 +115,24 @@ namespace Avalonia.X11.Glx
         // On some Linux systems, glXGetProcAddress will return valid pointers for even EGL functions.
         // This makes Skia try to load some data from EGL,
         // which can then cause segmentation faults because they return garbage.
-        public static IntPtr SafeGetProcAddress(string proc, bool optional)
+        public static IntPtr SafeGetProcAddress(string proc)
         {
             if (proc.StartsWith("egl", StringComparison.InvariantCulture))
             {
                 return IntPtr.Zero;
             }
 
-            return GlxConverted(proc, optional);
+            return GlxConverted(proc);
         }
 
-        private static readonly Func<string, bool, IntPtr> GlxConverted = ConvertNative(GlxGetProcAddress);
+        private static readonly Func<string, IntPtr> GlxConverted = ConvertNative(GlxGetProcAddress);
+
+        public string[] GetExtensions(IntPtr display)
+        {
+            var s = Marshal.PtrToStringAnsi(QueryExtensionsString(display, 0));
+            return s.Split(new[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries)
+                .Select(x => x.Trim()).ToArray();
+
+        }
     }
 }

+ 2 - 0
src/Avalonia.X11/Glx/GlxConsts.cs

@@ -100,6 +100,8 @@ namespace Avalonia.X11.Glx
         public const int GLX_CONTEXT_FLAGS_ARB = 0x2094;
         public const int GLX_CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001;
         public const int GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002;
+        public const int GLX_CONTEXT_ES2_PROFILE_BIT_EXT = 0x00000004;
+        
         public const int GLX_CONTEXT_PROFILE_MASK_ARB = 0x9126;
 
     }

+ 52 - 4
src/Avalonia.X11/Glx/GlxContext.cs

@@ -10,32 +10,80 @@ namespace Avalonia.X11.Glx
         public GlxInterface Glx { get; }
         private readonly X11Info _x11;
         private readonly IntPtr _defaultXid;
+        private readonly bool _ownsPBuffer;
         private readonly object _lock = new object();
 
-        public GlxContext(GlxInterface glx, IntPtr handle, GlxDisplay display, X11Info x11, IntPtr defaultXid)
+        public GlxContext(GlxInterface glx, IntPtr handle, GlxDisplay display, 
+            GlVersion version, int sampleCount, int stencilSize,
+            X11Info x11, IntPtr defaultXid,
+            bool ownsPBuffer)
         {
             Handle = handle;
             Glx = glx;
             _x11 = x11;
             _defaultXid = defaultXid;
+            _ownsPBuffer = ownsPBuffer;
             Display = display;
+            Version = version;
+            SampleCount = sampleCount;
+            StencilSize = stencilSize;
+            using (MakeCurrent())
+                GlInterface = new GlInterface(version, GlxInterface.SafeGetProcAddress);
         }
         
         public GlxDisplay Display { get; }
-        IGlDisplay IGlContext.Display => Display;
+        public GlVersion Version { get; }
+        public GlInterface GlInterface { get; }
+        public int SampleCount { get; }
+        public int StencilSize { get; }
         
         public IDisposable Lock()
         {
             Monitor.Enter(_lock);
             return Disposable.Create(() => Monitor.Exit(_lock));
         }
+
+        class RestoreContext : IDisposable
+        {
+            private GlxInterface _glx;
+            private IntPtr _defaultDisplay;
+            private IntPtr _display;
+            private IntPtr _context;
+            private IntPtr _read;
+            private IntPtr _draw;
+
+            public RestoreContext(GlxInterface glx, IntPtr defaultDisplay)
+            {
+                _glx = glx;
+                _defaultDisplay = defaultDisplay;
+                _display = _glx.GetCurrentDisplay();
+                _context = _glx.GetCurrentContext();
+                _read = _glx.GetCurrentReadDrawable();
+                _draw = _glx.GetCurrentDrawable();
+            }
+
+            public void Dispose()
+            {
+                var disp = _display == IntPtr.Zero ? _defaultDisplay : _display;
+                _glx.MakeContextCurrent(disp, _draw, _read, _context);
+            }
+        }
         
-        public void MakeCurrent() => MakeCurrent(_defaultXid);
+        public IDisposable MakeCurrent() => MakeCurrent(_defaultXid);
 
-        public void MakeCurrent(IntPtr xid)
+        public IDisposable MakeCurrent(IntPtr xid)
         {
+            var old = new RestoreContext(Glx, _x11.Display);
             if (!Glx.MakeContextCurrent(_x11.Display, xid, xid, Handle))
                 throw new OpenGlException("glXMakeContextCurrent failed ");
+            return old;
+        }
+
+        public void Dispose()
+        {
+            Glx.DestroyContext(_x11.Display, Handle);
+            if (_ownsPBuffer)
+                Glx.DestroyPbuffer(_x11.Display, _defaultXid);
         }
     }
 }

+ 86 - 48
src/Avalonia.X11/Glx/GlxDisplay.cs

@@ -1,28 +1,28 @@
 using System;
+using System.Collections.Generic;
 using System.Linq;
 using Avalonia.OpenGL;
 using static Avalonia.X11.Glx.GlxConsts;
 
 namespace Avalonia.X11.Glx
 {
-    unsafe class GlxDisplay : IGlDisplay
+    unsafe class GlxDisplay
     {
         private readonly X11Info _x11;
+        private readonly List<GlVersion> _probeProfiles;
         private readonly IntPtr _fbconfig;
         private readonly XVisualInfo* _visual;
-        public GlDisplayType Type => GlDisplayType.OpenGL2;
-        public GlInterface GlInterface { get; }
+        private string[] _displayExtensions;
+        private GlVersion? _version;
         
         public XVisualInfo* VisualInfo => _visual;
-        public int SampleCount { get; }
-        public int StencilSize { get; }
-        
-        public GlxContext ImmediateContext { get; }
         public GlxContext DeferredContext { get; }
         public GlxInterface Glx { get; } = new GlxInterface();
-        public GlxDisplay(X11Info x11) 
+        public GlxDisplay(X11Info x11, List<GlVersion> probeProfiles) 
         {
             _x11 = x11;
+            _probeProfiles = probeProfiles.ToList();
+            _displayExtensions = Glx.GetExtensions(_x11.Display);
 
             var baseAttribs = new[]
             {
@@ -38,7 +38,8 @@ namespace Avalonia.X11.Glx
                 GLX_STENCIL_SIZE, 8,
 
             };
-
+            int sampleCount = 0;
+            int stencilSize = 0;
             foreach (var attribs in new[]
             {
                 //baseAttribs.Concat(multiattribs),
@@ -71,9 +72,9 @@ namespace Avalonia.X11.Glx
             if (_visual == null)
                 throw new OpenGlException("Unable to get visual info from FBConfig");
             if (Glx.GetFBConfigAttrib(_x11.Display, _fbconfig, GLX_SAMPLES, out var samples) == 0)
-                SampleCount = samples;
+                sampleCount = samples;
             if (Glx.GetFBConfigAttrib(_x11.Display, _fbconfig, GLX_STENCIL_SIZE, out var stencil) == 0)
-                StencilSize = stencil;
+                stencilSize = stencil;
 
             var pbuffers = Enumerable.Range(0, 2).Select(_ => Glx.CreatePbuffer(_x11.Display, _fbconfig, new[]
             {
@@ -81,67 +82,104 @@ namespace Avalonia.X11.Glx
             })).ToList();
             
             XLib.XFlush(_x11.Display);
-            
-            ImmediateContext = CreateContext(pbuffers[0],null);
-            DeferredContext = CreateContext(pbuffers[1], ImmediateContext);
-            ImmediateContext.MakeCurrent();
-            var err = Glx.GetError();
-            
-            GlInterface = new GlInterface(GlxInterface.SafeGetProcAddress);
-            if (GlInterface.Version == null)
-                throw new OpenGlException("GL version string is null, aborting");
-            if (GlInterface.Renderer == null)
-                throw new OpenGlException("GL renderer string is null, aborting");
 
-            if (Environment.GetEnvironmentVariable("AVALONIA_GLX_IGNORE_RENDERER_BLACKLIST") != "1")
+            DeferredContext = CreateContext(CreatePBuffer(), null,
+                sampleCount, stencilSize, true);
+            using (DeferredContext.MakeCurrent())
             {
-                var blacklist = AvaloniaLocator.Current.GetService<X11PlatformOptions>()
-                    ?.GlxRendererBlacklist;
-                if (blacklist != null)
-                    foreach(var item in blacklist)
-                        if (GlInterface.Renderer.Contains(item))
-                            throw new OpenGlException($"Renderer '{GlInterface.Renderer}' is blacklisted by '{item}'");
+                var glInterface = DeferredContext.GlInterface;
+                if (glInterface.Version == null)
+                    throw new OpenGlException("GL version string is null, aborting");
+                if (glInterface.Renderer == null)
+                    throw new OpenGlException("GL renderer string is null, aborting");
+
+                if (Environment.GetEnvironmentVariable("AVALONIA_GLX_IGNORE_RENDERER_BLACKLIST") != "1")
+                {
+                    var blacklist = AvaloniaLocator.Current.GetService<X11PlatformOptions>()
+                        ?.GlxRendererBlacklist;
+                    if (blacklist != null)
+                        foreach (var item in blacklist)
+                            if (glInterface.Renderer.Contains(item))
+                                throw new OpenGlException(
+                                    $"Renderer '{glInterface.Renderer}' is blacklisted by '{item}'");
+                }
             }
-            
+
+        }
+
+        IntPtr CreatePBuffer()
+        {
+            return Glx.CreatePbuffer(_x11.Display, _fbconfig, new[] { GLX_PBUFFER_WIDTH, 1, GLX_PBUFFER_HEIGHT, 1, 0 });
         }
 
-        public void ClearContext() => Glx.MakeContextCurrent(_x11.Display,
-            IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
 
-        public GlxContext CreateContext(IGlContext share) => CreateContext(IntPtr.Zero, share);
-        public GlxContext CreateContext(IntPtr defaultXid, IGlContext share)
+        public GlxContext CreateContext() => CreateContext(DeferredContext);
+
+        GlxContext CreateContext(IGlContext share) => CreateContext(CreatePBuffer(), share,
+            share.SampleCount, share.StencilSize, true);
+        
+        GlxContext CreateContext(IntPtr defaultXid, IGlContext share,
+            int sampleCount, int stencilSize, bool ownsPBuffer)
         {
             var sharelist = ((GlxContext)share)?.Handle ?? IntPtr.Zero;
             IntPtr handle = default;
-            foreach (var ver in new[]
-            {
-                new Version(4, 0), new Version(3, 2),
-                new Version(3, 0), new Version(2, 0)
-            })
+            
+            GlxContext Create(GlVersion profile)
             {
+                var profileMask = GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
+                if (profile.Type == GlProfileType.OpenGLES) 
+                    profileMask = GLX_CONTEXT_ES2_PROFILE_BIT_EXT;
 
-                var attrs = new[]
+                var attrs = new int[]
                 {
-                    GLX_CONTEXT_MAJOR_VERSION_ARB, ver.Major,
-                    GLX_CONTEXT_MINOR_VERSION_ARB, ver.Minor,
-                    GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
+                    GLX_CONTEXT_MAJOR_VERSION_ARB, profile.Major,
+                    GLX_CONTEXT_MINOR_VERSION_ARB, profile.Minor,
+                    GLX_CONTEXT_PROFILE_MASK_ARB, profileMask,
                     0
                 };
+                
                 try
                 {
                     handle = Glx.CreateContextAttribsARB(_x11.Display, _fbconfig, sharelist, true, attrs);
                     if (handle != IntPtr.Zero)
-                        break;
+                    {
+                        _version = profile;
+                        return new GlxContext(new GlxInterface(), handle, this, profile,
+                            sampleCount, stencilSize, _x11, defaultXid, ownsPBuffer);
+                        
+                    }
                 }
                 catch
                 {
-                    break;
+                    return null;
                 }
+
+                return null;
+            }
+
+            GlxContext rv = null;
+            if (_version.HasValue)
+            {
+                rv = Create(_version.Value);
             }
             
-            if (handle == IntPtr.Zero)
-                throw new OpenGlException("Unable to create direct GLX context");
-            return new GlxContext(new GlxInterface(), handle, this, _x11, defaultXid);
+            foreach (var v in _probeProfiles)
+            {
+                if (v.Type == GlProfileType.OpenGLES
+                    && !_displayExtensions.Contains("GLX_EXT_create_context_es2_profile"))
+                    continue;
+                rv = Create(v);
+                if (rv != null)
+                {
+                    _version = v;
+                    break;
+                }
+            }
+
+            if (rv != null)
+                return rv;
+
+            throw new OpenGlException("Unable to create direct GLX context");
         }
 
         public void SwapBuffers(IntPtr xid) => Glx.SwapBuffers(_x11.Display, xid);

+ 8 - 6
src/Avalonia.X11/Glx/GlxGlPlatformSurface.cs

@@ -43,8 +43,8 @@ namespace Avalonia.X11.Glx
                 var l = _context.Lock();
                 try
                 {
-                    _context.MakeCurrent(_info.Handle);
-                    return new Session(_context, _info, l);
+
+                    return new Session(_context, _info, l, _context.MakeCurrent(_info.Handle));
                 }
                 catch
                 {
@@ -58,26 +58,28 @@ namespace Avalonia.X11.Glx
                 private readonly GlxContext _context;
                 private readonly EglGlPlatformSurface.IEglWindowGlPlatformSurfaceInfo _info;
                 private IDisposable _lock;
+                private readonly IDisposable _clearContext;
+                public IGlContext Context => _context;
 
                 public Session(GlxContext context, EglGlPlatformSurface.IEglWindowGlPlatformSurfaceInfo info,
-                    IDisposable @lock)
+                    IDisposable @lock, IDisposable clearContext)
                 {
                     _context = context;
                     _info = info;
                     _lock = @lock;
+                    _clearContext = clearContext;
                 }
 
                 public void Dispose()
                 {
-                    _context.Display.GlInterface.Flush();
+                    _context.GlInterface.Flush();
                     _context.Glx.WaitGL();
                     _context.Display.SwapBuffers(_info.Handle);
                     _context.Glx.WaitX();
-                    _context.Display.ClearContext();
+                    _clearContext.Dispose();
                     _lock.Dispose();
                 }
 
-                public IGlDisplay Display => _context.Display;
                 public PixelSize Size => _info.Size;
                 public double Scaling => _info.Scaling;
                 public bool IsYFlipped { get; }

+ 7 - 6
src/Avalonia.X11/Glx/GlxPlatformFeature.cs

@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using Avalonia.Logging;
 using Avalonia.OpenGL;
 
@@ -7,12 +8,13 @@ namespace Avalonia.X11.Glx
     class GlxGlPlatformFeature : IWindowingPlatformGlFeature
     {
         public GlxDisplay Display { get; private set; }
-        public IGlContext ImmediateContext { get; private set; }
+        public IGlContext CreateContext() => Display.CreateContext();
         public GlxContext DeferredContext { get; private set; }
+        public IGlContext MainContext => DeferredContext;
 
-        public static bool TryInitialize(X11Info x11)
+        public static bool TryInitialize(X11Info x11, List<GlVersion> glProfiles)
         {
-            var feature = TryCreate(x11);
+            var feature = TryCreate(x11, glProfiles);
             if (feature != null)
             {
                 AvaloniaLocator.CurrentMutable.Bind<IWindowingPlatformGlFeature>().ToConstant(feature);
@@ -22,15 +24,14 @@ namespace Avalonia.X11.Glx
             return false;
         }
         
-        public static GlxGlPlatformFeature TryCreate(X11Info x11)
+        public static GlxGlPlatformFeature TryCreate(X11Info x11, List<GlVersion> glProfiles)
         {
             try
             {
-                var disp = new GlxDisplay(x11);
+                var disp = new GlxDisplay(x11, glProfiles);
                 return new GlxGlPlatformFeature
                 {
                     Display = disp,
-                    ImmediateContext = disp.ImmediateContext,
                     DeferredContext = disp.DeferredContext
                 };
             }

+ 11 - 1
src/Avalonia.X11/X11Platform.cs

@@ -67,7 +67,7 @@ namespace Avalonia.X11
                 if (options.UseEGL)
                     EglGlPlatformFeature.TryInitialize();
                 else
-                    GlxGlPlatformFeature.TryInitialize(Info);
+                    GlxGlPlatformFeature.TryInitialize(Info, Options.GlProfiles);
             }
 
             
@@ -98,6 +98,16 @@ namespace Avalonia
         public bool UseDBusMenu { get; set; }
         public bool UseDeferredRendering { get; set; } = true;
 
+        public List<GlVersion> GlProfiles { get; set; } = new List<GlVersion>
+        {
+            new GlVersion(GlProfileType.OpenGL, 4, 0),
+            new GlVersion(GlProfileType.OpenGL, 3, 2),
+            new GlVersion(GlProfileType.OpenGL, 3, 0),
+            new GlVersion(GlProfileType.OpenGLES, 3, 2),
+            new GlVersion(GlProfileType.OpenGLES, 3, 0),
+            new GlVersion(GlProfileType.OpenGLES, 2, 0)
+        };
+
         public List<string> GlxRendererBlacklist { get; set; } = new List<string>
         {
             // llvmpipe is a software GL rasterizer. If it's returned by glGetString,

+ 1 - 1
src/Avalonia.X11/X11Window.cs

@@ -165,7 +165,7 @@ namespace Avalonia.X11
             
             if (egl != null)
                 surfaces.Insert(0,
-                    new EglGlPlatformSurface((EglDisplay)egl.Display, egl.DeferredContext,
+                    new EglGlPlatformSurface(egl.DeferredContext,
                         new SurfaceInfo(this, _x11.DeferredDisplay, _handle, _renderHandle)));
             if (glx != null)
                 surfaces.Insert(0, new GlxGlPlatformSurface(glx.Display, glx.DeferredContext,

+ 25 - 19
src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs

@@ -15,6 +15,8 @@ namespace Avalonia.LinuxFramebuffer.Output
         private readonly EglGlPlatformSurface _eglPlatformSurface;
         public PixelSize PixelSize => _mode.Resolution;
         public double Scaling { get; set; }
+        public IGlContext MainContext => _deferredContext;
+
         public DrmOutput(string path = null)
         {
             var card = new DrmCard(path);
@@ -48,7 +50,6 @@ namespace Avalonia.LinuxFramebuffer.Output
         private drmModeModeInfo _mode;
         private EglDisplay _eglDisplay;
         private EglSurface _eglSurface;
-        private EglContext _immediateContext;
         private EglContext _deferredContext;
         private IntPtr _currentBo;
         private IntPtr _gbmTargetSurface;
@@ -129,13 +130,15 @@ namespace Avalonia.LinuxFramebuffer.Output
                 return _eglDisplay.CreateContext(share, _eglDisplay.CreateWindowSurface(offSurf));
             }
             
-            _immediateContext = CreateContext(null);
-            _deferredContext = CreateContext(_immediateContext);
-            
-            _immediateContext.MakeCurrent(_eglSurface);
-            _eglDisplay.GlInterface.ClearColor(0, 0, 0, 0);
-            _eglDisplay.GlInterface.Clear(GlConsts.GL_COLOR_BUFFER_BIT | GlConsts.GL_STENCIL_BUFFER_BIT);
-            _eglSurface.SwapBuffers();
+            _deferredContext = CreateContext(null);
+
+            using (_deferredContext.MakeCurrent(_eglSurface))
+            {
+                _deferredContext.GlInterface.ClearColor(0, 0, 0, 0);
+                _deferredContext.GlInterface.Clear(GlConsts.GL_COLOR_BUFFER_BIT | GlConsts.GL_STENCIL_BUFFER_BIT);
+                _eglSurface.SwapBuffers();
+            }
+
             var bo = gbm_surface_lock_front_buffer(_gbmTargetSurface);
             var fbId = GetFbIdForBo(bo);
             var connectorId = connector.Id;
@@ -153,9 +156,10 @@ namespace Avalonia.LinuxFramebuffer.Output
             for(var c=0;c<2;c++)
                 using (CreateGlRenderTarget().BeginDraw())
                 {
-                    _eglDisplay.GlInterface.ClearColor(0, 0, 0, 0);
-                    _eglDisplay.GlInterface.Clear(GlConsts.GL_COLOR_BUFFER_BIT | GlConsts.GL_STENCIL_BUFFER_BIT);
+                    _deferredContext.GlInterface.ClearColor(0, 0, 0, 0);
+                    _deferredContext.GlInterface.Clear(GlConsts.GL_COLOR_BUFFER_BIT | GlConsts.GL_STENCIL_BUFFER_BIT);
                 }
+            
         }
 
         public IGlPlatformSurfaceRenderTarget CreateGlRenderTarget()
@@ -179,15 +183,17 @@ namespace Avalonia.LinuxFramebuffer.Output
             class RenderSession : IGlPlatformSurfaceRenderingSession
             {
                 private readonly DrmOutput _parent;
+                private readonly IDisposable _clearContext;
 
-                public RenderSession(DrmOutput parent)
+                public RenderSession(DrmOutput parent, IDisposable clearContext)
                 {
                     _parent = parent;
+                    _clearContext = clearContext;
                 }
 
                 public void Dispose()
                 {
-                    _parent._eglDisplay.GlInterface.Flush();
+                    _parent._deferredContext.GlInterface.Flush();
                     _parent._eglSurface.SwapBuffers();
                     
                     var nextBo = gbm_surface_lock_front_buffer(_parent._gbmTargetSurface);
@@ -225,11 +231,11 @@ namespace Avalonia.LinuxFramebuffer.Output
                         gbm_surface_release_buffer(_parent._gbmTargetSurface, _parent._currentBo);
                         _parent._currentBo = nextBo;
                     }
-                    _parent._eglDisplay.ClearContext();
+                    _clearContext.Dispose();
                 }
 
 
-                public IGlDisplay Display => _parent._eglDisplay;
+                public IGlContext Context => _parent._deferredContext;
 
                 public PixelSize Size => _parent._mode.Resolution;
 
@@ -240,14 +246,14 @@ namespace Avalonia.LinuxFramebuffer.Output
 
             public IGlPlatformSurfaceRenderingSession BeginDraw()
             {
-                _parent._deferredContext.MakeCurrent(_parent._eglSurface);
-                return new RenderSession(_parent);
+                return new RenderSession(_parent, _parent._deferredContext.MakeCurrent(_parent._eglSurface));
             }
-            
-            
         }
 
-        IGlContext IWindowingPlatformGlFeature.ImmediateContext => _immediateContext;
+        public IGlContext CreateContext()
+        {
+            throw new NotImplementedException();
+        }
     }
 
 

+ 2 - 2
src/Skia/Avalonia.Skia/DrawingContextImpl.cs

@@ -28,9 +28,9 @@ namespace Avalonia.Skia
         private double _currentOpacity = 1.0f;
         private readonly bool _canTextUseLcdRendering;
         private Matrix _currentTransform;
-        private GRContext _grContext;
         private bool _disposed;
-
+        private GRContext _grContext;
+        public GRContext GrContext => _grContext;
         private readonly SKPaint _strokePaint = new SKPaint();
         private readonly SKPaint _fillPaint = new SKPaint();
         private readonly SKPaint _boxShadowPaint = new SKPaint();

+ 8 - 7
src/Skia/Avalonia.Skia/ICustomSkiaGpu.cs → src/Skia/Avalonia.Skia/Gpu/ISkiaGpu.cs

@@ -1,4 +1,5 @@
 using System.Collections.Generic;
+using Avalonia.OpenGL.Imaging;
 using SkiaSharp;
 
 namespace Avalonia.Skia
@@ -6,18 +7,18 @@ namespace Avalonia.Skia
     /// <summary>
     /// Custom Skia gpu instance.
     /// </summary>
-    public interface ICustomSkiaGpu
+    public interface ISkiaGpu
     {
-        /// <summary>
-        /// Skia GrContext used.
-        /// </summary>
-        GRContext GrContext { get; }
-
         /// <summary>
         /// Attempts to create custom render target from given surfaces.
         /// </summary>
         /// <param name="surfaces">Surfaces.</param>
         /// <returns>Created render target or <see langword="null"/> if it fails.</returns>
-        ICustomSkiaRenderTarget TryCreateRenderTarget(IEnumerable<object> surfaces);
+        ISkiaGpuRenderTarget TryCreateRenderTarget(IEnumerable<object> surfaces);
+    }
+
+    public interface IOpenGlAwareSkiaGpu : ISkiaGpu
+    {
+        IOpenGlTextureBitmapImpl CreateOpenGlTextureBitmap();
     }
 }

+ 1 - 1
src/Skia/Avalonia.Skia/ICustomSkiaRenderSession.cs → src/Skia/Avalonia.Skia/Gpu/ISkiaGpuRenderSession.cs

@@ -6,7 +6,7 @@ namespace Avalonia.Skia
     /// <summary>
     /// Custom render session for Skia render target.
     /// </summary>
-    public interface ICustomSkiaRenderSession : IDisposable
+    public interface ISkiaGpuRenderSession : IDisposable
     {
         /// <summary>
         /// GrContext used by this session.

+ 5 - 2
src/Skia/Avalonia.Skia/ICustomSkiaRenderTarget.cs → src/Skia/Avalonia.Skia/Gpu/ISkiaGpuRenderTarget.cs

@@ -1,16 +1,19 @@
 using System;
+using SkiaSharp;
 
 namespace Avalonia.Skia
 {
     /// <summary>
     /// Custom Skia render target.
     /// </summary>
-    public interface ICustomSkiaRenderTarget : IDisposable
+    public interface ISkiaGpuRenderTarget : IDisposable
     {
         /// <summary>
         /// Start rendering to this render target.
         /// </summary>
         /// <returns></returns>
-        ICustomSkiaRenderSession BeginRendering();
+        ISkiaGpuRenderSession BeginRenderingSession();
+        
+        bool IsCorrupted { get; }
     }
 }

+ 42 - 31
src/Skia/Avalonia.Skia/GlRenderTarget.cs → src/Skia/Avalonia.Skia/Gpu/OpenGl/GlRenderTarget.cs

@@ -8,7 +8,7 @@ using static Avalonia.OpenGL.GlConsts;
 
 namespace Avalonia.Skia
 {
-    internal class GlRenderTarget : IRenderTargetWithCorruptionInfo
+    internal class GlRenderTarget : ISkiaGpuRenderTarget
     {
         private readonly GRContext _grContext;
         private IGlPlatformSurfaceRenderTarget _surface;
@@ -22,22 +22,52 @@ namespace Avalonia.Skia
         public void Dispose() => _surface.Dispose();
 
         public bool IsCorrupted => (_surface as IGlPlatformSurfaceRenderTargetWithCorruptionInfo)?.IsCorrupted == true;
-        
-        public IDrawingContextImpl CreateDrawingContext(IVisualBrushRenderer visualBrushRenderer)
+
+        class GlGpuSession : ISkiaGpuRenderSession
+        {
+            private readonly GRBackendRenderTarget _backendRenderTarget;
+            private readonly SKSurface _surface;
+            private readonly IGlPlatformSurfaceRenderingSession _glSession;
+
+            public GlGpuSession(GRContext grContext,
+                GRBackendRenderTarget backendRenderTarget,
+                SKSurface surface, 
+                IGlPlatformSurfaceRenderingSession glSession)
+            {
+                GrContext = grContext;
+                _backendRenderTarget = backendRenderTarget;
+                _surface = surface;
+                _glSession = glSession;
+            }
+            public void Dispose()
+            {
+                _surface.Canvas.Flush();
+                _surface.Dispose();
+                _backendRenderTarget.Dispose();
+                GrContext.Flush();
+                _glSession.Dispose();
+            }
+
+            public GRContext GrContext { get; }
+            public SKCanvas Canvas => _surface.Canvas;
+            public double ScaleFactor => _glSession.Scaling;
+        }
+
+        public ISkiaGpuRenderSession BeginRenderingSession()
         {
-            var session = _surface.BeginDraw();
+            var glSession = _surface.BeginDraw();
             bool success = false;
             try
             {
-                var disp = session.Display;
+                var disp = glSession.Context;
                 var gl = disp.GlInterface;
                 gl.GetIntegerv(GL_FRAMEBUFFER_BINDING, out var fb);
 
-                var size = session.Size;
-                var scaling = session.Scaling;
+                var size = glSession.Size;
+                var scaling = glSession.Scaling;
                 if (size.Width <= 0 || size.Height <= 0 || scaling < 0)
                 {
-                    session.Dispose();
+                    glSession.Dispose();
                     throw new InvalidOperationException(
                         $"Can't create drawing context for surface with {size} size and {scaling} scaling");
                 }
@@ -50,40 +80,21 @@ namespace Avalonia.Skia
                 {
                     _grContext.ResetContext();
 
-                    GRBackendRenderTarget renderTarget =
+                    var renderTarget =
                         new GRBackendRenderTarget(size.Width, size.Height, disp.SampleCount, disp.StencilSize,
                             new GRGlFramebufferInfo((uint)fb, GRPixelConfig.Rgba8888.ToGlSizedFormat()));
                     var surface = SKSurface.Create(_grContext, renderTarget,
-                        session.IsYFlipped ? GRSurfaceOrigin.TopLeft : GRSurfaceOrigin.BottomLeft,
+                        glSession.IsYFlipped ? GRSurfaceOrigin.TopLeft : GRSurfaceOrigin.BottomLeft,
                         GRPixelConfig.Rgba8888.ToColorType());
 
-                    var nfo = new DrawingContextImpl.CreateInfo
-                    {
-                        GrContext = _grContext,
-                        Canvas = surface.Canvas,
-                        Dpi = SkiaPlatform.DefaultDpi * scaling,
-                        VisualBrushRenderer = visualBrushRenderer,
-                        DisableTextLcdRendering = true
-                    };
-
-                    
-                    var ctx = new DrawingContextImpl(nfo, Disposable.Create(() =>
-                    {
-
-                        surface.Canvas.Flush();
-                        surface.Dispose();
-                        renderTarget.Dispose();
-                        _grContext.Flush();
-                        session.Dispose();
-                    }));
                     success = true;
-                    return ctx;
+                    return new GlGpuSession(_grContext, renderTarget, surface, glSession);
                 }
             }
             finally
             {
                 if(!success)
-                    session.Dispose();
+                    glSession.Dispose();
             }
         }
     }

+ 46 - 0
src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs

@@ -0,0 +1,46 @@
+using System.Collections.Generic;
+using Avalonia.OpenGL;
+using Avalonia.OpenGL.Imaging;
+using SkiaSharp;
+
+namespace Avalonia.Skia
+{
+    class GlSkiaGpu : IOpenGlAwareSkiaGpu
+    {
+        private GRContext _grContext;
+
+        public GlSkiaGpu(IWindowingPlatformGlFeature gl, long? maxResourceBytes)
+        {
+            var context = gl.MainContext;
+            using (context.MakeCurrent())
+            {
+                using (var iface = context.Version.Type == GlProfileType.OpenGL ?
+                    GRGlInterface.AssembleGlInterface((_, proc) => context.GlInterface.GetProcAddress(proc)) :
+                    GRGlInterface.AssembleGlesInterface((_, proc) => context.GlInterface.GetProcAddress(proc)))
+                {
+                    _grContext = GRContext.Create(GRBackend.OpenGL, iface);
+                    if (maxResourceBytes.HasValue)
+                    {
+                        _grContext.GetResourceCacheLimits(out var maxResources, out _);
+                        _grContext.SetResourceCacheLimits(maxResources, maxResourceBytes.Value);
+                    }
+                }
+            }
+        }
+        
+        public ISkiaGpuRenderTarget TryCreateRenderTarget(IEnumerable<object> surfaces)
+        {
+            foreach (var surface in surfaces)
+            {
+                if (surface is IGlPlatformSurface glSurface)
+                {
+                    return new GlRenderTarget(_grContext, glSurface);
+                }
+            }
+
+            return null;
+        }
+
+        public IOpenGlTextureBitmapImpl CreateOpenGlTextureBitmap() => new OpenGlTextureBitmapImpl();
+    }
+}

+ 81 - 0
src/Skia/Avalonia.Skia/Gpu/OpenGlTextureBitmapImpl.cs

@@ -0,0 +1,81 @@
+using System;
+using System.IO;
+using Avalonia.OpenGL;
+using Avalonia.OpenGL.Imaging;
+using Avalonia.Skia.Helpers;
+using Avalonia.Utilities;
+using SkiaSharp;
+
+namespace Avalonia.Skia
+{
+    class OpenGlTextureBitmapImpl : IOpenGlTextureBitmapImpl, IDrawableBitmapImpl
+    {
+        private DisposableLock _lock = new DisposableLock();
+        private int _textureId;
+        private int _internalFormat;
+
+        public void Dispose()
+        {
+            using (Lock())
+            {
+                _textureId = 0;
+                PixelSize = new PixelSize(1, 1);
+                Version++;
+            }
+        }
+
+        public Vector Dpi { get; private set; } = new Vector(96, 96);
+        public PixelSize PixelSize { get; private set; } = new PixelSize(1, 1);
+        public int Version { get; private set; } = 0;
+
+        public void Save(string fileName) => throw new System.NotSupportedException();
+        public void Save(Stream stream) => throw new System.NotSupportedException();
+
+        public void Draw(DrawingContextImpl context, SKRect sourceRect, SKRect destRect, SKPaint paint)
+        {
+            // For now silently ignore
+            if (context.GrContext == null)
+                return;
+
+            using (Lock())
+            {
+                if (_textureId == 0)
+                    return;
+                using (var backendTexture = new GRBackendTexture(PixelSize.Width, PixelSize.Height, false,
+                    new GRGlTextureInfo(
+                        GlConsts.GL_TEXTURE_2D, (uint)_textureId,
+                        (uint)_internalFormat)))
+                using (var surface = SKSurface.Create(context.GrContext, backendTexture, GRSurfaceOrigin.TopLeft,
+                    SKColorType.Rgba8888))
+                {
+                    // Again, silently ignore, if something went wrong it's not our fault
+                    if (surface == null)
+                        return;
+
+                    using (var snapshot = surface.Snapshot())
+                        context.Canvas.DrawImage(snapshot, sourceRect, destRect, paint);
+                }
+            }
+        }
+
+        public IDisposable Lock() => _lock.Lock();
+
+        public void SetBackBuffer(int textureId, int internalFormat, PixelSize pixelSize, double dpiScaling)
+        {
+            using (_lock.Lock())
+            {
+                _textureId = textureId;
+                _internalFormat = internalFormat;
+                PixelSize = pixelSize;
+                Dpi = new Vector(96 * dpiScaling, 96 * dpiScaling);
+                Version++;
+            }
+        }
+
+        public void SetDirty()
+        {
+            using (_lock.Lock())
+                Version++;
+        }
+    }
+}

+ 7 - 5
src/Skia/Avalonia.Skia/CustomRenderTarget.cs → src/Skia/Avalonia.Skia/Gpu/SkiaGpuRenderTarget.cs

@@ -4,13 +4,13 @@ using Avalonia.Rendering;
 namespace Avalonia.Skia
 {
     /// <summary>
-    /// Adapts <see cref="ICustomSkiaRenderTarget"/> to be used within Skia rendering pipeline.
+    /// Adapts <see cref="ISkiaGpuRenderTarget"/> to be used within our rendering pipeline.
     /// </summary>
-    internal class CustomRenderTarget : IRenderTarget
+    internal class SkiaGpuRenderTarget : IRenderTargetWithCorruptionInfo
     {
-        private readonly ICustomSkiaRenderTarget _renderTarget;
+        private readonly ISkiaGpuRenderTarget _renderTarget;
 
-        public CustomRenderTarget(ICustomSkiaRenderTarget renderTarget)
+        public SkiaGpuRenderTarget(ISkiaGpuRenderTarget renderTarget)
         {
             _renderTarget = renderTarget;
         }
@@ -22,7 +22,7 @@ namespace Avalonia.Skia
 
         public IDrawingContextImpl CreateDrawingContext(IVisualBrushRenderer visualBrushRenderer)
         {
-            ICustomSkiaRenderSession session = _renderTarget.BeginRendering();
+            var session = _renderTarget.BeginRenderingSession();
 
             var nfo = new DrawingContextImpl.CreateInfo
             {
@@ -35,5 +35,7 @@ namespace Avalonia.Skia
 
             return new DrawingContextImpl(nfo, session);
         }
+
+        public bool IsCorrupted => _renderTarget.IsCorrupted;
     }
 }

+ 25 - 43
src/Skia/Avalonia.Skia/PlatformRenderInterface.cs

@@ -1,9 +1,12 @@
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.IO;
+using System.Linq;
 using Avalonia.Controls.Platform.Surfaces;
 using Avalonia.Media;
 using Avalonia.OpenGL;
+using Avalonia.OpenGL.Imaging;
 using Avalonia.Platform;
 using SkiaSharp;
 
@@ -12,44 +15,21 @@ namespace Avalonia.Skia
     /// <summary>
     /// Skia platform render interface.
     /// </summary>
-    internal class PlatformRenderInterface : IPlatformRenderInterface
+    internal class PlatformRenderInterface : IPlatformRenderInterface, IOpenGlAwarePlatformRenderInterface
     {
-        private readonly ICustomSkiaGpu _customSkiaGpu;
+        private readonly ISkiaGpu _skiaGpu;
 
-        private GRContext GrContext { get; }
-
-        public PlatformRenderInterface(ICustomSkiaGpu customSkiaGpu, long maxResourceBytes = 100663296)
+        public PlatformRenderInterface(ISkiaGpu skiaGpu, long? maxResourceBytes = null)
         {
-            if (customSkiaGpu != null)
+            if (skiaGpu != null)
             {
-                _customSkiaGpu = customSkiaGpu;
-
-                GrContext = _customSkiaGpu.GrContext;
-
-                GrContext.GetResourceCacheLimits(out var maxResources, out _);
-
-                GrContext.SetResourceCacheLimits(maxResources, maxResourceBytes);
-
+                _skiaGpu = skiaGpu;
                 return;
             }
 
             var gl = AvaloniaLocator.Current.GetService<IWindowingPlatformGlFeature>();
-            if (gl != null)
-            {
-                var display = gl.ImmediateContext.Display;
-                gl.ImmediateContext.MakeCurrent();
-                using (var iface = display.Type == GlDisplayType.OpenGL2
-                    ? GRGlInterface.AssembleGlInterface((_, proc) => display.GlInterface.GetProcAddress(proc))
-                    : GRGlInterface.AssembleGlesInterface((_, proc) => display.GlInterface.GetProcAddress(proc)))
-                {
-                    GrContext = GRContext.Create(GRBackend.OpenGL, iface);
-
-                    GrContext.GetResourceCacheLimits(out var maxResources, out _);
-
-                    GrContext.SetResourceCacheLimits(maxResources, maxResourceBytes);
-                }
-                display.ClearContext();
-            }
+            if (gl != null) 
+                _skiaGpu = new GlSkiaGpu(gl, maxResourceBytes);
         }
 
         /// <inheritdoc />
@@ -125,26 +105,18 @@ namespace Avalonia.Skia
         /// <inheritdoc />
         public IRenderTarget CreateRenderTarget(IEnumerable<object> surfaces)
         {
-            if (_customSkiaGpu != null)
+            if (!(surfaces is IList))
+                surfaces = surfaces.ToList();
+            var gpuRenderTarget = _skiaGpu?.TryCreateRenderTarget(surfaces);
+            if (gpuRenderTarget != null)
             {
-                ICustomSkiaRenderTarget customRenderTarget = _customSkiaGpu.TryCreateRenderTarget(surfaces);
-
-                if (customRenderTarget != null)
-                {
-                    return new CustomRenderTarget(customRenderTarget);
-                }
+                return new SkiaGpuRenderTarget(gpuRenderTarget);
             }
 
             foreach (var surface in surfaces)
             {
-                if (surface is IGlPlatformSurface glSurface && GrContext != null)
-                {
-                    return new GlRenderTarget(GrContext, glSurface);
-                }
                 if (surface is IFramebufferPlatformSurface framebufferSurface)
-                {
                     return new FramebufferRenderTarget(framebufferSurface);
-                }
             }
 
             throw new NotSupportedException(
@@ -256,6 +228,16 @@ namespace Avalonia.Skia
 
         }
 
+        public IOpenGlTextureBitmapImpl CreateOpenGlTextureBitmap()
+        {
+            if (_skiaGpu is IOpenGlAwareSkiaGpu glAware)
+                return glAware.CreateOpenGlTextureBitmap();
+            if (_skiaGpu == null)
+                throw new PlatformNotSupportedException("GPU acceleration is not available");
+            throw new PlatformNotSupportedException(
+                "Current GPU acceleration backend does not support OpenGL integration");
+        }
+
         public bool SupportsIndividualRoundRects => true;
     }
 }

+ 2 - 6
src/Skia/Avalonia.Skia/SkiaOptions.cs

@@ -8,18 +8,14 @@ namespace Avalonia
     /// </summary>
     public class SkiaOptions
     {
-        public SkiaOptions()
-        {
-            MaxGpuResourceSizeBytes = 100663296; // Value taken from skia.
-        }
         /// <summary>
         /// Custom gpu factory to use. Can be used to customize behavior of Skia renderer.
         /// </summary>
-        public Func<ICustomSkiaGpu> CustomGpuFactory { get; set; }
+        public Func<ISkiaGpu> CustomGpuFactory { get; set; }
 
         /// <summary>
         /// The maximum number of bytes for video memory to store textures and resources.
         /// </summary>
-        public long MaxGpuResourceSizeBytes { get; set; }
+        public long? MaxGpuResourceSizeBytes { get; set; }
     }
 }

+ 1 - 4
src/Windows/Avalonia.Win32/WindowImpl.cs

@@ -97,10 +97,7 @@ namespace Avalonia.Win32
             _framebuffer = new FramebufferManager(_hwnd);
 
             if (Win32GlManager.EglFeature != null)
-            {
-                _gl = new EglGlPlatformSurface((EglDisplay)Win32GlManager.EglFeature.Display,
-                    Win32GlManager.EglFeature.DeferredContext, this);
-            }
+                _gl = new EglGlPlatformSurface(Win32GlManager.EglFeature.DeferredContext, this);
 
             Screen = new ScreenImpl();