diff --git a/Avalonia.sln b/Avalonia.sln index 4999719676..35b6b2108a 100644 --- a/Avalonia.sln +++ b/Avalonia.sln @@ -13,7 +13,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Direct2D1", "src\W EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Controls", "src\Avalonia.Controls\Avalonia.Controls.csproj", "{D2221C82-4A25-4583-9B43-D791E3F6820C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Themes.Default", "src\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj", "{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Themes.Simple", "src\Avalonia.Themes.Simple\Avalonia.Themes.Simple.csproj", "{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Diagnostics", "src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj", "{7062AE20-5DCC-4442-9645-8195BDECE63E}" EndProject diff --git a/azure-pipelines.yml b/azure-pipelines.yml index edf3c3d819..52fc8db53c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -59,7 +59,7 @@ jobs: variables: SolutionDir: '$(Build.SourcesDirectory)' pool: - vmImage: 'macOS-10.15' + vmImage: 'macos-12' steps: - task: UseDotNet@2 displayName: 'Use .NET Core SDK 3.1.418' @@ -91,10 +91,10 @@ jobs: inputs: actions: 'build' scheme: '' - sdk: 'macosx11.1' + sdk: 'macosx12.3' configuration: 'Release' xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace' - xcodeVersion: '12' # Options: 8, 9, default, specifyPath + xcodeVersion: '13' # Options: 8, 9, default, specifyPath args: '-derivedDataPath ./' - task: CmdLine@2 diff --git a/samples/BindingDemo/App.xaml b/samples/BindingDemo/App.xaml index 9260dd280f..175e838616 100644 --- a/samples/BindingDemo/App.xaml +++ b/samples/BindingDemo/App.xaml @@ -3,7 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="BindingDemo.App"> - - + + - \ No newline at end of file + diff --git a/samples/BindingDemo/BindingDemo.csproj b/samples/BindingDemo/BindingDemo.csproj index bd6054327f..056d3bf552 100644 --- a/samples/BindingDemo/BindingDemo.csproj +++ b/samples/BindingDemo/BindingDemo.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/ControlCatalog.Android/ControlCatalog.Android.csproj b/samples/ControlCatalog.Android/ControlCatalog.Android.csproj index 54acdd9114..a43ea4539a 100644 --- a/samples/ControlCatalog.Android/ControlCatalog.Android.csproj +++ b/samples/ControlCatalog.Android/ControlCatalog.Android.csproj @@ -9,7 +9,6 @@ 1.0 apk true - android-arm64;android-x64 diff --git a/samples/ControlCatalog/App.xaml b/samples/ControlCatalog/App.xaml index fab4622303..b228e72f72 100644 --- a/samples/ControlCatalog/App.xaml +++ b/samples/ControlCatalog/App.xaml @@ -5,6 +5,13 @@ x:CompileBindings="True" Name="Avalonia ControlCatalog" x:Class="ControlCatalog.App"> + + + + + + + - diff --git a/samples/ControlCatalog/App.xaml.cs b/samples/ControlCatalog/App.xaml.cs index 7ebb87094a..750c1082a6 100644 --- a/samples/ControlCatalog/App.xaml.cs +++ b/samples/ControlCatalog/App.xaml.cs @@ -5,7 +5,7 @@ using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Markup.Xaml; using Avalonia.Markup.Xaml.Styling; using Avalonia.Styling; -using Avalonia.Themes.Default; +using Avalonia.Themes.Simple; using Avalonia.Themes.Fluent; using ControlCatalog.ViewModels; @@ -23,9 +23,9 @@ namespace ControlCatalog Source = new Uri("avares://Avalonia.Controls.ColorPicker/Themes/Fluent/Fluent.xaml") }; - public static readonly StyleInclude ColorPickerDefault = new StyleInclude(new Uri("avares://ControlCatalog/Styles")) + public static readonly StyleInclude ColorPickerSimple = new StyleInclude(new Uri("avares://ControlCatalog/Styles")) { - Source = new Uri("avares://Avalonia.Controls.ColorPicker/Themes/Default/Default.xaml") + Source = new Uri("avares://Avalonia.Controls.ColorPicker/Themes/Simple/Simple.xaml") }; public static readonly StyleInclude DataGridFluent = new StyleInclude(new Uri("avares://ControlCatalog/Styles")) @@ -33,16 +33,16 @@ namespace ControlCatalog Source = new Uri("avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml") }; - public static readonly StyleInclude DataGridDefault = new StyleInclude(new Uri("avares://ControlCatalog/Styles")) + public static readonly StyleInclude DataGridSimple = new StyleInclude(new Uri("avares://ControlCatalog/Styles")) { - Source = new Uri("avares://Avalonia.Controls.DataGrid/Themes/Default.xaml") + Source = new Uri("avares://Avalonia.Controls.DataGrid/Themes/Simple.xaml") }; public static FluentTheme Fluent = new FluentTheme(new Uri("avares://ControlCatalog/Styles")); - public static SimpleTheme Default = new SimpleTheme(new Uri("avares://ControlCatalog/Styles")); + public static SimpleTheme Simple = new SimpleTheme(new Uri("avares://ControlCatalog/Styles")); - public static Styles DefaultLight = new Styles + public static Styles SimpleLight = new Styles { new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) { @@ -56,10 +56,10 @@ namespace ControlCatalog { Source = new Uri("avares://Avalonia.Themes.Fluent/Accents/BaseLight.xaml") }, - Default + Simple }; - public static Styles DefaultDark = new Styles + public static Styles SimpleDark = new Styles { new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) { @@ -73,7 +73,7 @@ namespace ControlCatalog { Source = new Uri("avares://Avalonia.Themes.Fluent/Accents/BaseDark.xaml") }, - Default + Simple }; public override void Initialize() diff --git a/samples/ControlCatalog/ControlCatalog.csproj b/samples/ControlCatalog/ControlCatalog.csproj index 8358fb3cd4..2654574a3e 100644 --- a/samples/ControlCatalog/ControlCatalog.csproj +++ b/samples/ControlCatalog/ControlCatalog.csproj @@ -29,7 +29,7 @@ - + diff --git a/samples/ControlCatalog/MainView.xaml b/samples/ControlCatalog/MainView.xaml index 7461e78c33..7f5a191519 100644 --- a/samples/ControlCatalog/MainView.xaml +++ b/samples/ControlCatalog/MainView.xaml @@ -187,8 +187,8 @@ FluentLight FluentDark - DefaultLight - DefaultDark + SimpleLight + SimpleDark + + + + - @@ -54,7 +54,8 @@ - diff --git a/samples/ControlCatalog/Pages/DialogsPage.xaml.cs b/samples/ControlCatalog/Pages/DialogsPage.xaml.cs index f7b6db1255..036dccde0e 100644 --- a/samples/ControlCatalog/Pages/DialogsPage.xaml.cs +++ b/samples/ControlCatalog/Pages/DialogsPage.xaml.cs @@ -195,10 +195,10 @@ namespace ControlCatalog.Pages { // Sync disposal of StreamWriter is not supported on WASM #if NET6_0_OR_GREATER - await using var stream = await file.OpenWrite(); + await using var stream = await file.OpenWriteAsync(); await using var reader = new System.IO.StreamWriter(stream); #else - using var stream = await file.OpenWrite(); + using var stream = await file.OpenWriteAsync(); using var reader = new System.IO.StreamWriter(stream); #endif await reader.WriteLineAsync(openedFileContent.Text); @@ -243,8 +243,8 @@ namespace ControlCatalog.Pages async Task SetPickerResult(IReadOnlyCollection? items) { items ??= Array.Empty(); - var mappedResults = items.Select(FullPathOrName).ToList(); - bookmarkContainer.Text = items.FirstOrDefault(f => f.CanBookmark) is { } f ? await f.SaveBookmark() : "Can't bookmark"; + bookmarkContainer.Text = items.FirstOrDefault(f => f.CanBookmark) is { } f ? await f.SaveBookmarkAsync() : "Can't bookmark"; + var mappedResults = new List(); if (items.FirstOrDefault() is IStorageItem item) { @@ -267,9 +267,9 @@ Content: if (file.CanOpenRead) { #if NET6_0_OR_GREATER - await using var stream = await file.OpenRead(); + await using var stream = await file.OpenReadAsync(); #else - using var stream = await file.OpenRead(); + using var stream = await file.OpenReadAsync(); #endif using var reader = new System.IO.StreamReader(stream); @@ -293,7 +293,19 @@ Content: lastSelectedDirectory = await item.GetParentAsync(); if (lastSelectedDirectory is not null) { - mappedResults.Insert(0, "Parent: " + FullPathOrName(lastSelectedDirectory)); + mappedResults.Add(FullPathOrName(lastSelectedDirectory)); + } + + foreach (var selectedItem in items) + { + mappedResults.Add("+> " + FullPathOrName(selectedItem)); + if (selectedItem is IStorageFolder folder) + { + foreach (var innerItems in await folder.GetItemsAsync()) + { + mappedResults.Add("++> " + FullPathOrName(innerItems)); + } + } } } diff --git a/samples/ControlCatalog/Pages/ExpanderPage.xaml b/samples/ControlCatalog/Pages/ExpanderPage.xaml index cef473af04..f9ae1c7a3c 100644 --- a/samples/ControlCatalog/Pages/ExpanderPage.xaml +++ b/samples/ControlCatalog/Pages/ExpanderPage.xaml @@ -8,26 +8,31 @@ Margin="0,16,0,0" HorizontalAlignment="Center" Spacing="16"> - + Expanded content - + Expanded content - + Expanded content - + Expanded content - + Rounded + diff --git a/samples/ControlCatalog/Pages/ExpanderPage.xaml.cs b/samples/ControlCatalog/Pages/ExpanderPage.xaml.cs index 52166d1a5f..e8a080899a 100644 --- a/samples/ControlCatalog/Pages/ExpanderPage.xaml.cs +++ b/samples/ControlCatalog/Pages/ExpanderPage.xaml.cs @@ -1,5 +1,6 @@ using Avalonia.Controls; using Avalonia.Markup.Xaml; +using ControlCatalog.ViewModels; namespace ControlCatalog.Pages { @@ -8,6 +9,7 @@ namespace ControlCatalog.Pages public ExpanderPage() { this.InitializeComponent(); + DataContext = new ExpanderPageViewModel(); } private void InitializeComponent() diff --git a/samples/ControlCatalog/Pages/OpenGlPage.xaml.cs b/samples/ControlCatalog/Pages/OpenGlPage.xaml.cs index cb79bf219a..f37e0f8701 100644 --- a/samples/ControlCatalog/Pages/OpenGlPage.xaml.cs +++ b/samples/ControlCatalog/Pages/OpenGlPage.xaml.cs @@ -90,7 +90,6 @@ namespace ControlCatalog.Pages private int _vertexBufferObject; private int _indexBufferObject; private int _vertexArrayObject; - private GlExtrasInterface _glExt; private string GetShader(bool fragment, string shader) { @@ -258,7 +257,6 @@ namespace ControlCatalog.Pages 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)}"; @@ -298,8 +296,8 @@ namespace ControlCatalog.Pages 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); + _vertexArrayObject = GL.GenVertexArray(); + GL.BindVertexArray(_vertexArrayObject); CheckError(GL); GL.VertexAttribPointer(positionLocation, 3, GL_FLOAT, 0, vertexSize, IntPtr.Zero); @@ -316,12 +314,13 @@ namespace ControlCatalog.Pages // Unbind everything GL.BindBuffer(GL_ARRAY_BUFFER, 0); GL.BindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - _glExt.BindVertexArray(0); + GL.BindVertexArray(0); GL.UseProgram(0); // Delete all resources. - GL.DeleteBuffers(2, new[] { _vertexBufferObject, _indexBufferObject }); - _glExt.DeleteVertexArrays(1, new[] { _vertexArrayObject }); + GL.DeleteBuffer(_vertexBufferObject); + GL.DeleteBuffer(_indexBufferObject); + GL.DeleteVertexArray(_vertexArrayObject); GL.DeleteProgram(_shaderProgram); GL.DeleteShader(_fragmentShader); GL.DeleteShader(_vertexShader); @@ -338,7 +337,7 @@ namespace ControlCatalog.Pages GL.BindBuffer(GL_ARRAY_BUFFER, _vertexBufferObject); GL.BindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBufferObject); - _glExt.BindVertexArray(_vertexArrayObject); + GL.BindVertexArray(_vertexArrayObject); GL.UseProgram(_shaderProgram); CheckError(GL); var projection = @@ -369,34 +368,5 @@ namespace ControlCatalog.Pages if (_disco > 0.01) Dispatcher.UIThread.Post(InvalidateVisual, DispatcherPriority.Background); } - - class GlExtrasInterface : GlInterfaceBase - { - 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]; - } - } } } diff --git a/samples/ControlCatalog/Pages/TextBlockPage.xaml b/samples/ControlCatalog/Pages/TextBlockPage.xaml index cb49ba96c6..32914428ed 100644 --- a/samples/ControlCatalog/Pages/TextBlockPage.xaml +++ b/samples/ControlCatalog/Pages/TextBlockPage.xaml @@ -118,7 +118,7 @@ - + This is a TextBlock with several diff --git a/samples/ControlCatalog/ViewModels/ExpanderPageViewModel.cs b/samples/ControlCatalog/ViewModels/ExpanderPageViewModel.cs new file mode 100644 index 0000000000..aa7f710ee0 --- /dev/null +++ b/samples/ControlCatalog/ViewModels/ExpanderPageViewModel.cs @@ -0,0 +1,27 @@ +using Avalonia; +using MiniMvvm; + +namespace ControlCatalog.ViewModels +{ + public class ExpanderPageViewModel : ViewModelBase + { + private object _cornerRadius = AvaloniaProperty.UnsetValue; + private bool _rounded; + + public object CornerRadius + { + get => _cornerRadius; + private set => RaiseAndSetIfChanged(ref _cornerRadius, value); + } + + public bool Rounded + { + get => _rounded; + set + { + if (RaiseAndSetIfChanged(ref _rounded, value)) + CornerRadius = _rounded ? new CornerRadius(25) : AvaloniaProperty.UnsetValue; + } + } + } +} diff --git a/samples/PlatformSanityChecks/App.xaml b/samples/PlatformSanityChecks/App.xaml index 25bab6ae35..1b9d64fca6 100644 --- a/samples/PlatformSanityChecks/App.xaml +++ b/samples/PlatformSanityChecks/App.xaml @@ -1,6 +1,5 @@ - - + diff --git a/samples/PlatformSanityChecks/PlatformSanityChecks.csproj b/samples/PlatformSanityChecks/PlatformSanityChecks.csproj index 4f7f06b529..5c743aabdb 100644 --- a/samples/PlatformSanityChecks/PlatformSanityChecks.csproj +++ b/samples/PlatformSanityChecks/PlatformSanityChecks.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/Previewer/App.xaml b/samples/Previewer/App.xaml index 6bae1955af..1b9d64fca6 100644 --- a/samples/Previewer/App.xaml +++ b/samples/Previewer/App.xaml @@ -1,6 +1,5 @@ - - + - \ No newline at end of file + diff --git a/samples/Previewer/Previewer.csproj b/samples/Previewer/Previewer.csproj index 98560e9ab0..2cc84168dc 100644 --- a/samples/Previewer/Previewer.csproj +++ b/samples/Previewer/Previewer.csproj @@ -10,7 +10,7 @@ - + diff --git a/samples/RenderDemo/App.xaml b/samples/RenderDemo/App.xaml index 66d97a6444..8ea792de19 100644 --- a/samples/RenderDemo/App.xaml +++ b/samples/RenderDemo/App.xaml @@ -3,6 +3,12 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - + + + + + + + diff --git a/samples/RenderDemo/Pages/CustomSkiaPage.cs b/samples/RenderDemo/Pages/CustomSkiaPage.cs index 9c524a7932..bf27747154 100644 --- a/samples/RenderDemo/Pages/CustomSkiaPage.cs +++ b/samples/RenderDemo/Pages/CustomSkiaPage.cs @@ -40,14 +40,16 @@ namespace RenderDemo.Pages static Stopwatch St = Stopwatch.StartNew(); public void Render(IDrawingContextImpl context) { - var canvas = (context as ISkiaDrawingContextImpl)?.SkCanvas; - if (canvas == null) + var leaseFeature = context.GetFeature(); + if (leaseFeature == null) using (var c = new DrawingContext(context, false)) { c.DrawText(_noSkia, new Point()); } else { + using var lease = leaseFeature.Lease(); + var canvas = lease.SkCanvas; canvas.Save(); // create the first shader var colors = new SKColor[] { diff --git a/samples/SampleControls/HamburgerMenu/HamburgerMenu.xaml b/samples/SampleControls/HamburgerMenu/HamburgerMenu.xaml index 1d58c465a0..fbc51414e3 100644 --- a/samples/SampleControls/HamburgerMenu/HamburgerMenu.xaml +++ b/samples/SampleControls/HamburgerMenu/HamburgerMenu.xaml @@ -1,6 +1,6 @@ - + @@ -20,25 +20,136 @@ - - 40 - 220 - 36 - 36 - 32 - 12,0,0,0 - 52,0,0,0 - 212,0,0,0 - 1 1 1 1 #2000, 0 0 1 1 #2fff - 0 0 1 1 #2000 - + 40 + 220 + 36 + 36 + 32 + 12,0,0,0 + 52,0,0,0 + 212,0,0,0 + 1 1 1 1 #2000, 0 0 1 1 #2fff + 0 0 1 1 #2000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + - - - - - - - - - - + diff --git a/samples/VirtualizationDemo/App.xaml b/samples/VirtualizationDemo/App.xaml index 3ad1dce794..eb5f0e4dca 100644 --- a/samples/VirtualizationDemo/App.xaml +++ b/samples/VirtualizationDemo/App.xaml @@ -1,9 +1,7 @@ - - - - - - \ No newline at end of file + + + + + diff --git a/samples/VirtualizationDemo/VirtualizationDemo.csproj b/samples/VirtualizationDemo/VirtualizationDemo.csproj index bd6054327f..b27cfe77e8 100644 --- a/samples/VirtualizationDemo/VirtualizationDemo.csproj +++ b/samples/VirtualizationDemo/VirtualizationDemo.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/interop/Direct3DInteropSample/App.paml b/samples/interop/Direct3DInteropSample/App.paml index d9630eef58..e6d77dfaf4 100644 --- a/samples/interop/Direct3DInteropSample/App.paml +++ b/samples/interop/Direct3DInteropSample/App.paml @@ -1,6 +1,5 @@ - - + - \ No newline at end of file + diff --git a/samples/interop/Direct3DInteropSample/Direct3DInteropSample.csproj b/samples/interop/Direct3DInteropSample/Direct3DInteropSample.csproj index 81b94b4d09..f9ef4693d5 100644 --- a/samples/interop/Direct3DInteropSample/Direct3DInteropSample.csproj +++ b/samples/interop/Direct3DInteropSample/Direct3DInteropSample.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Android/Avalonia.Android/AndroidPlatform.cs b/src/Android/Avalonia.Android/AndroidPlatform.cs index 0c72c389dc..89444dea10 100644 --- a/src/Android/Avalonia.Android/AndroidPlatform.cs +++ b/src/Android/Avalonia.Android/AndroidPlatform.cs @@ -8,7 +8,8 @@ using Avalonia.Input.Platform; using Avalonia.OpenGL.Egl; using Avalonia.Platform; using Avalonia.Rendering; -using Avalonia.Skia; +using Avalonia.Rendering.Composition; +using Avalonia.OpenGL; namespace Avalonia { @@ -42,6 +43,8 @@ namespace Avalonia.Android public TimeSpan DoubleClickTime => TimeSpan.FromMilliseconds(500); + internal static Compositor Compositor { get; private set; } + public static void Initialize(AndroidPlatformOptions options) { Options = options; @@ -62,12 +65,20 @@ namespace Avalonia.Android { EglPlatformOpenGlInterface.TryInitialize(); } + + if (options.UseCompositor) + { + Compositor = new Compositor( + AvaloniaLocator.Current.GetRequiredService(), + AvaloniaLocator.Current.GetService()); + } } } public sealed class AndroidPlatformOptions { - public bool UseDeferredRendering { get; set; } = true; + public bool UseDeferredRendering { get; set; } = false; public bool UseGpu { get; set; } = true; + public bool UseCompositor { get; set; } = true; } } diff --git a/src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs b/src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs index fd97e293f9..3484ea2317 100644 --- a/src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs +++ b/src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs @@ -19,6 +19,7 @@ using Avalonia.OpenGL.Surfaces; using Avalonia.Platform; using Avalonia.Platform.Storage; using Avalonia.Rendering; +using Avalonia.Rendering.Composition; namespace Avalonia.Android.Platform.SkiaPlatform { @@ -84,9 +85,11 @@ namespace Avalonia.Android.Platform.SkiaPlatform public IEnumerable Surfaces => new object[] { _gl, _framebuffer, Handle }; public IRenderer CreateRenderer(IRenderRoot root) => - AndroidPlatform.Options.UseDeferredRendering - ? new DeferredRenderer(root, AvaloniaLocator.Current.GetService()) { RenderOnlyOnRenderThread = true } - : new ImmediateRenderer(root); + AndroidPlatform.Options.UseCompositor + ? new CompositingRenderer(root, AndroidPlatform.Compositor) { DrawFps = true } + : AndroidPlatform.Options.UseDeferredRendering + ? new DeferredRenderer(root, AvaloniaLocator.Current.GetRequiredService()) { RenderOnlyOnRenderThread = true } + : new ImmediateRenderer(root); public virtual void Hide() { diff --git a/src/Android/Avalonia.Android/Platform/Storage/AndroidStorageItem.cs b/src/Android/Avalonia.Android/Platform/Storage/AndroidStorageItem.cs index 50581d47b1..a9b2e16d43 100644 --- a/src/Android/Avalonia.Android/Platform/Storage/AndroidStorageItem.cs +++ b/src/Android/Avalonia.Android/Platform/Storage/AndroidStorageItem.cs @@ -1,6 +1,7 @@ #nullable enable using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; @@ -35,13 +36,13 @@ internal abstract class AndroidStorageItem : IStorageBookmarkItem public bool CanBookmark => true; - public Task SaveBookmark() + public Task SaveBookmarkAsync() { Context.ContentResolver?.TakePersistableUriPermission(Uri, ActivityFlags.GrantWriteUriPermission | ActivityFlags.GrantReadUriPermission); return Task.FromResult(Uri.ToString()); } - public Task ReleaseBookmark() + public Task ReleaseBookmarkAsync() { Context.ContentResolver?.ReleasePersistableUriPermission(Uri, ActivityFlags.GrantWriteUriPermission | ActivityFlags.GrantReadUriPermission); return Task.CompletedTask; @@ -106,6 +107,30 @@ internal sealed class AndroidStorageFolder : AndroidStorageItem, IStorageBookmar { return Task.FromResult(new StorageItemProperties()); } + + public async Task> GetItemsAsync() + { + using var javaFile = new JavaFile(Uri.Path!); + + // Java file represents files AND directories. Don't be confused. + var files = await javaFile.ListFilesAsync().ConfigureAwait(false); + if (files is null) + { + return Array.Empty(); + } + + return files + .Select(f => (file: f, uri: AndroidUri.FromFile(f))) + .Where(t => t.uri is not null) + .Select(t => t.file switch + { + { IsFile: true } => (IStorageItem)new AndroidStorageFile(Context, t.uri!), + { IsDirectory: true } => new AndroidStorageFolder(Context, t.uri!), + _ => null + }) + .Where(i => i is not null) + .ToArray()!; + } } internal sealed class AndroidStorageFile : AndroidStorageItem, IStorageBookmarkFile @@ -118,10 +143,10 @@ internal sealed class AndroidStorageFile : AndroidStorageItem, IStorageBookmarkF public bool CanOpenWrite => true; - public Task OpenRead() => Task.FromResult(OpenContentStream(Context, Uri, false) + public Task OpenReadAsync() => Task.FromResult(OpenContentStream(Context, Uri, false) ?? throw new InvalidOperationException("Failed to open content stream")); - public Task OpenWrite() => Task.FromResult(OpenContentStream(Context, Uri, true) + public Task OpenWriteAsync() => Task.FromResult(OpenContentStream(Context, Uri, true) ?? throw new InvalidOperationException("Failed to open content stream")); private Stream? OpenContentStream(Context context, AndroidUri uri, bool isOutput) diff --git a/src/Avalonia.Base/Controls/ResourceDictionary.cs b/src/Avalonia.Base/Controls/ResourceDictionary.cs index 77863e5101..d6197c50c6 100644 --- a/src/Avalonia.Base/Controls/ResourceDictionary.cs +++ b/src/Avalonia.Base/Controls/ResourceDictionary.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using Avalonia.Collections; +using Avalonia.Controls.Templates; namespace Avalonia.Controls { @@ -29,7 +30,11 @@ namespace Avalonia.Controls public object? this[object key] { - get => _inner?[key]; + get + { + TryGetValue(key, out var value); + return value; + } set { Inner[key] = value; @@ -119,6 +124,12 @@ namespace Avalonia.Controls Owner?.NotifyHostedResourcesChanged(ResourcesChangedEventArgs.Empty); } + public void AddDeferred(object key, Func factory) + { + Inner.Add(key, new DeferredItem(factory)); + Owner?.NotifyHostedResourcesChanged(ResourcesChangedEventArgs.Empty); + } + public void Clear() { if (_inner?.Count > 0) @@ -143,10 +154,8 @@ namespace Avalonia.Controls public bool TryGetResource(object key, out object? value) { - if (_inner is not null && _inner.TryGetValue(key, out value)) - { + if (TryGetValue(key, out value)) return true; - } if (_mergedDictionaries != null) { @@ -165,12 +174,28 @@ namespace Avalonia.Controls public bool TryGetValue(object key, out object? value) { - if (_inner is not null) - return _inner.TryGetValue(key, out value); + if (_inner is not null && _inner.TryGetValue(key, out value)) + { + if (value is DeferredItem deffered) + { + _inner[key] = value = deffered.Factory(null) switch + { + ITemplateResult t => t.Result, + object v => v, + _ => null, + }; + } + return true; + } + value = null; return false; } + public IEnumerator> GetEnumerator() + { + return _inner?.GetEnumerator() ?? Enumerable.Empty>().GetEnumerator(); + } void ICollection>.Add(KeyValuePair item) { @@ -198,12 +223,17 @@ namespace Avalonia.Controls return false; } - public IEnumerator> GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + + internal bool ContainsDeferredKey(object key) { - return _inner?.GetEnumerator() ?? Enumerable.Empty>().GetEnumerator(); - } + if (_inner is not null && _inner.TryGetValue(key, out var result)) + { + return result is DeferredItem; + } - IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + return false; + } void IResourceProvider.AddOwner(IResourceHost owner) { @@ -258,5 +288,11 @@ namespace Avalonia.Controls } } } + + private class DeferredItem + { + public DeferredItem(Func factory) => Factory = factory; + public Func Factory { get; } + } } } diff --git a/src/Avalonia.Base/Controls/ResourceNodeExtensions.cs b/src/Avalonia.Base/Controls/ResourceNodeExtensions.cs index 1758c45650..6121646107 100644 --- a/src/Avalonia.Base/Controls/ResourceNodeExtensions.cs +++ b/src/Avalonia.Base/Controls/ResourceNodeExtensions.cs @@ -132,6 +132,11 @@ namespace Avalonia.Controls { _target.OwnerChanged += OwnerChanged; _owner = _target.Owner; + + if (_owner is object) + { + _owner.ResourcesChanged += ResourcesChanged; + } } protected override void Deinitialize() diff --git a/src/Avalonia.Base/Controls/Templates/ITemplateResult.cs b/src/Avalonia.Base/Controls/Templates/ITemplateResult.cs new file mode 100644 index 0000000000..6bd4d735a7 --- /dev/null +++ b/src/Avalonia.Base/Controls/Templates/ITemplateResult.cs @@ -0,0 +1,8 @@ +namespace Avalonia.Controls.Templates +{ + public interface ITemplateResult + { + public object? Result { get; } + public INameScope NameScope { get; } + } +} diff --git a/src/Avalonia.Controls/Templates/TemplateResult.cs b/src/Avalonia.Base/Controls/Templates/TemplateResult.cs similarity index 80% rename from src/Avalonia.Controls/Templates/TemplateResult.cs rename to src/Avalonia.Base/Controls/Templates/TemplateResult.cs index 770aecc329..0e38c6c0ce 100644 --- a/src/Avalonia.Controls/Templates/TemplateResult.cs +++ b/src/Avalonia.Base/Controls/Templates/TemplateResult.cs @@ -1,9 +1,10 @@ namespace Avalonia.Controls.Templates { - public class TemplateResult + public class TemplateResult : ITemplateResult { public T Result { get; } public INameScope NameScope { get; } + object? ITemplateResult.Result => Result; public TemplateResult(T result, INameScope nameScope) { diff --git a/src/Avalonia.Base/Input/Cursor.cs b/src/Avalonia.Base/Input/Cursor.cs index 122838f682..98c4258a90 100644 --- a/src/Avalonia.Base/Input/Cursor.cs +++ b/src/Avalonia.Base/Input/Cursor.cs @@ -32,10 +32,7 @@ namespace Avalonia.Input DragCopy, DragLink, None, - - [Obsolete("Use BottomSide")] - BottomSize = BottomSide - + // Not available in GTK directly, see http://www.pixelbeat.org/programming/x_cursors/ // We might enable them later, preferably, by loading pixmax directly from theme with fallback image // SizeNorthWestSouthEast, diff --git a/src/Avalonia.Base/Input/DragEventArgs.cs b/src/Avalonia.Base/Input/DragEventArgs.cs index 22ca8358ff..0e613c0f21 100644 --- a/src/Avalonia.Base/Input/DragEventArgs.cs +++ b/src/Avalonia.Base/Input/DragEventArgs.cs @@ -13,9 +13,6 @@ namespace Avalonia.Input public IDataObject Data { get; private set; } - [Obsolete("Use KeyModifiers")] - public InputModifiers Modifiers { get; private set; } - public KeyModifiers KeyModifiers { get; private set; } public Point GetPosition(IVisual relativeTo) @@ -35,17 +32,6 @@ namespace Avalonia.Input return point; } - [Obsolete("Use constructor taking KeyModifiers")] - public DragEventArgs(RoutedEvent routedEvent, IDataObject data, Interactive target, Point targetLocation, InputModifiers modifiers) - : base(routedEvent) - { - Data = data; - _target = target; - _targetLocation = targetLocation; - Modifiers = modifiers; - KeyModifiers = (KeyModifiers)(((int)modifiers) & 0xF); - } - public DragEventArgs(RoutedEvent routedEvent, IDataObject data, Interactive target, Point targetLocation, KeyModifiers keyModifiers) : base(routedEvent) { @@ -53,10 +39,6 @@ namespace Avalonia.Input _target = target; _targetLocation = targetLocation; KeyModifiers = keyModifiers; -#pragma warning disable CS0618 // Type or member is obsolete - Modifiers = (InputModifiers)keyModifiers; -#pragma warning restore CS0618 // Type or member is obsolete } - } } diff --git a/src/Avalonia.Base/Input/GotFocusEventArgs.cs b/src/Avalonia.Base/Input/GotFocusEventArgs.cs index 9d958823fe..5cce138ee0 100644 --- a/src/Avalonia.Base/Input/GotFocusEventArgs.cs +++ b/src/Avalonia.Base/Input/GotFocusEventArgs.cs @@ -1,4 +1,3 @@ -using System; using Avalonia.Interactivity; namespace Avalonia.Input @@ -13,16 +12,6 @@ namespace Avalonia.Input /// public NavigationMethod NavigationMethod { get; set; } - /// - /// Gets or sets any input modifiers active at the time of focus. - /// - [Obsolete("Use KeyModifiers")] - public InputModifiers InputModifiers - { - get => (InputModifiers)KeyModifiers; - set => KeyModifiers = (KeyModifiers)((int)value & 0xF); - } - /// /// Gets or sets any key modifiers active at the time of focus. /// diff --git a/src/Avalonia.Base/Input/IInputRoot.cs b/src/Avalonia.Base/Input/IInputRoot.cs index 7edc69df52..344a4eefd7 100644 --- a/src/Avalonia.Base/Input/IInputRoot.cs +++ b/src/Avalonia.Base/Input/IInputRoot.cs @@ -27,10 +27,5 @@ namespace Avalonia.Input /// Gets or sets a value indicating whether access keys are shown in the window. /// bool ShowAccessKeys { get; set; } - - /// - /// Gets associated mouse device - /// - IMouseDevice? MouseDevice { get; } } } diff --git a/src/Avalonia.Base/Input/IKeyboardDevice.cs b/src/Avalonia.Base/Input/IKeyboardDevice.cs index 80aebc02bc..0b7b5aaecc 100644 --- a/src/Avalonia.Base/Input/IKeyboardDevice.cs +++ b/src/Avalonia.Base/Input/IKeyboardDevice.cs @@ -4,19 +4,6 @@ using Avalonia.Metadata; namespace Avalonia.Input { - [Flags, Obsolete("Use KeyModifiers and PointerPointProperties")] - public enum InputModifiers - { - None = 0, - Alt = 1, - Control = 2, - Shift = 4, - Windows = 8, - LeftMouseButton = 16, - RightMouseButton = 32, - MiddleMouseButton = 64 - } - [Flags] public enum KeyModifiers { diff --git a/src/Avalonia.Base/Input/IMouseDevice.cs b/src/Avalonia.Base/Input/IMouseDevice.cs index 2d66397d63..00c436bf21 100644 --- a/src/Avalonia.Base/Input/IMouseDevice.cs +++ b/src/Avalonia.Base/Input/IMouseDevice.cs @@ -1,4 +1,3 @@ -using System; using Avalonia.Metadata; namespace Avalonia.Input @@ -9,16 +8,5 @@ namespace Avalonia.Input [NotClientImplementable] public interface IMouseDevice : IPointerDevice { - /// - /// Gets the mouse position, in screen coordinates. - /// - [Obsolete("Use PointerEventArgs.GetPosition")] - PixelPoint Position { get; } - - [Obsolete] - void TopLevelClosed(IInputRoot root); - - [Obsolete] - void SceneInvalidated(IInputRoot root, Rect rect); } } diff --git a/src/Avalonia.Base/Input/IPointerDevice.cs b/src/Avalonia.Base/Input/IPointerDevice.cs index 0993835feb..e0aebda9c5 100644 --- a/src/Avalonia.Base/Input/IPointerDevice.cs +++ b/src/Avalonia.Base/Input/IPointerDevice.cs @@ -1,5 +1,3 @@ -using System; -using Avalonia.VisualTree; using Avalonia.Input.Raw; using Avalonia.Metadata; @@ -8,18 +6,6 @@ namespace Avalonia.Input [NotClientImplementable] public interface IPointerDevice : IInputDevice { - /// - [Obsolete("Use IPointer")] - IInputElement? Captured { get; } - - /// - [Obsolete("Use IPointer")] - void Capture(IInputElement? control); - - /// - [Obsolete("Use PointerEventArgs.GetPosition")] - Point GetPosition(IVisual relativeTo); - /// /// Gets a pointer for specific event args. /// diff --git a/src/Avalonia.Base/Input/KeyEventArgs.cs b/src/Avalonia.Base/Input/KeyEventArgs.cs index 67cd5a520a..b8291e9096 100644 --- a/src/Avalonia.Base/Input/KeyEventArgs.cs +++ b/src/Avalonia.Base/Input/KeyEventArgs.cs @@ -9,8 +9,6 @@ namespace Avalonia.Input public Key Key { get; set; } - [Obsolete("Use KeyModifiers")] - public InputModifiers Modifiers => (InputModifiers)KeyModifiers; public KeyModifiers KeyModifiers { get; set; } } } diff --git a/src/Avalonia.Base/Input/KeyGesture.cs b/src/Avalonia.Base/Input/KeyGesture.cs index 3b7a828b86..e79e9341a9 100644 --- a/src/Avalonia.Base/Input/KeyGesture.cs +++ b/src/Avalonia.Base/Input/KeyGesture.cs @@ -15,13 +15,6 @@ namespace Avalonia.Input { "+", Key.OemPlus }, { "-", Key.OemMinus }, { ".", Key.OemPeriod }, { ",", Key.OemComma } }; - [Obsolete("Use constructor taking KeyModifiers")] - public KeyGesture(Key key, InputModifiers modifiers) - { - Key = key; - KeyModifiers = (KeyModifiers)(((int)modifiers) & 0xf); - } - public KeyGesture(Key key, KeyModifiers modifiers = KeyModifiers.None) { Key = key; @@ -63,10 +56,7 @@ namespace Avalonia.Input } public Key Key { get; } - - [Obsolete("Use KeyModifiers")] - public InputModifiers Modifiers => (InputModifiers)KeyModifiers; - + public KeyModifiers KeyModifiers { get; } public static KeyGesture Parse(string gesture) diff --git a/src/Avalonia.Base/Input/MouseDevice.cs b/src/Avalonia.Base/Input/MouseDevice.cs index 5f8ab24b79..055c9cf1fd 100644 --- a/src/Avalonia.Base/Input/MouseDevice.cs +++ b/src/Avalonia.Base/Input/MouseDevice.cs @@ -21,7 +21,6 @@ namespace Avalonia.Input private readonly Pointer _pointer; private bool _disposed; - private PixelPoint? _position; private MouseButton _lastMouseDownButton; public MouseDevice(Pointer? pointer = null) @@ -29,43 +28,6 @@ namespace Avalonia.Input _pointer = pointer ?? new Pointer(Pointer.GetNextFreeId(), PointerType.Mouse, true); } - [Obsolete("Use IPointer instead")] - public IInputElement? Captured => _pointer.Captured; - - [Obsolete("Use events instead")] - public PixelPoint Position - { - get => _position ?? new PixelPoint(-1, -1); - protected set => _position = value; - } - - [Obsolete("Use IPointer instead")] - public void Capture(IInputElement? control) - { - _pointer.Capture(control); - } - - /// - /// Gets the mouse position relative to a control. - /// - /// The control. - /// The mouse position in the control's coordinates. - public Point GetPosition(IVisual relativeTo) - { - relativeTo = relativeTo ?? throw new ArgumentNullException(nameof(relativeTo)); - - if (relativeTo.VisualRoot == null) - { - throw new InvalidOperationException("Control is not attached to visual tree."); - } - -#pragma warning disable CS0618 // Type or member is obsolete - var rootPoint = relativeTo.VisualRoot.PointToClient(Position); -#pragma warning restore CS0618 // Type or member is obsolete - var transform = relativeTo.VisualRoot.TransformToVisual(relativeTo); - return rootPoint * transform!.Value; - } - public void ProcessRawEvent(RawInputEventArgs e) { if (!e.Handled && e is RawPointerEventArgs margs) @@ -96,7 +58,6 @@ namespace Avalonia.Input if(mouse._disposed) return; - _position = e.Root.PointToScreen(e.Position); var props = CreateProperties(e); var keyModifiers = e.InputModifiers.ToKeyModifiers(); switch (e.Type) @@ -145,7 +106,6 @@ namespace Avalonia.Input private void LeaveWindow() { - _position = null; } PointerPointProperties CreateProperties(RawPointerEventArgs args) @@ -324,19 +284,7 @@ namespace Avalonia.Input _disposed = true; _pointer?.Dispose(); } - - [Obsolete] - public void TopLevelClosed(IInputRoot root) - { - // no-op - } - - [Obsolete] - public void SceneInvalidated(IInputRoot root, Rect rect) - { - // no-op - } - + public IPointer? TryGetPointer(RawPointerEventArgs ev) { return _pointer; diff --git a/src/Avalonia.Base/Input/PenDevice.cs b/src/Avalonia.Base/Input/PenDevice.cs index d22b48562c..f5f0e90a45 100644 --- a/src/Avalonia.Base/Input/PenDevice.cs +++ b/src/Avalonia.Base/Input/PenDevice.cs @@ -1,10 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Reactive.Linq; using Avalonia.Input.Raw; using Avalonia.Platform; -using Avalonia.VisualTree; namespace Avalonia.Input { @@ -14,7 +12,6 @@ namespace Avalonia.Input public class PenDevice : IPenDevice, IDisposable { private readonly Dictionary _pointers = new(); - private readonly Dictionary _lastPositions = new(); private int _clickCount; private Rect _lastClickRect; private ulong _lastClickTime; @@ -41,9 +38,7 @@ namespace Avalonia.Input _pointers[e.RawPointerId] = pointer = new Pointer(Pointer.GetNextFreeId(), PointerType.Pen, _pointers.Count == 0); } - - _lastPositions[e.RawPointerId] = e.Root.PointToScreen(e.Position); - + var props = new PointerPointProperties(e.InputModifiers, e.Type.ToUpdateKind(), e.Point.Twist, e.Point.Pressure, e.Point.XTilt, e.Point.YTilt); var keyModifiers = e.InputModifiers.ToKeyModifiers(); @@ -69,7 +64,6 @@ namespace Avalonia.Input { pointer.Dispose(); _pointers.Remove(e.RawPointerId); - _lastPositions.Remove(e.RawPointerId); } } @@ -153,17 +147,6 @@ namespace Avalonia.Input p.Dispose(); } - [Obsolete] - IInputElement? IPointerDevice.Captured => _pointers.Values - .FirstOrDefault(p => p.IsPrimary)?.Captured; - - [Obsolete] - void IPointerDevice.Capture(IInputElement? control) => _pointers.Values - .FirstOrDefault(p => p.IsPrimary)?.Capture(control); - - [Obsolete] - Point IPointerDevice.GetPosition(IVisual relativeTo) => new Point(-1, -1); - public IPointer? TryGetPointer(RawPointerEventArgs ev) { return _pointers.TryGetValue(ev.RawPointerId, out var pointer) diff --git a/src/Avalonia.Base/Input/PointerEventArgs.cs b/src/Avalonia.Base/Input/PointerEventArgs.cs index 058c2f9cc1..1f3c726e7b 100644 --- a/src/Avalonia.Base/Input/PointerEventArgs.cs +++ b/src/Avalonia.Base/Input/PointerEventArgs.cs @@ -11,7 +11,7 @@ namespace Avalonia.Input private readonly IVisual? _rootVisual; private readonly Point _rootVisualPosition; private readonly PointerPointProperties _properties; - private Lazy?>? _previousPoints; + private readonly Lazy?>? _previousPoints; public PointerEventArgs(RoutedEvent routedEvent, IInteractive? source, @@ -43,29 +43,6 @@ namespace Avalonia.Input { _previousPoints = previousPoints; } - - - class EmulatedDevice : IPointerDevice - { - private readonly PointerEventArgs _ev; - - public EmulatedDevice(PointerEventArgs ev) - { - _ev = ev; - } - - public void ProcessRawEvent(RawInputEventArgs ev) => throw new NotSupportedException(); - - public IInputElement? Captured => _ev.Pointer.Captured; - public void Capture(IInputElement? control) - { - _ev.Pointer.Capture(control); - } - - public Point GetPosition(IVisual relativeTo) => _ev.GetPosition(relativeTo); - - public IPointer? TryGetPointer(RawPointerEventArgs ev) => _ev.Pointer; - } /// /// Gets specific pointer generated by input device. @@ -77,28 +54,6 @@ namespace Avalonia.Input /// public ulong Timestamp { get; } - private IPointerDevice? _device; - - [Obsolete("Use Pointer to get pointer-specific information")] - public IPointerDevice Device => _device ?? (_device = new EmulatedDevice(this)); - - [Obsolete("Use KeyModifiers and PointerPointProperties")] - public InputModifiers InputModifiers - { - get - { - var mods = (InputModifiers)KeyModifiers; - if (_properties.IsLeftButtonPressed) - mods |= InputModifiers.LeftMouseButton; - if (_properties.IsMiddleButtonPressed) - mods |= InputModifiers.MiddleMouseButton; - if (_properties.IsRightButtonPressed) - mods |= InputModifiers.RightMouseButton; - - return mods; - } - } - /// /// Gets a value that indicates which key modifiers were active at the time that the pointer event was initiated. /// @@ -120,9 +75,6 @@ namespace Avalonia.Input /// The pointer position in the control's coordinates. public Point GetPosition(IVisual? relativeTo) => GetPosition(_rootVisualPosition, relativeTo); - [Obsolete("Use GetCurrentPoint")] - public PointerPoint GetPointerPoint(IVisual? relativeTo) => GetCurrentPoint(relativeTo); - /// /// Returns the PointerPoint associated with the current event /// @@ -171,8 +123,6 @@ namespace Avalonia.Input public class PointerPressedEventArgs : PointerEventArgs { - private readonly int _clickCount; - public PointerPressedEventArgs( IInteractive source, IPointer pointer, @@ -184,13 +134,10 @@ namespace Avalonia.Input : base(InputElement.PointerPressedEvent, source, pointer, rootVisual, rootVisualPosition, timestamp, properties, modifiers) { - _clickCount = clickCount; + ClickCount = clickCount; } - public int ClickCount => _clickCount; - - [Obsolete("Use PointerPressedEventArgs.GetCurrentPoint(this).Properties")] - public MouseButton MouseButton => Properties.PointerUpdateKind.GetMouseButton(); + public int ClickCount { get; } } public class PointerReleasedEventArgs : PointerEventArgs @@ -210,9 +157,6 @@ namespace Avalonia.Input /// Gets the mouse button that triggered the corresponding PointerPressed event /// public MouseButton InitialPressMouseButton { get; } - - [Obsolete("Use InitialPressMouseButton")] - public MouseButton MouseButton => InitialPressMouseButton; } public class PointerCaptureLostEventArgs : RoutedEventArgs diff --git a/src/Avalonia.Base/Input/PointerOverPreProcessor.cs b/src/Avalonia.Base/Input/PointerOverPreProcessor.cs index 67d1eea7e3..a95d66346a 100644 --- a/src/Avalonia.Base/Input/PointerOverPreProcessor.cs +++ b/src/Avalonia.Base/Input/PointerOverPreProcessor.cs @@ -15,6 +15,8 @@ namespace Avalonia.Input _inputRoot = inputRoot ?? throw new ArgumentNullException(nameof(inputRoot)); } + public PixelPoint? LastPosition => _lastPointer?.position; + public void OnCompleted() { ClearPointerOver(); diff --git a/src/Avalonia.Base/Input/Raw/RawDragEvent.cs b/src/Avalonia.Base/Input/Raw/RawDragEvent.cs index 652bad7115..c903aad684 100644 --- a/src/Avalonia.Base/Input/Raw/RawDragEvent.cs +++ b/src/Avalonia.Base/Input/Raw/RawDragEvent.cs @@ -8,8 +8,6 @@ namespace Avalonia.Input.Raw public IDataObject Data { get; } public DragDropEffects Effects { get; set; } public RawDragEventType Type { get; } - [Obsolete("Use KeyModifiers")] - public InputModifiers Modifiers { get; } public KeyModifiers KeyModifiers { get; } public RawDragEvent(IDragDropDevice inputDevice, RawDragEventType type, @@ -21,9 +19,6 @@ namespace Avalonia.Input.Raw Data = data; Effects = effects; KeyModifiers = modifiers.ToKeyModifiers(); -#pragma warning disable CS0618 // Type or member is obsolete - Modifiers = (InputModifiers)modifiers; -#pragma warning restore CS0618 // Type or member is obsolete } } } diff --git a/src/Avalonia.Base/Input/Raw/RawTouchEventArgs.cs b/src/Avalonia.Base/Input/Raw/RawTouchEventArgs.cs index 6706a45f48..3e842e6e3f 100644 --- a/src/Avalonia.Base/Input/Raw/RawTouchEventArgs.cs +++ b/src/Avalonia.Base/Input/Raw/RawTouchEventArgs.cs @@ -19,8 +19,5 @@ namespace Avalonia.Input.Raw { RawPointerId = rawPointerId; } - - [Obsolete("Use RawPointerId")] - public long TouchPointId { get => RawPointerId; set => RawPointerId = value; } } } diff --git a/src/Avalonia.Base/Input/TouchDevice.cs b/src/Avalonia.Base/Input/TouchDevice.cs index e914d860fd..1d5b1d6bbf 100644 --- a/src/Avalonia.Base/Input/TouchDevice.cs +++ b/src/Avalonia.Base/Input/TouchDevice.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using Avalonia.Input.Raw; using Avalonia.Platform; -using Avalonia.VisualTree; namespace Avalonia.Input { @@ -20,9 +19,6 @@ namespace Avalonia.Input private int _clickCount; private Rect _lastClickRect; private ulong _lastClickTime; - private Pointer? _lastPointer; - - IInputElement? IPointerDevice.Captured => _lastPointer?.Captured; RawInputModifiers GetModifiers(RawInputModifiers modifiers, bool isLeftButtonDown) { @@ -32,10 +28,6 @@ namespace Avalonia.Input return rv; } - void IPointerDevice.Capture(IInputElement? control) => _lastPointer?.Capture(control); - - Point IPointerDevice.GetPosition(IVisual relativeTo) => default; - public void ProcessRawEvent(RawInputEventArgs ev) { if (ev.Handled || _disposed) @@ -51,7 +43,6 @@ namespace Avalonia.Input PointerType.Touch, _pointers.Count == 0); pointer.Capture(hit); } - _lastPointer = pointer; var target = pointer.Captured ?? args.Root; var updateKind = args.Type.ToUpdateKind(); @@ -96,7 +87,6 @@ namespace Avalonia.Input new PointerPointProperties(GetModifiers(args.InputModifiers, false), updateKind), keyModifier, MouseButton.Left)); } - _lastPointer = null; } if (args.Type == RawPointerEventType.TouchCancel) @@ -104,7 +94,6 @@ namespace Avalonia.Input _pointers.Remove(args.RawPointerId); using (pointer) pointer.Capture(null); - _lastPointer = null; } if (args.Type == RawPointerEventType.TouchUpdate) diff --git a/src/Avalonia.Base/Media/DrawingGroup.cs b/src/Avalonia.Base/Media/DrawingGroup.cs index 603bb1c1c1..e71f568207 100644 --- a/src/Avalonia.Base/Media/DrawingGroup.cs +++ b/src/Avalonia.Base/Media/DrawingGroup.cs @@ -228,6 +228,8 @@ namespace Avalonia.Media throw new NotImplementedException(); } + public object? GetFeature(Type t) => null; + public void DrawBitmap(IRef source, double opacity, Rect sourceRect, Rect destRect, BitmapInterpolationMode bitmapInterpolationMode = BitmapInterpolationMode.Default) { throw new NotImplementedException(); diff --git a/src/Avalonia.Base/Media/GlyphRun.cs b/src/Avalonia.Base/Media/GlyphRun.cs index ac87d521a5..cae7a8fe75 100644 --- a/src/Avalonia.Base/Media/GlyphRun.cs +++ b/src/Avalonia.Base/Media/GlyphRun.cs @@ -265,7 +265,7 @@ namespace Avalonia.Media //RightToLeft var glyphIndex = FindGlyphIndex(characterIndex); - if (GlyphClusters != null) + if (GlyphClusters != null && GlyphClusters.Count > 0) { if (characterIndex > GlyphClusters[0]) { @@ -445,7 +445,7 @@ namespace Avalonia.Media /// public int FindGlyphIndex(int characterIndex) { - if (GlyphClusters == null) + if (GlyphClusters == null || GlyphClusters.Count == 0) { return characterIndex; } @@ -614,17 +614,29 @@ namespace Avalonia.Media private GlyphRunMetrics CreateGlyphRunMetrics() { + var firstCluster = 0; + var lastCluster = Characters.Length - 1; + + if (!IsLeftToRight) + { + var cluster = firstCluster; + firstCluster = lastCluster; + lastCluster = cluster; + } + if (GlyphClusters != null && GlyphClusters.Count > 0) { - var firstCluster = GlyphClusters[0]; + firstCluster = GlyphClusters[0]; + lastCluster = GlyphClusters[GlyphClusters.Count - 1]; _offsetToFirstCharacter = Math.Max(0, Characters.Start - firstCluster); } + var isReversed = firstCluster > lastCluster; var height = (GlyphTypeface.Descent - GlyphTypeface.Ascent + GlyphTypeface.LineGap) * Scale; var widthIncludingTrailingWhitespace = 0d; - var trailingWhitespaceLength = GetTrailingWhitespaceLength(out var newLineLength, out var glyphCount); + var trailingWhitespaceLength = GetTrailingWhitespaceLength(isReversed, out var newLineLength, out var glyphCount); for (var index = 0; index < GlyphIndices.Count; index++) { @@ -635,16 +647,16 @@ namespace Avalonia.Media var width = widthIncludingTrailingWhitespace; - if (IsLeftToRight) + if (isReversed) { - for (var index = GlyphIndices.Count - glyphCount; index < GlyphIndices.Count; index++) + for (var index = 0; index < glyphCount; index++) { width -= GetGlyphAdvance(index, out _); } } else { - for (var index = 0; index < glyphCount; index++) + for (var index = GlyphIndices.Count - glyphCount; index < GlyphIndices.Count; index++) { width -= GetGlyphAdvance(index, out _); } @@ -654,16 +666,15 @@ namespace Avalonia.Media height); } - private int GetTrailingWhitespaceLength(out int newLineLength, out int glyphCount) - { - glyphCount = 0; - newLineLength = 0; - - if (Characters.IsEmpty) + private int GetTrailingWhitespaceLength(bool isReversed, out int newLineLength, out int glyphCount) + { + if (isReversed) { - return 0; + return GetTralingWhitespaceLengthRightToLeft(out newLineLength, out glyphCount); } + glyphCount = 0; + newLineLength = 0; var trailingWhitespaceLength = 0; if (GlyphClusters == null) @@ -732,6 +743,78 @@ namespace Avalonia.Media return trailingWhitespaceLength; } + private int GetTralingWhitespaceLengthRightToLeft(out int newLineLength, out int glyphCount) + { + glyphCount = 0; + newLineLength = 0; + var trailingWhitespaceLength = 0; + + if (GlyphClusters == null) + { + for (var i = 0; i < Characters.Length;) + { + var codepoint = Codepoint.ReadAt(_characters, i, out var count); + + if (!codepoint.IsWhiteSpace) + { + break; + } + + if (codepoint.IsBreakChar) + { + newLineLength++; + } + + trailingWhitespaceLength++; + + i += count; + glyphCount++; + } + } + else + { + for (var i = 0; i < GlyphClusters.Count; i++) + { + var currentCluster = GlyphClusters[i]; + var characterIndex = Math.Max(0, currentCluster - _characters.BufferOffset); + var codepoint = Codepoint.ReadAt(_characters, characterIndex, out _); + + if (!codepoint.IsWhiteSpace) + { + break; + } + + var clusterLength = 1; + + while (i - 1 >= 0) + { + var nextCluster = GlyphClusters[i - 1]; + + if (currentCluster == nextCluster) + { + clusterLength++; + i--; + + continue; + } + + break; + } + + if (codepoint.IsBreakChar) + { + newLineLength += clusterLength; + } + + trailingWhitespaceLength += clusterLength; + + glyphCount++; + } + } + + return trailingWhitespaceLength; + } + private void Set(ref T field, T value) { _glyphRunImpl?.Dispose(); diff --git a/src/Avalonia.Base/Media/TextDecoration.cs b/src/Avalonia.Base/Media/TextDecoration.cs index 8eeb86c555..4c9764af96 100644 --- a/src/Avalonia.Base/Media/TextDecoration.cs +++ b/src/Avalonia.Base/Media/TextDecoration.cs @@ -209,7 +209,7 @@ namespace Avalonia.Media var pen = new Pen(Stroke ?? defaultBrush, thickness, new DashStyle(StrokeDashArray, StrokeDashOffset), StrokeLineCap); - drawingContext.DrawLine(pen, origin, origin + new Point(glyphRun.Size.Width, 0)); + drawingContext.DrawLine(pen, origin, origin + new Point(glyphRun.Metrics.Width, 0)); } } } diff --git a/src/Avalonia.Base/Media/TextFormatting/FormattedTextSource.cs b/src/Avalonia.Base/Media/TextFormatting/FormattedTextSource.cs index 97df87d3d9..7ab67ea34d 100644 --- a/src/Avalonia.Base/Media/TextFormatting/FormattedTextSource.cs +++ b/src/Avalonia.Base/Media/TextFormatting/FormattedTextSource.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using Avalonia.Media.TextFormatting.Unicode; using Avalonia.Utilities; namespace Avalonia.Media.TextFormatting @@ -116,7 +117,30 @@ namespace Avalonia.Media.TextFormatting length = text.Length; } + length = CoerceLength(text, length); + return new ValueSpan(firstTextSourceIndex, length, currentProperties); } + + private static int CoerceLength(ReadOnlySlice text, int length) + { + var finalLength = 0; + + var graphemeEnumerator = new GraphemeEnumerator(text); + + while (graphemeEnumerator.MoveNext()) + { + var grapheme = graphemeEnumerator.Current; + + finalLength += grapheme.Text.Length; + + if (finalLength >= length) + { + return finalLength; + } + } + + return length; + } } } diff --git a/src/Avalonia.Base/Media/TextFormatting/InterWordJustification.cs b/src/Avalonia.Base/Media/TextFormatting/InterWordJustification.cs index df83ada34a..a49e4ef13b 100644 --- a/src/Avalonia.Base/Media/TextFormatting/InterWordJustification.cs +++ b/src/Avalonia.Base/Media/TextFormatting/InterWordJustification.cs @@ -15,6 +15,13 @@ namespace Avalonia.Media.TextFormatting public override void Justify(TextLine textLine) { + var lineImpl = textLine as TextLineImpl; + + if(lineImpl is null) + { + return; + } + var paragraphWidth = Width; if (double.IsInfinity(paragraphWidth)) @@ -22,12 +29,12 @@ namespace Avalonia.Media.TextFormatting return; } - if (textLine.NewLineLength > 0) + if (lineImpl.NewLineLength > 0) { return; } - var textLineBreak = textLine.TextLineBreak; + var textLineBreak = lineImpl.TextLineBreak; if (textLineBreak is not null && textLineBreak.TextEndOfLine is not null) { @@ -39,7 +46,7 @@ namespace Avalonia.Media.TextFormatting var breakOportunities = new Queue(); - foreach (var textRun in textLine.TextRuns) + foreach (var textRun in lineImpl.TextRuns) { var text = textRun.Text; @@ -68,10 +75,10 @@ namespace Avalonia.Media.TextFormatting return; } - var remainingSpace = Math.Max(0, paragraphWidth - textLine.WidthIncludingTrailingWhitespace); + var remainingSpace = Math.Max(0, paragraphWidth - lineImpl.WidthIncludingTrailingWhitespace); var spacing = remainingSpace / breakOportunities.Count; - foreach (var textRun in textLine.TextRuns) + foreach (var textRun in lineImpl.TextRuns) { var text = textRun.Text; diff --git a/src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs b/src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs index ab72601c3e..42a9e61c36 100644 --- a/src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs +++ b/src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs @@ -38,7 +38,7 @@ namespace Avalonia.Media.TextFormatting /// Gets a list of . /// /// The shapeable text characters. - internal IReadOnlyList GetShapeableCharacters(ReadOnlySlice runText, sbyte biDiLevel, + internal IReadOnlyList GetShapeableCharacters(ReadOnlySlice runText, sbyte biDiLevel, ref TextRunProperties? previousProperties) { var shapeableCharacters = new List(2); @@ -65,7 +65,7 @@ namespace Avalonia.Media.TextFormatting /// The bidi level of the run. /// /// A list of shapeable text runs. - private static ShapeableTextCharacters CreateShapeableRun(ReadOnlySlice text, + private static ShapeableTextCharacters CreateShapeableRun(ReadOnlySlice text, TextRunProperties defaultProperties, sbyte biDiLevel, ref TextRunProperties? previousProperties) { var defaultTypeface = defaultProperties.Typeface; @@ -76,7 +76,7 @@ namespace Avalonia.Media.TextFormatting { if (script == Script.Common && previousTypeface is not null) { - if(TryGetShapeableLength(text, previousTypeface.Value, defaultTypeface, out var fallbackCount, out _)) + if (TryGetShapeableLength(text, previousTypeface.Value, defaultTypeface, out var fallbackCount, out _)) { return new ShapeableTextCharacters(text.Take(fallbackCount), defaultProperties.WithTypeface(previousTypeface.Value), biDiLevel); @@ -86,10 +86,10 @@ namespace Avalonia.Media.TextFormatting return new ShapeableTextCharacters(text.Take(count), defaultProperties.WithTypeface(currentTypeface), biDiLevel); } - + if (previousTypeface is not null) { - if(TryGetShapeableLength(text, previousTypeface.Value, defaultTypeface, out count, out _)) + if (TryGetShapeableLength(text, previousTypeface.Value, defaultTypeface, out count, out _)) { return new ShapeableTextCharacters(text.Take(count), defaultProperties.WithTypeface(previousTypeface.Value), biDiLevel); @@ -106,12 +106,12 @@ namespace Avalonia.Media.TextFormatting { continue; } - + codepoint = codepointEnumerator.Current; - + break; } - + //ToDo: Fix FontFamily fallback var matchFound = FontManager.Current.TryMatchCharacter(codepoint, defaultTypeface.Style, defaultTypeface.Weight, @@ -157,14 +157,14 @@ namespace Avalonia.Media.TextFormatting /// /// protected static bool TryGetShapeableLength( - ReadOnlySlice text, - Typeface typeface, + ReadOnlySlice text, + Typeface typeface, Typeface? defaultTypeface, out int length, out Script script) { length = 0; - script = Script.Unknown; + script = Script.Unknown; if (text.Length == 0) { @@ -182,7 +182,7 @@ namespace Avalonia.Media.TextFormatting var currentScript = currentGrapheme.FirstCodepoint.Script; - if (currentScript != Script.Common && defaultFont != null && defaultFont.TryGetGlyph(currentGrapheme.FirstCodepoint, out _)) + if (!currentGrapheme.FirstCodepoint.IsWhiteSpace && defaultFont != null && defaultFont.TryGetGlyph(currentGrapheme.FirstCodepoint, out _)) { break; } @@ -192,7 +192,7 @@ namespace Avalonia.Media.TextFormatting { break; } - + if (currentScript != script) { if (script is Script.Unknown || currentScript != Script.Common && diff --git a/src/Avalonia.Base/Media/TextFormatting/TextLayout.cs b/src/Avalonia.Base/Media/TextFormatting/TextLayout.cs index f3af240c58..0828b6518a 100644 --- a/src/Avalonia.Base/Media/TextFormatting/TextLayout.cs +++ b/src/Avalonia.Base/Media/TextFormatting/TextLayout.cs @@ -63,7 +63,7 @@ namespace Avalonia.Media.TextFormatting MaxHeight = maxHeight; - MaxLines = maxLines; + MaxLines = maxLines; TextLines = CreateTextLines(); } @@ -80,7 +80,7 @@ namespace Avalonia.Media.TextFormatting /// The maximum number of text lines. public TextLayout( ITextSource textSource, - TextParagraphProperties paragraphProperties, + TextParagraphProperties paragraphProperties, TextTrimming? textTrimming = null, double maxWidth = double.PositiveInfinity, double maxHeight = double.PositiveInfinity, @@ -178,24 +178,18 @@ namespace Avalonia.Media.TextFormatting return new Rect(); } - if (textPosition < 0 || textPosition >= _textSourceLength) + if (textPosition < 0) { - var lastLine = TextLines[TextLines.Count - 1]; - - var lineX = lastLine.Width; - - var lineY = Bounds.Bottom - lastLine.Height; - - return new Rect(lineX, lineY, 0, lastLine.Height); + textPosition = _textSourceLength; } var currentY = 0.0; foreach (var textLine in TextLines) { - var end = textLine.FirstTextSourceIndex + textLine.Length - 1; + var end = textLine.FirstTextSourceIndex + textLine.Length; - if (end < textPosition) + if (end <= textPosition && end < _textSourceLength) { currentY += textLine.Height; @@ -224,7 +218,7 @@ namespace Avalonia.Media.TextFormatting } var result = new List(TextLines.Count); - + var currentY = 0d; foreach (var textLine in TextLines) @@ -239,7 +233,7 @@ namespace Avalonia.Media.TextFormatting var textBounds = textLine.GetTextBounds(start, length); - if(textBounds.Count > 0) + if (textBounds.Count > 0) { foreach (var bounds in textBounds) { @@ -262,7 +256,7 @@ namespace Avalonia.Media.TextFormatting } } - if(textLine.FirstTextSourceIndex + textLine.Length >= start + length) + if (textLine.FirstTextSourceIndex + textLine.Length >= start + length) { break; } @@ -305,7 +299,7 @@ namespace Avalonia.Media.TextFormatting return GetHitTestResult(currentLine, characterHit, point); } - + public int GetLineIndexFromCharacterIndex(int charIndex, bool trailingEdge) { if (charIndex < 0) @@ -327,7 +321,7 @@ namespace Avalonia.Media.TextFormatting continue; } - if (charIndex >= textLine.FirstTextSourceIndex && + if (charIndex >= textLine.FirstTextSourceIndex && charIndex <= textLine.FirstTextSourceIndex + textLine.Length - (trailingEdge ? 0 : 1)) { return index; @@ -398,7 +392,7 @@ namespace Avalonia.Media.TextFormatting /// The current left. /// The current width. /// The current height. - private static void UpdateBounds(TextLine textLine,ref double left, ref double width, ref double height) + private static void UpdateBounds(TextLine textLine, ref double left, ref double width, ref double height) { var lineWidth = textLine.WidthIncludingTrailingWhitespace; @@ -421,7 +415,7 @@ namespace Avalonia.Media.TextFormatting { var textLine = TextFormatterImpl.CreateEmptyTextLine(0, double.PositiveInfinity, _paragraphProperties); - Bounds = new Rect(0,0,0, textLine.Height); + Bounds = new Rect(0, 0, 0, textLine.Height); return new List { textLine }; } @@ -439,9 +433,9 @@ namespace Avalonia.Media.TextFormatting var textLine = TextFormatter.Current.FormatLine(_textSource, _textSourceLength, MaxWidth, _paragraphProperties, previousLine?.TextLineBreak); - if(textLine == null || textLine.Length == 0 || textLine.TextRuns.Count == 0 && textLine.TextLineBreak?.TextEndOfLine is TextEndOfParagraph) + if (textLine == null || textLine.Length == 0 || textLine.TextRuns.Count == 0 && textLine.TextLineBreak?.TextEndOfLine is TextEndOfParagraph) { - if(previousLine != null && previousLine.NewLineLength > 0) + if (previousLine != null && previousLine.NewLineLength > 0) { var emptyTextLine = TextFormatterImpl.CreateEmptyTextLine(_textSourceLength, MaxWidth, _paragraphProperties); @@ -454,7 +448,7 @@ namespace Avalonia.Media.TextFormatting } _textSourceLength += textLine.Length; - + //Fulfill max height constraint if (textLines.Count > 0 && !double.IsPositiveInfinity(MaxHeight) && height + textLine.Height > MaxHeight) { @@ -485,12 +479,17 @@ namespace Avalonia.Media.TextFormatting //Fulfill max lines constraint if (MaxLines > 0 && textLines.Count >= MaxLines) { + if(textLine.TextLineBreak is TextLineBreak lineBreak && lineBreak.RemainingRuns != null) + { + textLines[textLines.Count - 1] = textLine.Collapse(GetCollapsingProperties(width)); + } + break; } } //Make sure the TextLayout always contains at least on empty line - if(textLines.Count == 0) + if (textLines.Count == 0) { var textLine = TextFormatterImpl.CreateEmptyTextLine(0, MaxWidth, _paragraphProperties); @@ -501,7 +500,7 @@ namespace Avalonia.Media.TextFormatting Bounds = new Rect(left, 0, width, height); - if(_paragraphProperties.TextAlignment == TextAlignment.Justify) + if (_paragraphProperties.TextAlignment == TextAlignment.Justify) { var whitespaceWidth = 0d; @@ -509,7 +508,7 @@ namespace Avalonia.Media.TextFormatting { var lineWhitespaceWidth = line.Width - line.WidthIncludingTrailingWhitespace; - if(lineWhitespaceWidth > whitespaceWidth) + if (lineWhitespaceWidth > whitespaceWidth) { whitespaceWidth = lineWhitespaceWidth; } @@ -517,7 +516,7 @@ namespace Avalonia.Media.TextFormatting var justificationWidth = width - whitespaceWidth; - if(justificationWidth > 0) + if (justificationWidth > 0) { var justificationProperties = new InterWordJustification(justificationWidth); @@ -538,8 +537,13 @@ namespace Avalonia.Media.TextFormatting /// /// The collapsing width. /// The . - private TextCollapsingProperties GetCollapsingProperties(double width) + private TextCollapsingProperties? GetCollapsingProperties(double width) { + if(_textTrimming == TextTrimming.None) + { + return null; + } + return _textTrimming.CreateCollapsingProperties(new TextCollapsingCreateInfo(width, _paragraphProperties.DefaultTextRunProperties)); } } diff --git a/src/Avalonia.Base/Media/TextFormatting/TextLine.cs b/src/Avalonia.Base/Media/TextFormatting/TextLine.cs index c8a23097db..61b24dc8c5 100644 --- a/src/Avalonia.Base/Media/TextFormatting/TextLine.cs +++ b/src/Avalonia.Base/Media/TextFormatting/TextLine.cs @@ -153,7 +153,7 @@ namespace Avalonia.Media.TextFormatting /// /// A value that represents a collapsed line that can be displayed. /// - public abstract TextLine Collapse(params TextCollapsingProperties[] collapsingPropertiesList); + public abstract TextLine Collapse(params TextCollapsingProperties?[] collapsingPropertiesList); /// /// Create a justified line based on justification text properties. diff --git a/src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs b/src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs index 7c686358e2..fa1ab6fd29 100644 --- a/src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs +++ b/src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs @@ -119,7 +119,7 @@ namespace Avalonia.Media.TextFormatting } /// - public override TextLine Collapse(params TextCollapsingProperties[] collapsingPropertiesList) + public override TextLine Collapse(params TextCollapsingProperties?[] collapsingPropertiesList) { if (collapsingPropertiesList.Length == 0) { @@ -128,6 +128,11 @@ namespace Avalonia.Media.TextFormatting var collapsingProperties = collapsingPropertiesList[0]; + if(collapsingProperties is null) + { + return this; + } + var collapsedRuns = collapsingProperties.Collapse(this); if (collapsedRuns is null) @@ -166,58 +171,122 @@ namespace Avalonia.Media.TextFormatting if (distance <= 0) { - // hit happens before the line, return the first position var firstRun = _textRuns[0]; - if (firstRun is ShapedTextCharacters shapedTextCharacters) - { - return shapedTextCharacters.GlyphRun.GetCharacterHitFromDistance(distance, out _); - } + return GetRunCharacterHit(firstRun, FirstTextSourceIndex, 0); + } - return _resolvedFlowDirection == FlowDirection.LeftToRight ? - new CharacterHit(FirstTextSourceIndex) : - new CharacterHit(FirstTextSourceIndex + Length); + if (distance >= WidthIncludingTrailingWhitespace) + { + var lastRun = _textRuns[_textRuns.Count - 1]; + + return GetRunCharacterHit(lastRun, FirstTextSourceIndex + Length - lastRun.TextSourceLength, lastRun.Size.Width); } // process hit that happens within the line var characterHit = new CharacterHit(); var currentPosition = FirstTextSourceIndex; + var currentDistance = 0.0; - foreach (var currentRun in _textRuns) + for (var i = 0; i < _textRuns.Count; i++) { - switch (currentRun) + var currentRun = _textRuns[i]; + + if(currentRun is ShapedTextCharacters shapedRun && !shapedRun.ShapedBuffer.IsLeftToRight) { - case ShapedTextCharacters shapedRun: + var rightToLeftIndex = i; + currentPosition += currentRun.TextSourceLength; + + while (rightToLeftIndex + 1 <= _textRuns.Count - 1) + { + var nextShaped = _textRuns[rightToLeftIndex + 1] as ShapedTextCharacters; + + if (nextShaped == null || nextShaped.ShapedBuffer.IsLeftToRight) { - characterHit = shapedRun.GlyphRun.GetCharacterHitFromDistance(distance, out _); + break; + } - var offset = Math.Max(0, currentPosition - shapedRun.Text.Start); + currentPosition += nextShaped.TextSourceLength; - characterHit = new CharacterHit(characterHit.FirstCharacterIndex + offset, characterHit.TrailingLength); + rightToLeftIndex++; + } + for (var j = i; i <= rightToLeftIndex; j++) + { + if(j > _textRuns.Count - 1) + { break; } - default: + + currentRun = _textRuns[j]; + + if(currentDistance + currentRun.Size.Width <= distance) { - if (distance < currentRun.Size.Width / 2) - { - characterHit = new CharacterHit(currentPosition); - } - else - { - characterHit = new CharacterHit(currentPosition, currentRun.TextSourceLength); - } - break; + currentDistance += currentRun.Size.Width; + currentPosition -= currentRun.TextSourceLength; + + continue; } + + characterHit = GetRunCharacterHit(currentRun, currentPosition, distance - currentDistance); + + break; + } } - if (distance <= currentRun.Size.Width) + if (currentDistance + currentRun.Size.Width < distance) { - break; + currentDistance += currentRun.Size.Width; + currentPosition += currentRun.TextSourceLength; + + continue; } - distance -= currentRun.Size.Width; - currentPosition += currentRun.TextSourceLength; + characterHit = GetRunCharacterHit(currentRun, currentPosition, distance - currentDistance); + + break; + } + + return characterHit; + } + + private static CharacterHit GetRunCharacterHit(DrawableTextRun run, int currentPosition, double distance) + { + CharacterHit characterHit; + + switch (run) + { + case ShapedTextCharacters shapedRun: + { + characterHit = shapedRun.GlyphRun.GetCharacterHitFromDistance(distance, out _); + + var offset = 0; + + if (shapedRun.GlyphRun.IsLeftToRight) + { + offset = Math.Max(0, currentPosition - shapedRun.Text.Start); + } + //else + //{ + // offset = Math.Max(0, currentPosition - shapedRun.Text.Start + shapedRun.Text.Length); + //} + + characterHit = new CharacterHit(characterHit.FirstCharacterIndex + offset, characterHit.TrailingLength); + + break; + } + default: + { + if (distance < run.Size.Width / 2) + { + characterHit = new CharacterHit(currentPosition); + } + else + { + characterHit = new CharacterHit(currentPosition, run.TextSourceLength); + } + break; + } } return characterHit; @@ -226,136 +295,168 @@ namespace Avalonia.Media.TextFormatting /// public override double GetDistanceFromCharacterHit(CharacterHit characterHit) { - var isTrailingHit = characterHit.TrailingLength > 0; + var flowDirection = _paragraphProperties.FlowDirection; var characterIndex = characterHit.FirstCharacterIndex + characterHit.TrailingLength; - var currentDistance = Start; var currentPosition = FirstTextSourceIndex; var remainingLength = characterIndex - FirstTextSourceIndex; - GlyphRun? lastRun = null; + var currentDistance = Start; - for (var index = 0; index < _textRuns.Count; index++) + if (flowDirection == FlowDirection.LeftToRight) { - var textRun = _textRuns[index]; - - switch (textRun) + for (var index = 0; index < _textRuns.Count; index++) { - case ShapedTextCharacters shapedTextCharacters: - { - var currentRun = shapedTextCharacters.GlyphRun; + var currentRun = _textRuns[index]; - if (lastRun != null) - { - if (!lastRun.IsLeftToRight && currentRun.IsLeftToRight && - currentRun.Characters.Start == characterHit.FirstCharacterIndex && - characterHit.TrailingLength == 0) - { - return currentDistance; - } - } + if (currentRun is ShapedTextCharacters shapedRun && !shapedRun.ShapedBuffer.IsLeftToRight) + { + var i = index; + + var rightToLeftWidth = currentRun.Size.Width; - //Look for a hit in within the current run - if (currentPosition + remainingLength <= currentPosition + textRun.Text.Length) + while (i + 1 <= _textRuns.Count - 1) + { + var nextRun = _textRuns[i + 1]; + + if (nextRun is ShapedTextCharacters nextShapedRun && !nextShapedRun.ShapedBuffer.IsLeftToRight) { - characterHit = new CharacterHit(textRun.Text.Start + remainingLength); + i++; - var distance = currentRun.GetDistanceFromCharacterHit(characterHit); + rightToLeftWidth += nextRun.Size.Width; - return currentDistance + distance; + continue; } + + break; + } - //Look at the left and right edge of the current run - if (currentRun.IsLeftToRight) + if(i > index) + { + while (i >= index) { - if (_resolvedFlowDirection == FlowDirection.LeftToRight && (lastRun == null || lastRun.IsLeftToRight)) - { - if (characterIndex <= currentPosition) - { - return currentDistance; - } - } - else - { - if (characterIndex == currentPosition) - { - return currentDistance; - } - } + currentRun = _textRuns[i]; - if (characterIndex == currentPosition + textRun.Text.Length && isTrailingHit) - { - return currentDistance + currentRun.Size.Width; - } - } - else - { - if (characterIndex == currentPosition) + rightToLeftWidth -= currentRun.Size.Width; + + if (currentPosition + currentRun.TextSourceLength >= characterIndex) { - return currentDistance + currentRun.Size.Width; + break; } - var nextRun = index + 1 < _textRuns.Count ? - _textRuns[index + 1] as ShapedTextCharacters : - null; + currentPosition += currentRun.TextSourceLength; - if (nextRun != null) - { - if (nextRun.ShapedBuffer.IsLeftToRight) - { - if (characterIndex == currentPosition + textRun.Text.Length) - { - return currentDistance; - } - } - else - { - if (currentPosition + nextRun.Text.Length == characterIndex) - { - return currentDistance; - } - } - } - else - { - if (characterIndex > currentPosition + textRun.Text.Length) - { - return currentDistance; - } - } + remainingLength -= currentRun.TextSourceLength; + + i--; } - lastRun = currentRun; + currentDistance += rightToLeftWidth; + } + } + + if (currentPosition + currentRun.TextSourceLength >= characterIndex && + TryGetDistanceFromCharacterHit(currentRun, characterHit, currentPosition, remainingLength, flowDirection, out var distance, out _)) + { + return Math.Max(0, currentDistance + distance); + } - break; + //No hit hit found so we add the full width + currentDistance += currentRun.Size.Width; + currentPosition += currentRun.TextSourceLength; + remainingLength -= currentRun.TextSourceLength; + } + } + else + { + currentDistance += WidthIncludingTrailingWhitespace; + + for (var index = _textRuns.Count - 1; index >= 0; index--) + { + var currentRun = _textRuns[index]; + + if (TryGetDistanceFromCharacterHit(currentRun, characterHit, currentPosition, remainingLength, + flowDirection, out var distance, out var currentGlyphRun)) + { + if (currentGlyphRun != null) + { + distance = currentGlyphRun.Size.Width - distance; } - default: + + return Math.Max(0, currentDistance - distance); + } + + //No hit hit found so we add the full width + currentDistance -= currentRun.Size.Width; + currentPosition += currentRun.TextSourceLength; + remainingLength -= currentRun.TextSourceLength; + } + } + + return Math.Max(0, currentDistance); + } + + private static bool TryGetDistanceFromCharacterHit( + DrawableTextRun currentRun, + CharacterHit characterHit, + int currentPosition, + int remainingLength, + FlowDirection flowDirection, + out double distance, + out GlyphRun? currentGlyphRun) + { + var characterIndex = characterHit.FirstCharacterIndex + characterHit.TrailingLength; + var isTrailingHit = characterHit.TrailingLength > 0; + + distance = 0; + currentGlyphRun = null; + + switch (currentRun) + { + case ShapedTextCharacters shapedTextCharacters: + { + currentGlyphRun = shapedTextCharacters.GlyphRun; + + if (currentPosition + remainingLength <= currentPosition + currentRun.Text.Length) { - if (characterIndex == currentPosition) - { - return currentDistance; - } + characterHit = new CharacterHit(currentRun.Text.Start + remainingLength); + + distance = currentGlyphRun.GetDistanceFromCharacterHit(characterHit); + + return true; + } - if (characterIndex == currentPosition + textRun.TextSourceLength) + if (currentPosition + remainingLength == currentPosition + currentRun.Text.Length && isTrailingHit) + { + if (currentGlyphRun.IsLeftToRight || flowDirection == FlowDirection.RightToLeft) { - return currentDistance + textRun.Size.Width; + distance = currentGlyphRun.Size.Width; } - break; + return true; } - } - //No hit hit found so we add the full width - currentDistance += textRun.Size.Width; - currentPosition += textRun.TextSourceLength; - remainingLength -= textRun.TextSourceLength; + break; + } + default: + { + if (characterIndex == currentPosition) + { + return true; + } - if (remainingLength <= 0) - { - break; - } + if (characterIndex == currentPosition + currentRun.TextSourceLength) + { + distance = currentRun.Size.Width; + + return true; + + } + + break; + } } - return currentDistance; + return false; } /// @@ -440,121 +541,168 @@ namespace Avalonia.Media.TextFormatting continue; } - if (currentPosition + currentRun.TextSourceLength <= firstTextSourceIndex) - { - startX += currentRun.Size.Width; - - currentPosition += currentRun.TextSourceLength; - - continue; - } - var characterLength = 0; var endX = startX; + var runWidth = 0.0; + TextRunBounds? currentRunBounds = null; - if (currentRun is ShapedTextCharacters currentShapedRun) - { - var offset = Math.Max(0, firstTextSourceIndex - currentPosition); - - currentPosition += offset; + var currentShapedRun = currentRun as ShapedTextCharacters; - var startIndex = currentRun.Text.Start + offset; + if (currentShapedRun != null && !currentShapedRun.ShapedBuffer.IsLeftToRight) + { + var rightToLeftIndex = index; + startX += currentShapedRun.Size.Width; - var endOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit( - currentShapedRun.ShapedBuffer.IsLeftToRight ? - new CharacterHit(startIndex + remainingLength) : - new CharacterHit(startIndex)); + while (rightToLeftIndex + 1 <= _textRuns.Count - 1) + { + var nextShapedRun = _textRuns[rightToLeftIndex + 1] as ShapedTextCharacters; - endX += endOffset; + if (nextShapedRun == null || nextShapedRun.ShapedBuffer.IsLeftToRight) + { + break; + } - var startOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit( - currentShapedRun.ShapedBuffer.IsLeftToRight ? - new CharacterHit(startIndex) : - new CharacterHit(startIndex + remainingLength)); + startX += nextShapedRun.Size.Width; - startX += startOffset; + rightToLeftIndex++; + } - var endHit = currentShapedRun.GlyphRun.GetCharacterHitFromDistance(endOffset, out _); - var startHit = currentShapedRun.GlyphRun.GetCharacterHitFromDistance(startOffset, out _); + if (TryGetTextRunBoundsRightToLeft(startX, firstTextSourceIndex, characterIndex, rightToLeftIndex, ref currentPosition, ref remainingLength, out currentRunBounds)) + { + startX = currentRunBounds!.Rectangle.Left; + endX = currentRunBounds.Rectangle.Right; - characterLength = Math.Abs(endHit.FirstCharacterIndex + endHit.TrailingLength - startHit.FirstCharacterIndex - startHit.TrailingLength); + runWidth = currentRunBounds.Rectangle.Width; + } - currentDirection = currentShapedRun.ShapedBuffer.IsLeftToRight ? - FlowDirection.LeftToRight : - FlowDirection.RightToLeft; + currentDirection = FlowDirection.RightToLeft; } else { - if (currentPosition < firstTextSourceIndex) + if (currentShapedRun != null) { - startX += currentRun.Size.Width; - } + if (currentPosition + currentRun.TextSourceLength <= firstTextSourceIndex) + { + startX += currentRun.Size.Width; - if (currentPosition + currentRun.TextSourceLength <= characterIndex) - { - endX += currentRun.Size.Width; + currentPosition += currentRun.TextSourceLength; - characterLength = currentRun.TextSourceLength; + continue; + } + + var offset = Math.Max(0, firstTextSourceIndex - currentPosition); + + currentPosition += offset; + + var startIndex = currentRun.Text.Start + offset; + + double startOffset; + double endOffset; + + if (currentShapedRun.ShapedBuffer.IsLeftToRight) + { + startOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit(new CharacterHit(startIndex)); + + endOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit(new CharacterHit(startIndex + remainingLength)); + } + else + { + endOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit(new CharacterHit(startIndex)); + + if (currentPosition < startIndex) + { + startOffset = endOffset; + } + else + { + startOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit(new CharacterHit(startIndex + remainingLength)); + } + } + + startX += startOffset; + + endX += endOffset; + + var endHit = currentShapedRun.GlyphRun.GetCharacterHitFromDistance(endOffset, out _); + var startHit = currentShapedRun.GlyphRun.GetCharacterHitFromDistance(startOffset, out _); + + characterLength = Math.Abs(endHit.FirstCharacterIndex + endHit.TrailingLength - startHit.FirstCharacterIndex - startHit.TrailingLength); + + currentDirection = FlowDirection.LeftToRight; } - } + else + { + if (currentPosition + currentRun.TextSourceLength <= firstTextSourceIndex) + { + startX += currentRun.Size.Width; - if (endX < startX) - { - (endX, startX) = (startX, endX); - } + currentPosition += currentRun.TextSourceLength; - //Lines that only contain a linebreak need to be covered here - if(characterLength == 0) - { - characterLength = NewLineLength; - } + continue; + } - var runwidth = endX - startX; - var currentRunBounds = new TextRunBounds(new Rect(startX, 0, runwidth, Height), currentPosition, characterLength, currentRun); + if (currentPosition < firstTextSourceIndex) + { + startX += currentRun.Size.Width; + } - if (lastDirection == currentDirection && result.Count > 0 && MathUtilities.AreClose(currentRect.Right, startX)) - { - currentRect = currentRect.WithWidth(currentWidth + runwidth); + if (currentPosition + currentRun.TextSourceLength <= characterIndex) + { + endX += currentRun.Size.Width; - var textBounds = result[result.Count - 1]; + characterLength = currentRun.TextSourceLength; + } + } - textBounds.Rectangle = currentRect; + if (endX < startX) + { + (endX, startX) = (startX, endX); + } - textBounds.TextRunBounds.Add(currentRunBounds); - } - else - { - currentRect = currentRunBounds.Rectangle; + //Lines that only contain a linebreak need to be covered here + if (characterLength == 0) + { + characterLength = NewLineLength; + } - result.Add(new TextBounds(currentRect, currentDirection, new List { currentRunBounds })); - } + runWidth = endX - startX; + currentRunBounds = new TextRunBounds(new Rect(startX, 0, runWidth, Height), currentPosition, characterLength, currentRun); - currentWidth += runwidth; - currentPosition += characterLength; + currentPosition += characterLength; + + remainingLength -= characterLength; + } - if (currentDirection == FlowDirection.LeftToRight) + if (currentRunBounds != null && !MathUtilities.IsZero(runWidth) || NewLineLength > 0) { - if (currentPosition > characterIndex) + if (lastDirection == currentDirection && result.Count > 0 && MathUtilities.AreClose(currentRect.Right, startX)) { - break; + currentRect = currentRect.WithWidth(currentWidth + runWidth); + + var textBounds = result[result.Count - 1]; + + textBounds.Rectangle = currentRect; + + textBounds.TextRunBounds.Add(currentRunBounds!); } - } - else - { - if (currentPosition <= firstTextSourceIndex) + else { - break; + currentRect = currentRunBounds!.Rectangle; + + result.Add(new TextBounds(currentRect, currentDirection, new List { currentRunBounds })); } } - startX = endX; - lastDirection = currentDirection; - remainingLength -= characterLength; + currentWidth += runWidth; + - if (remainingLength <= 0) + if (remainingLength <= 0 || currentPosition >= characterIndex) { break; } + + startX = endX; + lastDirection = currentDirection; } return result; @@ -571,7 +719,7 @@ namespace Avalonia.Media.TextFormatting var currentPosition = FirstTextSourceIndex; var remainingLength = textLength; - var startX = Start + WidthIncludingTrailingWhitespace; + var startX = WidthIncludingTrailingWhitespace; double currentWidth = 0; var currentRect = Rect.Empty; @@ -582,7 +730,7 @@ namespace Avalonia.Media.TextFormatting continue; } - if (currentPosition + currentRun.TextSourceLength <= firstTextSourceIndex) + if (currentPosition + currentRun.TextSourceLength < firstTextSourceIndex) { startX -= currentRun.Size.Width; @@ -601,20 +749,31 @@ namespace Avalonia.Media.TextFormatting currentPosition += offset; var startIndex = currentRun.Text.Start + offset; + double startOffset; + double endOffset; - var endOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit( - currentShapedRun.ShapedBuffer.IsLeftToRight ? - new CharacterHit(startIndex + remainingLength) : - new CharacterHit(startIndex)); + if (currentShapedRun.ShapedBuffer.IsLeftToRight) + { + if (currentPosition < startIndex) + { + startOffset = endOffset = 0; + } + else + { + endOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit(new CharacterHit(startIndex + remainingLength)); - endX += endOffset - currentShapedRun.Size.Width; + startOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit(new CharacterHit(startIndex)); + } + } + else + { + endOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit(new CharacterHit(startIndex)); - var startOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit( - currentShapedRun.ShapedBuffer.IsLeftToRight ? - new CharacterHit(startIndex) : - new CharacterHit(startIndex + remainingLength)); + startOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit(new CharacterHit(startIndex + remainingLength)); + } - startX += startOffset - currentShapedRun.Size.Width; + startX -= currentRun.Size.Width - startOffset; + endX -= currentRun.Size.Width - endOffset; var endHit = currentShapedRun.GlyphRun.GetCharacterHitFromDistance(endOffset, out _); var startHit = currentShapedRun.GlyphRun.GetCharacterHitFromDistance(startOffset, out _); @@ -652,53 +811,150 @@ namespace Avalonia.Media.TextFormatting } var runWidth = endX - startX; - var currentRunBounds = new TextRunBounds(new Rect(startX, 0, runWidth, Height), currentPosition, characterLength, currentRun); - if (lastDirection == currentDirection && result.Count > 0 && MathUtilities.AreClose(currentRect.Right, startX)) + var currentRunBounds = new TextRunBounds(new Rect(Start + startX, 0, runWidth, Height), currentPosition, characterLength, currentRun); + + if (!MathUtilities.IsZero(runWidth) || NewLineLength > 0) { - currentRect = currentRect.WithWidth(currentWidth + runWidth); + if (lastDirection == currentDirection && result.Count > 0 && MathUtilities.AreClose(currentRect.Right, Start + startX)) + { + currentRect = currentRect.WithWidth(currentWidth + runWidth); - var textBounds = result[result.Count - 1]; + var textBounds = result[result.Count - 1]; - textBounds.Rectangle = currentRect; + textBounds.Rectangle = currentRect; - textBounds.TextRunBounds.Add(currentRunBounds); - } - else - { - currentRect = currentRunBounds.Rectangle; + textBounds.TextRunBounds.Add(currentRunBounds); + } + else + { + currentRect = currentRunBounds.Rectangle; - result.Add(new TextBounds(currentRect, currentDirection, new List { currentRunBounds })); + result.Add(new TextBounds(currentRect, currentDirection, new List { currentRunBounds })); + } } currentWidth += runWidth; currentPosition += characterLength; - if (currentDirection == FlowDirection.LeftToRight) + if (currentPosition > characterIndex) + { + break; + } + + lastDirection = currentDirection; + remainingLength -= characterLength; + + if (remainingLength <= 0) + { + break; + } + } + + result.Reverse(); + + return result; + } + + private bool TryGetTextRunBoundsRightToLeft(double startX, int firstTextSourceIndex, int characterIndex, int runIndex, ref int currentPosition, ref int remainingLength, out TextRunBounds? textRunBounds) + { + textRunBounds = null; + + for (var index = runIndex; index >= 0; index--) + { + if (TextRuns[index] is not DrawableTextRun currentRun) + { + continue; + } + + if (currentPosition + currentRun.TextSourceLength <= firstTextSourceIndex) { - if (currentPosition > characterIndex) + startX -= currentRun.Size.Width; + + currentPosition += currentRun.TextSourceLength; + + continue; + } + + var characterLength = 0; + var endX = startX; + + if (currentRun is ShapedTextCharacters currentShapedRun) + { + var offset = Math.Max(0, firstTextSourceIndex - currentPosition); + + currentPosition += offset; + + var startIndex = currentRun.Text.Start + offset; + double startOffset; + double endOffset; + + if (currentShapedRun.ShapedBuffer.IsLeftToRight) { - break; + if (currentPosition < startIndex) + { + startOffset = endOffset = 0; + } + else + { + endOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit(new CharacterHit(startIndex + remainingLength)); + + startOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit(new CharacterHit(startIndex)); + } } + else + { + endOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit(new CharacterHit(startIndex)); + + startOffset = currentShapedRun.GlyphRun.GetDistanceFromCharacterHit(new CharacterHit(startIndex + remainingLength)); + } + + startX -= currentRun.Size.Width - startOffset; + endX -= currentRun.Size.Width - endOffset; + + var endHit = currentShapedRun.GlyphRun.GetCharacterHitFromDistance(endOffset, out _); + var startHit = currentShapedRun.GlyphRun.GetCharacterHitFromDistance(startOffset, out _); + + characterLength = Math.Abs(startHit.FirstCharacterIndex + startHit.TrailingLength - endHit.FirstCharacterIndex - endHit.TrailingLength); } else { - if (currentPosition <= firstTextSourceIndex) + if (currentPosition + currentRun.TextSourceLength <= characterIndex) { - break; + endX -= currentRun.Size.Width; + } + + if (currentPosition < firstTextSourceIndex) + { + startX -= currentRun.Size.Width; + + characterLength = currentRun.TextSourceLength; } } - lastDirection = currentDirection; - remainingLength -= characterLength; + if (endX < startX) + { + (endX, startX) = (startX, endX); + } - if (remainingLength <= 0) + //Lines that only contain a linebreak need to be covered here + if (characterLength == 0) { - break; + characterLength = NewLineLength; } + + var runWidth = endX - startX; + + remainingLength -= characterLength; + + currentPosition += characterLength; + + textRunBounds = new TextRunBounds(new Rect(Start + startX, 0, runWidth, Height), currentPosition, characterLength, currentRun); + + return true; } - return result; + return false; } public override IReadOnlyList GetTextBounds(int firstTextSourceIndex, int textLength) @@ -1280,6 +1536,11 @@ namespace Avalonia.Media.TextFormatting var textAlignment = _paragraphProperties.TextAlignment; var paragraphFlowDirection = _paragraphProperties.FlowDirection; + if(textAlignment == TextAlignment.Justify) + { + textAlignment = TextAlignment.Start; + } + switch (textAlignment) { case TextAlignment.Start: @@ -1302,8 +1563,14 @@ namespace Avalonia.Media.TextFormatting switch (textAlignment) { case TextAlignment.Center: - return Math.Max(0, (_paragraphWidth - width) / 2); + var start = (_paragraphWidth - width) / 2; + + if (paragraphFlowDirection == FlowDirection.RightToLeft) + { + start -= (widthIncludingTrailingWhitespace - width); + } + return Math.Max(0, start); case TextAlignment.Right: return Math.Max(0, _paragraphWidth - widthIncludingTrailingWhitespace); diff --git a/src/Avalonia.Base/Media/TextFormatting/Unicode/Codepoint.cs b/src/Avalonia.Base/Media/TextFormatting/Unicode/Codepoint.cs index 56a90f31ea..ab17263806 100644 --- a/src/Avalonia.Base/Media/TextFormatting/Unicode/Codepoint.cs +++ b/src/Avalonia.Base/Media/TextFormatting/Unicode/Codepoint.cs @@ -224,7 +224,7 @@ namespace Avalonia.Media.TextFormatting.Unicode } /// - /// Returns if is between + /// Returns if is between /// and , inclusive. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/src/Markup/Avalonia.Markup.Xaml/IAddChild.cs b/src/Avalonia.Base/Metadata/IAddChild.cs similarity index 61% rename from src/Markup/Avalonia.Markup.Xaml/IAddChild.cs rename to src/Avalonia.Base/Metadata/IAddChild.cs index 993eb6142d..8ef02912a6 100644 --- a/src/Markup/Avalonia.Markup.Xaml/IAddChild.cs +++ b/src/Avalonia.Base/Metadata/IAddChild.cs @@ -1,11 +1,11 @@ -namespace Avalonia.Markup.Xaml +namespace Avalonia.Metadata { public interface IAddChild { void AddChild(object child); } - public interface IAddChild : IAddChild + public interface IAddChild { void AddChild(T child); } diff --git a/src/Avalonia.Base/Platform/IDrawingContextImpl.cs b/src/Avalonia.Base/Platform/IDrawingContextImpl.cs index d84a509234..6aa5eeea3d 100644 --- a/src/Avalonia.Base/Platform/IDrawingContextImpl.cs +++ b/src/Avalonia.Base/Platform/IDrawingContextImpl.cs @@ -172,6 +172,20 @@ namespace Avalonia.Platform /// /// Custom draw operation void Custom(ICustomDrawOperation custom); + + /// + /// Attempts to get an optional feature from the drawing context implementation + /// + object? GetFeature(Type t); + } + + public static class DrawingContextImplExtensions + { + /// + /// Attempts to get an optional feature from the drawing context implementation + /// + public static T? GetFeature(this IDrawingContextImpl context) where T : class => + (T?)context.GetFeature(typeof(T)); } public interface IDrawingContextLayerImpl : IRenderTargetBitmapImpl diff --git a/src/Avalonia.Base/Platform/IGeometryImpl.cs b/src/Avalonia.Base/Platform/IGeometryImpl.cs index c80f8923ef..5826cfb2ff 100644 --- a/src/Avalonia.Base/Platform/IGeometryImpl.cs +++ b/src/Avalonia.Base/Platform/IGeometryImpl.cs @@ -38,8 +38,8 @@ namespace Avalonia.Platform /// Intersects the geometry with another geometry. /// /// The other geometry. - /// A new representing the intersection. - IGeometryImpl Intersect(IGeometryImpl geometry); + /// A new representing the intersection or null when the operation failed. + IGeometryImpl? Intersect(IGeometryImpl geometry); /// /// Indicates whether the geometry's stroke contains the specified point. diff --git a/src/Avalonia.Base/Platform/Storage/FileIO/BclStorageFile.cs b/src/Avalonia.Base/Platform/Storage/FileIO/BclStorageFile.cs index 5af02219ce..cf21e9b8b5 100644 --- a/src/Avalonia.Base/Platform/Storage/FileIO/BclStorageFile.cs +++ b/src/Avalonia.Base/Platform/Storage/FileIO/BclStorageFile.cs @@ -47,22 +47,22 @@ public class BclStorageFile : IStorageBookmarkFile return Task.FromResult(null); } - public Task OpenRead() + public Task OpenReadAsync() { return Task.FromResult(_fileInfo.OpenRead()); } - public Task OpenWrite() + public Task OpenWriteAsync() { return Task.FromResult(_fileInfo.OpenWrite()); } - public virtual Task SaveBookmark() + public virtual Task SaveBookmarkAsync() { return Task.FromResult(_fileInfo.FullName); } - public Task ReleaseBookmark() + public Task ReleaseBookmarkAsync() { // No-op return Task.CompletedTask; diff --git a/src/Avalonia.Base/Platform/Storage/FileIO/BclStorageFolder.cs b/src/Avalonia.Base/Platform/Storage/FileIO/BclStorageFolder.cs index 7267017eaf..cd6c8be1ae 100644 --- a/src/Avalonia.Base/Platform/Storage/FileIO/BclStorageFolder.cs +++ b/src/Avalonia.Base/Platform/Storage/FileIO/BclStorageFolder.cs @@ -1,6 +1,8 @@ using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Linq; using System.Security; using System.Threading.Tasks; using Avalonia.Metadata; @@ -43,12 +45,22 @@ public class BclStorageFolder : IStorageBookmarkFolder return Task.FromResult(null); } - public virtual Task SaveBookmark() + public Task> GetItemsAsync() + { + var items = _directoryInfo.GetDirectories() + .Select(d => (IStorageItem)new BclStorageFolder(d)) + .Concat(_directoryInfo.GetFiles().Select(f => new BclStorageFile(f))) + .ToArray(); + + return Task.FromResult>(items); + } + + public virtual Task SaveBookmarkAsync() { return Task.FromResult(_directoryInfo.FullName); } - public Task ReleaseBookmark() + public Task ReleaseBookmarkAsync() { // No-op return Task.CompletedTask; diff --git a/src/Avalonia.Base/Platform/Storage/IStorageBookmarkItem.cs b/src/Avalonia.Base/Platform/Storage/IStorageBookmarkItem.cs index d21c950862..40f2720ee8 100644 --- a/src/Avalonia.Base/Platform/Storage/IStorageBookmarkItem.cs +++ b/src/Avalonia.Base/Platform/Storage/IStorageBookmarkItem.cs @@ -6,7 +6,7 @@ namespace Avalonia.Platform.Storage; [NotClientImplementable] public interface IStorageBookmarkItem : IStorageItem { - Task ReleaseBookmark(); + Task ReleaseBookmarkAsync(); } [NotClientImplementable] diff --git a/src/Avalonia.Base/Platform/Storage/IStorageFile.cs b/src/Avalonia.Base/Platform/Storage/IStorageFile.cs index 965caf8216..46aa6efa72 100644 --- a/src/Avalonia.Base/Platform/Storage/IStorageFile.cs +++ b/src/Avalonia.Base/Platform/Storage/IStorageFile.cs @@ -18,7 +18,7 @@ public interface IStorageFile : IStorageItem /// /// Opens a stream for read access. /// - Task OpenRead(); + Task OpenReadAsync(); /// /// Returns true, if file is writeable. @@ -28,5 +28,5 @@ public interface IStorageFile : IStorageItem /// /// Opens stream for writing to the file. /// - Task OpenWrite(); + Task OpenWriteAsync(); } diff --git a/src/Avalonia.Base/Platform/Storage/IStorageFolder.cs b/src/Avalonia.Base/Platform/Storage/IStorageFolder.cs index 25b9f01a92..0ffb9f41c6 100644 --- a/src/Avalonia.Base/Platform/Storage/IStorageFolder.cs +++ b/src/Avalonia.Base/Platform/Storage/IStorageFolder.cs @@ -1,4 +1,6 @@ -using Avalonia.Metadata; +using System.Collections.Generic; +using System.Threading.Tasks; +using Avalonia.Metadata; namespace Avalonia.Platform.Storage; @@ -8,4 +10,11 @@ namespace Avalonia.Platform.Storage; [NotClientImplementable] public interface IStorageFolder : IStorageItem { + /// + /// Gets the files and subfolders in the current folder. + /// + /// + /// When this method completes successfully, it returns a list of the files and folders in the current folder. Each item in the list is represented by an implementation object. + /// + Task> GetItemsAsync(); } diff --git a/src/Avalonia.Base/Platform/Storage/IStorageItem.cs b/src/Avalonia.Base/Platform/Storage/IStorageItem.cs index 8513ebc7d9..f5469d31c9 100644 --- a/src/Avalonia.Base/Platform/Storage/IStorageItem.cs +++ b/src/Avalonia.Base/Platform/Storage/IStorageItem.cs @@ -44,7 +44,7 @@ public interface IStorageItem : IDisposable /// /// Returns identifier of a bookmark. Can be null if OS denied request. /// - Task SaveBookmark(); + Task SaveBookmarkAsync(); /// /// Gets the parent folder of the current storage item. diff --git a/src/Avalonia.Base/Rendering/Composition/Animations/AnimationInstanceBase.cs b/src/Avalonia.Base/Rendering/Composition/Animations/AnimationInstanceBase.cs index 80e64118ee..889c1d34c8 100644 --- a/src/Avalonia.Base/Rendering/Composition/Animations/AnimationInstanceBase.cs +++ b/src/Avalonia.Base/Rendering/Composition/Animations/AnimationInstanceBase.cs @@ -3,8 +3,9 @@ using System.Collections.Generic; using Avalonia.Rendering.Composition.Expressions; using Avalonia.Rendering.Composition.Server; -namespace Avalonia.Rendering.Composition.Animations; +// Special license applies License.md +namespace Avalonia.Rendering.Composition.Animations; /// /// The base class for both key-frame and expression animation instances @@ -79,4 +80,4 @@ internal abstract class AnimationInstanceBase : IAnimationInstance _invalidated = true; TargetObject.NotifyAnimatedValueChanged(Property); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Animations/CompositionAnimation.cs b/src/Avalonia.Base/Rendering/Composition/Animations/CompositionAnimation.cs index c5102a2d7d..a6db4330a3 100644 --- a/src/Avalonia.Base/Rendering/Composition/Animations/CompositionAnimation.cs +++ b/src/Avalonia.Base/Rendering/Composition/Animations/CompositionAnimation.cs @@ -1,12 +1,11 @@ // ReSharper disable InconsistentNaming // ReSharper disable CheckNamespace -using System; -using System.Collections.Generic; using System.Numerics; using Avalonia.Rendering.Composition.Expressions; using Avalonia.Rendering.Composition.Server; -using Avalonia.Rendering.Composition.Transport; + +// Special license applies License.md namespace Avalonia.Rendering.Composition.Animations { @@ -14,10 +13,10 @@ namespace Avalonia.Rendering.Composition.Animations /// This is the base class for ExpressionAnimation and KeyFrameAnimation. /// /// - /// Use the method to start the animation. + /// Use the method to start the animation. /// Value parameters (as opposed to reference parameters which are set using ) /// are copied and "embedded" into an expression at the time CompositionObject.StartAnimation is called. - /// Changing the value of the variable after is called will not affect + /// Changing the value of the variable after is called will not affect /// the value of the ExpressionAnimation. /// See the remarks section of ExpressionAnimation for additional information. /// @@ -72,4 +71,4 @@ namespace Avalonia.Rendering.Composition.Animations } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Animations/CompositionAnimationGroup.cs b/src/Avalonia.Base/Rendering/Composition/Animations/CompositionAnimationGroup.cs index 89f8ba411d..bad3991f43 100644 --- a/src/Avalonia.Base/Rendering/Composition/Animations/CompositionAnimationGroup.cs +++ b/src/Avalonia.Base/Rendering/Composition/Animations/CompositionAnimationGroup.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using Avalonia.Rendering.Composition.Transport; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Animations { public class CompositionAnimationGroup : CompositionObject, ICompositionAnimationBase @@ -21,4 +23,4 @@ namespace Avalonia.Rendering.Composition.Animations { } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Animations/ExpressionAnimation.cs b/src/Avalonia.Base/Rendering/Composition/Animations/ExpressionAnimation.cs index 163f4e99ba..ec2972044e 100644 --- a/src/Avalonia.Base/Rendering/Composition/Animations/ExpressionAnimation.cs +++ b/src/Avalonia.Base/Rendering/Composition/Animations/ExpressionAnimation.cs @@ -3,6 +3,8 @@ using System; using Avalonia.Rendering.Composition.Expressions; using Avalonia.Rendering.Composition.Server; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Animations { /// @@ -14,7 +16,7 @@ namespace Avalonia.Rendering.Composition.Animations /// This contrasts s, which use an interpolator to define how the animating /// property changes over time. The mathematical equation can be defined using references to properties /// of Composition objects, mathematical functions and operators and Input. - /// Use the method to start the animation. + /// Use the method to start the animation. /// public class ExpressionAnimation : CompositionAnimation { @@ -50,4 +52,4 @@ namespace Avalonia.Rendering.Composition.Animations => new ExpressionAnimationInstance(ParsedExpression, targetObject, finalValue, CreateSnapshot()); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Animations/ExpressionAnimationInstance.cs b/src/Avalonia.Base/Rendering/Composition/Animations/ExpressionAnimationInstance.cs index 764bac9931..6c7c556456 100644 --- a/src/Avalonia.Base/Rendering/Composition/Animations/ExpressionAnimationInstance.cs +++ b/src/Avalonia.Base/Rendering/Composition/Animations/ExpressionAnimationInstance.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using Avalonia.Rendering.Composition.Expressions; using Avalonia.Rendering.Composition.Server; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Animations { @@ -46,4 +48,4 @@ namespace Avalonia.Rendering.Composition.Animations _finalValue = finalValue; } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Animations/IAnimationInstance.cs b/src/Avalonia.Base/Rendering/Composition/Animations/IAnimationInstance.cs index 4e1972f2c6..8ec4ec19bc 100644 --- a/src/Avalonia.Base/Rendering/Composition/Animations/IAnimationInstance.cs +++ b/src/Avalonia.Base/Rendering/Composition/Animations/IAnimationInstance.cs @@ -2,6 +2,8 @@ using System; using Avalonia.Rendering.Composition.Expressions; using Avalonia.Rendering.Composition.Server; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Animations { internal interface IAnimationInstance @@ -13,4 +15,4 @@ namespace Avalonia.Rendering.Composition.Animations void Deactivate(); void Invalidate(); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Animations/ICompositionAnimationBase.cs b/src/Avalonia.Base/Rendering/Composition/Animations/ICompositionAnimationBase.cs index 87e5ad757a..91b37a81af 100644 --- a/src/Avalonia.Base/Rendering/Composition/Animations/ICompositionAnimationBase.cs +++ b/src/Avalonia.Base/Rendering/Composition/Animations/ICompositionAnimationBase.cs @@ -2,6 +2,8 @@ using Avalonia.Rendering.Composition.Server; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Animations { /// @@ -12,4 +14,4 @@ namespace Avalonia.Rendering.Composition.Animations internal void InternalOnly(); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Animations/ImplicitAnimationCollection.cs b/src/Avalonia.Base/Rendering/Composition/Animations/ImplicitAnimationCollection.cs index f4bcc6ff38..72be4edd07 100644 --- a/src/Avalonia.Base/Rendering/Composition/Animations/ImplicitAnimationCollection.cs +++ b/src/Avalonia.Base/Rendering/Composition/Animations/ImplicitAnimationCollection.cs @@ -4,6 +4,8 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Avalonia.Rendering.Composition.Transport; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Animations { /// @@ -79,4 +81,4 @@ namespace Avalonia.Rendering.Composition.Animations return rv; } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Animations/Interpolators.cs b/src/Avalonia.Base/Rendering/Composition/Animations/Interpolators.cs index a4eeacef32..e19c0ff098 100644 --- a/src/Avalonia.Base/Rendering/Composition/Animations/Interpolators.cs +++ b/src/Avalonia.Base/Rendering/Composition/Animations/Interpolators.cs @@ -1,6 +1,8 @@ using System; using System.Numerics; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Animations { /// @@ -73,4 +75,4 @@ namespace Avalonia.Rendering.Composition.Animations public static BooleanInterpolator Instance { get; } = new BooleanInterpolator(); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Animations/KeyFrameAnimation.cs b/src/Avalonia.Base/Rendering/Composition/Animations/KeyFrameAnimation.cs index 49b3ab753a..d21a4d06e3 100644 --- a/src/Avalonia.Base/Rendering/Composition/Animations/KeyFrameAnimation.cs +++ b/src/Avalonia.Base/Rendering/Composition/Animations/KeyFrameAnimation.cs @@ -2,6 +2,8 @@ using System; using Avalonia.Animation; using Avalonia.Animation.Easings; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Animations { @@ -22,9 +24,9 @@ namespace Avalonia.Rendering.Composition.Animations /// The delay behavior of the key frame animation. /// public AnimationDelayBehavior DelayBehavior { get; set; } - + /// - /// Delay before the animation starts after is called. + /// Delay before the animation starts after is called. /// public System.TimeSpan DelayTime { get; set; } @@ -131,4 +133,4 @@ namespace Avalonia.Rendering.Composition.Animations /// SetToFinalValue } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Animations/KeyFrameAnimationInstance.cs b/src/Avalonia.Base/Rendering/Composition/Animations/KeyFrameAnimationInstance.cs index 0c0fcfaf2b..e20a4a9ad8 100644 --- a/src/Avalonia.Base/Rendering/Composition/Animations/KeyFrameAnimationInstance.cs +++ b/src/Avalonia.Base/Rendering/Composition/Animations/KeyFrameAnimationInstance.cs @@ -4,6 +4,8 @@ using Avalonia.Animation; using Avalonia.Rendering.Composition.Expressions; using Avalonia.Rendering.Composition.Server; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Animations { /// @@ -175,4 +177,4 @@ namespace Avalonia.Rendering.Composition.Animations base.Deactivate(); } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Animations/KeyFrames.cs b/src/Avalonia.Base/Rendering/Composition/Animations/KeyFrames.cs index 369cc80b95..79045ccff8 100644 --- a/src/Avalonia.Base/Rendering/Composition/Animations/KeyFrames.cs +++ b/src/Avalonia.Base/Rendering/Composition/Animations/KeyFrames.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using Avalonia.Animation.Easings; using Avalonia.Rendering.Composition.Expressions; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Animations { @@ -86,4 +88,4 @@ namespace Avalonia.Rendering.Composition.Animations { public void InsertExpressionKeyFrame(float normalizedProgressKey, string value, IEasing easingFunction); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Animations/PropertySetSnapshot.cs b/src/Avalonia.Base/Rendering/Composition/Animations/PropertySetSnapshot.cs index fc6cfc9f3d..af3c344999 100644 --- a/src/Avalonia.Base/Rendering/Composition/Animations/PropertySetSnapshot.cs +++ b/src/Avalonia.Base/Rendering/Composition/Animations/PropertySetSnapshot.cs @@ -1,6 +1,8 @@ using System.Collections.Generic; using Avalonia.Rendering.Composition.Expressions; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Animations { /// @@ -46,4 +48,4 @@ namespace Avalonia.Rendering.Composition.Animations public ExpressionVariant GetProperty(string name) => GetParameter(name); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/CompositingRenderer.cs b/src/Avalonia.Base/Rendering/Composition/CompositingRenderer.cs index a571a0518b..9aa3c25425 100644 --- a/src/Avalonia.Base/Rendering/Composition/CompositingRenderer.cs +++ b/src/Avalonia.Base/Rendering/Composition/CompositingRenderer.cs @@ -11,6 +11,8 @@ using Avalonia.Rendering.Composition.Server; using Avalonia.Threading; using Avalonia.VisualTree; +// Special license applies License.md + namespace Avalonia.Rendering.Composition; /// @@ -69,7 +71,7 @@ public class CompositingRenderer : IRendererWithCompositor if(_queuedUpdate) return; _queuedUpdate = true; - Dispatcher.UIThread.Post(_update, DispatcherPriority.Composition); + _compositor.InvokeWhenReadyForNextCommit(_update); } /// diff --git a/src/Avalonia.Base/Rendering/Composition/CompositionDrawListVisual.cs b/src/Avalonia.Base/Rendering/Composition/CompositionDrawListVisual.cs index 49aea1c3dc..77b392eee5 100644 --- a/src/Avalonia.Base/Rendering/Composition/CompositionDrawListVisual.cs +++ b/src/Avalonia.Base/Rendering/Composition/CompositionDrawListVisual.cs @@ -5,6 +5,8 @@ using Avalonia.Rendering.Composition.Server; using Avalonia.Rendering.Composition.Transport; using Avalonia.VisualTree; +// Special license applies License.md + namespace Avalonia.Rendering.Composition; @@ -72,4 +74,4 @@ internal class CompositionDrawListVisual : CompositionContainerVisual return true; return false; } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/CompositionObject.cs b/src/Avalonia.Base/Rendering/Composition/CompositionObject.cs index f529ee9cff..50332926ad 100644 --- a/src/Avalonia.Base/Rendering/Composition/CompositionObject.cs +++ b/src/Avalonia.Base/Rendering/Composition/CompositionObject.cs @@ -5,6 +5,8 @@ using Avalonia.Rendering.Composition.Server; using Avalonia.Rendering.Composition.Transport; using Avalonia.Utilities; +// Special license applies License.md + namespace Avalonia.Rendering.Composition { /// @@ -138,4 +140,4 @@ namespace Avalonia.Rendering.Composition writer.Write((byte)(IsDisposed ? 1 : 0)); } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/CompositionPropertySet.cs b/src/Avalonia.Base/Rendering/Composition/CompositionPropertySet.cs index ee4552d154..7d794af9a2 100644 --- a/src/Avalonia.Base/Rendering/Composition/CompositionPropertySet.cs +++ b/src/Avalonia.Base/Rendering/Composition/CompositionPropertySet.cs @@ -5,6 +5,8 @@ using Avalonia.Rendering.Composition.Animations; using Avalonia.Rendering.Composition.Expressions; using Avalonia.Rendering.Composition.Transport; +// Special license applies License.md + namespace Avalonia.Rendering.Composition { /// @@ -144,4 +146,4 @@ namespace Avalonia.Rendering.Composition TypeMismatch, NotFound } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/CompositionTarget.cs b/src/Avalonia.Base/Rendering/Composition/CompositionTarget.cs index 01b2d0d5d9..4e53e163ec 100644 --- a/src/Avalonia.Base/Rendering/Composition/CompositionTarget.cs +++ b/src/Avalonia.Base/Rendering/Composition/CompositionTarget.cs @@ -4,6 +4,8 @@ using System.Numerics; using Avalonia.Collections.Pooled; using Avalonia.VisualTree; +// Special license applies License.md + namespace Avalonia.Rendering.Composition { /// @@ -127,4 +129,4 @@ namespace Avalonia.Rendering.Composition Compositor.Server.Render(); } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Compositor.cs b/src/Avalonia.Base/Rendering/Composition/Compositor.cs index 1bdae44cb9..10360f7874 100644 --- a/src/Avalonia.Base/Rendering/Composition/Compositor.cs +++ b/src/Avalonia.Base/Rendering/Composition/Compositor.cs @@ -12,6 +12,8 @@ using Avalonia.Rendering.Composition.Transport; using Avalonia.Threading; +// Special license applies License.md + namespace Avalonia.Rendering.Composition { /// @@ -31,6 +33,7 @@ namespace Avalonia.Rendering.Composition internal IEasing DefaultEasing { get; } private List? _invokeOnNextCommit; private readonly Stack> _invokeListPool = new(); + private Task? _lastBatchCompleted; /// /// Creates a new compositor on a specified render loop that would use a particular GPU @@ -84,7 +87,7 @@ namespace Avalonia.Rendering.Composition if (_invokeOnNextCommit != null) ScheduleCommitCallbacks(batch.Completed); - return batch.Completed; + return _lastBatchCompleted = batch.Completed; } async void ScheduleCommitCallbacks(Task task) @@ -137,5 +140,15 @@ namespace Avalonia.Rendering.Composition _invokeOnNextCommit ??= _invokeListPool.Count > 0 ? _invokeListPool.Pop() : new(); _invokeOnNextCommit.Add(action); } + + public void InvokeWhenReadyForNextCommit(Action action) + { + if (_lastBatchCompleted == null || _lastBatchCompleted.IsCompleted) + Dispatcher.UIThread.Post(action, DispatcherPriority.Composition); + else + _lastBatchCompleted.ContinueWith( + static (_, state) => Dispatcher.UIThread.Post((Action)state!, DispatcherPriority.Composition), + action); + } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/ContainerVisual.cs b/src/Avalonia.Base/Rendering/Composition/ContainerVisual.cs index caf074dd6b..9b9c44b95f 100644 --- a/src/Avalonia.Base/Rendering/Composition/ContainerVisual.cs +++ b/src/Avalonia.Base/Rendering/Composition/ContainerVisual.cs @@ -1,5 +1,7 @@ using Avalonia.Rendering.Composition.Server; +// Special license applies License.md + namespace Avalonia.Rendering.Composition { /// @@ -21,4 +23,4 @@ namespace Avalonia.Rendering.Composition base.OnRootChangedCore(); } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Drawing/CompositionDrawList.cs b/src/Avalonia.Base/Rendering/Composition/Drawing/CompositionDrawList.cs index 432a0832f2..10a7c3e360 100644 --- a/src/Avalonia.Base/Rendering/Composition/Drawing/CompositionDrawList.cs +++ b/src/Avalonia.Base/Rendering/Composition/Drawing/CompositionDrawList.cs @@ -4,6 +4,8 @@ using Avalonia.Rendering.Composition.Server; using Avalonia.Rendering.SceneGraph; using Avalonia.Utilities; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Drawing; /// @@ -99,4 +101,4 @@ internal class CompositionDrawListBuilder if (count < Count) _operations!.RemoveRange(count, _operations.Count - count); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Drawing/CompositionDrawingContext.cs b/src/Avalonia.Base/Rendering/Composition/Drawing/CompositionDrawingContext.cs index d7c1ef125d..30b57883fc 100644 --- a/src/Avalonia.Base/Rendering/Composition/Drawing/CompositionDrawingContext.cs +++ b/src/Avalonia.Base/Rendering/Composition/Drawing/CompositionDrawingContext.cs @@ -8,6 +8,9 @@ using Avalonia.Rendering.Composition.Drawing; using Avalonia.Rendering.SceneGraph; using Avalonia.Utilities; using Avalonia.VisualTree; + +// Special license applies License.md + namespace Avalonia.Rendering.Composition; /// @@ -153,6 +156,8 @@ internal class CompositionDrawingContext : IDrawingContextImpl, IDrawingContextW ++_drawOperationIndex; } + public object? GetFeature(Type t) => null; + /// public void DrawGlyphRun(IBrush foreground, GlyphRun glyphRun) { @@ -388,4 +393,4 @@ internal class CompositionDrawingContext : IDrawingContextImpl, IDrawingContextW } return null; } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/ElementCompositionPreview.cs b/src/Avalonia.Base/Rendering/Composition/ElementCompositionPreview.cs index 1397a20fb6..5bd8e4a4d3 100644 --- a/src/Avalonia.Base/Rendering/Composition/ElementCompositionPreview.cs +++ b/src/Avalonia.Base/Rendering/Composition/ElementCompositionPreview.cs @@ -1,3 +1,5 @@ +// Special license applies License.md + namespace Avalonia.Rendering.Composition; /// @@ -11,4 +13,4 @@ public static class ElementComposition /// /// public static CompositionVisual? GetElementVisual(Visual visual) => visual.CompositionVisual; -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Enums.cs b/src/Avalonia.Base/Rendering/Composition/Enums.cs index e349845cbf..cc37b25701 100644 --- a/src/Avalonia.Base/Rendering/Composition/Enums.cs +++ b/src/Avalonia.Base/Rendering/Composition/Enums.cs @@ -1,5 +1,7 @@ using System; +// Special license applies License.md + namespace Avalonia.Rendering.Composition { public enum CompositionBlendMode @@ -117,4 +119,4 @@ namespace Avalonia.Rendering.Composition Fill = 1, //TODO: Uniform, UniformToFill } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Expressions/BuiltInExpressionFfi.cs b/src/Avalonia.Base/Rendering/Composition/Expressions/BuiltInExpressionFfi.cs index 44347d2c7a..896ae4fc3a 100644 --- a/src/Avalonia.Base/Rendering/Composition/Expressions/BuiltInExpressionFfi.cs +++ b/src/Avalonia.Base/Rendering/Composition/Expressions/BuiltInExpressionFfi.cs @@ -4,6 +4,8 @@ using System.Numerics; using Avalonia.Rendering.Composition.Animations; using Avalonia.Utilities; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Expressions { /// @@ -234,4 +236,4 @@ namespace Avalonia.Rendering.Composition.Expressions public static BuiltInExpressionFfi Instance { get; } = new BuiltInExpressionFfi(); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Expressions/DelegateExpressionFfi.cs b/src/Avalonia.Base/Rendering/Composition/Expressions/DelegateExpressionFfi.cs index 85c6141409..c15487065c 100644 --- a/src/Avalonia.Base/Rendering/Composition/Expressions/DelegateExpressionFfi.cs +++ b/src/Avalonia.Base/Rendering/Composition/Expressions/DelegateExpressionFfi.cs @@ -5,6 +5,8 @@ using System.Linq; using System.Numerics; using Avalonia.Media; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Expressions { /// @@ -181,4 +183,4 @@ namespace Avalonia.Rendering.Composition.Expressions ); } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Expressions/Expression.cs b/src/Avalonia.Base/Rendering/Composition/Expressions/Expression.cs index 5abba00365..ff2069e71e 100644 --- a/src/Avalonia.Base/Rendering/Composition/Expressions/Expression.cs +++ b/src/Avalonia.Base/Rendering/Composition/Expressions/Expression.cs @@ -4,6 +4,8 @@ using System.Globalization; using System.Reflection; using Avalonia.Rendering.Composition.Server; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Expressions { /// @@ -374,4 +376,4 @@ namespace Avalonia.Rendering.Composition.Expressions -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionEvaluationContext.cs b/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionEvaluationContext.cs index 9d23551e43..9086c59aad 100644 --- a/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionEvaluationContext.cs +++ b/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionEvaluationContext.cs @@ -1,6 +1,8 @@ using System.Collections.Generic; using Avalonia.Rendering.Composition.Server; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Expressions { internal struct ExpressionEvaluationContext @@ -29,4 +31,4 @@ namespace Avalonia.Rendering.Composition.Expressions { bool Call(string name, IReadOnlyList arguments, out ExpressionVariant result); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionParseException.cs b/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionParseException.cs index 6a207a3bf7..c32a7832a6 100644 --- a/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionParseException.cs +++ b/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionParseException.cs @@ -1,5 +1,7 @@ using System; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Expressions { internal class ExpressionParseException : Exception @@ -11,4 +13,4 @@ namespace Avalonia.Rendering.Composition.Expressions Position = position; } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionParser.cs b/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionParser.cs index 5924bb8f1b..3937d48187 100644 --- a/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionParser.cs +++ b/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionParser.cs @@ -5,6 +5,8 @@ using System.Linq; // ReSharper disable StringLiteralTypo +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Expressions { internal class ExpressionParser @@ -295,4 +297,4 @@ namespace Avalonia.Rendering.Composition.Expressions } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionTrackedValues.cs b/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionTrackedValues.cs index 334f975aa0..e386e058df 100644 --- a/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionTrackedValues.cs +++ b/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionTrackedValues.cs @@ -2,6 +2,8 @@ using System.Collections; using System.Collections.Generic; using Avalonia.Rendering.Composition.Server; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Expressions; internal class ExpressionTrackedObjects : IEnumerable @@ -54,4 +56,4 @@ internal class ExpressionTrackedObjects : IEnumerable _stack.Push(obj); } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs b/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs index 7b900534d8..6e53a138cd 100644 --- a/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs +++ b/src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs @@ -4,6 +4,8 @@ using System.Numerics; using System.Runtime.InteropServices; using Avalonia.Media; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Expressions { internal enum VariantType @@ -727,4 +729,4 @@ namespace Avalonia.Rendering.Composition.Expressions } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Expressions/TokenParser.cs b/src/Avalonia.Base/Rendering/Composition/Expressions/TokenParser.cs index 27782c8c2c..bb7372c375 100644 --- a/src/Avalonia.Base/Rendering/Composition/Expressions/TokenParser.cs +++ b/src/Avalonia.Base/Rendering/Composition/Expressions/TokenParser.cs @@ -1,6 +1,8 @@ using System; using System.Globalization; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Expressions { /// @@ -256,4 +258,4 @@ namespace Avalonia.Rendering.Composition.Expressions public override string ToString() => _s.ToString(); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/ICompositionTargetDebugEvents.cs b/src/Avalonia.Base/Rendering/Composition/ICompositionTargetDebugEvents.cs index 045a4f8cc6..131a51b5e6 100644 --- a/src/Avalonia.Base/Rendering/Composition/ICompositionTargetDebugEvents.cs +++ b/src/Avalonia.Base/Rendering/Composition/ICompositionTargetDebugEvents.cs @@ -1,6 +1,8 @@ +// Special license applies License.md + namespace Avalonia.Rendering.Composition; internal interface ICompositionTargetDebugEvents { void RectInvalidated(Rect rc); -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/License.md b/src/Avalonia.Base/Rendering/Composition/License.md new file mode 100644 index 0000000000..d1b709859e --- /dev/null +++ b/src/Avalonia.Base/Rendering/Composition/License.md @@ -0,0 +1,7 @@ +Please note: Any code in this directory is excluded from the normal MIT license. + +This code is owned and copyright to Avalonia OU. + +This code may be used free of charge by any application that consumes Avalonia binary packages as a direct or indirect dependency. + +Explicit permission is required for any other use outside of Avalonia applications. \ No newline at end of file diff --git a/src/Avalonia.Base/Rendering/Composition/MatrixUtils.cs b/src/Avalonia.Base/Rendering/Composition/MatrixUtils.cs index 2cb500cae4..3d8d5bae78 100644 --- a/src/Avalonia.Base/Rendering/Composition/MatrixUtils.cs +++ b/src/Avalonia.Base/Rendering/Composition/MatrixUtils.cs @@ -1,5 +1,7 @@ using System.Numerics; +// Special license applies License.md + namespace Avalonia.Rendering.Composition { static class MatrixUtils @@ -63,4 +65,4 @@ namespace Avalonia.Rendering.Composition matrix44.M42, matrix44.M44); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Server/CompositionProperty.cs b/src/Avalonia.Base/Rendering/Composition/Server/CompositionProperty.cs index 282c0e113d..5d63c8a4b3 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/CompositionProperty.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/CompositionProperty.cs @@ -1,6 +1,8 @@ using System.Collections.Generic; using System.Threading; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Server; internal class CompositionProperty @@ -12,4 +14,4 @@ internal class CompositionProperty { Id = Interlocked.Increment(ref s_NextId) }; -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Server/DrawingContextProxy.cs b/src/Avalonia.Base/Rendering/Composition/Server/DrawingContextProxy.cs index e261507f60..03859d241f 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/DrawingContextProxy.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/DrawingContextProxy.cs @@ -1,3 +1,4 @@ +using System; using System.Numerics; using Avalonia.Media; using Avalonia.Media.Imaging; @@ -6,6 +7,8 @@ using Avalonia.Rendering.Composition.Drawing; using Avalonia.Rendering.SceneGraph; using Avalonia.Utilities; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Server; /// @@ -153,6 +156,8 @@ internal class CompositorDrawingContextProxy : IDrawingContextImpl, IDrawingCont _impl.Custom(custom); } + public object? GetFeature(Type t) => _impl.GetFeature(t); + public class VisualBrushRenderer : IVisualBrushRenderer { public CompositionDrawList? VisualBrushDrawList { get; set; } @@ -176,4 +181,4 @@ internal class CompositorDrawingContextProxy : IDrawingContextImpl, IDrawingCont if (_impl is IDrawingContextWithAcrylicLikeSupport acrylic) acrylic.DrawRectangle(material, rect); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Server/FpsCounter.cs b/src/Avalonia.Base/Rendering/Composition/Server/FpsCounter.cs index 7585710540..b0b3982ed5 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/FpsCounter.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/FpsCounter.cs @@ -6,6 +6,8 @@ using Avalonia.Media.TextFormatting; using Avalonia.Platform; using Avalonia.Utilities; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Server; /// @@ -73,4 +75,4 @@ internal class FpsCounter offset += run.Size.Width; } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Server/ReadbackIndices.cs b/src/Avalonia.Base/Rendering/Composition/Server/ReadbackIndices.cs index c9592b70ab..d9df176e66 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/ReadbackIndices.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/ReadbackIndices.cs @@ -1,3 +1,5 @@ +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Server { /// @@ -43,4 +45,4 @@ namespace Avalonia.Rendering.Composition.Server } } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionContainerVisual.cs b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionContainerVisual.cs index f7152293cc..19349a5196 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionContainerVisual.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionContainerVisual.cs @@ -1,6 +1,8 @@ using System.Numerics; using Avalonia.Platform; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Server { /// @@ -41,4 +43,4 @@ namespace Avalonia.Rendering.Composition.Server Children = new ServerCompositionVisualCollection(Compositor); } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionDrawListVisual.cs b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionDrawListVisual.cs index 93a5226f83..6cbd2797f9 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionDrawListVisual.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionDrawListVisual.cs @@ -7,6 +7,8 @@ using Avalonia.Rendering.Composition.Transport; using Avalonia.Rendering.SceneGraph; using Avalonia.Utilities; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Server; /// @@ -72,4 +74,4 @@ internal class ServerCompositionDrawListVisual : ServerCompositionContainerVisua return UiVisual.GetType().ToString(); } #endif -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionSurface.cs b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionSurface.cs index 462a193a86..32a99fa187 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionSurface.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionSurface.cs @@ -1,3 +1,5 @@ +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Server { internal abstract class ServerCompositionSurface : ServerObject @@ -6,4 +8,4 @@ namespace Avalonia.Rendering.Composition.Server { } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs index 882b66bf70..c20594aaca 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs @@ -9,6 +9,8 @@ using Avalonia.Platform; using Avalonia.Rendering.Composition.Transport; using Avalonia.Utilities; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Server { /// @@ -218,4 +220,4 @@ namespace Avalonia.Rendering.Composition.Server public void EnqueueAdornerUpdate(ServerCompositionVisual visual) => _adornerUpdateQueue.Enqueue(visual); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual.DirtyProperties.cs b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual.DirtyProperties.cs index c5af74e2dd..405c7879b7 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual.DirtyProperties.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual.DirtyProperties.cs @@ -1,3 +1,5 @@ +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Server; partial class ServerCompositionVisual @@ -73,4 +75,4 @@ partial class ServerCompositionVisual || offset == s_IdOfSizeProperty) _clipSizeDirty = true; } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual.cs b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual.cs index c0e487f209..b742f1d44a 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual.cs @@ -6,6 +6,8 @@ using Avalonia.Rendering.Composition.Animations; using Avalonia.Rendering.Composition.Transport; using Avalonia.Utilities; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Server { /// @@ -234,4 +236,4 @@ namespace Avalonia.Rendering.Composition.Server } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositor.cs b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositor.cs index 564f792ebe..bfc2b2d626 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositor.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositor.cs @@ -6,6 +6,8 @@ using Avalonia.Rendering.Composition.Animations; using Avalonia.Rendering.Composition.Expressions; using Avalonia.Rendering.Composition.Transport; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Server { /// @@ -106,6 +108,7 @@ namespace Avalonia.Rendering.Composition.Server private void RenderCore() { ApplyPendingBatches(); + CompletePendingBatches(); foreach(var animation in _activeAnimations) _animationsToUpdate.Add(animation); @@ -117,8 +120,6 @@ namespace Avalonia.Rendering.Composition.Server foreach (var t in _activeTargets) t.Render(); - - CompletePendingBatches(); } public void AddCompositionTarget(ServerCompositionTarget target) @@ -137,4 +138,4 @@ namespace Avalonia.Rendering.Composition.Server public void RemoveFromClock(IAnimationInstance animationInstance) => _activeAnimations.Remove(animationInstance); } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Server/ServerList.cs b/src/Avalonia.Base/Rendering/Composition/Server/ServerList.cs index 39d6a8dc70..08a3fdce22 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/ServerList.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/ServerList.cs @@ -2,6 +2,8 @@ using System; using System.Collections.Generic; using Avalonia.Rendering.Composition.Transport; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Server { /// @@ -41,4 +43,4 @@ namespace Avalonia.Rendering.Composition.Server { } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Server/ServerObject.cs b/src/Avalonia.Base/Rendering/Composition/Server/ServerObject.cs index 93ea8e8dee..257d3b29a2 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/ServerObject.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/ServerObject.cs @@ -7,6 +7,8 @@ using Avalonia.Rendering.Composition.Expressions; using Avalonia.Rendering.Composition.Transport; using Avalonia.Utilities; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Server { /// @@ -177,4 +179,4 @@ namespace Avalonia.Rendering.Composition.Server ItselfLastChangedBy = batch.SequenceId; } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Transport/Batch.cs b/src/Avalonia.Base/Rendering/Composition/Transport/Batch.cs index e69768d3bf..0cf1650ccf 100644 --- a/src/Avalonia.Base/Rendering/Composition/Transport/Batch.cs +++ b/src/Avalonia.Base/Rendering/Composition/Transport/Batch.cs @@ -4,6 +4,8 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Transport { /// @@ -36,4 +38,4 @@ namespace Avalonia.Rendering.Composition.Transport public Task Completed => _tcs.Task; } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Transport/BatchStream.cs b/src/Avalonia.Base/Rendering/Composition/Transport/BatchStream.cs index 6db480a966..8b68900994 100644 --- a/src/Avalonia.Base/Rendering/Composition/Transport/BatchStream.cs +++ b/src/Avalonia.Base/Rendering/Composition/Transport/BatchStream.cs @@ -5,6 +5,8 @@ using System.Runtime.CompilerServices; using Avalonia.Rendering.Composition.Animations; using Avalonia.Rendering.Composition.Server; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Transport; /// diff --git a/src/Avalonia.Base/Rendering/Composition/Transport/BatchStreamArrayPool.cs b/src/Avalonia.Base/Rendering/Composition/Transport/BatchStreamArrayPool.cs index b0a89c6f92..f24f449551 100644 --- a/src/Avalonia.Base/Rendering/Composition/Transport/BatchStreamArrayPool.cs +++ b/src/Avalonia.Base/Rendering/Composition/Transport/BatchStreamArrayPool.cs @@ -5,6 +5,8 @@ using System.Runtime.InteropServices; using Avalonia.Platform; using Avalonia.Threading; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Transport; /// @@ -153,4 +155,4 @@ internal sealed class BatchStreamMemoryPool : BatchStreamPoolBase protected override IntPtr CreateItem() => Marshal.AllocHGlobal(BufferSize); protected override void DestroyItem(IntPtr item) => Marshal.FreeHGlobal(item); -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Transport/BatchStreamDebugMarker.cs b/src/Avalonia.Base/Rendering/Composition/Transport/BatchStreamDebugMarker.cs index 7d21b03f24..fed0f4d4aa 100644 --- a/src/Avalonia.Base/Rendering/Composition/Transport/BatchStreamDebugMarker.cs +++ b/src/Avalonia.Base/Rendering/Composition/Transport/BatchStreamDebugMarker.cs @@ -1,9 +1,11 @@ using System; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Transport; internal class BatchStreamDebugMarkers { public static object ObjectEndMarker = new object(); public static Guid ObjectEndMagic = Guid.NewGuid(); -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Transport/ServerListProxyHelper.cs b/src/Avalonia.Base/Rendering/Composition/Transport/ServerListProxyHelper.cs index e295c3c2c8..603c7582a1 100644 --- a/src/Avalonia.Base/Rendering/Composition/Transport/ServerListProxyHelper.cs +++ b/src/Avalonia.Base/Rendering/Composition/Transport/ServerListProxyHelper.cs @@ -2,6 +2,8 @@ using System.Collections; using System.Collections.Generic; using Avalonia.Rendering.Composition.Server; +// Special license applies License.md + namespace Avalonia.Rendering.Composition.Transport { /// @@ -95,4 +97,4 @@ namespace Avalonia.Rendering.Composition.Transport _changed = false; } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/Visual.cs b/src/Avalonia.Base/Rendering/Composition/Visual.cs index 7ebbb0aa96..7356b7b9e8 100644 --- a/src/Avalonia.Base/Rendering/Composition/Visual.cs +++ b/src/Avalonia.Base/Rendering/Composition/Visual.cs @@ -3,6 +3,8 @@ using System.Numerics; using Avalonia.Media; using Avalonia.VisualTree; +// Special license applies License.md + namespace Avalonia.Rendering.Composition { /// @@ -53,4 +55,4 @@ namespace Avalonia.Rendering.Composition internal virtual bool HitTest(Point point, Func? filter) => true; } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/VisualCollection.cs b/src/Avalonia.Base/Rendering/Composition/VisualCollection.cs index 60ebd9271c..6981dc39e3 100644 --- a/src/Avalonia.Base/Rendering/Composition/VisualCollection.cs +++ b/src/Avalonia.Base/Rendering/Composition/VisualCollection.cs @@ -1,6 +1,8 @@ using System; using Avalonia.Rendering.Composition.Server; +// Special license applies License.md + namespace Avalonia.Rendering.Composition { /// @@ -70,4 +72,4 @@ namespace Avalonia.Rendering.Composition item.Parent = item; } } -} \ No newline at end of file +} diff --git a/src/Avalonia.Base/Rendering/Composition/readme.md b/src/Avalonia.Base/Rendering/Composition/readme.md new file mode 100644 index 0000000000..6c238db191 --- /dev/null +++ b/src/Avalonia.Base/Rendering/Composition/readme.md @@ -0,0 +1,3 @@ +Please note the composition renderer is not subject to the usual MIT license. + +Please contact us for more details and see [License.md](https://raw.githubusercontent.com/AvaloniaUI/Avalonia/master/src/Avalonia.Base/Rendering/Composition/License.md) diff --git a/src/Avalonia.Base/Rendering/SceneGraph/DeferredDrawingContextImpl.cs b/src/Avalonia.Base/Rendering/SceneGraph/DeferredDrawingContextImpl.cs index 07082e4ac3..d6766fa9b8 100644 --- a/src/Avalonia.Base/Rendering/SceneGraph/DeferredDrawingContextImpl.cs +++ b/src/Avalonia.Base/Rendering/SceneGraph/DeferredDrawingContextImpl.cs @@ -203,6 +203,8 @@ namespace Avalonia.Rendering.SceneGraph ++_drawOperationindex; } + public object? GetFeature(Type t) => null; + /// public void DrawGlyphRun(IBrush foreground, GlyphRun glyphRun) { diff --git a/src/Avalonia.Base/Rendering/SceneGraph/ExperimentalAcrylicNode.cs b/src/Avalonia.Base/Rendering/SceneGraph/ExperimentalAcrylicNode.cs index 59ebcf5109..12b67105e9 100644 --- a/src/Avalonia.Base/Rendering/SceneGraph/ExperimentalAcrylicNode.cs +++ b/src/Avalonia.Base/Rendering/SceneGraph/ExperimentalAcrylicNode.cs @@ -83,7 +83,7 @@ namespace Avalonia.Rendering.SceneGraph if (Material != null) { var rect = Rect.Rect; - return rect.Contains(p); + return rect.ContainsExclusive(p); } } diff --git a/src/Avalonia.Base/Rendering/SceneGraph/GeometryNode.cs b/src/Avalonia.Base/Rendering/SceneGraph/GeometryNode.cs index 4b43f93aee..cf53b86fa7 100644 --- a/src/Avalonia.Base/Rendering/SceneGraph/GeometryNode.cs +++ b/src/Avalonia.Base/Rendering/SceneGraph/GeometryNode.cs @@ -1,9 +1,7 @@ using System; -using System.Collections.Generic; using Avalonia.Media; using Avalonia.Media.Immutable; using Avalonia.Platform; -using Avalonia.VisualTree; namespace Avalonia.Rendering.SceneGraph { @@ -19,7 +17,7 @@ namespace Avalonia.Rendering.SceneGraph /// The fill brush. /// The stroke pen. /// The geometry. - /// Child scenes for drawing visual brushes. + /// Auxiliary data required to draw the brush. public GeometryNode(Matrix transform, IBrush? brush, IPen? pen, diff --git a/src/Avalonia.Base/Rendering/SceneGraph/GlyphRunNode.cs b/src/Avalonia.Base/Rendering/SceneGraph/GlyphRunNode.cs index 9199611ed6..1d85e95835 100644 --- a/src/Avalonia.Base/Rendering/SceneGraph/GlyphRunNode.cs +++ b/src/Avalonia.Base/Rendering/SceneGraph/GlyphRunNode.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; - using Avalonia.Media; -using Avalonia.Media.Immutable; using Avalonia.Platform; -using Avalonia.VisualTree; namespace Avalonia.Rendering.SceneGraph { @@ -19,7 +15,7 @@ namespace Avalonia.Rendering.SceneGraph /// The transform. /// The foreground brush. /// The glyph run to draw. - /// Child scenes for drawing visual brushes. + /// Auxiliary data required to draw the brush. public GlyphRunNode( Matrix transform, IBrush foreground, @@ -73,6 +69,6 @@ namespace Avalonia.Rendering.SceneGraph } /// - public override bool HitTest(Point p) => Bounds.Contains(p); + public override bool HitTest(Point p) => Bounds.ContainsExclusive(p); } } diff --git a/src/Avalonia.Base/Rendering/SceneGraph/ImageNode.cs b/src/Avalonia.Base/Rendering/SceneGraph/ImageNode.cs index 23267166a5..339881e675 100644 --- a/src/Avalonia.Base/Rendering/SceneGraph/ImageNode.cs +++ b/src/Avalonia.Base/Rendering/SceneGraph/ImageNode.cs @@ -109,7 +109,7 @@ namespace Avalonia.Rendering.SceneGraph } /// - public override bool HitTest(Point p) => Bounds.Contains(p); + public override bool HitTest(Point p) => Bounds.ContainsExclusive(p); public override void Dispose() { diff --git a/src/Avalonia.Base/Rendering/SceneGraph/LineNode.cs b/src/Avalonia.Base/Rendering/SceneGraph/LineNode.cs index ee5ec0a5fc..0af8ba2752 100644 --- a/src/Avalonia.Base/Rendering/SceneGraph/LineNode.cs +++ b/src/Avalonia.Base/Rendering/SceneGraph/LineNode.cs @@ -1,9 +1,7 @@ using System; -using System.Collections.Generic; using Avalonia.Media; using Avalonia.Media.Immutable; using Avalonia.Platform; -using Avalonia.VisualTree; namespace Avalonia.Rendering.SceneGraph { @@ -19,7 +17,7 @@ namespace Avalonia.Rendering.SceneGraph /// The stroke pen. /// The start point of the line. /// The end point of the line. - /// Child scenes for drawing visual brushes. + /// Auxiliary data required to draw the brush. public LineNode( Matrix transform, IPen pen, diff --git a/src/Avalonia.Base/Rendering/SceneGraph/OpacityMaskNode.cs b/src/Avalonia.Base/Rendering/SceneGraph/OpacityMaskNode.cs index 549c1fd7de..5fd200ddff 100644 --- a/src/Avalonia.Base/Rendering/SceneGraph/OpacityMaskNode.cs +++ b/src/Avalonia.Base/Rendering/SceneGraph/OpacityMaskNode.cs @@ -17,7 +17,7 @@ namespace Avalonia.Rendering.SceneGraph /// /// The opacity mask to push. /// The bounds of the mask. - /// Child scenes for drawing visual brushes. + /// Auxiliary data required to draw the brush. public OpacityMaskNode(IBrush mask, Rect bounds, IDisposable? aux = null) : base(Rect.Empty, Matrix.Identity, aux) { diff --git a/src/Avalonia.Base/Rendering/SceneGraph/RectangleNode.cs b/src/Avalonia.Base/Rendering/SceneGraph/RectangleNode.cs index 7b79c446f9..f2ffd7411c 100644 --- a/src/Avalonia.Base/Rendering/SceneGraph/RectangleNode.cs +++ b/src/Avalonia.Base/Rendering/SceneGraph/RectangleNode.cs @@ -20,7 +20,7 @@ namespace Avalonia.Rendering.SceneGraph /// The stroke pen. /// The rectangle to draw. /// The box shadow parameters - /// Child scenes for drawing visual brushes. + /// Auxiliary data required to draw the brush. public RectangleNode( Matrix transform, IBrush? brush, @@ -103,13 +103,13 @@ namespace Avalonia.Rendering.SceneGraph if (Brush != null) { var rect = Rect.Rect.Inflate((Pen?.Thickness / 2) ?? 0); - return rect.Contains(p); + return rect.ContainsExclusive(p); } else { var borderRect = Rect.Rect.Inflate((Pen?.Thickness / 2) ?? 0); var emptyRect = Rect.Rect.Deflate((Pen?.Thickness / 2) ?? 0); - return borderRect.Contains(p) && !emptyRect.Contains(p); + return borderRect.ContainsExclusive(p) && !emptyRect.ContainsExclusive(p); } } diff --git a/src/Avalonia.Base/Rendering/SceneGraph/Scene.cs b/src/Avalonia.Base/Rendering/SceneGraph/Scene.cs index 20c23d7bee..c436299018 100644 --- a/src/Avalonia.Base/Rendering/SceneGraph/Scene.cs +++ b/src/Avalonia.Base/Rendering/SceneGraph/Scene.cs @@ -300,7 +300,7 @@ namespace Avalonia.Rendering.SceneGraph if (node.ClipToBounds) { clip = clip == null ? node.ClipBounds : clip.Value.Intersect(node.ClipBounds); - clipped = !clip.Value.Contains(_point); + clipped = !clip.Value.ContainsExclusive(_point); } if (node.GeometryClip != null) diff --git a/src/Avalonia.Base/StyledElement.cs b/src/Avalonia.Base/StyledElement.cs index f98d2cdbcc..3a42e9bdfe 100644 --- a/src/Avalonia.Base/StyledElement.cs +++ b/src/Avalonia.Base/StyledElement.cs @@ -12,8 +12,6 @@ using Avalonia.Logging; using Avalonia.LogicalTree; using Avalonia.Styling; -#nullable enable - namespace Avalonia { /// @@ -55,7 +53,14 @@ namespace Avalonia nameof(TemplatedParent), o => o.TemplatedParent, (o ,v) => o.TemplatedParent = v); + + /// + /// Defines the property. + /// + public static readonly StyledProperty ThemeProperty = + AvaloniaProperty.Register(nameof(Theme)); + private static readonly ControlTheme s_invalidTheme = new ControlTheme(); private int _initCount; private string? _name; private readonly Classes _classes = new Classes(); @@ -67,6 +72,8 @@ namespace Avalonia private List? _appliedStyles; private ITemplatedControl? _templatedParent; private bool _dataContextUpdating; + private bool _hasPromotedTheme; + private ControlTheme? _implicitTheme; /// /// Initializes static members of the class. @@ -230,6 +237,15 @@ namespace Avalonia internal set => SetAndRaise(TemplatedParentProperty, ref _templatedParent, value); } + /// + /// Gets or sets the theme to be applied to the element. + /// + public ControlTheme? Theme + { + get => GetValue(ThemeProperty); + set => SetValue(ThemeProperty, value); + } + /// /// Gets the styled element's logical children. /// @@ -302,6 +318,7 @@ namespace Avalonia /// IStyleHost? IStyleHost.StylingParent => (IStyleHost?)InheritanceParent; + /// public virtual void BeginInit() { @@ -341,10 +358,15 @@ namespace Avalonia } finally { + _styled = true; EndBatchUpdate(); } - _styled = true; + if (_hasPromotedTheme) + { + _hasPromotedTheme = false; + ClearValue(ThemeProperty); + } } return _styled; @@ -475,6 +497,31 @@ namespace Avalonia }; } + ControlTheme? IStyleable.GetEffectiveTheme() + { + var theme = Theme; + + // Explitly set Theme property takes precedence. + if (theme is not null) + return theme; + + // If the Theme property is not set, try to find a ControlTheme resource with our StyleKey. + if (_implicitTheme is null) + { + var key = ((IStyleable)this).StyleKey; + + if (this.TryFindResource(key, out var value) && value is ControlTheme t) + _implicitTheme = t; + else + _implicitTheme = s_invalidTheme; + } + + if (_implicitTheme != s_invalidTheme) + return _implicitTheme; + + return null; + } + void IStyleable.StyleApplied(IStyleInstance instance) { instance = instance ?? throw new ArgumentNullException(nameof(instance)); @@ -590,6 +637,30 @@ namespace Avalonia { } + protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) + { + base.OnPropertyChanged(change); + + if (change.Property == ThemeProperty) + { + // Changing the theme detaches all styles, meaning that if the theme property was + // set via a style, it will get cleared! To work around this, if the value was + // applied at less than local value priority then promote the value to local value + // priority until styling is re-applied. + if (change.Priority > BindingPriority.LocalValue) + { + Theme = change.GetNewValue(); + _hasPromotedTheme = true; + } + else if (_hasPromotedTheme && change.Priority == BindingPriority.LocalValue) + { + _hasPromotedTheme = false; + } + + InvalidateStyles(); + } + } + private static void DataContextNotifying(IAvaloniaObject o, bool updateStarted) { if (o is StyledElement element) @@ -696,6 +767,7 @@ namespace Avalonia if (_logicalRoot != null) { _logicalRoot = null; + _implicitTheme = null; DetachStyles(); OnDetachedFromLogicalTree(e); DetachedFromLogicalTree?.Invoke(this, e); @@ -760,7 +832,7 @@ namespace Avalonia private void DetachStyles() { - if (_appliedStyles is object) + if (_appliedStyles?.Count > 0) { BeginBatchUpdate(); @@ -801,9 +873,12 @@ namespace Avalonia if (applied.Source == styles[i]) { - applied.Dispose(); _appliedStyles.RemoveAt(j); + applied.Dispose(); } + + if (j > _appliedStyles.Count) + j = _appliedStyles.Count; } } } diff --git a/src/Avalonia.Base/Styling/ChildSelector.cs b/src/Avalonia.Base/Styling/ChildSelector.cs index 34f3a76b61..9512dc34df 100644 --- a/src/Avalonia.Base/Styling/ChildSelector.cs +++ b/src/Avalonia.Base/Styling/ChildSelector.cs @@ -65,6 +65,6 @@ namespace Avalonia.Styling } protected override Selector? MovePrevious() => null; - internal override bool HasValidNestingSelector() => _parent.HasValidNestingSelector(); + protected override Selector? MovePreviousOrParent() => _parent; } } diff --git a/src/Avalonia.Base/Styling/ControlTheme.cs b/src/Avalonia.Base/Styling/ControlTheme.cs new file mode 100644 index 0000000000..644e8b32d4 --- /dev/null +++ b/src/Avalonia.Base/Styling/ControlTheme.cs @@ -0,0 +1,67 @@ +using System; + +namespace Avalonia.Styling +{ + /// + /// Defines a switchable theme for a control. + /// + public class ControlTheme : StyleBase + { + /// + /// Initializes a new instance of the class. + /// + public ControlTheme() { } + + /// + /// Initializes a new instance of the class. + /// + /// The value for . + public ControlTheme(Type targetType) => TargetType = targetType; + + /// + /// Gets or sets the type for which this control theme is intended. + /// + public Type? TargetType { get; set; } + + /// + /// Gets or sets a control theme that is the basis of the current theme. + /// + public ControlTheme? BasedOn { get; set; } + + public override SelectorMatchResult TryAttach(IStyleable target, object? host) + { + _ = target ?? throw new ArgumentNullException(nameof(target)); + + if (TargetType is null) + throw new InvalidOperationException("ControlTheme has no TargetType."); + + var result = BasedOn?.TryAttach(target, host) ?? SelectorMatchResult.NeverThisType; + + if (HasSettersOrAnimations && TargetType.IsAssignableFrom(target.StyleKey)) + { + Attach(target, null); + result = SelectorMatchResult.AlwaysThisType; + } + + var childResult = TryAttachChildren(target, host); + + if (childResult > result) + result = childResult; + + return result; + } + + public override string ToString() + { + if (TargetType is not null) + return "ControlTheme: " + TargetType.Name; + else + return "ControlTheme"; + } + + internal override void SetParent(StyleBase? parent) + { + throw new InvalidOperationException("ControlThemes cannot be added as a nested style."); + } + } +} diff --git a/src/Avalonia.Base/Styling/DescendentSelector.cs b/src/Avalonia.Base/Styling/DescendentSelector.cs index 4ffaff6861..677a924189 100644 --- a/src/Avalonia.Base/Styling/DescendentSelector.cs +++ b/src/Avalonia.Base/Styling/DescendentSelector.cs @@ -70,6 +70,6 @@ namespace Avalonia.Styling } protected override Selector? MovePrevious() => null; - internal override bool HasValidNestingSelector() => _parent.HasValidNestingSelector(); + protected override Selector? MovePreviousOrParent() => _parent; } } diff --git a/src/Avalonia.Base/Styling/IStyle.cs b/src/Avalonia.Base/Styling/IStyle.cs index e9faf82c07..417739fb28 100644 --- a/src/Avalonia.Base/Styling/IStyle.cs +++ b/src/Avalonia.Base/Styling/IStyle.cs @@ -23,6 +23,6 @@ namespace Avalonia.Styling /// /// A describing how the style matches the control. /// - SelectorMatchResult TryAttach(IStyleable target, IStyleHost? host); + SelectorMatchResult TryAttach(IStyleable target, object? host); } } diff --git a/src/Avalonia.Base/Styling/IStyleable.cs b/src/Avalonia.Base/Styling/IStyleable.cs index 5bc972e7ab..254da4d85c 100644 --- a/src/Avalonia.Base/Styling/IStyleable.cs +++ b/src/Avalonia.Base/Styling/IStyleable.cs @@ -3,8 +3,6 @@ using System.Collections.Generic; using Avalonia.Collections; using Avalonia.Metadata; -#nullable enable - namespace Avalonia.Styling { /// @@ -28,6 +26,11 @@ namespace Avalonia.Styling /// ITemplatedControl? TemplatedParent { get; } + /// + /// Gets the effective theme for the control as used by the syling system. + /// + ControlTheme? GetEffectiveTheme(); + /// /// Notifies the element that a style has been applied. /// diff --git a/src/Avalonia.Base/Styling/NestingSelector.cs b/src/Avalonia.Base/Styling/NestingSelector.cs index 481a937867..77c5b719c6 100644 --- a/src/Avalonia.Base/Styling/NestingSelector.cs +++ b/src/Avalonia.Base/Styling/NestingSelector.cs @@ -15,9 +15,17 @@ namespace Avalonia.Styling protected override SelectorMatch Evaluate(IStyleable control, IStyle? parent, bool subscribe) { - if (parent is Style s && s.Selector is Selector selector) + if (parent is Style s && s.Selector is not null) { - return selector.Match(control, (parent as Style)?.Parent, subscribe); + return s.Selector.Match(control, s.Parent, subscribe); + } + else if (parent is ControlTheme theme) + { + if (theme.TargetType is null) + throw new InvalidOperationException("ControlTheme has no TargetType."); + return theme.TargetType.IsAssignableFrom(control.StyleKey) ? + SelectorMatch.AlwaysThisType : + SelectorMatch.NeverThisType; } throw new InvalidOperationException( @@ -25,6 +33,6 @@ namespace Avalonia.Styling } protected override Selector? MovePrevious() => null; - internal override bool HasValidNestingSelector() => true; + protected override Selector? MovePreviousOrParent() => null; } } diff --git a/src/Avalonia.Base/Styling/NotSelector.cs b/src/Avalonia.Base/Styling/NotSelector.cs index cdc3254d38..c7727bb6b8 100644 --- a/src/Avalonia.Base/Styling/NotSelector.cs +++ b/src/Avalonia.Base/Styling/NotSelector.cs @@ -67,6 +67,6 @@ namespace Avalonia.Styling } protected override Selector? MovePrevious() => _previous; - internal override bool HasValidNestingSelector() => _argument.HasValidNestingSelector(); + protected override Selector? MovePreviousOrParent() => _previous; } } diff --git a/src/Avalonia.Base/Styling/NthChildSelector.cs b/src/Avalonia.Base/Styling/NthChildSelector.cs index 047bf434da..f473791664 100644 --- a/src/Avalonia.Base/Styling/NthChildSelector.cs +++ b/src/Avalonia.Base/Styling/NthChildSelector.cs @@ -105,7 +105,7 @@ namespace Avalonia.Styling } protected override Selector? MovePrevious() => _previous; - internal override bool HasValidNestingSelector() => _previous?.HasValidNestingSelector() ?? false; + protected override Selector? MovePreviousOrParent() => _previous; public override string ToString() { diff --git a/src/Avalonia.Base/Styling/OrSelector.cs b/src/Avalonia.Base/Styling/OrSelector.cs index 913c27bf0c..af9249864f 100644 --- a/src/Avalonia.Base/Styling/OrSelector.cs +++ b/src/Avalonia.Base/Styling/OrSelector.cs @@ -103,18 +103,12 @@ namespace Avalonia.Styling } protected override Selector? MovePrevious() => null; + protected override Selector? MovePreviousOrParent() => null; - internal override bool HasValidNestingSelector() + internal override void ValidateNestingSelector(bool inControlTheme) { foreach (var selector in _selectors) - { - if (!selector.HasValidNestingSelector()) - { - return false; - } - } - - return true; + selector.ValidateNestingSelector(inControlTheme); } private Type? EvaluateTargetType() diff --git a/src/Avalonia.Base/Styling/PropertyEqualsSelector.cs b/src/Avalonia.Base/Styling/PropertyEqualsSelector.cs index 7a37daf087..48136ba2de 100644 --- a/src/Avalonia.Base/Styling/PropertyEqualsSelector.cs +++ b/src/Avalonia.Base/Styling/PropertyEqualsSelector.cs @@ -90,7 +90,7 @@ namespace Avalonia.Styling } protected override Selector? MovePrevious() => _previous; - internal override bool HasValidNestingSelector() => _previous?.HasValidNestingSelector() ?? false; + protected override Selector? MovePreviousOrParent() => _previous; internal static bool Compare(Type propertyType, object? propertyValue, object? value) { diff --git a/src/Avalonia.Base/Styling/Selector.cs b/src/Avalonia.Base/Styling/Selector.cs index 1e06f3d375..7ce17518dd 100644 --- a/src/Avalonia.Base/Styling/Selector.cs +++ b/src/Avalonia.Base/Styling/Selector.cs @@ -86,7 +86,36 @@ namespace Avalonia.Styling /// protected abstract Selector? MovePrevious(); - internal abstract bool HasValidNestingSelector(); + /// + /// Moves to the previous selector or the parent selector. + /// + protected abstract Selector? MovePreviousOrParent(); + + internal virtual void ValidateNestingSelector(bool inControlTheme) + { + var s = this; + var templateCount = 0; + + do + { + if (inControlTheme) + { + if (!s.InTemplate && s.IsCombinator) + throw new InvalidOperationException( + "ControlTheme style may not directly contain a child or descendent selector."); + if (s is TemplateSelector && templateCount++ > 0) + throw new InvalidOperationException( + "ControlTemplate styles cannot contain multiple template selectors."); + } + + var previous = s.MovePreviousOrParent(); + + if (previous is null && s is not NestingSelector) + throw new InvalidOperationException("Child styles must have a nesting selector."); + + s = previous; + } while (s is not null); + } private static SelectorMatch MatchUntilCombinator( IStyleable control, diff --git a/src/Avalonia.Base/Styling/Style.cs b/src/Avalonia.Base/Styling/Style.cs index 000e588bad..c61b08b2a1 100644 --- a/src/Avalonia.Base/Styling/Style.cs +++ b/src/Avalonia.Base/Styling/Style.cs @@ -1,22 +1,13 @@ using System; -using System.Collections.Generic; -using Avalonia.Animation; -using Avalonia.Controls; -using Avalonia.Metadata; namespace Avalonia.Styling { /// /// Defines a style. /// - public class Style : AvaloniaObject, IStyle, IResourceProvider + public class Style : StyleBase { - private IResourceHost? _owner; - private StyleChildren? _children; - private IResourceDictionary? _resources; - private List? _setters; - private List? _animations; - private StyleCache? _childCache; + private Selector? _selector; /// /// Initializes a new instance of the class. @@ -35,113 +26,41 @@ namespace Avalonia.Styling } /// - /// Gets the children of the style. - /// - public IList Children => _children ??= new(this); - - /// - /// Gets the or Application that hosts the style. + /// Gets or sets the style's selector. /// - public IResourceHost? Owner + public Selector? Selector { - get => _owner; - private set - { - if (_owner != value) - { - _owner = value; - OwnerChanged?.Invoke(this, EventArgs.Empty); - } - } + get => _selector; + set => _selector = ValidateSelector(value); } - /// - /// Gets the parent style if this style is hosted in a collection. - /// - public Style? Parent { get; private set; } - - /// - /// Gets or sets a dictionary of style resources. - /// - public IResourceDictionary Resources + public override SelectorMatchResult TryAttach(IStyleable target, object? host) { - get => _resources ?? (Resources = new ResourceDictionary()); - set - { - value = value ?? throw new ArgumentNullException(nameof(value)); - - var hadResources = _resources?.HasResources ?? false; - - _resources = value; - - if (Owner is object) - { - _resources.AddOwner(Owner); - - if (hadResources || _resources.HasResources) - { - Owner.NotifyHostedResourcesChanged(ResourcesChangedEventArgs.Empty); - } - } - } - } - - /// - /// Gets or sets the style's selector. - /// - public Selector? Selector { get; set; } - - /// - /// Gets the style's setters. - /// - public IList Setters => _setters ??= new List(); - - /// - /// Gets the style's animations. - /// - public IList Animations => _animations ??= new List(); - - bool IResourceNode.HasResources => _resources?.Count > 0; - IReadOnlyList IStyle.Children => (IReadOnlyList?)_children ?? Array.Empty(); + _ = target ?? throw new ArgumentNullException(nameof(target)); - public event EventHandler? OwnerChanged; + var result = SelectorMatchResult.NeverThisType; - public void Add(ISetter setter) => Setters.Add(setter); - public void Add(IStyle style) => Children.Add(style); - - public SelectorMatchResult TryAttach(IStyleable target, IStyleHost? host) - { - target = target ?? throw new ArgumentNullException(nameof(target)); + if (HasSettersOrAnimations) + { + var match = Selector?.Match(target, Parent, true) ?? + (target == host ? + SelectorMatch.AlwaysThisInstance : + SelectorMatch.NeverThisInstance); - var match = Selector is object ? Selector.Match(target, Parent) : - target == host ? SelectorMatch.AlwaysThisInstance : SelectorMatch.NeverThisInstance; + if (match.IsMatch) + Attach(target, match.Activator); - if (match.IsMatch && (_setters is object || _animations is object)) - { - var instance = new StyleInstance(this, target, _setters, _animations, match.Activator); - target.StyleApplied(instance); - instance.Start(); + result = match.Result; } - var result = match.Result; + var childResult = TryAttachChildren(target, host); - if (_children is not null) - { - _childCache ??= new StyleCache(); - var childResult = _childCache.TryAttach(_children, target, host); - if (childResult > result) - result = childResult; - } + if (childResult > result) + result = childResult; return result; } - public bool TryGetResource(object key, out object? result) - { - result = null; - return _resources?.TryGetResource(key, out result) ?? false; - } - /// /// Returns a string representation of the style. /// @@ -158,41 +77,30 @@ namespace Avalonia.Styling } } - void IResourceProvider.AddOwner(IResourceHost owner) + internal override void SetParent(StyleBase? parent) { - owner = owner ?? throw new ArgumentNullException(nameof(owner)); - - if (Owner != null) + if (parent is Style parentStyle && parentStyle.Selector is not null) { - throw new InvalidOperationException("The Style already has a parent."); - } - - Owner = owner; - _resources?.AddOwner(owner); - } - - void IResourceProvider.RemoveOwner(IResourceHost owner) - { - owner = owner ?? throw new ArgumentNullException(nameof(owner)); - - if (Owner == owner) - { - Owner = null; - _resources?.RemoveOwner(owner); + if (Selector is null) + throw new InvalidOperationException("Child styles must have a selector."); + Selector.ValidateNestingSelector(false); } - } - - internal void SetParent(Style? parent) - { - if (parent?.Selector is not null) + else if (parent is ControlTheme) { if (Selector is null) throw new InvalidOperationException("Child styles must have a selector."); - if (!Selector.HasValidNestingSelector()) - throw new InvalidOperationException("Child styles must have a nesting selector."); + Selector.ValidateNestingSelector(true); } - Parent = parent; + base.SetParent(parent); + } + + private static Selector? ValidateSelector(Selector? selector) + { + if (selector is TemplateSelector) + throw new InvalidOperationException( + "Invalid selector: Template selector must be followed by control selector."); + return selector; } } } diff --git a/src/Avalonia.Base/Styling/StyleBase.cs b/src/Avalonia.Base/Styling/StyleBase.cs new file mode 100644 index 0000000000..306a4cf010 --- /dev/null +++ b/src/Avalonia.Base/Styling/StyleBase.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using Avalonia.Animation; +using Avalonia.Controls; +using Avalonia.Metadata; +using Avalonia.Styling.Activators; + +namespace Avalonia.Styling +{ + /// + /// Base class for and . + /// + public abstract class StyleBase : AvaloniaObject, IStyle, IResourceProvider + { + private IResourceHost? _owner; + private StyleChildren? _children; + private IResourceDictionary? _resources; + private List? _setters; + private List? _animations; + private StyleCache? _childCache; + + public IList Children => _children ??= new(this); + + public IResourceHost? Owner + { + get => _owner; + private set + { + if (_owner != value) + { + _owner = value; + OwnerChanged?.Invoke(this, EventArgs.Empty); + } + } + } + + public IStyle? Parent { get; private set; } + + public IResourceDictionary Resources + { + get => _resources ?? (Resources = new ResourceDictionary()); + set + { + value = value ?? throw new ArgumentNullException(nameof(value)); + + var hadResources = _resources?.HasResources ?? false; + + _resources = value; + + if (Owner is object) + { + _resources.AddOwner(Owner); + + if (hadResources || _resources.HasResources) + { + Owner.NotifyHostedResourcesChanged(ResourcesChangedEventArgs.Empty); + } + } + } + } + + public IList Setters => _setters ??= new List(); + public IList Animations => _animations ??= new List(); + + bool IResourceNode.HasResources => _resources?.Count > 0; + IReadOnlyList IStyle.Children => (IReadOnlyList?)_children ?? Array.Empty(); + + internal bool HasSettersOrAnimations => _setters?.Count > 0 || _animations?.Count > 0; + + public void Add(ISetter setter) => Setters.Add(setter); + public void Add(IStyle style) => Children.Add(style); + + public event EventHandler? OwnerChanged; + + public abstract SelectorMatchResult TryAttach(IStyleable target, object? host); + + public bool TryGetResource(object key, out object? result) + { + result = null; + return _resources?.TryGetResource(key, out result) ?? false; + } + + internal void Attach(IStyleable target, IStyleActivator? activator) + { + var instance = new StyleInstance(this, target, _setters, _animations, activator); + target.StyleApplied(instance); + instance.Start(); + } + + internal SelectorMatchResult TryAttachChildren(IStyleable target, object? host) + { + if (_children is null || _children.Count == 0) + return SelectorMatchResult.NeverThisType; + _childCache ??= new StyleCache(); + return _childCache.TryAttach(_children, target, host); + } + + internal virtual void SetParent(StyleBase? parent) => Parent = parent; + + void IResourceProvider.AddOwner(IResourceHost owner) + { + owner = owner ?? throw new ArgumentNullException(nameof(owner)); + + if (Owner != null) + { + throw new InvalidOperationException("The Style already has a parent."); + } + + Owner = owner; + _resources?.AddOwner(owner); + } + + void IResourceProvider.RemoveOwner(IResourceHost owner) + { + owner = owner ?? throw new ArgumentNullException(nameof(owner)); + + if (Owner == owner) + { + Owner = null; + _resources?.RemoveOwner(owner); + } + } + } +} diff --git a/src/Avalonia.Base/Styling/StyleCache.cs b/src/Avalonia.Base/Styling/StyleCache.cs index 3285476880..81196f6a27 100644 --- a/src/Avalonia.Base/Styling/StyleCache.cs +++ b/src/Avalonia.Base/Styling/StyleCache.cs @@ -12,7 +12,7 @@ namespace Avalonia.Styling /// internal class StyleCache : Dictionary?> { - public SelectorMatchResult TryAttach(IList styles, IStyleable target, IStyleHost? host) + public SelectorMatchResult TryAttach(IList styles, IStyleable target, object? host) { if (TryGetValue(target.StyleKey, out var cached)) { diff --git a/src/Avalonia.Base/Styling/StyleChildren.cs b/src/Avalonia.Base/Styling/StyleChildren.cs index 5f8635f155..42b0a331ee 100644 --- a/src/Avalonia.Base/Styling/StyleChildren.cs +++ b/src/Avalonia.Base/Styling/StyleChildren.cs @@ -5,20 +5,20 @@ namespace Avalonia.Styling { internal class StyleChildren : Collection { - private readonly Style _owner; + private readonly StyleBase _owner; - public StyleChildren(Style owner) => _owner = owner; + public StyleChildren(StyleBase owner) => _owner = owner; protected override void InsertItem(int index, IStyle item) { - (item as Style)?.SetParent(_owner); + (item as StyleBase)?.SetParent(_owner); base.InsertItem(index, item); } protected override void RemoveItem(int index) { var item = Items[index]; - (item as Style)?.SetParent(null); + (item as StyleBase)?.SetParent(null); if (_owner.Owner is IResourceHost host) (item as IResourceProvider)?.RemoveOwner(host); base.RemoveItem(index); @@ -26,7 +26,7 @@ namespace Avalonia.Styling protected override void SetItem(int index, IStyle item) { - (item as Style)?.SetParent(_owner); + (item as StyleBase)?.SetParent(_owner); base.SetItem(index, item); if (_owner.Owner is IResourceHost host) (item as IResourceProvider)?.AddOwner(host); diff --git a/src/Avalonia.Base/Styling/Styler.cs b/src/Avalonia.Base/Styling/Styler.cs index 74cf77ea40..ad5c1cd102 100644 --- a/src/Avalonia.Base/Styling/Styler.cs +++ b/src/Avalonia.Base/Styling/Styler.cs @@ -1,19 +1,24 @@ using System; -#nullable enable - namespace Avalonia.Styling { public class Styler : IStyler { public void ApplyStyles(IStyleable target) { - target = target ?? throw new ArgumentNullException(nameof(target)); + _ = target ?? throw new ArgumentNullException(nameof(target)); + + // Apply the control theme. + target.GetEffectiveTheme()?.TryAttach(target, target); + + // If the control has a themed templated parent then apply the styles from the + // templated parent theme. + if (target.TemplatedParent is IStyleable styleableParent) + styleableParent.GetEffectiveTheme()?.TryAttach(target, styleableParent); + // Apply styles from the rest of the tree. if (target is IStyleHost styleHost) - { ApplyStyles(target, styleHost); - } } private void ApplyStyles(IStyleable target, IStyleHost host) @@ -21,14 +26,10 @@ namespace Avalonia.Styling var parent = host.StylingParent; if (parent != null) - { ApplyStyles(target, parent); - } if (host.IsStylesInitialized) - { host.Styles.TryAttach(target, host); - } } } } diff --git a/src/Avalonia.Base/Styling/Styles.cs b/src/Avalonia.Base/Styling/Styles.cs index e4c3371007..c213475bb7 100644 --- a/src/Avalonia.Base/Styling/Styles.cs +++ b/src/Avalonia.Base/Styling/Styles.cs @@ -26,6 +26,11 @@ namespace Avalonia.Styling { _styles.ResetBehavior = ResetBehavior.Remove; _styles.CollectionChanged += OnCollectionChanged; + _styles.Validate = i => + { + if (i is ControlTheme) + throw new InvalidOperationException("ControlThemes cannot be added to a Styles collection."); + }; } public Styles(IResourceHost owner) @@ -111,7 +116,7 @@ namespace Avalonia.Styling set => _styles[index] = value; } - public SelectorMatchResult TryAttach(IStyleable target, IStyleHost? host) + public SelectorMatchResult TryAttach(IStyleable target, object? host) { _cache ??= new StyleCache(); return _cache.TryAttach(this, target, host); diff --git a/src/Avalonia.Base/Styling/TemplateSelector.cs b/src/Avalonia.Base/Styling/TemplateSelector.cs index b0a2dae8d6..278e24a203 100644 --- a/src/Avalonia.Base/Styling/TemplateSelector.cs +++ b/src/Avalonia.Base/Styling/TemplateSelector.cs @@ -49,6 +49,6 @@ namespace Avalonia.Styling } protected override Selector? MovePrevious() => null; - internal override bool HasValidNestingSelector() => _parent?.HasValidNestingSelector() ?? false; + protected override Selector? MovePreviousOrParent() => _parent; } } diff --git a/src/Avalonia.Base/Styling/TypeNameAndClassSelector.cs b/src/Avalonia.Base/Styling/TypeNameAndClassSelector.cs index d52c8c7d5c..94a6db41f6 100644 --- a/src/Avalonia.Base/Styling/TypeNameAndClassSelector.cs +++ b/src/Avalonia.Base/Styling/TypeNameAndClassSelector.cs @@ -141,7 +141,7 @@ namespace Avalonia.Styling } protected override Selector? MovePrevious() => _previous; - internal override bool HasValidNestingSelector() => _previous?.HasValidNestingSelector() ?? false; + protected override Selector? MovePreviousOrParent() => _previous; private string BuildSelectorString() { diff --git a/src/Avalonia.Base/Utilities/MathUtilities.cs b/src/Avalonia.Base/Utilities/MathUtilities.cs index 3d5be806e1..d381979c1e 100644 --- a/src/Avalonia.Base/Utilities/MathUtilities.cs +++ b/src/Avalonia.Base/Utilities/MathUtilities.cs @@ -255,7 +255,7 @@ namespace Avalonia.Utilities /// /// Clamps a value between a minimum and maximum value. /// - /// The value. + /// The value. /// The minimum value. /// The maximum value. /// The clamped value. diff --git a/src/Avalonia.Build.Tasks/Avalonia.Build.Tasks.csproj b/src/Avalonia.Build.Tasks/Avalonia.Build.Tasks.csproj index a801d338c3..dc9064b262 100644 --- a/src/Avalonia.Build.Tasks/Avalonia.Build.Tasks.csproj +++ b/src/Avalonia.Build.Tasks/Avalonia.Build.Tasks.csproj @@ -95,6 +95,9 @@ Markup/%(RecursiveDir)%(FileName)%(Extension) + + Markup/%(RecursiveDir)%(FileName)%(Extension) + Markup/%(RecursiveDir)%(FileName)%(Extension) diff --git a/src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs b/src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs index b39ceab1b6..5915388822 100644 --- a/src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs +++ b/src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs @@ -251,7 +251,8 @@ namespace Avalonia.Build.Tasks var populateBuilder = classTypeDefinition == null ? builder : typeSystem.CreateTypeBuilder(classTypeDefinition); - compiler.Compile(parsed, contextClass, + compiler.Compile(parsed, + contextClass, compiler.DefinePopulateMethod(populateBuilder, parsed, populateName, classTypeDefinition == null), buildName == null ? null : compiler.DefineBuildMethod(builder, parsed, buildName, true), @@ -325,8 +326,8 @@ namespace Avalonia.Build.Tasks var op = i[c].Operand as MethodReference; // TODO: Throw an error - // This usually happens when same XAML resource was added twice for some weird reason - // We currently support it for dual-named default theme resource + // This usually happens when the same XAML resource was added twice for some weird reason + // We currently support it for dual-named default theme resources if (op != null && op.Name == TrampolineName) { diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Default/ColorSlider.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Default/ColorSlider.xaml deleted file mode 100644 index 35cd7a9faa..0000000000 --- a/src/Avalonia.Controls.ColorPicker/Themes/Default/ColorSlider.xaml +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Default/Default.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Default/Default.xaml deleted file mode 100644 index ebecd65cc3..0000000000 --- a/src/Avalonia.Controls.ColorPicker/Themes/Default/Default.xaml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPicker.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPicker.xaml index a4d5ff673f..74a1df4991 100644 --- a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPicker.xaml +++ b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPicker.xaml @@ -1,14 +1,10 @@ - + - - - 5,5,0,0 - - - @@ -46,7 +42,7 @@ - + + SelectedIndex="{Binding SelectedIndex, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"> + + + 5,5,0,0 + + - - - - - + - + diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPreviewer.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPreviewer.xaml index 74f33d1258..1c4a44d081 100644 --- a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPreviewer.xaml +++ b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPreviewer.xaml @@ -1,15 +1,14 @@ - + - - - 80 - 40 - + + 80 + 40 - + - + diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorSlider.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorSlider.xaml index 162ac372de..eb67ada334 100644 --- a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorSlider.xaml +++ b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorSlider.xaml @@ -1,188 +1,190 @@ - + - + - + - + - - + + + + + + - - - - + + - - + - + diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorSpectrum.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorSpectrum.xaml index dba4ad19f5..f95721c881 100644 --- a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorSpectrum.xaml +++ b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorSpectrum.xaml @@ -1,9 +1,10 @@ - + - - - - + + + - - - + + + - - - - - + + + + + - - + + - - - + + + - + + + diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorView.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorView.xaml index e25e822f3f..59cc48975f 100644 --- a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorView.xaml +++ b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorView.xaml @@ -1,86 +1,87 @@ - + - - - - - - - 48 - 30 - 80 - - - M3 2C3.27614 2 3.5 2.22386 3.5 2.5V5.5C3.5 5.77614 3.72386 6 4 6H16C16.2761 6 16.5 5.77614 - 16.5 5.5V2.5C16.5 2.22386 16.7239 2 17 2C17.2761 2 17.5 2.22386 17.5 2.5V5.5C17.5 6.32843 - 16.8284 7 16 7H15.809L12.2236 14.1708C12.0615 14.4951 11.7914 14.7431 11.4695 - 14.8802C11.4905 15.0808 11.5 15.2891 11.5 15.5C11.5 16.0818 11.4278 16.6623 11.2268 - 17.1165C11.019 17.5862 10.6266 18 10 18C9.37343 18 8.98105 17.5862 8.77323 17.1165C8.57222 - 16.6623 8.5 16.0818 8.5 15.5C8.5 15.2891 8.50952 15.0808 8.53051 14.8802C8.20863 14.7431 - 7.93851 14.4951 7.77639 14.1708L4.19098 7H4C3.17157 7 2.5 6.32843 2.5 5.5V2.5C2.5 2.22386 - 2.72386 2 3 2ZM9.11803 14H10.882C11.0714 14 11.2445 13.893 11.3292 13.7236L14.691 - 7H5.30902L8.67082 13.7236C8.75552 13.893 8.92865 14 9.11803 14ZM9.52346 15C9.50787 15.1549 - 9.5 15.3225 9.5 15.5C9.5 16.0228 9.56841 16.4423 9.6877 16.7119C9.8002 16.9661 9.90782 17 - 10 17C10.0922 17 10.1998 16.9661 10.3123 16.7119C10.4316 16.4423 10.5 16.0228 10.5 - 15.5C10.5 15.3225 10.4921 15.1549 10.4765 15H9.52346Z - - - - M9.75003 6.5C10.1642 6.5 10.5 6.16421 10.5 5.75C10.5 5.33579 10.1642 5 9.75003 5C9.33582 - 5 9.00003 5.33579 9.00003 5.75C9.00003 6.16421 9.33582 6.5 9.75003 6.5ZM12.75 7.5C13.1642 - 7.5 13.5 7.16421 13.5 6.75C13.5 6.33579 13.1642 6 12.75 6C12.3358 6 12 6.33579 12 6.75C12 - 7.16421 12.3358 7.5 12.75 7.5ZM15.25 9C15.25 9.41421 14.9142 9.75 14.5 9.75C14.0858 9.75 - 13.75 9.41421 13.75 9C13.75 8.58579 14.0858 8.25 14.5 8.25C14.9142 8.25 15.25 8.58579 - 15.25 9ZM14.5 12.75C14.9142 12.75 15.25 12.4142 15.25 12C15.25 11.5858 14.9142 11.25 14.5 - 11.25C14.0858 11.25 13.75 11.5858 13.75 12C13.75 12.4142 14.0858 12.75 14.5 12.75ZM13.25 - 14C13.25 14.4142 12.9142 14.75 12.5 14.75C12.0858 14.75 11.75 14.4142 11.75 14C11.75 - 13.5858 12.0858 13.25 12.5 13.25C12.9142 13.25 13.25 13.5858 13.25 14ZM13.6972 - 2.99169C10.9426 1.57663 8.1432 1.7124 5.77007 3.16636C4.55909 3.9083 3.25331 5.46925 - 2.51605 7.05899C2.14542 7.85816 1.89915 8.70492 1.90238 9.49318C1.90566 10.2941 2.16983 - 11.0587 2.84039 11.6053C3.45058 12.1026 3.98165 12.353 4.49574 12.3784C5.01375 12.404 - 5.41804 12.1942 5.73429 12.0076C5.80382 11.9666 5.86891 11.927 5.93113 11.8892C6.17332 - 11.7421 6.37205 11.6214 6.62049 11.5426C6.90191 11.4534 7.2582 11.4205 7.77579 - 11.5787C7.96661 11.637 8.08161 11.7235 8.16212 11.8229C8.24792 11.9289 8.31662 12.0774 - 8.36788 12.2886C8.41955 12.5016 8.44767 12.7527 8.46868 13.0491C8.47651 13.1594 8.48379 - 13.2855 8.49142 13.4176C8.50252 13.6098 8.51437 13.8149 8.52974 14.0037C8.58435 14.6744 - 8.69971 15.4401 9.10362 16.1357C9.51764 16.8488 10.2047 17.439 11.307 17.8158C12.9093 - 18.3636 14.3731 17.9191 15.5126 17.0169C16.6391 16.125 17.4691 14.7761 17.8842 - 13.4272C19.1991 9.15377 17.6728 5.03394 13.6972 2.99169ZM6.29249 4.01905C8.35686 2.75426 - 10.7844 2.61959 13.2403 3.88119C16.7473 5.68275 18.1135 9.28161 16.9284 13.1332C16.5624 - 14.3227 15.8338 15.4871 14.8919 16.2329C13.963 16.9684 12.8486 17.286 11.6305 - 16.8696C10.7269 16.5607 10.2467 16.1129 9.96842 15.6336C9.68001 15.1369 9.57799 14.5556 - 9.52644 13.9225C9.51101 13.733 9.50132 13.5621 9.49147 13.3884C9.48399 13.2564 9.47642 - 13.1229 9.46618 12.9783C9.44424 12.669 9.41175 12.3499 9.33968 12.0529C9.26719 11.7541 - 9.14902 11.4527 8.93935 11.1937C8.72439 10.9282 8.43532 10.7346 8.06801 10.6223C7.36648 - 10.408 6.80266 10.4359 6.31839 10.5893C5.94331 10.7082 5.62016 10.9061 5.37179 - 11.0582C5.31992 11.0899 5.2713 11.1197 5.22616 11.1463C4.94094 11.3146 4.75357 11.39 - 4.54514 11.3796C4.33279 11.3691 4.00262 11.2625 3.47218 10.8301C3.0866 10.5158 2.90473 - 10.0668 2.90237 9.48908C2.89995 8.89865 3.08843 8.20165 3.42324 7.47971C4.09686 6.0272 - 5.28471 4.63649 6.29249 4.01905Z - - - - M14.95 5C14.7184 3.85888 13.7095 3 12.5 3C11.2905 3 10.2816 3.85888 10.05 5H2.5C2.22386 - 5 2 5.22386 2 5.5C2 5.77614 2.22386 6 2.5 6H10.05C10.2816 7.14112 11.2905 8 12.5 8C13.7297 - 8 14.752 7.11217 14.961 5.94254C14.9575 5.96177 14.9539 5.98093 14.95 6H17.5C17.7761 6 18 - 5.77614 18 5.5C18 5.22386 17.7761 5 17.5 5H14.95ZM12.5 7C11.6716 7 11 6.32843 11 5.5C11 - 4.67157 11.6716 4 12.5 4C13.3284 4 14 4.67157 14 5.5C14 6.32843 13.3284 7 12.5 7ZM9.94999 - 14C9.71836 12.8589 8.70948 12 7.5 12C6.29052 12 5.28164 12.8589 5.05001 14H2.5C2.22386 - 14 2 14.2239 2 14.5C2 14.7761 2.22386 15 2.5 15H5.05001C5.28164 16.1411 6.29052 17 7.5 - 17C8.70948 17 9.71836 16.1411 9.94999 15H17.5C17.7761 15 18 14.7761 18 14.5C18 14.2239 - 17.7761 14 17.5 14H9.94999ZM7.5 16C6.67157 16 6 15.3284 6 14.5C6 13.6716 6.67157 13 7.5 - 13C8.32843 13 9 13.6716 9 14.5C9 15.3284 8.32843 16 7.5 16Z - - + + + + + + 48 + 30 + 80 + + + M3 2C3.27614 2 3.5 2.22386 3.5 2.5V5.5C3.5 5.77614 3.72386 6 4 6H16C16.2761 6 16.5 5.77614 + 16.5 5.5V2.5C16.5 2.22386 16.7239 2 17 2C17.2761 2 17.5 2.22386 17.5 2.5V5.5C17.5 6.32843 + 16.8284 7 16 7H15.809L12.2236 14.1708C12.0615 14.4951 11.7914 14.7431 11.4695 + 14.8802C11.4905 15.0808 11.5 15.2891 11.5 15.5C11.5 16.0818 11.4278 16.6623 11.2268 + 17.1165C11.019 17.5862 10.6266 18 10 18C9.37343 18 8.98105 17.5862 8.77323 17.1165C8.57222 + 16.6623 8.5 16.0818 8.5 15.5C8.5 15.2891 8.50952 15.0808 8.53051 14.8802C8.20863 14.7431 + 7.93851 14.4951 7.77639 14.1708L4.19098 7H4C3.17157 7 2.5 6.32843 2.5 5.5V2.5C2.5 2.22386 + 2.72386 2 3 2ZM9.11803 14H10.882C11.0714 14 11.2445 13.893 11.3292 13.7236L14.691 + 7H5.30902L8.67082 13.7236C8.75552 13.893 8.92865 14 9.11803 14ZM9.52346 15C9.50787 15.1549 + 9.5 15.3225 9.5 15.5C9.5 16.0228 9.56841 16.4423 9.6877 16.7119C9.8002 16.9661 9.90782 17 + 10 17C10.0922 17 10.1998 16.9661 10.3123 16.7119C10.4316 16.4423 10.5 16.0228 10.5 + 15.5C10.5 15.3225 10.4921 15.1549 10.4765 15H9.52346Z + + + + M9.75003 6.5C10.1642 6.5 10.5 6.16421 10.5 5.75C10.5 5.33579 10.1642 5 9.75003 5C9.33582 + 5 9.00003 5.33579 9.00003 5.75C9.00003 6.16421 9.33582 6.5 9.75003 6.5ZM12.75 7.5C13.1642 + 7.5 13.5 7.16421 13.5 6.75C13.5 6.33579 13.1642 6 12.75 6C12.3358 6 12 6.33579 12 6.75C12 + 7.16421 12.3358 7.5 12.75 7.5ZM15.25 9C15.25 9.41421 14.9142 9.75 14.5 9.75C14.0858 9.75 + 13.75 9.41421 13.75 9C13.75 8.58579 14.0858 8.25 14.5 8.25C14.9142 8.25 15.25 8.58579 + 15.25 9ZM14.5 12.75C14.9142 12.75 15.25 12.4142 15.25 12C15.25 11.5858 14.9142 11.25 14.5 + 11.25C14.0858 11.25 13.75 11.5858 13.75 12C13.75 12.4142 14.0858 12.75 14.5 12.75ZM13.25 + 14C13.25 14.4142 12.9142 14.75 12.5 14.75C12.0858 14.75 11.75 14.4142 11.75 14C11.75 + 13.5858 12.0858 13.25 12.5 13.25C12.9142 13.25 13.25 13.5858 13.25 14ZM13.6972 + 2.99169C10.9426 1.57663 8.1432 1.7124 5.77007 3.16636C4.55909 3.9083 3.25331 5.46925 + 2.51605 7.05899C2.14542 7.85816 1.89915 8.70492 1.90238 9.49318C1.90566 10.2941 2.16983 + 11.0587 2.84039 11.6053C3.45058 12.1026 3.98165 12.353 4.49574 12.3784C5.01375 12.404 + 5.41804 12.1942 5.73429 12.0076C5.80382 11.9666 5.86891 11.927 5.93113 11.8892C6.17332 + 11.7421 6.37205 11.6214 6.62049 11.5426C6.90191 11.4534 7.2582 11.4205 7.77579 + 11.5787C7.96661 11.637 8.08161 11.7235 8.16212 11.8229C8.24792 11.9289 8.31662 12.0774 + 8.36788 12.2886C8.41955 12.5016 8.44767 12.7527 8.46868 13.0491C8.47651 13.1594 8.48379 + 13.2855 8.49142 13.4176C8.50252 13.6098 8.51437 13.8149 8.52974 14.0037C8.58435 14.6744 + 8.69971 15.4401 9.10362 16.1357C9.51764 16.8488 10.2047 17.439 11.307 17.8158C12.9093 + 18.3636 14.3731 17.9191 15.5126 17.0169C16.6391 16.125 17.4691 14.7761 17.8842 + 13.4272C19.1991 9.15377 17.6728 5.03394 13.6972 2.99169ZM6.29249 4.01905C8.35686 2.75426 + 10.7844 2.61959 13.2403 3.88119C16.7473 5.68275 18.1135 9.28161 16.9284 13.1332C16.5624 + 14.3227 15.8338 15.4871 14.8919 16.2329C13.963 16.9684 12.8486 17.286 11.6305 + 16.8696C10.7269 16.5607 10.2467 16.1129 9.96842 15.6336C9.68001 15.1369 9.57799 14.5556 + 9.52644 13.9225C9.51101 13.733 9.50132 13.5621 9.49147 13.3884C9.48399 13.2564 9.47642 + 13.1229 9.46618 12.9783C9.44424 12.669 9.41175 12.3499 9.33968 12.0529C9.26719 11.7541 + 9.14902 11.4527 8.93935 11.1937C8.72439 10.9282 8.43532 10.7346 8.06801 10.6223C7.36648 + 10.408 6.80266 10.4359 6.31839 10.5893C5.94331 10.7082 5.62016 10.9061 5.37179 + 11.0582C5.31992 11.0899 5.2713 11.1197 5.22616 11.1463C4.94094 11.3146 4.75357 11.39 + 4.54514 11.3796C4.33279 11.3691 4.00262 11.2625 3.47218 10.8301C3.0866 10.5158 2.90473 + 10.0668 2.90237 9.48908C2.89995 8.89865 3.08843 8.20165 3.42324 7.47971C4.09686 6.0272 + 5.28471 4.63649 6.29249 4.01905Z + + + + M14.95 5C14.7184 3.85888 13.7095 3 12.5 3C11.2905 3 10.2816 3.85888 10.05 5H2.5C2.22386 + 5 2 5.22386 2 5.5C2 5.77614 2.22386 6 2.5 6H10.05C10.2816 7.14112 11.2905 8 12.5 8C13.7297 + 8 14.752 7.11217 14.961 5.94254C14.9575 5.96177 14.9539 5.98093 14.95 6H17.5C17.7761 6 18 + 5.77614 18 5.5C18 5.22386 17.7761 5 17.5 5H14.95ZM12.5 7C11.6716 7 11 6.32843 11 5.5C11 + 4.67157 11.6716 4 12.5 4C13.3284 4 14 4.67157 14 5.5C14 6.32843 13.3284 7 12.5 7ZM9.94999 + 14C9.71836 12.8589 8.70948 12 7.5 12C6.29052 12 5.28164 12.8589 5.05001 14H2.5C2.22386 + 14 2 14.2239 2 14.5C2 14.7761 2.22386 15 2.5 15H5.05001C5.28164 16.1411 6.29052 17 7.5 + 17C8.70948 17 9.71836 16.1411 9.94999 15H17.5C17.7761 15 18 14.7761 18 14.5C18 14.2239 + 17.7761 14 17.5 14H9.94999ZM7.5 16C6.67157 16 6 15.3284 6 14.5C6 13.6716 6.67157 13 7.5 + 13C8.32843 13 9 13.6716 9 14.5C9 15.3284 8.32843 16 7.5 16Z + + + 3 - + - + diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/Fluent.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/Fluent.xaml index 186b6de9bc..a5a94a2322 100644 --- a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/Fluent.xaml +++ b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/Fluent.xaml @@ -3,42 +3,48 @@ xmlns:converters="using:Avalonia.Controls.Converters"> - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - + - - - + + + + + + + + + + + diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Default/ColorPreviewer.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Simple/ColorPreviewer.xaml similarity index 89% rename from src/Avalonia.Controls.ColorPicker/Themes/Default/ColorPreviewer.xaml rename to src/Avalonia.Controls.ColorPicker/Themes/Simple/ColorPreviewer.xaml index c3bc7df4a4..e067fe4ab5 100644 --- a/src/Avalonia.Controls.ColorPicker/Themes/Default/ColorPreviewer.xaml +++ b/src/Avalonia.Controls.ColorPicker/Themes/Simple/ColorPreviewer.xaml @@ -1,15 +1,14 @@ - + - - - 80 - 40 - + + 80 + 40 - + - + diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Simple/ColorSlider.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Simple/ColorSlider.xaml new file mode 100644 index 0000000000..9aa2dcd9f9 --- /dev/null +++ b/src/Avalonia.Controls.ColorPicker/Themes/Simple/ColorSlider.xaml @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Default/ColorSpectrum.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Simple/ColorSpectrum.xaml similarity index 69% rename from src/Avalonia.Controls.ColorPicker/Themes/Default/ColorSpectrum.xaml rename to src/Avalonia.Controls.ColorPicker/Themes/Simple/ColorSpectrum.xaml index 0e57f6b483..0e137c89c6 100644 --- a/src/Avalonia.Controls.ColorPicker/Themes/Default/ColorSpectrum.xaml +++ b/src/Avalonia.Controls.ColorPicker/Themes/Simple/ColorSpectrum.xaml @@ -1,9 +1,10 @@ - + - - - - + + + - - - + + + - - - - - + + + + + - + - - - + + + - + + + diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Simple/Simple.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Simple/Simple.xaml new file mode 100644 index 0000000000..1e507a91fe --- /dev/null +++ b/src/Avalonia.Controls.ColorPicker/Themes/Simple/Simple.xaml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Controls.DataGrid/DataGridCell.cs b/src/Avalonia.Controls.DataGrid/DataGridCell.cs index f9685b3682..dd802678d4 100644 --- a/src/Avalonia.Controls.DataGrid/DataGridCell.cs +++ b/src/Avalonia.Controls.DataGrid/DataGridCell.cs @@ -14,7 +14,7 @@ namespace Avalonia.Controls /// Represents an individual cell. /// [TemplatePart(DATAGRIDCELL_elementRightGridLine, typeof(Rectangle))] - [PseudoClasses(":selected", ":current", ":edited", ":invalid")] + [PseudoClasses(":selected", ":current", ":edited", ":invalid", ":focus")] public class DataGridCell : ContentControl { private const string DATAGRIDCELL_elementRightGridLine = "PART_RightGridLine"; @@ -216,6 +216,8 @@ namespace Avalonia.Controls PseudoClasses.Set(":edited", IsEdited); PseudoClasses.Set(":invalid", !IsValid); + + PseudoClasses.Set(":focus", OwningGrid.IsFocused && IsCurrent); } // Makes sure the right gridline has the proper stroke and visibility. If lastVisibleColumn is specified, the @@ -245,9 +247,15 @@ namespace Avalonia.Controls if (column == null) { Classes.Clear(); + ClearValue(ThemeProperty); } else { + if (Theme != column.CellTheme) + { + Theme = column.CellTheme; + } + Classes.Replace(column.CellStyleClasses); } } diff --git a/src/Avalonia.Controls.DataGrid/DataGridColumn.cs b/src/Avalonia.Controls.DataGrid/DataGridColumn.cs index e57d6bbde2..fbdb979e24 100644 --- a/src/Avalonia.Controls.DataGrid/DataGridColumn.cs +++ b/src/Avalonia.Controls.DataGrid/DataGridColumn.cs @@ -16,6 +16,7 @@ using Avalonia.Controls.Templates; using Avalonia.Controls.Utils; using Avalonia.Layout; using Avalonia.Markup.Xaml.MarkupExtensions; +using Avalonia.Styling; namespace Avalonia.Controls { @@ -36,6 +37,7 @@ namespace Avalonia.Controls private IControl _editingElement; private ICellEditBinding _editBinding; private IBinding _clipboardContentBinding; + private ControlTheme _cellTheme; private readonly Classes _cellStyleClasses = new Classes(); /// @@ -399,6 +401,24 @@ namespace Avalonia.Controls } } } + + /// + /// Backing field for CellTheme property. + /// + public static readonly DirectProperty CellThemeProperty = + AvaloniaProperty.RegisterDirect( + nameof(CellTheme), + o => o.CellTheme, + (o, v) => o.CellTheme = v); + + /// + /// Gets or sets the cell theme. + /// + public ControlTheme CellTheme + { + get { return _cellTheme; } + set { SetAndRaise(CellThemeProperty, ref _cellTheme, value); } + } /// /// Backing field for Header property diff --git a/src/Avalonia.Controls.DataGrid/DataGridRowGroupHeader.cs b/src/Avalonia.Controls.DataGrid/DataGridRowGroupHeader.cs index 9f37e8a6aa..d63c738133 100644 --- a/src/Avalonia.Controls.DataGrid/DataGridRowGroupHeader.cs +++ b/src/Avalonia.Controls.DataGrid/DataGridRowGroupHeader.cs @@ -113,7 +113,6 @@ namespace Avalonia.Controls /// public DataGridRowGroupHeader() { - //DefaultStyleKey = typeof(DataGridRowGroupHeader); AddHandler(InputElement.PointerPressedEvent, (s, e) => DataGridRowGroupHeader_PointerPressed(e), handledEventsToo: true); } diff --git a/src/Avalonia.Controls.DataGrid/DataGridTextColumn.cs b/src/Avalonia.Controls.DataGrid/DataGridTextColumn.cs index bb8637cda2..79247aa87f 100644 --- a/src/Avalonia.Controls.DataGrid/DataGridTextColumn.cs +++ b/src/Avalonia.Controls.DataGrid/DataGridTextColumn.cs @@ -11,6 +11,7 @@ using System.ComponentModel; using Avalonia.Layout; using Avalonia.Markup.Xaml.MarkupExtensions; using Avalonia.Controls.Documents; +using Avalonia.Styling; namespace Avalonia.Controls { @@ -19,12 +20,20 @@ namespace Avalonia.Controls /// public class DataGridTextColumn : DataGridBoundColumn { + private readonly Lazy _cellTextBoxTheme; + private readonly Lazy _cellTextBlockTheme; + /// /// Initializes a new instance of the class. /// public DataGridTextColumn() { BindingTarget = TextBox.TextProperty; + + _cellTextBoxTheme = new Lazy(() => + OwningGrid.TryFindResource("DataGridCellTextBoxTheme", out var theme) ? (ControlTheme)theme : null); + _cellTextBlockTheme = new Lazy(() => + OwningGrid.TryFindResource("DataGridCellTextBlockTheme", out var theme) ? (ControlTheme)theme : null); } /// @@ -156,16 +165,19 @@ namespace Avalonia.Controls protected override IControl GenerateEditingElementDirect(DataGridCell cell, object dataItem) { var textBox = new TextBox - { - VerticalAlignment = VerticalAlignment.Stretch, - Background = new SolidColorBrush(Colors.Transparent) + { + Name = "CellTextBox" }; + if (_cellTextBoxTheme.Value is { } theme) + { + textBox.Theme = theme; + } SyncProperties(textBox); return textBox; } - + /// /// Gets a read-only element that is bound to the column's property value. /// @@ -174,10 +186,14 @@ namespace Avalonia.Controls /// A new, read-only element that is bound to the column's property value. protected override IControl GenerateElement(DataGridCell cell, object dataItem) { - TextBlock textBlockElement = new TextBlock + var textBlockElement = new TextBlock { Name = "CellTextBlock" }; + if (_cellTextBlockTheme.Value is { } theme) + { + textBlockElement.Theme = theme; + } SyncProperties(textBlockElement); @@ -227,7 +243,7 @@ namespace Avalonia.Controls { if (element == null) { - throw new ArgumentNullException("element"); + throw new ArgumentNullException(nameof(element)); } if (element is AvaloniaObject content) diff --git a/src/Avalonia.Controls.DataGrid/Themes/Default.xaml b/src/Avalonia.Controls.DataGrid/Themes/Default.xaml deleted file mode 100644 index 0d1fe43eb6..0000000000 --- a/src/Avalonia.Controls.DataGrid/Themes/Default.xaml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Controls.DataGrid/Themes/Fluent.xaml b/src/Avalonia.Controls.DataGrid/Themes/Fluent.xaml index fb032fec3e..5ae83427b5 100644 --- a/src/Avalonia.Controls.DataGrid/Themes/Fluent.xaml +++ b/src/Avalonia.Controls.DataGrid/Themes/Fluent.xaml @@ -1,8 +1,8 @@ - + 0.6 0.8 - 12,0,12,0 M1875 1011l-787 787v-1798h-128v1798l-787 -787l-90 90l941 941l941 -941z M1965 947l-941 -941l-941 941l90 90l787 -787v1798h128v-1798l787 787z @@ -13,10 +13,12 @@ - + - + @@ -27,14 +29,12 @@ - + - - - - + @@ -44,157 +44,424 @@ Opacity="0.4" Color="{DynamicResource SystemBaseMediumLowColor}" /> - + - - + + + + + + + + + + + + + + + - + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fill="{TemplateBinding SeparatorBrush}" + IsVisible="{TemplateBinding AreSeparatorsVisible}" /> - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/Avalonia.Controls.DataGrid/Themes/Simple.xaml b/src/Avalonia.Controls.DataGrid/Themes/Simple.xaml new file mode 100644 index 0000000000..6a748f399e --- /dev/null +++ b/src/Avalonia.Controls.DataGrid/Themes/Simple.xaml @@ -0,0 +1,377 @@ + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Controls/Button.cs b/src/Avalonia.Controls/Button.cs index 6dba33516b..8e5d4e1e06 100644 --- a/src/Avalonia.Controls/Button.cs +++ b/src/Avalonia.Controls/Button.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using System.Linq; using System.Windows.Input; using Avalonia.Automation.Peers; @@ -281,24 +282,29 @@ namespace Avalonia.Controls /// protected override void OnKeyDown(KeyEventArgs e) { - if (e.Key == Key.Enter) + switch (e.Key) { - OnClick(); - e.Handled = true; - } - else if (e.Key == Key.Space) - { - if (ClickMode == ClickMode.Press) - { + case Key.Enter: OnClick(); + e.Handled = true; + break; + + case Key.Space: + { + if (ClickMode == ClickMode.Press) + { + OnClick(); + } + + IsPressed = true; + e.Handled = true; + break; } - IsPressed = true; - e.Handled = true; - } - else if (e.Key == Key.Escape && Flyout != null) - { - // If Flyout doesn't have focusable content, close the flyout here - Flyout.Hide(); + + case Key.Escape when Flyout != null: + // If Flyout doesn't have focusable content, close the flyout here + CloseFlyout(); + break; } base.OnKeyDown(e); @@ -327,7 +333,14 @@ namespace Avalonia.Controls { if (IsEffectivelyEnabled) { - OpenFlyout(); + if (_isFlyoutOpen) + { + CloseFlyout(); + } + else + { + OpenFlyout(); + } var e = new RoutedEventArgs(ClickEvent); RaiseEvent(e); @@ -348,6 +361,14 @@ namespace Avalonia.Controls Flyout?.ShowAt(this); } + /// + /// Closes the button's flyout. + /// + protected virtual void CloseFlyout() + { + Flyout?.Hide(); + } + /// /// Invoked when the button's flyout is opened. /// @@ -494,8 +515,7 @@ namespace Avalonia.Controls // If flyout is changed while one is already open, make sure we // close the old one first - if (oldFlyout != null && - oldFlyout.IsOpen) + if (oldFlyout != null && oldFlyout.IsOpen) { oldFlyout.Hide(); } diff --git a/src/Avalonia.Controls/Chrome/CaptionButtons.cs b/src/Avalonia.Controls/Chrome/CaptionButtons.cs index d5923a8b37..6d7e542bb2 100644 --- a/src/Avalonia.Controls/Chrome/CaptionButtons.cs +++ b/src/Avalonia.Controls/Chrome/CaptionButtons.cs @@ -8,10 +8,10 @@ namespace Avalonia.Controls.Chrome /// /// Draws window minimize / maximize / close buttons in a when managed client decorations are enabled. /// - [TemplatePart("PART_CloseButton", typeof(Panel))] - [TemplatePart("PART_RestoreButton", typeof(Panel))] - [TemplatePart("PART_MinimiseButton", typeof(Panel))] - [TemplatePart("PART_FullScreenButton", typeof(Panel))] + [TemplatePart("PART_CloseButton", typeof(Button))] + [TemplatePart("PART_RestoreButton", typeof(Button))] + [TemplatePart("PART_MinimiseButton", typeof(Button))] + [TemplatePart("PART_FullScreenButton", typeof(Button))] [PseudoClasses(":minimized", ":normal", ":maximized", ":fullscreen")] public class CaptionButtons : TemplatedControl { @@ -88,18 +88,15 @@ namespace Avalonia.Controls.Chrome { base.OnApplyTemplate(e); - var closeButton = e.NameScope.Get("PART_CloseButton"); - var restoreButton = e.NameScope.Get("PART_RestoreButton"); - var minimiseButton = e.NameScope.Get("PART_MinimiseButton"); - var fullScreenButton = e.NameScope.Get("PART_FullScreenButton"); + var closeButton = e.NameScope.Get public static readonly AttachedProperty FontWeightProperty = - AvaloniaProperty.RegisterAttached( + AvaloniaProperty.RegisterAttached( nameof(FontWeight), inherits: true, defaultValue: FontWeight.Normal); @@ -53,7 +53,7 @@ namespace Avalonia.Controls.Documents /// Defines the property. /// public static readonly AttachedProperty FontStretchProperty = - AvaloniaProperty.RegisterAttached( + AvaloniaProperty.RegisterAttached( nameof(FontStretch), inherits: true, defaultValue: FontStretch.Normal); @@ -62,7 +62,7 @@ namespace Avalonia.Controls.Documents /// Defines the property. /// public static readonly AttachedProperty ForegroundProperty = - AvaloniaProperty.RegisterAttached( + AvaloniaProperty.RegisterAttached( nameof(Foreground), Brushes.Black, inherits: true); diff --git a/src/Avalonia.Controls/Flyouts/FlyoutBase.cs b/src/Avalonia.Controls/Flyouts/FlyoutBase.cs index 1504d2b25f..00ebcab70e 100644 --- a/src/Avalonia.Controls/Flyouts/FlyoutBase.cs +++ b/src/Avalonia.Controls/Flyouts/FlyoutBase.cs @@ -12,17 +12,12 @@ namespace Avalonia.Controls.Primitives { public abstract class FlyoutBase : AvaloniaObject, IPopupHostProvider { - static FlyoutBase() - { - Control.ContextFlyoutProperty.Changed.Subscribe(OnContextFlyoutPropertyChanged); - } - /// /// Defines the property /// public static readonly DirectProperty IsOpenProperty = - AvaloniaProperty.RegisterDirect(nameof(IsOpen), - x => x.IsOpen); + AvaloniaProperty.RegisterDirect(nameof(IsOpen), + x => x.IsOpen); /// /// Defines the property @@ -43,6 +38,14 @@ namespace Avalonia.Controls.Primitives AvaloniaProperty.RegisterDirect(nameof(ShowMode), x => x.ShowMode, (x, v) => x.ShowMode = v); + /// + /// Defines the property + /// + public static readonly DirectProperty OverlayInputPassThroughElementProperty = + Popup.OverlayInputPassThroughElementProperty.AddOwner( + o => o._overlayInputPassThroughElement, + (o, v) => o._overlayInputPassThroughElement = v); + /// /// Defines the AttachedFlyout property /// @@ -57,6 +60,12 @@ namespace Avalonia.Controls.Primitives private PixelRect? _enlargePopupRectScreenPixelRect; private IDisposable? _transientDisposable; private Action? _popupHostChangedHandler; + private IInputElement? _overlayInputPassThroughElement; + + static FlyoutBase() + { + Control.ContextFlyoutProperty.Changed.Subscribe(OnContextFlyoutPropertyChanged); + } public FlyoutBase() { @@ -101,11 +110,21 @@ namespace Avalonia.Controls.Primitives private set => SetAndRaise(TargetProperty, ref _target, value); } + /// + /// Gets or sets an element that should receive pointer input events even when underneath + /// the flyout's overlay. + /// + public IInputElement? OverlayInputPassThroughElement + { + get => _overlayInputPassThroughElement; + set => SetAndRaise(OverlayInputPassThroughElementProperty, ref _overlayInputPassThroughElement, value); + } + IPopupHost? IPopupHostProvider.PopupHost => Popup?.Host; - event Action? IPopupHostProvider.PopupHostChanged - { - add => _popupHostChangedHandler += value; + event Action? IPopupHostProvider.PopupHostChanged + { + add => _popupHostChangedHandler += value; remove => _popupHostChangedHandler -= value; } @@ -175,8 +194,9 @@ namespace Avalonia.Controls.Primitives IsOpen = false; Popup.IsOpen = false; + ((ISetLogicalParent)Popup).SetParent(null); - + // Ensure this isn't active _transientDisposable?.Dispose(); _transientDisposable = null; @@ -231,6 +251,8 @@ namespace Avalonia.Controls.Primitives Popup.Child = CreatePresenter(); } + Popup.OverlayInputPassThroughElement = OverlayInputPassThroughElement; + if (CancelOpening()) { return false; @@ -356,10 +378,13 @@ namespace Avalonia.Controls.Primitives private Popup CreatePopup() { - var popup = new Popup(); - popup.WindowManagerAddShadowHint = false; - popup.IsLightDismissEnabled = true; - popup.OverlayDismissEventPassThrough = true; + var popup = new Popup + { + WindowManagerAddShadowHint = false, + IsLightDismissEnabled = true, + //Note: This is required to prevent Button.Flyout from opening the flyout again after dismiss. + OverlayDismissEventPassThrough = false + }; popup.Opened += OnPopupOpened; popup.Closed += OnPopupClosed; @@ -372,7 +397,7 @@ namespace Avalonia.Controls.Primitives { IsOpen = true; - _popupHostChangedHandler?.Invoke(Popup!.Host); + _popupHostChangedHandler?.Invoke(Popup.Host); } private void OnPopupClosing(object? sender, CancelEventArgs e) diff --git a/src/Avalonia.Controls/Generators/IItemContainerGenerator.cs b/src/Avalonia.Controls/Generators/IItemContainerGenerator.cs index 70d9dbec08..f9772cb399 100644 --- a/src/Avalonia.Controls/Generators/IItemContainerGenerator.cs +++ b/src/Avalonia.Controls/Generators/IItemContainerGenerator.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using Avalonia.Controls.Templates; +using Avalonia.Styling; namespace Avalonia.Controls.Generators { @@ -14,6 +15,11 @@ namespace Avalonia.Controls.Generators /// IEnumerable Containers { get; } + /// + /// Gets or sets the theme to be applied to the items in the control. + /// + ControlTheme? ItemContainerTheme { get; set; } + /// /// Gets or sets the data template used to display the items in the control. /// diff --git a/src/Avalonia.Controls/Generators/ItemContainerGenerator.cs b/src/Avalonia.Controls/Generators/ItemContainerGenerator.cs index a76dcbe9c8..8b36b07cec 100644 --- a/src/Avalonia.Controls/Generators/ItemContainerGenerator.cs +++ b/src/Avalonia.Controls/Generators/ItemContainerGenerator.cs @@ -4,6 +4,7 @@ using System.Linq; using Avalonia.Controls.Presenters; using Avalonia.Controls.Templates; using Avalonia.Data; +using Avalonia.Styling; namespace Avalonia.Controls.Generators { @@ -35,6 +36,11 @@ namespace Avalonia.Controls.Generators /// public event EventHandler? Recycled; + /// + /// Gets or sets the theme to be applied to the items in the control. + /// + public ControlTheme? ItemContainerTheme { get; set; } + /// /// Gets or sets the data template used to display the items in the control. /// @@ -190,10 +196,18 @@ namespace Avalonia.Controls.Generators result.SetValue( ContentPresenter.ContentTemplateProperty, ItemTemplate, - BindingPriority.TemplatedParent); + BindingPriority.Style); } } + if (ItemContainerTheme != null) + { + result.SetValue( + StyledElement.ThemeProperty, + ItemContainerTheme, + BindingPriority.TemplatedParent); + } + return result; } diff --git a/src/Avalonia.Controls/Generators/ItemContainerGenerator`1.cs b/src/Avalonia.Controls/Generators/ItemContainerGenerator`1.cs index 635f3a7d37..3ff1b0702d 100644 --- a/src/Avalonia.Controls/Generators/ItemContainerGenerator`1.cs +++ b/src/Avalonia.Controls/Generators/ItemContainerGenerator`1.cs @@ -44,28 +44,29 @@ namespace Avalonia.Controls.Generators { var container = item as T; - if (container != null) + if (container is null) { - return container; - } - else - { - var result = new T(); + container = new T(); if (ContentTemplateProperty != null) { - result.SetValue(ContentTemplateProperty, ItemTemplate, BindingPriority.Style); + container.SetValue(ContentTemplateProperty, ItemTemplate, BindingPriority.Style); } - result.SetValue(ContentProperty, item, BindingPriority.Style); + container.SetValue(ContentProperty, item, BindingPriority.Style); if (!(item is IControl)) { - result.DataContext = item; + container.DataContext = item; } + } - return result; + if (ItemContainerTheme != null) + { + container.SetValue(StyledElement.ThemeProperty, ItemContainerTheme, BindingPriority.Style); } + + return container; } /// diff --git a/src/Avalonia.Controls/Generators/TreeItemContainerGenerator.cs b/src/Avalonia.Controls/Generators/TreeItemContainerGenerator.cs index 536a5fdd06..4e3deb5552 100644 --- a/src/Avalonia.Controls/Generators/TreeItemContainerGenerator.cs +++ b/src/Avalonia.Controls/Generators/TreeItemContainerGenerator.cs @@ -71,6 +71,11 @@ namespace Avalonia.Controls.Generators var template = GetTreeDataTemplate(item, ItemTemplate); var result = new T(); + if (ItemContainerTheme != null) + { + result.SetValue(Control.ThemeProperty, ItemContainerTheme, BindingPriority.Style); + } + result.SetValue(ContentProperty, template.Build(item), BindingPriority.Style); var itemsSelector = template.ItemsSelector(item); diff --git a/src/Avalonia.Controls/ItemsControl.cs b/src/Avalonia.Controls/ItemsControl.cs index 1ac642c22b..345e7fcac8 100644 --- a/src/Avalonia.Controls/ItemsControl.cs +++ b/src/Avalonia.Controls/ItemsControl.cs @@ -15,6 +15,7 @@ using Avalonia.Input; using Avalonia.LogicalTree; using Avalonia.Metadata; using Avalonia.VisualTree; +using Avalonia.Styling; namespace Avalonia.Controls { @@ -36,6 +37,12 @@ namespace Avalonia.Controls public static readonly DirectProperty ItemsProperty = AvaloniaProperty.RegisterDirect(nameof(Items), o => o.Items, (o, v) => o.Items = v); + /// + /// Defines the property. + /// + public static readonly StyledProperty ItemContainerThemeProperty = + AvaloniaProperty.Register(nameof(ItemContainerTheme)); + /// /// Defines the property. /// @@ -88,6 +95,7 @@ namespace Avalonia.Controls { _itemContainerGenerator = CreateItemContainerGenerator(); + _itemContainerGenerator.ItemContainerTheme = ItemContainerTheme; _itemContainerGenerator.ItemTemplate = ItemTemplate; _itemContainerGenerator.Materialized += (_, e) => OnContainersMaterialized(e); _itemContainerGenerator.Dematerialized += (_, e) => OnContainersDematerialized(e); @@ -108,6 +116,15 @@ namespace Avalonia.Controls set { SetAndRaise(ItemsProperty, ref _items, value); } } + /// + /// Gets or sets the that is applied to the container element generated for each item. + /// + public ControlTheme? ItemContainerTheme + { + get { return GetValue(ItemContainerThemeProperty); } + set { SetValue(ItemContainerThemeProperty, value); } + } + /// /// Gets the number of items in . /// @@ -349,6 +366,10 @@ namespace Avalonia.Controls { UpdatePseudoClasses(change.GetNewValue()); } + else if (change.Property == ItemContainerThemeProperty && _itemContainerGenerator is not null) + { + _itemContainerGenerator.ItemContainerTheme = change.GetNewValue(); + } } /// diff --git a/src/Avalonia.Controls/ListBox.cs b/src/Avalonia.Controls/ListBox.cs index 79285bb86b..80b5259a53 100644 --- a/src/Avalonia.Controls/ListBox.cs +++ b/src/Avalonia.Controls/ListBox.cs @@ -6,6 +6,7 @@ using Avalonia.Controls.Primitives; using Avalonia.Controls.Selection; using Avalonia.Controls.Templates; using Avalonia.Input; +using Avalonia.Input.Platform; using Avalonia.VisualTree; namespace Avalonia.Controls @@ -157,7 +158,7 @@ namespace Avalonia.Controls e.Source, true, e.KeyModifiers.HasAllFlags(KeyModifiers.Shift), - e.KeyModifiers.HasAllFlags(KeyModifiers.Control), + e.KeyModifiers.HasAllFlags(AvaloniaLocator.Current.GetRequiredService().CommandModifiers), point.Properties.IsRightButtonPressed); } } diff --git a/src/Avalonia.Controls/Platform/ITopLevelImpl.cs b/src/Avalonia.Controls/Platform/ITopLevelImpl.cs index bd0339f525..6bb94c6070 100644 --- a/src/Avalonia.Controls/Platform/ITopLevelImpl.cs +++ b/src/Avalonia.Controls/Platform/ITopLevelImpl.cs @@ -6,7 +6,6 @@ using Avalonia.Input.Raw; using Avalonia.Layout; using Avalonia.Metadata; using Avalonia.Rendering; -using JetBrains.Annotations; namespace Avalonia.Platform { @@ -151,13 +150,7 @@ namespace Avalonia.Platform /// Gets or sets a method called when the input focus is lost. /// Action? LostFocus { get; set; } - - /// - /// Gets a mouse device associated with toplevel - /// - [CanBeNull] - IMouseDevice MouseDevice { get; } - + IPopupImpl? CreatePopup(); /// diff --git a/src/Avalonia.Controls/Platform/PlatformManager.cs b/src/Avalonia.Controls/Platform/PlatformManager.cs index 92f6f1cb52..de7708e869 100644 --- a/src/Avalonia.Controls/Platform/PlatformManager.cs +++ b/src/Avalonia.Controls/Platform/PlatformManager.cs @@ -20,17 +20,8 @@ namespace Avalonia.Controls.Platform { } - public static ITrayIconImpl? CreateTrayIcon() - { - var platform = AvaloniaLocator.Current.GetService(); - - if (platform == null) - { - throw new Exception("Could not CreateTrayIcon(): IWindowingPlatform is not registered."); - } - - return s_designerMode ? null : platform.CreateTrayIcon(); - } + public static ITrayIconImpl? CreateTrayIcon() => + s_designerMode ? null : AvaloniaLocator.Current.GetService()?.CreateTrayIcon(); public static IWindowImpl CreateWindow() diff --git a/src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs b/src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs index 39a512a773..4db2ec6d50 100644 --- a/src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs +++ b/src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs @@ -187,7 +187,7 @@ namespace Avalonia.Controls.Presenters break; case NotifyCollectionChangedAction.Remove: - if ((e.OldStartingIndex >= FirstIndex && e.OldStartingIndex < NextIndex) || + if (e.OldStartingIndex < NextIndex || panel.Children.Count > ItemCount) { RecycleContainersOnRemove(); diff --git a/src/Avalonia.Controls/Presenters/TextPresenter.cs b/src/Avalonia.Controls/Presenters/TextPresenter.cs index e463bc5731..e540f58195 100644 --- a/src/Avalonia.Controls/Presenters/TextPresenter.cs +++ b/src/Avalonia.Controls/Presenters/TextPresenter.cs @@ -9,6 +9,7 @@ using Avalonia.VisualTree; using Avalonia.Layout; using Avalonia.Media.Immutable; using Avalonia.Controls.Documents; +using Avalonia.Media.TextFormatting.Unicode; namespace Avalonia.Controls.Presenters { @@ -496,14 +497,14 @@ namespace Avalonia.Controls.Presenters var length = Math.Max(selectionStart, selectionEnd) - start; IReadOnlyList>? textStyleOverrides = null; - - if (length > 0) + + if (length > 0 && SelectionForegroundBrush != null) { textStyleOverrides = new[] { new ValueSpan(start, length, new GenericTextRunProperties(typeface, FontSize, - foregroundBrush: SelectionForegroundBrush ?? Brushes.White)) + foregroundBrush: SelectionForegroundBrush)) }; } diff --git a/src/Avalonia.Controls/Primitives/Popup.cs b/src/Avalonia.Controls/Primitives/Popup.cs index 1501d97470..3573ad9aaa 100644 --- a/src/Avalonia.Controls/Primitives/Popup.cs +++ b/src/Avalonia.Controls/Primitives/Popup.cs @@ -501,7 +501,7 @@ namespace Avalonia.Controls.Primitives if (dismissLayer != null) { dismissLayer.IsVisible = true; - dismissLayer.InputPassThroughElement = _overlayInputPassThroughElement; + dismissLayer.InputPassThroughElement = OverlayInputPassThroughElement; Disposable.Create(() => { diff --git a/src/Avalonia.Controls/Primitives/PopupPositioning/IPopupPositioner.cs b/src/Avalonia.Controls/Primitives/PopupPositioning/IPopupPositioner.cs index 8d35a91e00..d8de813d47 100644 --- a/src/Avalonia.Controls/Primitives/PopupPositioning/IPopupPositioner.cs +++ b/src/Avalonia.Controls/Primitives/PopupPositioning/IPopupPositioner.cs @@ -45,6 +45,7 @@ Copyright © 2019 Nikita Tsukanov */ using System; +using Avalonia.Input; using Avalonia.Metadata; using Avalonia.VisualTree; using Avalonia.Media; @@ -452,16 +453,14 @@ namespace Avalonia.Controls.Primitives.PopupPositioning PopupPositionerConstraintAdjustment constraintAdjustment, Rect? rect, FlowDirection flowDirection) { - // We need a better way for tracking the last pointer position -#pragma warning disable CS0618 // Type or member is obsolete - var pointer = topLevel.PointToClient(topLevel.PlatformImpl?.MouseDevice.Position ?? default); -#pragma warning restore CS0618 // Type or member is obsolete - positionerParameters.Offset = offset; positionerParameters.ConstraintAdjustment = constraintAdjustment; if (placement == PlacementMode.Pointer) { - positionerParameters.AnchorRectangle = new Rect(pointer, new Size(1, 1)); + // We need a better way for tracking the last pointer position + var position = topLevel.PointToClient(topLevel.LastPointerPosition ?? default); + + positionerParameters.AnchorRectangle = new Rect(position, new Size(1, 1)); positionerParameters.Anchor = PopupAnchor.TopLeft; positionerParameters.Gravity = PopupGravity.BottomRight; } diff --git a/src/Avalonia.Controls/Primitives/TemplatedControl.cs b/src/Avalonia.Controls/Primitives/TemplatedControl.cs index 35033c58f0..dc52cc3ae2 100644 --- a/src/Avalonia.Controls/Primitives/TemplatedControl.cs +++ b/src/Avalonia.Controls/Primitives/TemplatedControl.cs @@ -367,6 +367,17 @@ namespace Avalonia.Controls.Primitives { } + protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) + { + base.OnPropertyChanged(change); + + if (change.Property == ThemeProperty) + { + foreach (var child in this.GetTemplateChildren()) + child.InvalidateStyles(); + } + } + /// /// Called when the control's template is applied. /// diff --git a/src/Avalonia.Controls/ProgressBar.cs b/src/Avalonia.Controls/ProgressBar.cs index d0e8e8f1a0..91114628ee 100644 --- a/src/Avalonia.Controls/ProgressBar.cs +++ b/src/Avalonia.Controls/ProgressBar.cs @@ -100,6 +100,7 @@ namespace Avalonia.Controls private double _indeterminateStartingOffset; private double _indeterminateEndingOffset; private Border? _indicator; + private IDisposable? _trackSizeChangedListener; public static readonly StyledProperty IsIndeterminateProperty = AvaloniaProperty.Register(nameof(IsIndeterminate)); @@ -118,14 +119,12 @@ namespace Avalonia.Controls nameof(Percentage), o => o.Percentage); - [Obsolete("To be removed when Avalonia.Themes.Default is discontinued.")] public static readonly DirectProperty IndeterminateStartingOffsetProperty = AvaloniaProperty.RegisterDirect( nameof(IndeterminateStartingOffset), p => p.IndeterminateStartingOffset, (p, o) => p.IndeterminateStartingOffset = o); - [Obsolete("To be removed when Avalonia.Themes.Default is discontinued.")] public static readonly DirectProperty IndeterminateEndingOffsetProperty = AvaloniaProperty.RegisterDirect( nameof(IndeterminateEndingOffset), @@ -138,14 +137,12 @@ namespace Avalonia.Controls private set { SetAndRaise(PercentageProperty, ref _percentage, value); } } - [Obsolete("To be removed when Avalonia.Themes.Default is discontinued.")] public double IndeterminateStartingOffset { get => _indeterminateStartingOffset; set => SetAndRaise(IndeterminateStartingOffsetProperty, ref _indeterminateStartingOffset, value); } - [Obsolete("To be removed when Avalonia.Themes.Default is discontinued.")] public double IndeterminateEndingOffset { get => _indeterminateEndingOffset; @@ -195,8 +192,9 @@ namespace Avalonia.Controls /// protected override Size ArrangeOverride(Size finalSize) { + var result = base.ArrangeOverride(finalSize); UpdateIndicator(); - return base.ArrangeOverride(finalSize); + return result; } protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) @@ -216,8 +214,15 @@ namespace Avalonia.Controls /// protected override void OnApplyTemplate(TemplateAppliedEventArgs e) { + // dispose any previous track size listener + _trackSizeChangedListener?.Dispose(); + _indicator = e.NameScope.Get("PART_Indicator"); + // listen to size changes of the indicators track (parent) and update the indicator there. + _trackSizeChangedListener = _indicator.Parent?.GetPropertyChangedObservable(BoundsProperty) + .Subscribe(_ => UpdateIndicator()); + UpdateIndicator(); } diff --git a/src/Avalonia.Controls/Remote/Server/RemoteServerTopLevelImpl.cs b/src/Avalonia.Controls/Remote/Server/RemoteServerTopLevelImpl.cs index e800f2f4b0..3bc0593813 100644 --- a/src/Avalonia.Controls/Remote/Server/RemoteServerTopLevelImpl.cs +++ b/src/Avalonia.Controls/Remote/Server/RemoteServerTopLevelImpl.cs @@ -12,7 +12,6 @@ using Avalonia.Remote.Protocol; using Avalonia.Remote.Protocol.Input; using Avalonia.Remote.Protocol.Viewport; using Avalonia.Threading; -using InputModifiers = Avalonia.Input.InputModifiers; using Key = Avalonia.Input.Key; using PixelFormat = Avalonia.Platform.PixelFormat; using ProtocolPixelFormat = Avalonia.Remote.Protocol.Viewport.PixelFormat; diff --git a/src/Avalonia.Controls/RichTextBlock.cs b/src/Avalonia.Controls/RichTextBlock.cs index 2b84113497..1f8abbc30d 100644 --- a/src/Avalonia.Controls/RichTextBlock.cs +++ b/src/Avalonia.Controls/RichTextBlock.cs @@ -41,14 +41,11 @@ namespace Avalonia.Controls public static readonly StyledProperty SelectionBrushProperty = AvaloniaProperty.Register(nameof(SelectionBrush), Brushes.Blue); - public static readonly StyledProperty SelectionForegroundBrushProperty = - AvaloniaProperty.Register(nameof(SelectionForegroundBrush)); - /// /// Defines the property. /// - public static readonly StyledProperty InlinesProperty = - AvaloniaProperty.Register( + public static readonly StyledProperty InlinesProperty = + AvaloniaProperty.Register( nameof(Inlines)); public static readonly DirectProperty CanCopyProperty = @@ -63,12 +60,13 @@ namespace Avalonia.Controls private bool _canCopy; private int _selectionStart; private int _selectionEnd; + private int _wordSelectionStart = -1; static RichTextBlock() { FocusableProperty.OverrideDefaultValue(typeof(RichTextBlock), true); - AffectsRender(SelectionStartProperty, SelectionEndProperty, SelectionForegroundBrushProperty, SelectionBrushProperty); + AffectsRender(SelectionStartProperty, SelectionEndProperty, SelectionBrushProperty, IsTextSelectionEnabledProperty); } public RichTextBlock() @@ -89,15 +87,6 @@ namespace Avalonia.Controls set => SetValue(SelectionBrushProperty, value); } - /// - /// Gets or sets a value that defines the brush used for selected text. - /// - public IBrush? SelectionForegroundBrush - { - get => GetValue(SelectionForegroundBrushProperty); - set => SetValue(SelectionForegroundBrushProperty, value); - } - /// /// Gets or sets a character index for the beginning of the current selection. /// @@ -149,7 +138,7 @@ namespace Avalonia.Controls /// Gets or sets the inlines. /// [Content] - public InlineCollection Inlines + public InlineCollection? Inlines { get => GetValue(InlinesProperty); set => SetValue(InlinesProperty, value); @@ -170,6 +159,8 @@ namespace Avalonia.Controls remove => RemoveHandler(CopyingToClipboardEvent, value); } + internal bool HasComplexContent => Inlines != null && Inlines.Count > 0; + /// /// Copies the current selection to the Clipboard. /// @@ -198,7 +189,7 @@ namespace Avalonia.Controls } } - public override void Render(DrawingContext context) + protected override void RenderTextLayout(DrawingContext context, Point origin) { var selectionStart = SelectionStart; var selectionEnd = SelectionEnd; @@ -213,13 +204,16 @@ namespace Avalonia.Controls var rects = TextLayout.HitTestTextRange(start, length); - foreach (var rect in rects) + using (context.PushPostTransform(Matrix.CreateTranslation(origin))) { - context.FillRectangle(selectionBrush, PixelRect.FromRect(rect, 1).ToRect(1)); + foreach (var rect in rects) + { + context.FillRectangle(selectionBrush, PixelRect.FromRect(rect, 1).ToRect(1)); + } } } - base.Render(context); + base.RenderTextLayout(context, origin); } /// @@ -251,25 +245,40 @@ namespace Avalonia.Controls SelectionEnd = SelectionStart; } - protected override string? GetText() - { - return _text ?? Inlines.Text; - } - - protected override void SetText(string? text) + protected void AddText(string? text) { - var oldValue = _text ?? Inlines?.Text; - - if (Inlines is not null && Inlines.HasComplexContent) + if (string.IsNullOrEmpty(text)) { - Inlines.Text = text; + return; + } - _text = null; + if (!HasComplexContent && string.IsNullOrEmpty(_text)) + { + _text = text; } else { - _text = text; + if (!string.IsNullOrEmpty(_text)) + { + Inlines?.Add(_text); + + _text = null; + } + + Inlines?.Add(text); } + } + + protected override string? GetText() + { + return _text ?? Inlines?.Text; + } + + protected override void SetText(string? text) + { + var oldValue = GetText(); + + AddText(text); RaisePropertyChanged(TextProperty, oldValue, text); } @@ -280,8 +289,9 @@ namespace Avalonia.Controls /// A object. protected override TextLayout CreateTextLayout(string? text) { + var typeface = new Typeface(FontFamily, FontStyle, FontWeight, FontStretch); var defaultProperties = new GenericTextRunProperties( - new Typeface(FontFamily, FontStyle, FontWeight, FontStretch), + typeface, FontSize, TextDecorations, Foreground); @@ -291,10 +301,10 @@ namespace Avalonia.Controls ITextSource textSource; - var inlines = Inlines; - - if (inlines is not null && inlines.HasComplexContent) + if (HasComplexContent) { + var inlines = Inlines!; + var textRuns = new List(); foreach (var inline in inlines) @@ -328,6 +338,8 @@ namespace Avalonia.Controls protected override void OnKeyDown(KeyEventArgs e) { + base.OnKeyDown(e); + var handled = false; var modifiers = e.KeyModifiers; var keymap = AvaloniaLocator.Current.GetRequiredService(); @@ -346,6 +358,8 @@ namespace Avalonia.Controls protected override void OnPointerPressed(PointerPressedEventArgs e) { + base.OnPointerPressed(e); + if (!IsTextSelectionEnabled) { return; @@ -356,7 +370,9 @@ namespace Avalonia.Controls if (text != null && clickInfo.Properties.IsLeftButtonPressed) { - var point = e.GetPosition(this); + var padding = Padding; + + var point = e.GetPosition(this) - new Point(padding.Left, padding.Top); var clickToSelect = e.KeyModifiers.HasFlag(KeyModifiers.Shift); @@ -365,8 +381,6 @@ namespace Avalonia.Controls var hit = TextLayout.HitTestPoint(point); var index = hit.TextPosition; - SelectionStart = SelectionEnd = index; - #pragma warning disable CS0618 // Type or member is obsolete switch (e.ClickCount) #pragma warning restore CS0618 // Type or member is obsolete @@ -374,12 +388,34 @@ namespace Avalonia.Controls case 1: if (clickToSelect) { - SelectionStart = Math.Min(oldIndex, index); - SelectionEnd = Math.Max(oldIndex, index); + if (_wordSelectionStart >= 0) + { + var previousWord = StringUtils.PreviousWord(text, index); + + if (index > _wordSelectionStart) + { + SelectionEnd = StringUtils.NextWord(text, index); + } + + if (index < _wordSelectionStart || previousWord == _wordSelectionStart) + { + SelectionStart = previousWord; + } + } + else + { + SelectionStart = Math.Min(oldIndex, index); + SelectionEnd = Math.Max(oldIndex, index); + } } else { - SelectionStart = SelectionEnd = index; + if (_wordSelectionStart == -1 || index < SelectionStart || index > SelectionEnd) + { + SelectionStart = SelectionEnd = index; + + _wordSelectionStart = -1; + } } break; @@ -389,9 +425,13 @@ namespace Avalonia.Controls SelectionStart = StringUtils.PreviousWord(text, index); } + _wordSelectionStart = SelectionStart; + SelectionEnd = StringUtils.NextWord(text, index); break; case 3: + _wordSelectionStart = -1; + SelectAll(); break; } @@ -403,6 +443,8 @@ namespace Avalonia.Controls protected override void OnPointerMoved(PointerEventArgs e) { + base.OnPointerMoved(e); + if (!IsTextSelectionEnabled) { return; @@ -411,20 +453,49 @@ namespace Avalonia.Controls // selection should not change during pointer move if the user right clicks if (e.Pointer.Captured == this && e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) { - var point = e.GetPosition(this); + var text = Text; + var padding = Padding; + + var point = e.GetPosition(this) - new Point(padding.Left, padding.Top); point = new Point( - MathUtilities.Clamp(point.X, 0, Math.Max(Bounds.Width - 1, 0)), - MathUtilities.Clamp(point.Y, 0, Math.Max(Bounds.Height - 1, 0))); + MathUtilities.Clamp(point.X, 0, Math.Max(TextLayout.Bounds.Width, 0)), + MathUtilities.Clamp(point.Y, 0, Math.Max(TextLayout.Bounds.Width, 0))); var hit = TextLayout.HitTestPoint(point); + var textPosition = hit.TextPosition; + + if (text != null && _wordSelectionStart >= 0) + { + var distance = textPosition - _wordSelectionStart; + + if (distance <= 0) + { + SelectionStart = StringUtils.PreviousWord(text, textPosition); + } + + if (distance >= 0) + { + if (SelectionStart != _wordSelectionStart) + { + SelectionStart = _wordSelectionStart; + } + + SelectionEnd = StringUtils.NextWord(text, textPosition); + } + } + else + { + SelectionEnd = textPosition; + } - SelectionEnd = hit.TextPosition; } } protected override void OnPointerReleased(PointerReleasedEventArgs e) { + base.OnPointerReleased(e); + if (!IsTextSelectionEnabled) { return; @@ -437,7 +508,9 @@ namespace Avalonia.Controls if (e.InitialPressMouseButton == MouseButton.Right) { - var point = e.GetPosition(this); + var padding = Padding; + + var point = e.GetPosition(this) - new Point(padding.Left, padding.Top); var hit = TextLayout.HitTestPoint(point); @@ -464,17 +537,12 @@ namespace Avalonia.Controls switch (change.Property.Name) { - case nameof(InlinesProperty): + case nameof(Inlines): { OnInlinesChanged(change.OldValue as InlineCollection, change.NewValue as InlineCollection); InvalidateTextLayout(); break; } - case nameof(TextProperty): - { - InvalidateTextLayout(); - break; - } } } @@ -485,7 +553,7 @@ namespace Avalonia.Controls return ""; } - var text = Inlines.Text ?? Text; + var text = GetText(); if (string.IsNullOrEmpty(text)) { diff --git a/src/Avalonia.Controls/TextBlock.cs b/src/Avalonia.Controls/TextBlock.cs index 52261d1c76..99c8068b3d 100644 --- a/src/Avalonia.Controls/TextBlock.cs +++ b/src/Avalonia.Controls/TextBlock.cs @@ -4,6 +4,7 @@ using Avalonia.Controls.Documents; using Avalonia.Layout; using Avalonia.Media; using Avalonia.Media.TextFormatting; +using Avalonia.Metadata; using Avalonia.Utilities; namespace Avalonia.Controls @@ -11,7 +12,7 @@ namespace Avalonia.Controls /// /// A control that displays a block of text. /// - public class TextBlock : Control + public class TextBlock : Control, IAddChild { /// /// Defines the property. @@ -128,7 +129,7 @@ namespace Avalonia.Controls public static readonly StyledProperty TextDecorationsProperty = AvaloniaProperty.Register(nameof(TextDecorations)); - protected string? _text; + internal string? _text; protected TextLayout? _textLayout; protected Size _constraint; @@ -473,11 +474,6 @@ namespace Avalonia.Controls control.SetValue(MaxLinesProperty, maxLines); } - public void Add(string text) - { - _text = text; - } - /// /// Renders the to a drawing context. /// @@ -509,7 +505,17 @@ namespace Avalonia.Controls } } - TextLayout.Draw(context, new Point(padding.Left, top)); + RenderTextLayout(context, new Point(padding.Left, top)); + } + + protected virtual void RenderTextLayout(DrawingContext context, Point origin) + { + TextLayout.Draw(context, origin); + } + + void IAddChild.AddChild(string text) + { + _text = text; } protected virtual string? GetText() diff --git a/src/Avalonia.Controls/TextBox.cs b/src/Avalonia.Controls/TextBox.cs index 9531f719b9..4c9e9327d4 100644 --- a/src/Avalonia.Controls/TextBox.cs +++ b/src/Avalonia.Controls/TextBox.cs @@ -17,6 +17,7 @@ using Avalonia.Controls.Metadata; using Avalonia.Media.TextFormatting; using Avalonia.Media.TextFormatting.Unicode; using Avalonia.Automation.Peers; +using System.Diagnostics; namespace Avalonia.Controls { @@ -53,7 +54,7 @@ namespace Avalonia.Controls public static readonly StyledProperty PasswordCharProperty = AvaloniaProperty.Register(nameof(PasswordChar)); - + public static readonly StyledProperty SelectionBrushProperty = AvaloniaProperty.Register(nameof(SelectionBrush)); @@ -80,7 +81,7 @@ namespace Avalonia.Controls public static readonly StyledProperty MaxLinesProperty = AvaloniaProperty.Register(nameof(MaxLines), defaultValue: 0); - + public static readonly DirectProperty TextProperty = TextBlock.TextProperty.AddOwnerWithDataValidation( o => o.Text, @@ -105,7 +106,7 @@ namespace Avalonia.Controls public static readonly StyledProperty TextWrappingProperty = TextBlock.TextWrappingProperty.AddOwner(); - + /// /// Defines see property. /// @@ -202,6 +203,7 @@ namespace Avalonia.Controls private string _newLine = Environment.NewLine; private static readonly string[] invalidCharacters = new String[1] { "\u007f" }; + private int _wordSelectionStart = -1; private int _selectedTextChangesMadeSinceLastUndoSnapshot; private bool _hasDoneSnapshotOnce; private const int _maxCharsBeforeUndoSnapshot = 7; @@ -275,7 +277,7 @@ namespace Avalonia.Controls get => GetValue(IsReadOnlyProperty); set => SetValue(IsReadOnlyProperty, value); } - + public char PasswordChar { get => GetValue(PasswordCharProperty); @@ -307,7 +309,7 @@ namespace Avalonia.Controls { value = CoerceCaretIndex(value); var changed = SetAndRaise(SelectionStartProperty, ref _selectionStart, value); - + if (changed) { UpdateCommandStates(); @@ -327,12 +329,12 @@ namespace Avalonia.Controls { value = CoerceCaretIndex(value); var changed = SetAndRaise(SelectionEndProperty, ref _selectionEnd, value); - + if (changed) { UpdateCommandStates(); } - + if (SelectionStart == value && CaretIndex != value) { CaretIndex = value; @@ -351,7 +353,7 @@ namespace Avalonia.Controls get => GetValue(MaxLinesProperty); set => SetValue(MaxLinesProperty, value); } - + /// /// Gets or sets the line height. /// @@ -370,7 +372,7 @@ namespace Avalonia.Controls var caretIndex = CaretIndex; var selectionStart = SelectionStart; var selectionEnd = SelectionEnd; - + CaretIndex = CoerceCaretIndex(caretIndex, value); SelectionStart = CoerceCaretIndex(selectionStart, value); SelectionEnd = CoerceCaretIndex(selectionEnd, value); @@ -567,7 +569,7 @@ namespace Avalonia.Controls _presenter = e.NameScope.Get("PART_TextPresenter"); _imClient.SetPresenter(_presenter, this); - + if (IsFocused) { _presenter?.ShowCaret(); @@ -577,7 +579,7 @@ namespace Avalonia.Controls protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e) { base.OnAttachedToVisualTree(e); - + if (IsFocused) { _presenter?.ShowCaret(); @@ -587,7 +589,7 @@ namespace Avalonia.Controls protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e) { base.OnDetachedFromVisualTree(e); - + _imClient.SetPresenter(null, null); } @@ -637,7 +639,7 @@ namespace Avalonia.Controls } UpdateCommandStates(); - + _imClient.SetPresenter(_presenter, this); _presenter?.ShowCaret(); @@ -657,7 +659,7 @@ namespace Avalonia.Controls UpdateCommandStates(); _presenter?.HideCaret(); - + _imClient.SetPresenter(null, null); } @@ -700,14 +702,14 @@ namespace Avalonia.Controls if (grapheme.FirstCodepoint.IsBreakChar) { - if(lineCount + 1 > MaxLines) + if (lineCount + 1 > MaxLines) { break; } else { lineCount++; - } + } } length += grapheme.Text.Length; @@ -736,7 +738,7 @@ namespace Avalonia.Controls text = Text ?? string.Empty; SetTextInternal(text.Substring(0, caretIndex) + input + text.Substring(caretIndex)); ClearSelection(); - + if (IsUndoEnabled) { _undoRedoHelper.DiscardRedo(); @@ -746,7 +748,7 @@ namespace Avalonia.Controls { RaisePropertyChanged(TextProperty, oldText, _text); } - + CaretIndex = caretIndex + input.Length; } } @@ -828,7 +830,7 @@ namespace Avalonia.Controls { return; } - + var text = Text ?? string.Empty; var caretIndex = CaretIndex; var movement = false; @@ -985,87 +987,87 @@ namespace Avalonia.Controls break; case Key.Up: - { - selection = DetectSelection(); - - _presenter.MoveCaretVertical(LogicalDirection.Backward); - - if (caretIndex != _presenter.CaretIndex) { - movement = true; - } + selection = DetectSelection(); - if (selection) - { - SelectionEnd = _presenter.CaretIndex; - } - else - { - CaretIndex = _presenter.CaretIndex; + _presenter.MoveCaretVertical(LogicalDirection.Backward); + + if (caretIndex != _presenter.CaretIndex) + { + movement = true; + } + + if (selection) + { + SelectionEnd = _presenter.CaretIndex; + } + else + { + CaretIndex = _presenter.CaretIndex; + } + + break; } - - break; - } case Key.Down: - { - selection = DetectSelection(); - - _presenter.MoveCaretVertical(); - - if (caretIndex != _presenter.CaretIndex) - { - movement = true; - } - - if (selection) - { - SelectionEnd = _presenter.CaretIndex; - } - else { - CaretIndex = _presenter.CaretIndex; + selection = DetectSelection(); + + _presenter.MoveCaretVertical(); + + if (caretIndex != _presenter.CaretIndex) + { + movement = true; + } + + if (selection) + { + SelectionEnd = _presenter.CaretIndex; + } + else + { + CaretIndex = _presenter.CaretIndex; + } + + break; } - - break; - } case Key.Back: - { - SnapshotUndoRedo(); - - if (hasWholeWordModifiers && SelectionStart == SelectionEnd) { - SetSelectionForControlBackspace(); - } - - if (!DeleteSelection()) - { - var characterHit = _presenter.GetNextCharacterHit(LogicalDirection.Backward); + SnapshotUndoRedo(); - var backspacePosition = characterHit.FirstCharacterIndex + characterHit.TrailingLength; + if (hasWholeWordModifiers && SelectionStart == SelectionEnd) + { + SetSelectionForControlBackspace(); + } - if (caretIndex != backspacePosition) + if (!DeleteSelection()) { - var start = Math.Min(backspacePosition, caretIndex); - var end = Math.Max(backspacePosition, caretIndex); + var characterHit = _presenter.GetNextCharacterHit(LogicalDirection.Backward); - var length = end - start; + var backspacePosition = characterHit.FirstCharacterIndex + characterHit.TrailingLength; - var editedText = text.Substring(0, start) + text.Substring(Math.Min(end, text.Length)); + if (caretIndex != backspacePosition) + { + var start = Math.Min(backspacePosition, caretIndex); + var end = Math.Max(backspacePosition, caretIndex); - SetTextInternal(editedText); + var length = end - start; - CaretIndex = start; - } - } - - SnapshotUndoRedo(); + var editedText = text.Substring(0, start) + text.Substring(Math.Min(end, text.Length)); - handled = true; - break; - } + SetTextInternal(editedText); + + CaretIndex = start; + } + } + + SnapshotUndoRedo(); + + handled = true; + break; + } case Key.Delete: SnapshotUndoRedo(); - + if (hasWholeWordModifiers && SelectionStart == SelectionEnd) { SetSelectionForControlDelete(); @@ -1077,7 +1079,7 @@ namespace Avalonia.Controls var nextPosition = characterHit.FirstCharacterIndex + characterHit.TrailingLength; - if(nextPosition != caretIndex) + if (nextPosition != caretIndex) { var start = Math.Min(nextPosition, caretIndex); var end = Math.Max(nextPosition, caretIndex); @@ -1144,7 +1146,7 @@ namespace Avalonia.Controls { return; } - + var text = Text; var clickInfo = e.GetCurrentPoint(this); @@ -1170,24 +1172,50 @@ namespace Avalonia.Controls case 1: if (clickToSelect) { - SelectionStart = Math.Min(oldIndex, index); - SelectionEnd = Math.Max(oldIndex, index); + if (_wordSelectionStart >= 0) + { + var previousWord = StringUtils.PreviousWord(text, index); + + if (index > _wordSelectionStart) + { + SelectionEnd = StringUtils.NextWord(text, index); + } + + if (index < _wordSelectionStart || previousWord == _wordSelectionStart) + { + SelectionStart = previousWord; + } + } + else + { + SelectionStart = Math.Min(oldIndex, index); + SelectionEnd = Math.Max(oldIndex, index); + } } else { - SelectionStart = SelectionEnd = index; + if(_wordSelectionStart == -1 || index < SelectionStart || index > SelectionEnd) + { + SelectionStart = SelectionEnd = index; + _wordSelectionStart = -1; + } } break; - case 2: + case 2: + if (!StringUtils.IsStartOfWord(text, index)) { SelectionStart = StringUtils.PreviousWord(text, index); } + _wordSelectionStart = SelectionStart; + SelectionEnd = StringUtils.NextWord(text, index); break; case 3: + _wordSelectionStart = -1; + SelectAll(); break; } @@ -1203,7 +1231,7 @@ namespace Avalonia.Controls { return; } - + // selection should not change during pointer move if the user right clicks if (e.Pointer.Captured == _presenter && e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) { @@ -1213,9 +1241,35 @@ namespace Avalonia.Controls MathUtilities.Clamp(point.X, 0, Math.Max(_presenter.Bounds.Width - 1, 0)), MathUtilities.Clamp(point.Y, 0, Math.Max(_presenter.Bounds.Height - 1, 0))); - _presenter.MoveCaretToPoint(point); + _presenter.MoveCaretToPoint(point); - SelectionEnd = _presenter.CaretIndex; + var caretIndex = _presenter.CaretIndex; + + var text = Text; + + if (text != null && _wordSelectionStart >= 0) + { + var distance = caretIndex - _wordSelectionStart; + + if (distance <= 0) + { + SelectionStart = StringUtils.PreviousWord(text, caretIndex); + } + + if (distance >= 0) + { + if(SelectionStart != _wordSelectionStart) + { + SelectionStart = _wordSelectionStart; + } + + SelectionEnd = StringUtils.NextWord(text, caretIndex); + } + } + else + { + SelectionEnd = caretIndex; + } } } @@ -1234,9 +1288,9 @@ namespace Avalonia.Controls if (e.InitialPressMouseButton == MouseButton.Right) { var point = e.GetPosition(_presenter); - + _presenter.MoveCaretToPoint(point); - + var caretIndex = _presenter.CaretIndex; // see if mouse clicked inside current selection @@ -1250,7 +1304,7 @@ namespace Avalonia.Controls CaretIndex = SelectionEnd = SelectionStart = caretIndex; } } - + e.Pointer.Capture(null); } @@ -1309,7 +1363,7 @@ namespace Avalonia.Controls { return; } - + var text = Text ?? string.Empty; var selectionStart = SelectionStart; var selectionEnd = SelectionEnd; @@ -1319,11 +1373,11 @@ namespace Avalonia.Controls if (isSelecting) { _presenter.MoveCaretToTextPosition(selectionEnd); - + _presenter.MoveCaretHorizontal(direction > 0 ? LogicalDirection.Forward : LogicalDirection.Backward); - + SelectionEnd = _presenter.CaretIndex; } else @@ -1347,7 +1401,7 @@ namespace Avalonia.Controls else { int offset; - + if (direction > 0) { offset = StringUtils.NextWord(text, selectionEnd) - selectionEnd; @@ -1356,7 +1410,7 @@ namespace Avalonia.Controls { offset = StringUtils.PreviousWord(text, selectionEnd) - selectionEnd; } - + SelectionEnd += offset; _presenter.MoveCaretToTextPosition(SelectionEnd); @@ -1378,7 +1432,7 @@ namespace Avalonia.Controls { return; } - + var caretIndex = CaretIndex; if (document) @@ -1401,7 +1455,7 @@ namespace Avalonia.Controls { return; } - + var text = Text ?? string.Empty; var caretIndex = CaretIndex; @@ -1432,8 +1486,9 @@ namespace Avalonia.Controls private bool DeleteSelection(bool raiseTextChanged = true) { - if (IsReadOnly) return true; - + if (IsReadOnly) + return true; + var selectionStart = SelectionStart; var selectionEnd = SelectionEnd; @@ -1444,40 +1499,40 @@ namespace Avalonia.Controls var text = Text!; SetTextInternal(text.Substring(0, start) + text.Substring(end), raiseTextChanged); - + _presenter?.MoveCaretToTextPosition(start); - - CaretIndex= start; - + + CaretIndex = start; + ClearSelection(); - + return true; } - + CaretIndex = SelectionStart; - + return false; } private string GetSelection() { var text = Text; - + if (string.IsNullOrEmpty(text)) { return ""; } - + var selectionStart = SelectionStart; var selectionEnd = SelectionEnd; var start = Math.Min(selectionStart, selectionEnd); var end = Math.Max(selectionStart, selectionEnd); - + if (start == end || (Text?.Length ?? 0) < end) { return ""; } - + return text.Substring(start, end - start); } @@ -1496,7 +1551,7 @@ namespace Avalonia.Controls private void SetSelectionForControlBackspace() { var selectionStart = CaretIndex; - + MoveHorizontal(-1, true, false); SelectionStart = selectionStart; @@ -1508,9 +1563,9 @@ namespace Avalonia.Controls { return; } - + SelectionStart = CaretIndex; - + MoveHorizontal(1, true, true); if (SelectionEnd < _text.Length && _text[SelectionEnd] == ' ') diff --git a/src/Avalonia.Controls/TopLevel.cs b/src/Avalonia.Controls/TopLevel.cs index 5c5053b982..1c1df84431 100644 --- a/src/Avalonia.Controls/TopLevel.cs +++ b/src/Avalonia.Controls/TopLevel.cs @@ -285,6 +285,8 @@ namespace Avalonia.Controls /// public IRenderer Renderer { get; private set; } + internal PixelPoint? LastPointerPosition => _pointerOverPreProcessor?.LastPosition; + /// /// Gets the access key handler for the window. /// @@ -302,9 +304,6 @@ namespace Avalonia.Controls set { SetValue(PointerOverElementProperty, value); } } - /// - IMouseDevice? IInputRoot.MouseDevice => PlatformImpl?.MouseDevice; - /// /// Gets or sets a value indicating whether access keys are shown in the window. /// diff --git a/src/Avalonia.Controls/TransitioningContentControl.cs b/src/Avalonia.Controls/TransitioningContentControl.cs index 451e234653..70b21b7248 100644 --- a/src/Avalonia.Controls/TransitioningContentControl.cs +++ b/src/Avalonia.Controls/TransitioningContentControl.cs @@ -84,13 +84,19 @@ public class TransitioningContentControl : ContentControl _lastTransitionCts?.Cancel(); _lastTransitionCts = new CancellationTokenSource(); + var localToken = _lastTransitionCts.Token; if (PageTransition != null) - await PageTransition.Start(this, null, true, _lastTransitionCts.Token); + await PageTransition.Start(this, null, true, localToken); + + if (localToken.IsCancellationRequested) + { + return; + } CurrentContent = content; if (PageTransition != null) - await PageTransition.Start(null, this, true, _lastTransitionCts.Token); + await PageTransition.Start(null, this, true, localToken); } } diff --git a/src/Avalonia.Controls/TreeView.cs b/src/Avalonia.Controls/TreeView.cs index b2a188a2ea..7359f3cade 100644 --- a/src/Avalonia.Controls/TreeView.cs +++ b/src/Avalonia.Controls/TreeView.cs @@ -529,7 +529,7 @@ namespace Avalonia.Controls e.Source, true, e.KeyModifiers.HasAllFlags(KeyModifiers.Shift), - e.KeyModifiers.HasAllFlags(KeyModifiers.Control), + e.KeyModifiers.HasAllFlags(AvaloniaLocator.Current.GetRequiredService().CommandModifiers), point.Properties.IsRightButtonPressed); } } diff --git a/src/Avalonia.Controls/TreeViewItem.cs b/src/Avalonia.Controls/TreeViewItem.cs index 490b0b3ce3..2e3aa037c2 100644 --- a/src/Avalonia.Controls/TreeViewItem.cs +++ b/src/Avalonia.Controls/TreeViewItem.cs @@ -121,6 +121,11 @@ namespace Avalonia.Controls { ItemTemplate = _treeView.ItemTemplate; } + + if (ItemContainerTheme == null && _treeView?.ItemContainerTheme != null) + { + ItemContainerTheme = _treeView.ItemContainerTheme; + } } protected override void OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e) diff --git a/src/Avalonia.DesignerSupport/DesignWindowLoader.cs b/src/Avalonia.DesignerSupport/DesignWindowLoader.cs index b009778f97..811f9c7baa 100644 --- a/src/Avalonia.DesignerSupport/DesignWindowLoader.cs +++ b/src/Avalonia.DesignerSupport/DesignWindowLoader.cs @@ -37,6 +37,7 @@ namespace Avalonia.DesignerSupport var localAsm = assemblyPath != null ? Assembly.LoadFile(Path.GetFullPath(assemblyPath)) : null; var loaded = loader.Load(stream, localAsm, null, baseUri, true); var style = loaded as IStyle; + var resources = loaded as ResourceDictionary; if (style != null) { var substitute = Design.GetPreviewWith((AvaloniaObject)style); @@ -58,6 +59,27 @@ namespace Avalonia.DesignerSupport } }; } + else if (resources != null) + { + var substitute = Design.GetPreviewWith(resources); + if (substitute != null) + { + substitute.Resources.MergedDictionaries.Add(resources); + control = substitute; + } + else + control = new StackPanel + { + Children = + { + new TextBlock {Text = "ResourceDictionaries can't be previewed without Design.PreviewWith. Add"}, + new TextBlock {Text = ""}, + new TextBlock {Text = " "}, + new TextBlock {Text = ""}, + new TextBlock {Text = "in your resource dictionary"} + } + }; + } else if (loaded is Application) control = new TextBlock {Text = "Application can't be previewed in design view"}; else diff --git a/src/Avalonia.Diagnostics/Avalonia.Diagnostics.csproj b/src/Avalonia.Diagnostics/Avalonia.Diagnostics.csproj index adddf3f57b..d719135a7f 100644 --- a/src/Avalonia.Diagnostics/Avalonia.Diagnostics.csproj +++ b/src/Avalonia.Diagnostics/Avalonia.Diagnostics.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/Avalonia.Diagnostics/Diagnostics/ViewModels/ControlDetailsViewModel.cs b/src/Avalonia.Diagnostics/Diagnostics/ViewModels/ControlDetailsViewModel.cs index f8e2e0544f..631da80d8b 100644 --- a/src/Avalonia.Diagnostics/Diagnostics/ViewModels/ControlDetailsViewModel.cs +++ b/src/Avalonia.Diagnostics/Diagnostics/ViewModels/ControlDetailsViewModel.cs @@ -67,8 +67,15 @@ namespace Avalonia.Diagnostics.ViewModels var setters = new List(); - if (styleSource is Style style) + if (styleSource is StyleBase style) { + var selector = style switch + { + Style s => s.Selector?.ToString(), + ControlTheme t => t.TargetType?.Name.ToString(), + _ => null, + }; + foreach (var setter in style.Setters) { if (setter is Setter regularSetter @@ -105,7 +112,7 @@ namespace Avalonia.Diagnostics.ViewModels } } - AppliedStyles.Add(new StyleViewModel(appliedStyle, style.Selector?.ToString() ?? "No selector", setters)); + AppliedStyles.Add(new StyleViewModel(appliedStyle, selector ?? "No selector", setters)); } } diff --git a/src/Avalonia.Diagnostics/Diagnostics/Views/MainWindow.xaml b/src/Avalonia.Diagnostics/Diagnostics/Views/MainWindow.xaml index c32638f6ca..1270dbaa62 100644 --- a/src/Avalonia.Diagnostics/Diagnostics/Views/MainWindow.xaml +++ b/src/Avalonia.Diagnostics/Diagnostics/Views/MainWindow.xaml @@ -2,19 +2,16 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:views="clr-namespace:Avalonia.Diagnostics.Views" xmlns:diag="clr-namespace:Avalonia.Diagnostics" - xmlns:default="using:Avalonia.Themes.Default" Title="Avalonia DevTools" - x:Class="Avalonia.Diagnostics.Views.MainWindow"> + x:Class="Avalonia.Diagnostics.Views.MainWindow" + Theme="{StaticResource {x:Type Window}}"> - - - + + diff --git a/src/Avalonia.Diagnostics/Diagnostics/Views/MainWindow.xaml.cs b/src/Avalonia.Diagnostics/Diagnostics/Views/MainWindow.xaml.cs index 3b143d3b58..c81997f2cb 100644 --- a/src/Avalonia.Diagnostics/Diagnostics/Views/MainWindow.xaml.cs +++ b/src/Avalonia.Diagnostics/Diagnostics/Views/MainWindow.xaml.cs @@ -11,7 +11,7 @@ using Avalonia.Input; using Avalonia.Input.Raw; using Avalonia.Markup.Xaml; using Avalonia.Styling; -using Avalonia.Themes.Default; +using Avalonia.Themes.Simple; using Avalonia.VisualTree; namespace Avalonia.Diagnostics.Views @@ -19,8 +19,10 @@ namespace Avalonia.Diagnostics.Views internal class MainWindow : Window, IStyleHost { private readonly IDisposable? _keySubscription; + private readonly IDisposable? _pointerSubscription; private readonly Dictionary _frozenPopupStates; private AvaloniaObject? _root; + private PixelPoint _lastPointerPosition; public MainWindow() { @@ -30,6 +32,10 @@ namespace Avalonia.Diagnostics.Views .OfType() .Where(x => x.Type == RawKeyEventType.KeyDown) .Subscribe(RawKeyDown); + _pointerSubscription = InputManager.Instance?.Process + .OfType() + .Subscribe(x => _lastPointerPosition = x.Root.PointToScreen(x.Position)); + _frozenPopupStates = new Dictionary(); @@ -84,6 +90,7 @@ namespace Avalonia.Diagnostics.Views { base.OnClosed(e); _keySubscription?.Dispose(); + _pointerSubscription?.Dispose(); foreach (var state in _frozenPopupStates) { @@ -108,9 +115,7 @@ namespace Avalonia.Diagnostics.Views private IControl? GetHoveredControl(TopLevel topLevel) { -#pragma warning disable CS0618 // Type or member is obsolete - var point = (topLevel as IInputRoot)?.MouseDevice?.GetPosition(topLevel) ?? default; -#pragma warning restore CS0618 // Type or member is obsolete + var point = topLevel.PointToClient(_lastPointerPosition); return (IControl?)topLevel.GetVisualsAt(point, x => { diff --git a/src/Avalonia.Headless/HeadlessPlatformRenderInterface.cs b/src/Avalonia.Headless/HeadlessPlatformRenderInterface.cs index 5576368240..cb23c6c336 100644 --- a/src/Avalonia.Headless/HeadlessPlatformRenderInterface.cs +++ b/src/Avalonia.Headless/HeadlessPlatformRenderInterface.cs @@ -416,6 +416,11 @@ namespace Avalonia.Headless } + public object GetFeature(Type t) + { + return null; + } + public void DrawLine(IPen pen, Point p1, Point p2) { } diff --git a/src/Avalonia.OpenGL/Angle/AngleWin32EglDisplay.cs b/src/Avalonia.OpenGL/Angle/AngleWin32EglDisplay.cs index 94e7728d68..3a8fdb8491 100644 --- a/src/Avalonia.OpenGL/Angle/AngleWin32EglDisplay.cs +++ b/src/Avalonia.OpenGL/Angle/AngleWin32EglDisplay.cs @@ -21,7 +21,7 @@ namespace Avalonia.OpenGL.Angle var display = IntPtr.Zero; AngleOptions.PlatformApi angleApi = default; { - if (_egl.GetPlatformDisplayEXT == null) + if (!_egl.IsGetPlatformDisplayExtAvailable) throw new OpenGlException("eglGetPlatformDisplayEXT is not supported by libegl.dll"); var allowedApis = AvaloniaLocator.Current.GetService()?.AllowedPlatformApis @@ -37,7 +37,7 @@ namespace Avalonia.OpenGL.Angle else continue; - display = _egl.GetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, IntPtr.Zero, + display = _egl.GetPlatformDisplayExt(EGL_PLATFORM_ANGLE_ANGLE, IntPtr.Zero, new[] { EGL_PLATFORM_ANGLE_TYPE_ANGLE, dapi, EGL_NONE }); if (display != IntPtr.Zero) { diff --git a/src/Avalonia.OpenGL/Avalonia.OpenGL.csproj b/src/Avalonia.OpenGL/Avalonia.OpenGL.csproj index 76924d060f..bacb10c792 100644 --- a/src/Avalonia.OpenGL/Avalonia.OpenGL.csproj +++ b/src/Avalonia.OpenGL/Avalonia.OpenGL.csproj @@ -11,4 +11,5 @@ + diff --git a/src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs b/src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs index ccdc5ac19b..7b65cfb595 100644 --- a/src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs +++ b/src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs @@ -66,11 +66,9 @@ namespace Avalonia.OpenGL.Controls return; gl.GetIntegerv(GL_RENDERBUFFER_BINDING, out var oldRenderBuffer); - if (_depthBuffer != 0) gl.DeleteRenderbuffers(1, new[] { _depthBuffer }); + if (_depthBuffer != 0) gl.DeleteRenderbuffer(_depthBuffer); - var oneArr = new int[1]; - gl.GenRenderbuffers(1, oneArr); - _depthBuffer = oneArr[0]; + _depthBuffer = gl.GenRenderbuffer(); gl.BindRenderbuffer(GL_RENDERBUFFER, _depthBuffer); gl.RenderbufferStorage(GL_RENDERBUFFER, GlVersion.Type == GlProfileType.OpenGLES ? GL_DEPTH_COMPONENT16 : GL_DEPTH_COMPONENT, @@ -88,9 +86,9 @@ namespace Avalonia.OpenGL.Controls var gl = _context.GlInterface; gl.BindTexture(GL_TEXTURE_2D, 0); gl.BindFramebuffer(GL_FRAMEBUFFER, 0); - gl.DeleteFramebuffers(1, new[] { _fb }); + gl.DeleteFramebuffer(_fb); _fb = 0; - gl.DeleteRenderbuffers(1, new[] { _depthBuffer }); + gl.DeleteRenderbuffer(_depthBuffer); _depthBuffer = 0; _attachment?.Dispose(); _attachment = null; @@ -181,9 +179,7 @@ namespace Avalonia.OpenGL.Controls { _depthBufferSize = GetPixelSize(); var gl = _context.GlInterface; - var oneArr = new int[1]; - gl.GenFramebuffers(1, oneArr); - _fb = oneArr[0]; + _fb = gl.GenFramebuffer(); gl.BindFramebuffer(GL_FRAMEBUFFER, _fb); EnsureDepthBufferAttachment(gl); diff --git a/src/Avalonia.OpenGL/Egl/EglConsts.cs b/src/Avalonia.OpenGL/Egl/EglConsts.cs index 530d3401f6..1268845f0f 100644 --- a/src/Avalonia.OpenGL/Egl/EglConsts.cs +++ b/src/Avalonia.OpenGL/Egl/EglConsts.cs @@ -4,212 +4,212 @@ namespace Avalonia.OpenGL.Egl { public static class EglConsts { - public const int EGL_ALPHA_SIZE = 0x3021; - public const int EGL_BAD_ACCESS = 0x3002; - public const int EGL_BAD_ALLOC = 0x3003; - public const int EGL_BAD_ATTRIBUTE = 0x3004; - public const int EGL_BAD_CONFIG = 0x3005; - public const int EGL_BAD_CONTEXT = 0x3006; - public const int EGL_BAD_CURRENT_SURFACE = 0x3007; - public const int EGL_BAD_DISPLAY = 0x3008; - public const int EGL_BAD_MATCH = 0x3009; - public const int EGL_BAD_NATIVE_PIXMAP = 0x300A; - public const int EGL_BAD_NATIVE_WINDOW = 0x300B; - public const int EGL_BAD_PARAMETER = 0x300C; - public const int EGL_BAD_SURFACE = 0x300D; - public const int EGL_BLUE_SIZE = 0x3022; - public const int EGL_BUFFER_SIZE = 0x3020; - public const int EGL_CONFIG_CAVEAT = 0x3027; - public const int EGL_CONFIG_ID = 0x3028; - public const int EGL_CORE_NATIVE_ENGINE = 0x305B; - public const int EGL_DEPTH_SIZE = 0x3025; - public const int EGL_DONT_CARE = -1; - public const int EGL_DRAW = 0x3059; - public const int EGL_EXTENSIONS = 0x3055; - public const int EGL_FALSE = 0; - public const int EGL_GREEN_SIZE = 0x3023; - public const int EGL_HEIGHT = 0x3056; - public const int EGL_LARGEST_PBUFFER = 0x3058; - public const int EGL_LEVEL = 0x3029; - public const int EGL_MAX_PBUFFER_HEIGHT = 0x302A; - public const int EGL_MAX_PBUFFER_PIXELS = 0x302B; - public const int EGL_MAX_PBUFFER_WIDTH = 0x302C; - public const int EGL_NATIVE_RENDERABLE = 0x302D; - public const int EGL_NATIVE_VISUAL_ID = 0x302E; - public const int EGL_NATIVE_VISUAL_TYPE = 0x302F; - public const int EGL_NONE = 0x3038; - public const int EGL_NON_CONFORMANT_CONFIG = 0x3051; - public const int EGL_NOT_INITIALIZED = 0x3001; - public const int EGL_NO_CONTEXT = 0; - public const int EGL_NO_DISPLAY = 0; - public const int EGL_NO_SURFACE = 0; - public const int EGL_PBUFFER_BIT = 0x0001; - public const int EGL_PIXMAP_BIT = 0x0002; - public const int EGL_READ = 0x305A; - public const int EGL_RED_SIZE = 0x3024; - public const int EGL_SAMPLES = 0x3031; - public const int EGL_SAMPLE_BUFFERS = 0x3032; - public const int EGL_SLOW_CONFIG = 0x3050; - public const int EGL_STENCIL_SIZE = 0x3026; - public const int EGL_SUCCESS = 0x3000; - public const int EGL_SURFACE_TYPE = 0x3033; - public const int EGL_TRANSPARENT_BLUE_VALUE = 0x3035; - public const int EGL_TRANSPARENT_GREEN_VALUE = 0x3036; - public const int EGL_TRANSPARENT_RED_VALUE = 0x3037; - public const int EGL_TRANSPARENT_RGB = 0x3052; - public const int EGL_TRANSPARENT_TYPE = 0x3034; - public const int EGL_TRUE = 1; - public const int EGL_VENDOR = 0x3053; - public const int EGL_VERSION = 0x3054; - public const int EGL_WIDTH = 0x3057; - public const int EGL_WINDOW_BIT = 0x0004; + public const int EGL_ALPHA_SIZE = 0x3021; + public const int EGL_BAD_ACCESS = 0x3002; + public const int EGL_BAD_ALLOC = 0x3003; + public const int EGL_BAD_ATTRIBUTE = 0x3004; + public const int EGL_BAD_CONFIG = 0x3005; + public const int EGL_BAD_CONTEXT = 0x3006; + public const int EGL_BAD_CURRENT_SURFACE = 0x3007; + public const int EGL_BAD_DISPLAY = 0x3008; + public const int EGL_BAD_MATCH = 0x3009; + public const int EGL_BAD_NATIVE_PIXMAP = 0x300A; + public const int EGL_BAD_NATIVE_WINDOW = 0x300B; + public const int EGL_BAD_PARAMETER = 0x300C; + public const int EGL_BAD_SURFACE = 0x300D; + public const int EGL_BLUE_SIZE = 0x3022; +// public const int EGL_BUFFER_SIZE = 0x3020; +// public const int EGL_CONFIG_CAVEAT = 0x3027; +// public const int EGL_CONFIG_ID = 0x3028; + public const int EGL_CORE_NATIVE_ENGINE = 0x305B; + public const int EGL_DEPTH_SIZE = 0x3025; +// public const int EGL_DONT_CARE = -1; + public const int EGL_DRAW = 0x3059; + public const int EGL_EXTENSIONS = 0x3055; + public const int EGL_FALSE = 0; + public const int EGL_GREEN_SIZE = 0x3023; + public const int EGL_HEIGHT = 0x3056; +// public const int EGL_LARGEST_PBUFFER = 0x3058; +// public const int EGL_LEVEL = 0x3029; +// public const int EGL_MAX_PBUFFER_HEIGHT = 0x302A; +// public const int EGL_MAX_PBUFFER_PIXELS = 0x302B; +// public const int EGL_MAX_PBUFFER_WIDTH = 0x302C; +// public const int EGL_NATIVE_RENDERABLE = 0x302D; +// public const int EGL_NATIVE_VISUAL_ID = 0x302E; +// public const int EGL_NATIVE_VISUAL_TYPE = 0x302F; + public const int EGL_NONE = 0x3038; +// public const int EGL_NON_CONFORMANT_CONFIG = 0x3051; + public const int EGL_NOT_INITIALIZED = 0x3001; + public const int EGL_NO_CONTEXT = 0; + public const int EGL_NO_DISPLAY = 0; + public const int EGL_NO_SURFACE = 0; + public const int EGL_PBUFFER_BIT = 0x0001; +// public const int EGL_PIXMAP_BIT = 0x0002; + public const int EGL_READ = 0x305A; + public const int EGL_RED_SIZE = 0x3024; + public const int EGL_SAMPLES = 0x3031; +// public const int EGL_SAMPLE_BUFFERS = 0x3032; +// public const int EGL_SLOW_CONFIG = 0x3050; + public const int EGL_STENCIL_SIZE = 0x3026; + public const int EGL_SUCCESS = 0x3000; + public const int EGL_SURFACE_TYPE = 0x3033; +// public const int EGL_TRANSPARENT_BLUE_VALUE = 0x3035; +// public const int EGL_TRANSPARENT_GREEN_VALUE = 0x3036; +// public const int EGL_TRANSPARENT_RED_VALUE = 0x3037; +// public const int EGL_TRANSPARENT_RGB = 0x3052; +// public const int EGL_TRANSPARENT_TYPE = 0x3034; + public const int EGL_TRUE = 1; +// public const int EGL_VENDOR = 0x3053; +// public const int EGL_VERSION = 0x3054; + public const int EGL_WIDTH = 0x3057; + public const int EGL_WINDOW_BIT = 0x0004; - public const int EGL_BACK_BUFFER = 0x3084; - public const int EGL_BIND_TO_TEXTURE_RGB = 0x3039; - public const int EGL_BIND_TO_TEXTURE_RGBA = 0x303A; - public const int EGL_CONTEXT_LOST = 0x300E; - public const int EGL_MIN_SWAP_INTERVAL = 0x303B; - public const int EGL_MAX_SWAP_INTERVAL = 0x303C; - public const int EGL_MIPMAP_TEXTURE = 0x3082; - public const int EGL_MIPMAP_LEVEL = 0x3083; - public const int EGL_NO_TEXTURE = 0x305C; - public const int EGL_TEXTURE_2D = 0x305F; - public const int EGL_TEXTURE_FORMAT = 0x3080; - public const int EGL_TEXTURE_RGB = 0x305D; - public const int EGL_TEXTURE_RGBA = 0x305E; - public const int EGL_TEXTURE_TARGET = 0x3081; +// public const int EGL_BACK_BUFFER = 0x3084; +// public const int EGL_BIND_TO_TEXTURE_RGB = 0x3039; +// public const int EGL_BIND_TO_TEXTURE_RGBA = 0x303A; + public const int EGL_CONTEXT_LOST = 0x300E; +// public const int EGL_MIN_SWAP_INTERVAL = 0x303B; +// public const int EGL_MAX_SWAP_INTERVAL = 0x303C; +// public const int EGL_MIPMAP_TEXTURE = 0x3082; +// public const int EGL_MIPMAP_LEVEL = 0x3083; +// public const int EGL_NO_TEXTURE = 0x305C; +// public const int EGL_TEXTURE_2D = 0x305F; +// public const int EGL_TEXTURE_FORMAT = 0x3080; +// public const int EGL_TEXTURE_RGB = 0x305D; +// public const int EGL_TEXTURE_RGBA = 0x305E; +// public const int EGL_TEXTURE_TARGET = 0x3081; - public const int EGL_ALPHA_FORMAT = 0x3088; - public const int EGL_ALPHA_FORMAT_NONPRE = 0x308B; - public const int EGL_ALPHA_FORMAT_PRE = 0x308C; - public const int EGL_ALPHA_MASK_SIZE = 0x303E; - public const int EGL_BUFFER_PRESERVED = 0x3094; - public const int EGL_BUFFER_DESTROYED = 0x3095; - public const int EGL_CLIENT_APIS = 0x308D; - public const int EGL_COLORSPACE = 0x3087; - public const int EGL_COLORSPACE_sRGB = 0x3089; - public const int EGL_COLORSPACE_LINEAR = 0x308A; - public const int EGL_COLOR_BUFFER_TYPE = 0x303F; - public const int EGL_CONTEXT_CLIENT_TYPE = 0x3097; - public const int EGL_DISPLAY_SCALING = 10000; - public const int EGL_HORIZONTAL_RESOLUTION = 0x3090; - public const int EGL_LUMINANCE_BUFFER = 0x308F; - public const int EGL_LUMINANCE_SIZE = 0x303D; - public const int EGL_OPENGL_ES_BIT = 0x0001; - public const int EGL_OPENVG_BIT = 0x0002; - public const int EGL_OPENGL_ES_API = 0x30A0; - public const int EGL_OPENVG_API = 0x30A1; - public const int EGL_OPENVG_IMAGE = 0x3096; - public const int EGL_PIXEL_ASPECT_RATIO = 0x3092; - public const int EGL_RENDERABLE_TYPE = 0x3040; - public const int EGL_RENDER_BUFFER = 0x3086; - public const int EGL_RGB_BUFFER = 0x308E; - public const int EGL_SINGLE_BUFFER = 0x3085; - public const int EGL_SWAP_BEHAVIOR = 0x3093; - public const int EGL_UNKNOWN = -1; - public const int EGL_VERTICAL_RESOLUTION = 0x3091; - public const int EGL_CONFORMANT = 0x3042; - public const int EGL_CONTEXT_CLIENT_VERSION = 0x3098; - public const int EGL_MATCH_NATIVE_PIXMAP = 0x3041; - public const int EGL_OPENGL_ES2_BIT = 0x0004; - public const int EGL_VG_ALPHA_FORMAT = 0x3088; - public const int EGL_VG_ALPHA_FORMAT_NONPRE = 0x308B; - public const int EGL_VG_ALPHA_FORMAT_PRE = 0x308C; - public const int EGL_VG_ALPHA_FORMAT_PRE_BIT = 0x0040; - public const int EGL_VG_COLORSPACE = 0x3087; - public const int EGL_VG_COLORSPACE_sRGB = 0x3089; - public const int EGL_VG_COLORSPACE_LINEAR = 0x308A; - public const int EGL_VG_COLORSPACE_LINEAR_BIT = 0x0020; - public const int EGL_DEFAULT_DISPLAY = 0; - public const int EGL_MULTISAMPLE_RESOLVE_BOX_BIT = 0x0200; - public const int EGL_MULTISAMPLE_RESOLVE = 0x3099; - public const int EGL_MULTISAMPLE_RESOLVE_DEFAULT = 0x309A; - public const int EGL_MULTISAMPLE_RESOLVE_BOX = 0x309B; - public const int EGL_OPENGL_API = 0x30A2; - public const int EGL_OPENGL_BIT = 0x0008; - public const int EGL_SWAP_BEHAVIOR_PRESERVED_BIT = 0x0400; - public const int EGL_CONTEXT_MAJOR_VERSION = 0x3098; - public const int EGL_CONTEXT_MINOR_VERSION = 0x30FB; - public const int EGL_CONTEXT_OPENGL_PROFILE_MASK = 0x30FD; - public const int EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY = 0x31BD; - public const int EGL_NO_RESET_NOTIFICATION = 0x31BE; - public const int EGL_LOSE_CONTEXT_ON_RESET = 0x31BF; - public const int EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT = 0x00000001; - public const int EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT = 0x00000002; - public const int EGL_CONTEXT_OPENGL_DEBUG = 0x31B0; - public const int EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE = 0x31B1; - public const int EGL_CONTEXT_OPENGL_ROBUST_ACCESS = 0x31B2; - public const int EGL_OPENGL_ES3_BIT = 0x00000040; - public const int EGL_CL_EVENT_HANDLE = 0x309C; - public const int EGL_SYNC_CL_EVENT = 0x30FE; - public const int EGL_SYNC_CL_EVENT_COMPLETE = 0x30FF; - public const int EGL_SYNC_PRIOR_COMMANDS_COMPLETE = 0x30F0; - public const int EGL_SYNC_TYPE = 0x30F7; - public const int EGL_SYNC_STATUS = 0x30F1; - public const int EGL_SYNC_CONDITION = 0x30F8; - public const int EGL_SIGNALED = 0x30F2; - public const int EGL_UNSIGNALED = 0x30F3; +// public const int EGL_ALPHA_FORMAT = 0x3088; +// public const int EGL_ALPHA_FORMAT_NONPRE = 0x308B; +// public const int EGL_ALPHA_FORMAT_PRE = 0x308C; +// public const int EGL_ALPHA_MASK_SIZE = 0x303E; +// public const int EGL_BUFFER_PRESERVED = 0x3094; +// public const int EGL_BUFFER_DESTROYED = 0x3095; +// public const int EGL_CLIENT_APIS = 0x308D; +// public const int EGL_COLORSPACE = 0x3087; +// public const int EGL_COLORSPACE_sRGB = 0x3089; +// public const int EGL_COLORSPACE_LINEAR = 0x308A; +// public const int EGL_COLOR_BUFFER_TYPE = 0x303F; +// public const int EGL_CONTEXT_CLIENT_TYPE = 0x3097; +// public const int EGL_DISPLAY_SCALING = 10000; +// public const int EGL_HORIZONTAL_RESOLUTION = 0x3090; +// public const int EGL_LUMINANCE_BUFFER = 0x308F; +// public const int EGL_LUMINANCE_SIZE = 0x303D; + public const int EGL_OPENGL_ES_BIT = 0x0001; +// public const int EGL_OPENVG_BIT = 0x0002; + public const int EGL_OPENGL_ES_API = 0x30A0; +// public const int EGL_OPENVG_API = 0x30A1; +// public const int EGL_OPENVG_IMAGE = 0x3096; +// public const int EGL_PIXEL_ASPECT_RATIO = 0x3092; + public const int EGL_RENDERABLE_TYPE = 0x3040; +// public const int EGL_RENDER_BUFFER = 0x3086; +// public const int EGL_RGB_BUFFER = 0x308E; +// public const int EGL_SINGLE_BUFFER = 0x3085; +// public const int EGL_SWAP_BEHAVIOR = 0x3093; +// public const int EGL_UNKNOWN = -1; +// public const int EGL_VERTICAL_RESOLUTION = 0x3091; +// public const int EGL_CONFORMANT = 0x3042; +// public const int EGL_CONTEXT_CLIENT_VERSION = 0x3098; +// public const int EGL_MATCH_NATIVE_PIXMAP = 0x3041; + public const int EGL_OPENGL_ES2_BIT = 0x0004; +// public const int EGL_VG_ALPHA_FORMAT = 0x3088; +// public const int EGL_VG_ALPHA_FORMAT_NONPRE = 0x308B; +// public const int EGL_VG_ALPHA_FORMAT_PRE = 0x308C; +// public const int EGL_VG_ALPHA_FORMAT_PRE_BIT = 0x0040; +// public const int EGL_VG_COLORSPACE = 0x3087; +// public const int EGL_VG_COLORSPACE_sRGB = 0x3089; +// public const int EGL_VG_COLORSPACE_LINEAR = 0x308A; +// public const int EGL_VG_COLORSPACE_LINEAR_BIT = 0x0020; +// public const int EGL_DEFAULT_DISPLAY = 0; +// public const int EGL_MULTISAMPLE_RESOLVE_BOX_BIT = 0x0200; +// public const int EGL_MULTISAMPLE_RESOLVE = 0x3099; +// public const int EGL_MULTISAMPLE_RESOLVE_DEFAULT = 0x309A; +// public const int EGL_MULTISAMPLE_RESOLVE_BOX = 0x309B; +// public const int EGL_OPENGL_API = 0x30A2; +// public const int EGL_OPENGL_BIT = 0x0008; +// public const int EGL_SWAP_BEHAVIOR_PRESERVED_BIT = 0x0400; + public const int EGL_CONTEXT_MAJOR_VERSION = 0x3098; + public const int EGL_CONTEXT_MINOR_VERSION = 0x30FB; +// public const int EGL_CONTEXT_OPENGL_PROFILE_MASK = 0x30FD; +// public const int EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY = 0x31BD; +// public const int EGL_NO_RESET_NOTIFICATION = 0x31BE; +// public const int EGL_LOSE_CONTEXT_ON_RESET = 0x31BF; +// public const int EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT = 0x00000001; +// public const int EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT = 0x00000002; +// public const int EGL_CONTEXT_OPENGL_DEBUG = 0x31B0; +// public const int EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE = 0x31B1; +// public const int EGL_CONTEXT_OPENGL_ROBUST_ACCESS = 0x31B2; + public const int EGL_OPENGL_ES3_BIT = 0x00000040; +// public const int EGL_CL_EVENT_HANDLE = 0x309C; +// public const int EGL_SYNC_CL_EVENT = 0x30FE; +// public const int EGL_SYNC_CL_EVENT_COMPLETE = 0x30FF; +// public const int EGL_SYNC_PRIOR_COMMANDS_COMPLETE = 0x30F0; +// public const int EGL_SYNC_TYPE = 0x30F7; +// public const int EGL_SYNC_STATUS = 0x30F1; +// public const int EGL_SYNC_CONDITION = 0x30F8; +// public const int EGL_SIGNALED = 0x30F2; +// public const int EGL_UNSIGNALED = 0x30F3; - public const int EGL_SYNC_FLUSH_COMMANDS_BIT = 0x0001; +// public const int EGL_SYNC_FLUSH_COMMANDS_BIT = 0x0001; - public const int EGL_TIMEOUT_EXPIRED = 0x30F5; - public const int EGL_CONDITION_SATISFIED = 0x30F6; - public const int EGL_NO_SYNC = 0; - public const int EGL_SYNC_FENCE = 0x30F9; - public const int EGL_GL_COLORSPACE = 0x309D; - public const int EGL_GL_COLORSPACE_SRGB = 0x3089; - public const int EGL_GL_COLORSPACE_LINEAR = 0x308A; - public const int EGL_GL_RENDERBUFFER = 0x30B9; - public const int EGL_GL_TEXTURE_2D = 0x30B1; - public const int EGL_GL_TEXTURE_LEVEL = 0x30BC; - public const int EGL_GL_TEXTURE_3D = 0x30B2; - public const int EGL_GL_TEXTURE_ZOFFSET = 0x30BD; - public const int EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x30B3; - public const int EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x30B4; - public const int EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x30B5; - public const int EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x30B6; - public const int EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x30B7; - public const int EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x30B8; - public const int EGL_IMAGE_PRESERVED = 0x30D2; - public const int EGL_NO_IMAGE = 0; +// public const int EGL_TIMEOUT_EXPIRED = 0x30F5; +// public const int EGL_CONDITION_SATISFIED = 0x30F6; +// public const int EGL_NO_SYNC = 0; +// public const int EGL_SYNC_FENCE = 0x30F9; +// public const int EGL_GL_COLORSPACE = 0x309D; +// public const int EGL_GL_COLORSPACE_SRGB = 0x3089; +// public const int EGL_GL_COLORSPACE_LINEAR = 0x308A; +// public const int EGL_GL_RENDERBUFFER = 0x30B9; +// public const int EGL_GL_TEXTURE_2D = 0x30B1; +// public const int EGL_GL_TEXTURE_LEVEL = 0x30BC; +// public const int EGL_GL_TEXTURE_3D = 0x30B2; +// public const int EGL_GL_TEXTURE_ZOFFSET = 0x30BD; +// public const int EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x30B3; +// public const int EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x30B4; +// public const int EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x30B5; +// public const int EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x30B6; +// public const int EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x30B7; +// public const int EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x30B8; +// public const int EGL_IMAGE_PRESERVED = 0x30D2; +// public const int EGL_NO_IMAGE = 0; - public const int EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE = 0x3207; - public const int EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE = 0x3208; + public const int EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE = 0x3207; + public const int EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE = 0x3208; //EGL_ANGLE_platform_angle - public const int EGL_PLATFORM_ANGLE_ANGLE = 0x3202; - public const int EGL_PLATFORM_ANGLE_TYPE_ANGLE = 0x3203; - public const int EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE = 0x3204; - public const int EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE = 0x3205; - public const int EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED = 0x3451; - public const int EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE = 0x3206; - public const int EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE = 0x320A; - public const int EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE = 0x345E; + public const int EGL_PLATFORM_ANGLE_ANGLE = 0x3202; + public const int EGL_PLATFORM_ANGLE_TYPE_ANGLE = 0x3203; +// public const int EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE = 0x3204; +// public const int EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE = 0x3205; +// public const int EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED = 0x3451; +// public const int EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE = 0x3206; +// public const int EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE = 0x320A; +// public const int EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE = 0x345E; - public const int EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE = 0x320D; - public const int EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE = 0x320E; +// public const int EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE = 0x320D; +// public const int EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE = 0x320E; //EGL_ANGLE_platform_angle_d3d - public const int EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE = 0x3209; - public const int EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE = 0x320F; - public const int EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE = 0x320B; - public const int EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE = 0x320C; +// public const int EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE = 0x3209; +// public const int EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE = 0x320F; +// public const int EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE = 0x320B; +// public const int EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE = 0x320C; //EXT_device_query - public const int EGL_DEVICE_EXT = 0x322C; + public const int EGL_DEVICE_EXT = 0x322C; //ANGLE_device_d3d - public const int EGL_D3D9_DEVICE_ANGLE = 0x33A0; - public const int EGL_D3D11_DEVICE_ANGLE = 0x33A1; + public const int EGL_D3D9_DEVICE_ANGLE = 0x33A0; + public const int EGL_D3D11_DEVICE_ANGLE = 0x33A1; - public const int EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE = 0x3200; - public const int EGL_D3D_TEXTURE_ANGLE = 0x33A3; + public const int EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE = 0x3200; + public const int EGL_D3D_TEXTURE_ANGLE = 0x33A3; - public const int EGL_TEXTURE_OFFSET_X_ANGLE = 0x3490; - public const int EGL_TEXTURE_OFFSET_Y_ANGLE = 0x3491; + public const int EGL_TEXTURE_OFFSET_X_ANGLE = 0x3490; + public const int EGL_TEXTURE_OFFSET_Y_ANGLE = 0x3491; - public const int EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE = 0x33A6; + public const int EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE = 0x33A6; } } diff --git a/src/Avalonia.OpenGL/Egl/EglContext.cs b/src/Avalonia.OpenGL/Egl/EglContext.cs index bc517c3e27..e7b5dc7c83 100644 --- a/src/Avalonia.OpenGL/Egl/EglContext.cs +++ b/src/Avalonia.OpenGL/Egl/EglContext.cs @@ -24,7 +24,7 @@ namespace Avalonia.OpenGL.Egl SampleCount = sampleCount; StencilSize = stencilSize; using (MakeCurrent()) - GlInterface = GlInterface.FromNativeUtf8GetProcAddress(version, b => _egl.GetProcAddress(b)); + GlInterface = GlInterface.FromNativeUtf8GetProcAddress(version, _egl.GetProcAddress); } public IntPtr Context { get; } diff --git a/src/Avalonia.OpenGL/Egl/EglDisplay.cs b/src/Avalonia.OpenGL/Egl/EglDisplay.cs index 623364866b..d3d85e8c83 100644 --- a/src/Avalonia.OpenGL/Egl/EglDisplay.cs +++ b/src/Avalonia.OpenGL/Egl/EglDisplay.cs @@ -34,9 +34,9 @@ namespace Avalonia.OpenGL.Egl } else { - if (egl.GetPlatformDisplayEXT == null) + if (!egl.IsGetPlatformDisplayExtAvailable) throw new OpenGlException("eglGetPlatformDisplayEXT is not supported by libegl"); - display = egl.GetPlatformDisplayEXT(platformType, platformDisplay, attrs); + display = egl.GetPlatformDisplayExt(platformType, platformDisplay, attrs); } if (display == IntPtr.Zero) diff --git a/src/Avalonia.OpenGL/Egl/EglInterface.cs b/src/Avalonia.OpenGL/Egl/EglInterface.cs index 6148e58440..4fec8e5356 100644 --- a/src/Avalonia.OpenGL/Egl/EglInterface.cs +++ b/src/Avalonia.OpenGL/Egl/EglInterface.cs @@ -2,31 +2,26 @@ using System.Runtime.InteropServices; using Avalonia.Platform; using Avalonia.Platform.Interop; +using Avalonia.SourceGenerator; namespace Avalonia.OpenGL.Egl { - public class EglInterface : GlInterfaceBase + public unsafe partial class EglInterface { - public EglInterface() : base(Load()) + public EglInterface(Func getProcAddress) { - - } - - public EglInterface(Func getProcAddress) : base(getProcAddress) - { - + Initialize(getProcAddress); } - public EglInterface(Func getProcAddress) : base(getProcAddress) + public EglInterface(string library) : this(Load(library)) { - } - - public EglInterface(string library) : base(Load(library)) + + public EglInterface() : this(Load()) { + } - static Func Load() { var os = AvaloniaLocator.Current.GetService().GetRuntimeInfo().OperatingSystem; @@ -46,119 +41,75 @@ namespace Avalonia.OpenGL.Egl } // ReSharper disable UnassignedGetOnlyAutoProperty - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate int EglGetError(); - [GlEntryPoint("eglGetError")] - public EglGetError GetError { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr EglGetDisplay(IntPtr nativeDisplay); - [GlEntryPoint("eglGetDisplay")] - public EglGetDisplay GetDisplay { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr EglGetPlatformDisplayEXT(int platform, IntPtr nativeDisplay, int[] attrs); - [GlEntryPoint("eglGetPlatformDisplayEXT")] - [GlOptionalEntryPoint] - public EglGetPlatformDisplayEXT GetPlatformDisplayEXT { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool EglInitialize(IntPtr display, out int major, out int minor); - [GlEntryPoint("eglInitialize")] - public EglInitialize Initialize { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr EglGetProcAddress(Utf8Buffer proc); - [GlEntryPoint("eglGetProcAddress")] - public EglGetProcAddress GetProcAddress { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool EglBindApi(int api); - [GlEntryPoint("eglBindAPI")] - public EglBindApi BindApi { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool EglChooseConfig(IntPtr display, int[] attribs, - out IntPtr surfaceConfig, int numConfigs, out int choosenConfig); - [GlEntryPoint("eglChooseConfig")] - public EglChooseConfig ChooseConfig { get; } + + [GetProcAddress("eglGetError")] + public partial int GetError(); + + [GetProcAddress("eglGetDisplay")] + public partial IntPtr GetDisplay(IntPtr nativeDisplay); + + [GetProcAddress("eglGetPlatformDisplayEXT", true)] + public partial IntPtr GetPlatformDisplayExt(int platform, IntPtr nativeDisplay, int[] attrs); + + [GetProcAddress("eglInitialize")] + public partial bool Initialize(IntPtr display, out int major, out int minor); + + [GetProcAddress("eglGetProcAddress")] + public partial IntPtr GetProcAddress(IntPtr proc); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr EglCreateContext(IntPtr display, IntPtr config, + [GetProcAddress("eglBindAPI")] + public partial bool BindApi(int api); + + [GetProcAddress("eglChooseConfig")] + public partial bool ChooseConfig(IntPtr display, int[] attribs, + out IntPtr surfaceConfig, int numConfigs, out int choosenConfig); + + [GetProcAddress("eglCreateContext")] + public partial IntPtr CreateContext(IntPtr display, IntPtr config, IntPtr share, int[] attrs); - [GlEntryPoint("eglCreateContext")] - public EglCreateContext CreateContext { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool EglDestroyContext(IntPtr display, IntPtr context); - [GlEntryPoint("eglDestroyContext")] - public EglDestroyContext DestroyContext { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr EglCreatePBufferSurface(IntPtr display, IntPtr config, int[] attrs); - [GlEntryPoint("eglCreatePbufferSurface")] - public EglCreatePBufferSurface CreatePBufferSurface { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool EglMakeCurrent(IntPtr display, IntPtr draw, IntPtr read, IntPtr context); - [GlEntryPoint("eglMakeCurrent")] - public EglMakeCurrent MakeCurrent { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr EglGetCurrentContext(); - [GlEntryPoint("eglGetCurrentContext")] - public EglGetCurrentContext GetCurrentContext { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr EglGetCurrentDisplay(); - [GlEntryPoint("eglGetCurrentDisplay")] - public EglGetCurrentContext GetCurrentDisplay { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr EglGetCurrentSurface(int readDraw); - [GlEntryPoint("eglGetCurrentSurface")] - public EglGetCurrentSurface GetCurrentSurface { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void EglDisplaySurfaceVoidDelegate(IntPtr display, IntPtr surface); - [GlEntryPoint("eglDestroySurface")] - public EglDisplaySurfaceVoidDelegate DestroySurface { get; } - - [GlEntryPoint("eglSwapBuffers")] - public EglDisplaySurfaceVoidDelegate SwapBuffers { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr - EglCreateWindowSurface(IntPtr display, IntPtr config, IntPtr window, int[] attrs); - [GlEntryPoint("eglCreateWindowSurface")] - public EglCreateWindowSurface CreateWindowSurface { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool EglGetConfigAttrib(IntPtr display, IntPtr config, int attr, out int rv); - [GlEntryPoint("eglGetConfigAttrib")] - public EglGetConfigAttrib GetConfigAttrib { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool EglWaitGL(); - [GlEntryPoint("eglWaitGL")] - public EglWaitGL WaitGL { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool EglWaitClient(); - [GlEntryPoint("eglWaitClient")] - public EglWaitGL WaitClient { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool EglWaitNative(int engine); - [GlEntryPoint("eglWaitNative")] - public EglWaitNative WaitNative { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr EglQueryString(IntPtr display, int i); - - [GlEntryPoint("eglQueryString")] - public EglQueryString QueryStringNative { get; } + + [GetProcAddress("eglDestroyContext")] + public partial bool DestroyContext(IntPtr display, IntPtr context); + + [GetProcAddress("eglCreatePbufferSurface")] + public partial IntPtr CreatePBufferSurface(IntPtr display, IntPtr config, int[] attrs); + [GetProcAddress("eglMakeCurrent")] + public partial bool MakeCurrent(IntPtr display, IntPtr draw, IntPtr read, IntPtr context); + + [GetProcAddress("eglGetCurrentContext")] + public partial IntPtr GetCurrentContext(); + + [GetProcAddress("eglGetCurrentDisplay")] + public partial IntPtr GetCurrentDisplay(); + + [GetProcAddress("eglGetCurrentSurface")] + public partial IntPtr GetCurrentSurface(int readDraw); + + [GetProcAddress("eglDestroySurface")] + public partial void DestroySurface(IntPtr display, IntPtr surface); + + [GetProcAddress("eglSwapBuffers")] + public partial void SwapBuffers(IntPtr display, IntPtr surface); + + [GetProcAddress("eglCreateWindowSurface")] + public partial IntPtr CreateWindowSurface(IntPtr display, IntPtr config, IntPtr window, int[] attrs); + + [GetProcAddress("eglGetConfigAttrib")] + public partial bool GetConfigAttrib(IntPtr display, IntPtr config, int attr, out int rv); + + [GetProcAddress("eglWaitGL")] + public partial bool WaitGL(); + + [GetProcAddress("eglWaitClient")] + public partial bool WaitClient(); + + [GetProcAddress("eglWaitNative")] + public partial bool WaitNative(int engine); + + [GetProcAddress("eglQueryString")] + public partial IntPtr QueryStringNative(IntPtr display, int i); + public string QueryString(IntPtr display, int i) { var rv = QueryStringNative(display, i); @@ -166,25 +117,15 @@ namespace Avalonia.OpenGL.Egl return null; return Marshal.PtrToStringAnsi(rv); } + + [GetProcAddress("eglCreatePbufferFromClientBuffer")] + public partial IntPtr CreatePbufferFromClientBuffer(IntPtr display, int buftype, IntPtr buffer, IntPtr config, int[] attrib_list); + + [GetProcAddress("eglQueryDisplayAttribEXT", true)] + public partial bool QueryDisplayAttribExt(IntPtr display, int attr, out IntPtr res); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr EglCreatePbufferFromClientBuffer(IntPtr display, int buftype, IntPtr buffer, IntPtr config, int[] attrib_list); - [GlEntryPoint("eglCreatePbufferFromClientBuffer")] - - public EglCreatePbufferFromClientBuffer CreatePbufferFromClientBuffer { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool EglQueryDisplayAttribEXT(IntPtr display, int attr, out IntPtr res); - - [GlEntryPoint("eglQueryDisplayAttribEXT"), GlOptionalEntryPoint] - public EglQueryDisplayAttribEXT QueryDisplayAttribExt { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate bool EglQueryDeviceAttribEXT(IntPtr display, int attr, out IntPtr res); - - [GlEntryPoint("eglQueryDeviceAttribEXT"), GlOptionalEntryPoint] - public EglQueryDisplayAttribEXT QueryDeviceAttribExt { get; } - - // ReSharper restore UnassignedGetOnlyAutoProperty + + [GetProcAddress("eglQueryDeviceAttribEXT", true)] + public partial bool QueryDeviceAttribExt(IntPtr display, int attr, out IntPtr res); } } diff --git a/src/Avalonia.OpenGL/GlBasicInfoInterface.cs b/src/Avalonia.OpenGL/GlBasicInfoInterface.cs index aaba2ec09c..7a7110f15b 100644 --- a/src/Avalonia.OpenGL/GlBasicInfoInterface.cs +++ b/src/Avalonia.OpenGL/GlBasicInfoInterface.cs @@ -3,46 +3,24 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using Avalonia.Platform.Interop; +using Avalonia.SourceGenerator; namespace Avalonia.OpenGL { - public class GlBasicInfoInterface : GlBasicInfoInterface + public unsafe partial class GlBasicInfoInterface { - public GlBasicInfoInterface(Func getProcAddress) : base(getProcAddress, null) - { - } - - public GlBasicInfoInterface(Func nativeGetProcAddress) : base(nativeGetProcAddress, null) - { + public GlBasicInfoInterface(Func getProcAddress){ + Initialize(getProcAddress); } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlGetIntegerv(int name, out int rv); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr GlGetString(int v); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr GlGetStringi(int v, int v1); - } - public class GlBasicInfoInterface : GlInterfaceBase - { - public GlBasicInfoInterface(Func getProcAddress, TContextInfo context) : base(getProcAddress, context) - { - } + [GetProcAddress("glGetIntegerv")] + public partial void GetIntegerv(int name, out int rv); - public GlBasicInfoInterface(Func 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; } + [GetProcAddress("glGetString")] + public partial IntPtr GetStringNative(int v); + + [GetProcAddress("glGetStringi")] + public partial IntPtr GetStringiNative(int v, int v1); public string GetString(int v) { diff --git a/src/Avalonia.OpenGL/GlConsts.cs b/src/Avalonia.OpenGL/GlConsts.cs index 2a6aa0d14d..3fdc147701 100644 --- a/src/Avalonia.OpenGL/GlConsts.cs +++ b/src/Avalonia.OpenGL/GlConsts.cs @@ -1,457 +1,456 @@ -// ReSharper disable UnusedMember.Global // ReSharper disable IdentifierTypo namespace Avalonia.OpenGL { public static class GlConsts { - public const int GL_BYTE = 0x1400; +// public const int GL_BYTE = 0x1400 public const int GL_UNSIGNED_BYTE = 0x1401; - public const int GL_SHORT = 0x1402; +// public const int GL_SHORT = 0x1402; public const int GL_UNSIGNED_SHORT = 0x1403; - public const int GL_INT = 0x1404; - public const int GL_UNSIGNED_INT = 0x1405; +// public const int GL_INT = 0x1404; +// public const int GL_UNSIGNED_INT = 0x1405; public const int GL_FLOAT = 0x1406; - public const int GL_2_BYTES = 0x1407; - public const int GL_3_BYTES = 0x1408; - public const int GL_4_BYTES = 0x1409; - public const int GL_DOUBLE = 0x140A; - public const int GL_POINTS = 0x0000; - public const int GL_LINES = 0x0001; - public const int GL_LINE_LOOP = 0x0002; - public const int GL_LINE_STRIP = 0x0003; +// public const int GL_2_BYTES = 0x1407; +// public const int GL_3_BYTES = 0x1408; +// public const int GL_4_BYTES = 0x1409; +// public const int GL_DOUBLE = 0x140A; +// public const int GL_POINTS = 0x0000; +// public const int GL_LINES = 0x0001; +// public const int GL_LINE_LOOP = 0x0002; +// public const int GL_LINE_STRIP = 0x0003; public const int GL_TRIANGLES = 0x0004; - public const int GL_TRIANGLE_STRIP = 0x0005; - public const int GL_TRIANGLE_FAN = 0x0006; - public const int GL_QUADS = 0x0007; - public const int GL_QUAD_STRIP = 0x0008; - public const int GL_POLYGON = 0x0009; - public const int GL_VERTEX_ARRAY = 0x8074; - public const int GL_NORMAL_ARRAY = 0x8075; - public const int GL_COLOR_ARRAY = 0x8076; - public const int GL_INDEX_ARRAY = 0x8077; - public const int GL_TEXTURE_COORD_ARRAY = 0x8078; - public const int GL_EDGE_FLAG_ARRAY = 0x8079; - public const int GL_VERTEX_ARRAY_SIZE = 0x807A; - public const int GL_VERTEX_ARRAY_TYPE = 0x807B; - public const int GL_VERTEX_ARRAY_STRIDE = 0x807C; - public const int GL_NORMAL_ARRAY_TYPE = 0x807E; - public const int GL_NORMAL_ARRAY_STRIDE = 0x807F; - public const int GL_COLOR_ARRAY_SIZE = 0x8081; - public const int GL_COLOR_ARRAY_TYPE = 0x8082; - public const int GL_COLOR_ARRAY_STRIDE = 0x8083; - public const int GL_INDEX_ARRAY_TYPE = 0x8085; - public const int GL_INDEX_ARRAY_STRIDE = 0x8086; - public const int GL_TEXTURE_COORD_ARRAY_SIZE = 0x8088; - public const int GL_TEXTURE_COORD_ARRAY_TYPE = 0x8089; - public const int GL_TEXTURE_COORD_ARRAY_STRIDE = 0x808A; - public const int GL_EDGE_FLAG_ARRAY_STRIDE = 0x808C; - public const int GL_VERTEX_ARRAY_POINTER = 0x808E; - public const int GL_NORMAL_ARRAY_POINTER = 0x808F; - public const int GL_COLOR_ARRAY_POINTER = 0x8090; - public const int GL_INDEX_ARRAY_POINTER = 0x8091; - public const int GL_TEXTURE_COORD_ARRAY_POINTER = 0x8092; - public const int GL_EDGE_FLAG_ARRAY_POINTER = 0x8093; - public const int GL_V2F = 0x2A20; - public const int GL_V3F = 0x2A21; - public const int GL_C4UB_V2F = 0x2A22; - public const int GL_C4UB_V3F = 0x2A23; - public const int GL_C3F_V3F = 0x2A24; - public const int GL_N3F_V3F = 0x2A25; - public const int GL_C4F_N3F_V3F = 0x2A26; - public const int GL_T2F_V3F = 0x2A27; - public const int GL_T4F_V4F = 0x2A28; - public const int GL_T2F_C4UB_V3F = 0x2A29; - public const int GL_T2F_C3F_V3F = 0x2A2A; - public const int GL_T2F_N3F_V3F = 0x2A2B; - public const int GL_T2F_C4F_N3F_V3F = 0x2A2C; - public const int GL_T4F_C4F_N3F_V4F = 0x2A2D; - public const int GL_MATRIX_MODE = 0x0BA0; - public const int GL_MODELVIEW = 0x1700; - public const int GL_PROJECTION = 0x1701; - public const int GL_TEXTURE = 0x1702; - public const int GL_POINT_SMOOTH = 0x0B10; - public const int GL_POINT_SIZE = 0x0B11; - public const int GL_POINT_SIZE_GRANULARITY = 0x0B13; - public const int GL_POINT_SIZE_RANGE = 0x0B12; - public const int GL_LINE_SMOOTH = 0x0B20; - public const int GL_LINE_STIPPLE = 0x0B24; - public const int GL_LINE_STIPPLE_PATTERN = 0x0B25; - public const int GL_LINE_STIPPLE_REPEAT = 0x0B26; - public const int GL_LINE_WIDTH = 0x0B21; - public const int GL_LINE_WIDTH_GRANULARITY = 0x0B23; - public const int GL_LINE_WIDTH_RANGE = 0x0B22; - public const int GL_POINT = 0x1B00; - public const int GL_LINE = 0x1B01; - public const int GL_FILL = 0x1B02; - public const int GL_CW = 0x0900; - public const int GL_CCW = 0x0901; - public const int GL_FRONT = 0x0404; - public const int GL_BACK = 0x0405; - public const int GL_POLYGON_MODE = 0x0B40; - public const int GL_POLYGON_SMOOTH = 0x0B41; - public const int GL_POLYGON_STIPPLE = 0x0B42; - public const int GL_EDGE_FLAG = 0x0B43; - public const int GL_CULL_FACE = 0x0B44; - public const int GL_CULL_FACE_MODE = 0x0B45; - public const int GL_FRONT_FACE = 0x0B46; - public const int GL_POLYGON_OFFSET_FACTOR = 0x8038; - public const int GL_POLYGON_OFFSET_UNITS = 0x2A00; - public const int GL_POLYGON_OFFSET_POINT = 0x2A01; - public const int GL_POLYGON_OFFSET_LINE = 0x2A02; - public const int GL_POLYGON_OFFSET_FILL = 0x8037; - public const int GL_COMPILE = 0x1300; - public const int GL_COMPILE_AND_EXECUTE = 0x1301; - public const int GL_LIST_BASE = 0x0B32; - public const int GL_LIST_INDEX = 0x0B33; - public const int GL_LIST_MODE = 0x0B30; - public const int GL_NEVER = 0x0200; - public const int GL_LESS = 0x0201; - public const int GL_EQUAL = 0x0202; - public const int GL_LEQUAL = 0x0203; - public const int GL_GREATER = 0x0204; - public const int GL_NOTEQUAL = 0x0205; - public const int GL_GEQUAL = 0x0206; - public const int GL_ALWAYS = 0x0207; +// public const int GL_TRIANGLE_STRIP = 0x0005; +// public const int GL_TRIANGLE_FAN = 0x0006; +// public const int GL_QUADS = 0x0007; +// public const int GL_QUAD_STRIP = 0x0008; +// public const int GL_POLYGON = 0x0009; +// public const int GL_VERTEX_ARRAY = 0x8074; +// public const int GL_NORMAL_ARRAY = 0x8075; +// public const int GL_COLOR_ARRAY = 0x8076; +// public const int GL_INDEX_ARRAY = 0x8077; +// public const int GL_TEXTURE_COORD_ARRAY = 0x8078; +// public const int GL_EDGE_FLAG_ARRAY = 0x8079; +// public const int GL_VERTEX_ARRAY_SIZE = 0x807A; +// public const int GL_VERTEX_ARRAY_TYPE = 0x807B; +// public const int GL_VERTEX_ARRAY_STRIDE = 0x807C; +// public const int GL_NORMAL_ARRAY_TYPE = 0x807E; +// public const int GL_NORMAL_ARRAY_STRIDE = 0x807F; +// public const int GL_COLOR_ARRAY_SIZE = 0x8081; +// public const int GL_COLOR_ARRAY_TYPE = 0x8082; +// public const int GL_COLOR_ARRAY_STRIDE = 0x8083; +// public const int GL_INDEX_ARRAY_TYPE = 0x8085; +// public const int GL_INDEX_ARRAY_STRIDE = 0x8086; +// public const int GL_TEXTURE_COORD_ARRAY_SIZE = 0x8088; +// public const int GL_TEXTURE_COORD_ARRAY_TYPE = 0x8089; +// public const int GL_TEXTURE_COORD_ARRAY_STRIDE = 0x808A; +// public const int GL_EDGE_FLAG_ARRAY_STRIDE = 0x808C; +// public const int GL_VERTEX_ARRAY_POINTER = 0x808E; +// public const int GL_NORMAL_ARRAY_POINTER = 0x808F; +// public const int GL_COLOR_ARRAY_POINTER = 0x8090; +// public const int GL_INDEX_ARRAY_POINTER = 0x8091; +// public const int GL_TEXTURE_COORD_ARRAY_POINTER = 0x8092; +// public const int GL_EDGE_FLAG_ARRAY_POINTER = 0x8093; +// public const int GL_V2F = 0x2A20; +// public const int GL_V3F = 0x2A21; +// public const int GL_C4UB_V2F = 0x2A22; +// public const int GL_C4UB_V3F = 0x2A23; +// public const int GL_C3F_V3F = 0x2A24; +// public const int GL_N3F_V3F = 0x2A25; +// public const int GL_C4F_N3F_V3F = 0x2A26; +// public const int GL_T2F_V3F = 0x2A27; +// public const int GL_T4F_V4F = 0x2A28; +// public const int GL_T2F_C4UB_V3F = 0x2A29; +// public const int GL_T2F_C3F_V3F = 0x2A2A; +// public const int GL_T2F_N3F_V3F = 0x2A2B; +// public const int GL_T2F_C4F_N3F_V3F = 0x2A2C; +// public const int GL_T4F_C4F_N3F_V4F = 0x2A2D; +// public const int GL_MATRIX_MODE = 0x0BA0; +// public const int GL_MODELVIEW = 0x1700; +// public const int GL_PROJECTION = 0x1701; +// public const int GL_TEXTURE = 0x1702; +// public const int GL_POINT_SMOOTH = 0x0B10; +// public const int GL_POINT_SIZE = 0x0B11; +// public const int GL_POINT_SIZE_GRANULARITY = 0x0B13; +// public const int GL_POINT_SIZE_RANGE = 0x0B12; +// public const int GL_LINE_SMOOTH = 0x0B20; +// public const int GL_LINE_STIPPLE = 0x0B24; +// public const int GL_LINE_STIPPLE_PATTERN = 0x0B25; +// public const int GL_LINE_STIPPLE_REPEAT = 0x0B26; +// public const int GL_LINE_WIDTH = 0x0B21; +// public const int GL_LINE_WIDTH_GRANULARITY = 0x0B23; +// public const int GL_LINE_WIDTH_RANGE = 0x0B22; +// public const int GL_POINT = 0x1B00; +// public const int GL_LINE = 0x1B01; +// public const int GL_FILL = 0x1B02; +// public const int GL_CW = 0x0900; +// public const int GL_CCW = 0x0901; +// public const int GL_FRONT = 0x0404; +// public const int GL_BACK = 0x0405; +// public const int GL_POLYGON_MODE = 0x0B40; +// public const int GL_POLYGON_SMOOTH = 0x0B41; +// public const int GL_POLYGON_STIPPLE = 0x0B42; +// public const int GL_EDGE_FLAG = 0x0B43; +// public const int GL_CULL_FACE = 0x0B44; +// public const int GL_CULL_FACE_MODE = 0x0B45; +// public const int GL_FRONT_FACE = 0x0B46; +// public const int GL_POLYGON_OFFSET_FACTOR = 0x8038; +// public const int GL_POLYGON_OFFSET_UNITS = 0x2A00; +// public const int GL_POLYGON_OFFSET_POINT = 0x2A01; +// public const int GL_POLYGON_OFFSET_LINE = 0x2A02; +// public const int GL_POLYGON_OFFSET_FILL = 0x8037; +// public const int GL_COMPILE = 0x1300; +// public const int GL_COMPILE_AND_EXECUTE = 0x1301; +// public const int GL_LIST_BASE = 0x0B32; +// public const int GL_LIST_INDEX = 0x0B33; +// public const int GL_LIST_MODE = 0x0B30; +// public const int GL_NEVER = 0x0200; +// public const int GL_LESS = 0x0201; +// public const int GL_EQUAL = 0x0202; +// public const int GL_LEQUAL = 0x0203; +// public const int GL_GREATER = 0x0204; +// public const int GL_NOTEQUAL = 0x0205; +// public const int GL_GEQUAL = 0x0206; +// public const int GL_ALWAYS = 0x0207; public const int GL_DEPTH_TEST = 0x0B71; - public const int GL_DEPTH_BITS = 0x0D56; - public const int GL_DEPTH_CLEAR_VALUE = 0x0B73; - public const int GL_DEPTH_FUNC = 0x0B74; - public const int GL_DEPTH_RANGE = 0x0B70; - public const int GL_DEPTH_WRITEMASK = 0x0B72; +// public const int GL_DEPTH_BITS = 0x0D56; +// public const int GL_DEPTH_CLEAR_VALUE = 0x0B73; +// public const int GL_DEPTH_FUNC = 0x0B74; +// public const int GL_DEPTH_RANGE = 0x0B70; +// public const int GL_DEPTH_WRITEMASK = 0x0B72; public const int GL_DEPTH_COMPONENT = 0x1902; - public const int GL_LIGHTING = 0x0B50; - public const int GL_LIGHT0 = 0x4000; - public const int GL_LIGHT1 = 0x4001; - public const int GL_LIGHT2 = 0x4002; - public const int GL_LIGHT3 = 0x4003; - public const int GL_LIGHT4 = 0x4004; - public const int GL_LIGHT5 = 0x4005; - public const int GL_LIGHT6 = 0x4006; - public const int GL_LIGHT7 = 0x4007; - public const int GL_SPOT_EXPONENT = 0x1205; - public const int GL_SPOT_CUTOFF = 0x1206; - public const int GL_CONSTANT_ATTENUATION = 0x1207; - public const int GL_LINEAR_ATTENUATION = 0x1208; - public const int GL_QUADRATIC_ATTENUATION = 0x1209; - public const int GL_AMBIENT = 0x1200; - public const int GL_DIFFUSE = 0x1201; - public const int GL_SPECULAR = 0x1202; - public const int GL_SHININESS = 0x1601; - public const int GL_EMISSION = 0x1600; - public const int GL_POSITION = 0x1203; - public const int GL_SPOT_DIRECTION = 0x1204; - public const int GL_AMBIENT_AND_DIFFUSE = 0x1602; - public const int GL_COLOR_INDEXES = 0x1603; - public const int GL_LIGHT_MODEL_TWO_SIDE = 0x0B52; - public const int GL_LIGHT_MODEL_LOCAL_VIEWER = 0x0B51; - public const int GL_LIGHT_MODEL_AMBIENT = 0x0B53; - public const int GL_FRONT_AND_BACK = 0x0408; - public const int GL_SHADE_MODEL = 0x0B54; - public const int GL_FLAT = 0x1D00; - public const int GL_SMOOTH = 0x1D01; - public const int GL_COLOR_MATERIAL = 0x0B57; - public const int GL_COLOR_MATERIAL_FACE = 0x0B55; - public const int GL_COLOR_MATERIAL_PARAMETER = 0x0B56; - public const int GL_NORMALIZE = 0x0BA1; - public const int GL_CLIP_PLANE0 = 0x3000; - public const int GL_CLIP_PLANE1 = 0x3001; - public const int GL_CLIP_PLANE2 = 0x3002; - public const int GL_CLIP_PLANE3 = 0x3003; - public const int GL_CLIP_PLANE4 = 0x3004; - public const int GL_CLIP_PLANE5 = 0x3005; - public const int GL_ACCUM_RED_BITS = 0x0D58; - public const int GL_ACCUM_GREEN_BITS = 0x0D59; - public const int GL_ACCUM_BLUE_BITS = 0x0D5A; - public const int GL_ACCUM_ALPHA_BITS = 0x0D5B; - public const int GL_ACCUM_CLEAR_VALUE = 0x0B80; - public const int GL_ACCUM = 0x0100; - public const int GL_ADD = 0x0104; - public const int GL_LOAD = 0x0101; - public const int GL_MULT = 0x0103; - public const int GL_RETURN = 0x0102; - public const int GL_ALPHA_TEST = 0x0BC0; - public const int GL_ALPHA_TEST_REF = 0x0BC2; - public const int GL_ALPHA_TEST_FUNC = 0x0BC1; - public const int GL_BLEND = 0x0BE2; - public const int GL_BLEND_SRC = 0x0BE1; - public const int GL_BLEND_DST = 0x0BE0; - public const int GL_SRC_COLOR = 0x0300; - public const int GL_ONE_MINUS_SRC_COLOR = 0x0301; - public const int GL_SRC_ALPHA = 0x0302; - public const int GL_ONE_MINUS_SRC_ALPHA = 0x0303; - public const int GL_DST_ALPHA = 0x0304; - public const int GL_ONE_MINUS_DST_ALPHA = 0x0305; - public const int GL_DST_COLOR = 0x0306; - public const int GL_ONE_MINUS_DST_COLOR = 0x0307; - public const int GL_SRC_ALPHA_SATURATE = 0x0308; - public const int GL_FEEDBACK = 0x1C01; - public const int GL_RENDER = 0x1C00; - public const int GL_SELECT = 0x1C02; - public const int GL_2D = 0x0600; - public const int GL_3D = 0x0601; - public const int GL_3D_COLOR = 0x0602; - public const int GL_3D_COLOR_TEXTURE = 0x0603; - public const int GL_4D_COLOR_TEXTURE = 0x0604; - public const int GL_POINT_TOKEN = 0x0701; - public const int GL_LINE_TOKEN = 0x0702; - public const int GL_LINE_RESET_TOKEN = 0x0707; - public const int GL_POLYGON_TOKEN = 0x0703; - public const int GL_BITMAP_TOKEN = 0x0704; - public const int GL_DRAW_PIXEL_TOKEN = 0x0705; - public const int GL_COPY_PIXEL_TOKEN = 0x0706; - public const int GL_PASS_THROUGH_TOKEN = 0x0700; - public const int GL_FEEDBACK_BUFFER_POINTER = 0x0DF0; - public const int GL_FEEDBACK_BUFFER_SIZE = 0x0DF1; - public const int GL_FEEDBACK_BUFFER_TYPE = 0x0DF2; - public const int GL_SELECTION_BUFFER_POINTER = 0x0DF3; - public const int GL_SELECTION_BUFFER_SIZE = 0x0DF4; - public const int GL_FOG = 0x0B60; - public const int GL_FOG_MODE = 0x0B65; - public const int GL_FOG_DENSITY = 0x0B62; - public const int GL_FOG_COLOR = 0x0B66; - public const int GL_FOG_INDEX = 0x0B61; - public const int GL_FOG_START = 0x0B63; - public const int GL_FOG_END = 0x0B64; +// public const int GL_LIGHTING = 0x0B50; +// public const int GL_LIGHT0 = 0x4000; +// public const int GL_LIGHT1 = 0x4001; +// public const int GL_LIGHT2 = 0x4002; +// public const int GL_LIGHT3 = 0x4003; +// public const int GL_LIGHT4 = 0x4004; +// public const int GL_LIGHT5 = 0x4005; +// public const int GL_LIGHT6 = 0x4006; +// public const int GL_LIGHT7 = 0x4007; +// public const int GL_SPOT_EXPONENT = 0x1205; +// public const int GL_SPOT_CUTOFF = 0x1206; +// public const int GL_CONSTANT_ATTENUATION = 0x1207; +// public const int GL_LINEAR_ATTENUATION = 0x1208; +// public const int GL_QUADRATIC_ATTENUATION = 0x1209; +// public const int GL_AMBIENT = 0x1200; +// public const int GL_DIFFUSE = 0x1201; +// public const int GL_SPECULAR = 0x1202; +// public const int GL_SHININESS = 0x1601; +// public const int GL_EMISSION = 0x1600; +// public const int GL_POSITION = 0x1203; +// public const int GL_SPOT_DIRECTION = 0x1204; +// public const int GL_AMBIENT_AND_DIFFUSE = 0x1602; +// public const int GL_COLOR_INDEXES = 0x1603; +// public const int GL_LIGHT_MODEL_TWO_SIDE = 0x0B52; +// public const int GL_LIGHT_MODEL_LOCAL_VIEWER = 0x0B51; +// public const int GL_LIGHT_MODEL_AMBIENT = 0x0B53; +// public const int GL_FRONT_AND_BACK = 0x0408; +// public const int GL_SHADE_MODEL = 0x0B54; +// public const int GL_FLAT = 0x1D00; +// public const int GL_SMOOTH = 0x1D01; +// public const int GL_COLOR_MATERIAL = 0x0B57; +// public const int GL_COLOR_MATERIAL_FACE = 0x0B55; +// public const int GL_COLOR_MATERIAL_PARAMETER = 0x0B56; +// public const int GL_NORMALIZE = 0x0BA1; +// public const int GL_CLIP_PLANE0 = 0x3000; +// public const int GL_CLIP_PLANE1 = 0x3001; +// public const int GL_CLIP_PLANE2 = 0x3002; +// public const int GL_CLIP_PLANE3 = 0x3003; +// public const int GL_CLIP_PLANE4 = 0x3004; +// public const int GL_CLIP_PLANE5 = 0x3005; +// public const int GL_ACCUM_RED_BITS = 0x0D58; +// public const int GL_ACCUM_GREEN_BITS = 0x0D59; +// public const int GL_ACCUM_BLUE_BITS = 0x0D5A; +// public const int GL_ACCUM_ALPHA_BITS = 0x0D5B; +// public const int GL_ACCUM_CLEAR_VALUE = 0x0B80; +// public const int GL_ACCUM = 0x0100; +// public const int GL_ADD = 0x0104; +// public const int GL_LOAD = 0x0101; +// public const int GL_MULT = 0x0103; +// public const int GL_RETURN = 0x0102; +// public const int GL_ALPHA_TEST = 0x0BC0; +// public const int GL_ALPHA_TEST_REF = 0x0BC2; +// public const int GL_ALPHA_TEST_FUNC = 0x0BC1; +// public const int GL_BLEND = 0x0BE2; +// public const int GL_BLEND_SRC = 0x0BE1; +// public const int GL_BLEND_DST = 0x0BE0; +// public const int GL_SRC_COLOR = 0x0300; +// public const int GL_ONE_MINUS_SRC_COLOR = 0x0301; +// public const int GL_SRC_ALPHA = 0x0302; +// public const int GL_ONE_MINUS_SRC_ALPHA = 0x0303; +// public const int GL_DST_ALPHA = 0x0304; +// public const int GL_ONE_MINUS_DST_ALPHA = 0x0305; +// public const int GL_DST_COLOR = 0x0306; +// public const int GL_ONE_MINUS_DST_COLOR = 0x0307; +// public const int GL_SRC_ALPHA_SATURATE = 0x0308; +// public const int GL_FEEDBACK = 0x1C01; +// public const int GL_RENDER = 0x1C00; +// public const int GL_SELECT = 0x1C02; +// public const int GL_2D = 0x0600; +// public const int GL_3D = 0x0601; +// public const int GL_3D_COLOR = 0x0602; +// public const int GL_3D_COLOR_TEXTURE = 0x0603; +// public const int GL_4D_COLOR_TEXTURE = 0x0604; +// public const int GL_POINT_TOKEN = 0x0701; +// public const int GL_LINE_TOKEN = 0x0702; +// public const int GL_LINE_RESET_TOKEN = 0x0707; +// public const int GL_POLYGON_TOKEN = 0x0703; +// public const int GL_BITMAP_TOKEN = 0x0704; +// public const int GL_DRAW_PIXEL_TOKEN = 0x0705; +// public const int GL_COPY_PIXEL_TOKEN = 0x0706; +// public const int GL_PASS_THROUGH_TOKEN = 0x0700; +// public const int GL_FEEDBACK_BUFFER_POINTER = 0x0DF0; +// public const int GL_FEEDBACK_BUFFER_SIZE = 0x0DF1; +// public const int GL_FEEDBACK_BUFFER_TYPE = 0x0DF2; +// public const int GL_SELECTION_BUFFER_POINTER = 0x0DF3; +// public const int GL_SELECTION_BUFFER_SIZE = 0x0DF4; +// public const int GL_FOG = 0x0B60; +// public const int GL_FOG_MODE = 0x0B65; +// public const int GL_FOG_DENSITY = 0x0B62; +// public const int GL_FOG_COLOR = 0x0B66; +// public const int GL_FOG_INDEX = 0x0B61; +// public const int GL_FOG_START = 0x0B63; +// public const int GL_FOG_END = 0x0B64; public const int GL_LINEAR = 0x2601; - public const int GL_EXP = 0x0800; - public const int GL_EXP2 = 0x0801; - public const int GL_LOGIC_OP = 0x0BF1; - public const int GL_INDEX_LOGIC_OP = 0x0BF1; - public const int GL_COLOR_LOGIC_OP = 0x0BF2; - public const int GL_LOGIC_OP_MODE = 0x0BF0; - public const int GL_CLEAR = 0x1500; - public const int GL_SET = 0x150F; - public const int GL_COPY = 0x1503; - public const int GL_COPY_INVERTED = 0x150C; - public const int GL_NOOP = 0x1505; - public const int GL_INVERT = 0x150A; - public const int GL_AND = 0x1501; - public const int GL_NAND = 0x150E; - public const int GL_OR = 0x1507; - public const int GL_NOR = 0x1508; - public const int GL_XOR = 0x1506; - public const int GL_EQUIV = 0x1509; - public const int GL_AND_REVERSE = 0x1502; - public const int GL_AND_INVERTED = 0x1504; - public const int GL_OR_REVERSE = 0x150B; - public const int GL_OR_INVERTED = 0x150D; +// public const int GL_EXP = 0x0800; +// public const int GL_EXP2 = 0x0801; +// public const int GL_LOGIC_OP = 0x0BF1; +// public const int GL_INDEX_LOGIC_OP = 0x0BF1; +// public const int GL_COLOR_LOGIC_OP = 0x0BF2; +// public const int GL_LOGIC_OP_MODE = 0x0BF0; +// public const int GL_CLEAR = 0x1500; +// public const int GL_SET = 0x150F; +// public const int GL_COPY = 0x1503; +// public const int GL_COPY_INVERTED = 0x150C; +// public const int GL_NOOP = 0x1505; +// public const int GL_INVERT = 0x150A; +// public const int GL_AND = 0x1501; +// public const int GL_NAND = 0x150E; +// public const int GL_OR = 0x1507; +// public const int GL_NOR = 0x1508; +// public const int GL_XOR = 0x1506; +// public const int GL_EQUIV = 0x1509; +// public const int GL_AND_REVERSE = 0x1502; +// public const int GL_AND_INVERTED = 0x1504; +// public const int GL_OR_REVERSE = 0x150B; +// public const int GL_OR_INVERTED = 0x150D; public const int GL_STENCIL_BITS = 0x0D57; - public const int GL_STENCIL_TEST = 0x0B90; - public const int GL_STENCIL_CLEAR_VALUE = 0x0B91; - public const int GL_STENCIL_FUNC = 0x0B92; - public const int GL_STENCIL_VALUE_MASK = 0x0B93; - public const int GL_STENCIL_FAIL = 0x0B94; - public const int GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95; - public const int GL_STENCIL_PASS_DEPTH_PASS = 0x0B96; - public const int GL_STENCIL_REF = 0x0B97; - public const int GL_STENCIL_WRITEMASK = 0x0B98; - public const int GL_STENCIL_INDEX = 0x1901; - public const int GL_KEEP = 0x1E00; - public const int GL_REPLACE = 0x1E01; - public const int GL_INCR = 0x1E02; - public const int GL_DECR = 0x1E03; - public const int GL_LEFT = 0x0406; - public const int GL_RIGHT = 0x0407; - public const int GL_FRONT_LEFT = 0x0400; - public const int GL_FRONT_RIGHT = 0x0401; - public const int GL_BACK_LEFT = 0x0402; - public const int GL_BACK_RIGHT = 0x0403; - public const int GL_AUX0 = 0x0409; - public const int GL_AUX1 = 0x040A; - public const int GL_AUX2 = 0x040B; - public const int GL_AUX3 = 0x040C; - public const int GL_COLOR_INDEX = 0x1900; - public const int GL_RED = 0x1903; - public const int GL_GREEN = 0x1904; - public const int GL_BLUE = 0x1905; - public const int GL_ALPHA = 0x1906; - public const int GL_LUMINANCE = 0x1909; - public const int GL_LUMINANCE_ALPHA = 0x190A; - public const int GL_ALPHA_BITS = 0x0D55; - public const int GL_RED_BITS = 0x0D52; - public const int GL_GREEN_BITS = 0x0D53; - public const int GL_BLUE_BITS = 0x0D54; - public const int GL_INDEX_BITS = 0x0D51; - public const int GL_SUBPIXEL_BITS = 0x0D50; - public const int GL_AUX_BUFFERS = 0x0C00; - public const int GL_READ_BUFFER = 0x0C02; - public const int GL_DRAW_BUFFER = 0x0C01; - public const int GL_DOUBLEBUFFER = 0x0C32; - public const int GL_STEREO = 0x0C33; - public const int GL_BITMAP = 0x1A00; - public const int GL_COLOR = 0x1800; - public const int GL_DEPTH = 0x1801; - public const int GL_STENCIL = 0x1802; - public const int GL_DITHER = 0x0BD0; - public const int GL_RGB = 0x1907; +// public const int GL_STENCIL_TEST = 0x0B90; +// public const int GL_STENCIL_CLEAR_VALUE = 0x0B91; +// public const int GL_STENCIL_FUNC = 0x0B92; +// public const int GL_STENCIL_VALUE_MASK = 0x0B93; +// public const int GL_STENCIL_FAIL = 0x0B94; +// public const int GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95; +// public const int GL_STENCIL_PASS_DEPTH_PASS = 0x0B96; +// public const int GL_STENCIL_REF = 0x0B97; +// public const int GL_STENCIL_WRITEMASK = 0x0B98; +// public const int GL_STENCIL_INDEX = 0x1901; +// public const int GL_KEEP = 0x1E00; +// public const int GL_REPLACE = 0x1E01; +// public const int GL_INCR = 0x1E02; +// public const int GL_DECR = 0x1E03; +// public const int GL_LEFT = 0x0406; +// public const int GL_RIGHT = 0x0407; +// public const int GL_FRONT_LEFT = 0x0400; +// public const int GL_FRONT_RIGHT = 0x0401; +// public const int GL_BACK_LEFT = 0x0402; +// public const int GL_BACK_RIGHT = 0x0403; +// public const int GL_AUX0 = 0x0409; +// public const int GL_AUX1 = 0x040A; +// public const int GL_AUX2 = 0x040B; +// public const int GL_AUX3 = 0x040C; +// public const int GL_COLOR_INDEX = 0x1900; +// public const int GL_RED = 0x1903; +// public const int GL_GREEN = 0x1904; +// public const int GL_BLUE = 0x1905; +// public const int GL_ALPHA = 0x1906; +// public const int GL_LUMINANCE = 0x1909; +// public const int GL_LUMINANCE_ALPHA = 0x190A; +// public const int GL_ALPHA_BITS = 0x0D55; +// public const int GL_RED_BITS = 0x0D52; +// public const int GL_GREEN_BITS = 0x0D53; +// public const int GL_BLUE_BITS = 0x0D54; +// public const int GL_INDEX_BITS = 0x0D51; +// public const int GL_SUBPIXEL_BITS = 0x0D50; +// public const int GL_AUX_BUFFERS = 0x0C00; +// public const int GL_READ_BUFFER = 0x0C02; +// public const int GL_DRAW_BUFFER = 0x0C01; +// public const int GL_DOUBLEBUFFER = 0x0C32; +// public const int GL_STEREO = 0x0C33; +// public const int GL_BITMAP = 0x1A00; +// public const int GL_COLOR = 0x1800; +// public const int GL_DEPTH = 0x1801; +// public const int GL_STENCIL = 0x1802; +// public const int GL_DITHER = 0x0BD0; +// public const int GL_RGB = 0x1907; public const int GL_RGBA = 0x1908; - public const int GL_MAX_LIST_NESTING = 0x0B31; - public const int GL_MAX_EVAL_ORDER = 0x0D30; - public const int GL_MAX_LIGHTS = 0x0D31; - public const int GL_MAX_CLIP_PLANES = 0x0D32; - public const int GL_MAX_TEXTURE_SIZE = 0x0D33; - public const int GL_MAX_PIXEL_MAP_TABLE = 0x0D34; - public const int GL_MAX_ATTRIB_STACK_DEPTH = 0x0D35; - public const int GL_MAX_MODELVIEW_STACK_DEPTH = 0x0D36; - public const int GL_MAX_NAME_STACK_DEPTH = 0x0D37; - public const int GL_MAX_PROJECTION_STACK_DEPTH = 0x0D38; - public const int GL_MAX_TEXTURE_STACK_DEPTH = 0x0D39; - public const int GL_MAX_VIEWPORT_DIMS = 0x0D3A; - public const int GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = 0x0D3B; - public const int GL_ATTRIB_STACK_DEPTH = 0x0BB0; - public const int GL_CLIENT_ATTRIB_STACK_DEPTH = 0x0BB1; - public const int GL_COLOR_CLEAR_VALUE = 0x0C22; - public const int GL_COLOR_WRITEMASK = 0x0C23; - public const int GL_CURRENT_INDEX = 0x0B01; - public const int GL_CURRENT_COLOR = 0x0B00; - public const int GL_CURRENT_NORMAL = 0x0B02; - public const int GL_CURRENT_RASTER_COLOR = 0x0B04; - public const int GL_CURRENT_RASTER_DISTANCE = 0x0B09; - public const int GL_CURRENT_RASTER_INDEX = 0x0B05; - public const int GL_CURRENT_RASTER_POSITION = 0x0B07; - public const int GL_CURRENT_RASTER_TEXTURE_COORDS = 0x0B06; - public const int GL_CURRENT_RASTER_POSITION_VALID = 0x0B08; - public const int GL_CURRENT_TEXTURE_COORDS = 0x0B03; - public const int GL_INDEX_CLEAR_VALUE = 0x0C20; - public const int GL_INDEX_MODE = 0x0C30; - public const int GL_INDEX_WRITEMASK = 0x0C21; - public const int GL_MODELVIEW_MATRIX = 0x0BA6; - public const int GL_MODELVIEW_STACK_DEPTH = 0x0BA3; - public const int GL_NAME_STACK_DEPTH = 0x0D70; - public const int GL_PROJECTION_MATRIX = 0x0BA7; - public const int GL_PROJECTION_STACK_DEPTH = 0x0BA4; - public const int GL_RENDER_MODE = 0x0C40; - public const int GL_RGBA_MODE = 0x0C31; - public const int GL_TEXTURE_MATRIX = 0x0BA8; - public const int GL_TEXTURE_STACK_DEPTH = 0x0BA5; - public const int GL_VIEWPORT = 0x0BA2; - public const int GL_AUTO_NORMAL = 0x0D80; - public const int GL_MAP1_COLOR_4 = 0x0D90; - public const int GL_MAP1_INDEX = 0x0D91; - public const int GL_MAP1_NORMAL = 0x0D92; - public const int GL_MAP1_TEXTURE_COORD_1 = 0x0D93; - public const int GL_MAP1_TEXTURE_COORD_2 = 0x0D94; - public const int GL_MAP1_TEXTURE_COORD_3 = 0x0D95; - public const int GL_MAP1_TEXTURE_COORD_4 = 0x0D96; - public const int GL_MAP1_VERTEX_3 = 0x0D97; - public const int GL_MAP1_VERTEX_4 = 0x0D98; - public const int GL_MAP2_COLOR_4 = 0x0DB0; - public const int GL_MAP2_INDEX = 0x0DB1; - public const int GL_MAP2_NORMAL = 0x0DB2; - public const int GL_MAP2_TEXTURE_COORD_1 = 0x0DB3; - public const int GL_MAP2_TEXTURE_COORD_2 = 0x0DB4; - public const int GL_MAP2_TEXTURE_COORD_3 = 0x0DB5; - public const int GL_MAP2_TEXTURE_COORD_4 = 0x0DB6; - public const int GL_MAP2_VERTEX_3 = 0x0DB7; - public const int GL_MAP2_VERTEX_4 = 0x0DB8; - public const int GL_MAP1_GRID_DOMAIN = 0x0DD0; - public const int GL_MAP1_GRID_SEGMENTS = 0x0DD1; - public const int GL_MAP2_GRID_DOMAIN = 0x0DD2; - public const int GL_MAP2_GRID_SEGMENTS = 0x0DD3; - public const int GL_COEFF = 0x0A00; - public const int GL_ORDER = 0x0A01; - public const int GL_DOMAIN = 0x0A02; - public const int GL_PERSPECTIVE_CORRECTION_HINT = 0x0C50; - public const int GL_POINT_SMOOTH_HINT = 0x0C51; - public const int GL_LINE_SMOOTH_HINT = 0x0C52; - public const int GL_POLYGON_SMOOTH_HINT = 0x0C53; - public const int GL_FOG_HINT = 0x0C54; - public const int GL_DONT_CARE = 0x1100; - public const int GL_FASTEST = 0x1101; - public const int GL_NICEST = 0x1102; - public const int GL_SCISSOR_BOX = 0x0C10; - public const int GL_SCISSOR_TEST = 0x0C11; - public const int GL_MAP_COLOR = 0x0D10; - public const int GL_MAP_STENCIL = 0x0D11; - public const int GL_INDEX_SHIFT = 0x0D12; - public const int GL_INDEX_OFFSET = 0x0D13; - public const int GL_RED_SCALE = 0x0D14; - public const int GL_RED_BIAS = 0x0D15; - public const int GL_GREEN_SCALE = 0x0D18; - public const int GL_GREEN_BIAS = 0x0D19; - public const int GL_BLUE_SCALE = 0x0D1A; - public const int GL_BLUE_BIAS = 0x0D1B; - public const int GL_ALPHA_SCALE = 0x0D1C; - public const int GL_ALPHA_BIAS = 0x0D1D; - public const int GL_DEPTH_SCALE = 0x0D1E; - public const int GL_DEPTH_BIAS = 0x0D1F; - public const int GL_PIXEL_MAP_S_TO_S_SIZE = 0x0CB1; - public const int GL_PIXEL_MAP_I_TO_I_SIZE = 0x0CB0; - public const int GL_PIXEL_MAP_I_TO_R_SIZE = 0x0CB2; - public const int GL_PIXEL_MAP_I_TO_G_SIZE = 0x0CB3; - public const int GL_PIXEL_MAP_I_TO_B_SIZE = 0x0CB4; - public const int GL_PIXEL_MAP_I_TO_A_SIZE = 0x0CB5; - public const int GL_PIXEL_MAP_R_TO_R_SIZE = 0x0CB6; - public const int GL_PIXEL_MAP_G_TO_G_SIZE = 0x0CB7; - public const int GL_PIXEL_MAP_B_TO_B_SIZE = 0x0CB8; - public const int GL_PIXEL_MAP_A_TO_A_SIZE = 0x0CB9; - public const int GL_PIXEL_MAP_S_TO_S = 0x0C71; - public const int GL_PIXEL_MAP_I_TO_I = 0x0C70; - public const int GL_PIXEL_MAP_I_TO_R = 0x0C72; - public const int GL_PIXEL_MAP_I_TO_G = 0x0C73; - public const int GL_PIXEL_MAP_I_TO_B = 0x0C74; - public const int GL_PIXEL_MAP_I_TO_A = 0x0C75; - public const int GL_PIXEL_MAP_R_TO_R = 0x0C76; - public const int GL_PIXEL_MAP_G_TO_G = 0x0C77; - public const int GL_PIXEL_MAP_B_TO_B = 0x0C78; - public const int GL_PIXEL_MAP_A_TO_A = 0x0C79; - public const int GL_PACK_ALIGNMENT = 0x0D05; - public const int GL_PACK_LSB_FIRST = 0x0D01; - public const int GL_PACK_ROW_LENGTH = 0x0D02; - public const int GL_PACK_SKIP_PIXELS = 0x0D04; - public const int GL_PACK_SKIP_ROWS = 0x0D03; - public const int GL_PACK_SWAP_BYTES = 0x0D00; - public const int GL_UNPACK_ALIGNMENT = 0x0CF5; - public const int GL_UNPACK_LSB_FIRST = 0x0CF1; - public const int GL_UNPACK_ROW_LENGTH = 0x0CF2; - public const int GL_UNPACK_SKIP_PIXELS = 0x0CF4; - public const int GL_UNPACK_SKIP_ROWS = 0x0CF3; - public const int GL_UNPACK_SWAP_BYTES = 0x0CF0; - public const int GL_ZOOM_X = 0x0D16; - public const int GL_ZOOM_Y = 0x0D17; - public const int GL_TEXTURE_ENV = 0x2300; - public const int GL_TEXTURE_ENV_MODE = 0x2200; - public const int GL_TEXTURE_1D = 0x0DE0; +// public const int GL_MAX_LIST_NESTING = 0x0B31; +// public const int GL_MAX_EVAL_ORDER = 0x0D30; +// public const int GL_MAX_LIGHTS = 0x0D31; +// public const int GL_MAX_CLIP_PLANES = 0x0D32; +// public const int GL_MAX_TEXTURE_SIZE = 0x0D33; +// public const int GL_MAX_PIXEL_MAP_TABLE = 0x0D34; +// public const int GL_MAX_ATTRIB_STACK_DEPTH = 0x0D35; +// public const int GL_MAX_MODELVIEW_STACK_DEPTH = 0x0D36; +// public const int GL_MAX_NAME_STACK_DEPTH = 0x0D37; +// public const int GL_MAX_PROJECTION_STACK_DEPTH = 0x0D38; +// public const int GL_MAX_TEXTURE_STACK_DEPTH = 0x0D39; +// public const int GL_MAX_VIEWPORT_DIMS = 0x0D3A; +// public const int GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = 0x0D3B; +// public const int GL_ATTRIB_STACK_DEPTH = 0x0BB0; +// public const int GL_CLIENT_ATTRIB_STACK_DEPTH = 0x0BB1; +// public const int GL_COLOR_CLEAR_VALUE = 0x0C22; +// public const int GL_COLOR_WRITEMASK = 0x0C23; +// public const int GL_CURRENT_INDEX = 0x0B01; +// public const int GL_CURRENT_COLOR = 0x0B00; +// public const int GL_CURRENT_NORMAL = 0x0B02; +// public const int GL_CURRENT_RASTER_COLOR = 0x0B04; +// public const int GL_CURRENT_RASTER_DISTANCE = 0x0B09; +// public const int GL_CURRENT_RASTER_INDEX = 0x0B05; +// public const int GL_CURRENT_RASTER_POSITION = 0x0B07; +// public const int GL_CURRENT_RASTER_TEXTURE_COORDS = 0x0B06; +// public const int GL_CURRENT_RASTER_POSITION_VALID = 0x0B08; +// public const int GL_CURRENT_TEXTURE_COORDS = 0x0B03; +// public const int GL_INDEX_CLEAR_VALUE = 0x0C20; +// public const int GL_INDEX_MODE = 0x0C30; +// public const int GL_INDEX_WRITEMASK = 0x0C21; +// public const int GL_MODELVIEW_MATRIX = 0x0BA6; +// public const int GL_MODELVIEW_STACK_DEPTH = 0x0BA3; +// public const int GL_NAME_STACK_DEPTH = 0x0D70; +// public const int GL_PROJECTION_MATRIX = 0x0BA7; +// public const int GL_PROJECTION_STACK_DEPTH = 0x0BA4; +// public const int GL_RENDER_MODE = 0x0C40; +// public const int GL_RGBA_MODE = 0x0C31; +// public const int GL_TEXTURE_MATRIX = 0x0BA8; +// public const int GL_TEXTURE_STACK_DEPTH = 0x0BA5; +// public const int GL_VIEWPORT = 0x0BA2; +// public const int GL_AUTO_NORMAL = 0x0D80; +// public const int GL_MAP1_COLOR_4 = 0x0D90; +// public const int GL_MAP1_INDEX = 0x0D91; +// public const int GL_MAP1_NORMAL = 0x0D92; +// public const int GL_MAP1_TEXTURE_COORD_1 = 0x0D93; +// public const int GL_MAP1_TEXTURE_COORD_2 = 0x0D94; +// public const int GL_MAP1_TEXTURE_COORD_3 = 0x0D95; +// public const int GL_MAP1_TEXTURE_COORD_4 = 0x0D96; +// public const int GL_MAP1_VERTEX_3 = 0x0D97; +// public const int GL_MAP1_VERTEX_4 = 0x0D98; +// public const int GL_MAP2_COLOR_4 = 0x0DB0; +// public const int GL_MAP2_INDEX = 0x0DB1; +// public const int GL_MAP2_NORMAL = 0x0DB2; +// public const int GL_MAP2_TEXTURE_COORD_1 = 0x0DB3; +// public const int GL_MAP2_TEXTURE_COORD_2 = 0x0DB4; +// public const int GL_MAP2_TEXTURE_COORD_3 = 0x0DB5; +// public const int GL_MAP2_TEXTURE_COORD_4 = 0x0DB6; +// public const int GL_MAP2_VERTEX_3 = 0x0DB7; +// public const int GL_MAP2_VERTEX_4 = 0x0DB8; +// public const int GL_MAP1_GRID_DOMAIN = 0x0DD0; +// public const int GL_MAP1_GRID_SEGMENTS = 0x0DD1; +// public const int GL_MAP2_GRID_DOMAIN = 0x0DD2; +// public const int GL_MAP2_GRID_SEGMENTS = 0x0DD3; +// public const int GL_COEFF = 0x0A00; +// public const int GL_ORDER = 0x0A01; +// public const int GL_DOMAIN = 0x0A02; +// public const int GL_PERSPECTIVE_CORRECTION_HINT = 0x0C50; +// public const int GL_POINT_SMOOTH_HINT = 0x0C51; +// public const int GL_LINE_SMOOTH_HINT = 0x0C52; +// public const int GL_POLYGON_SMOOTH_HINT = 0x0C53; +// public const int GL_FOG_HINT = 0x0C54; +// public const int GL_DONT_CARE = 0x1100; +// public const int GL_FASTEST = 0x1101; +// public const int GL_NICEST = 0x1102; +// public const int GL_SCISSOR_BOX = 0x0C10; +// public const int GL_SCISSOR_TEST = 0x0C11; +// public const int GL_MAP_COLOR = 0x0D10; +// public const int GL_MAP_STENCIL = 0x0D11; +// public const int GL_INDEX_SHIFT = 0x0D12; +// public const int GL_INDEX_OFFSET = 0x0D13; +// public const int GL_RED_SCALE = 0x0D14; +// public const int GL_RED_BIAS = 0x0D15; +// public const int GL_GREEN_SCALE = 0x0D18; +// public const int GL_GREEN_BIAS = 0x0D19; +// public const int GL_BLUE_SCALE = 0x0D1A; +// public const int GL_BLUE_BIAS = 0x0D1B; +// public const int GL_ALPHA_SCALE = 0x0D1C; +// public const int GL_ALPHA_BIAS = 0x0D1D; +// public const int GL_DEPTH_SCALE = 0x0D1E; +// public const int GL_DEPTH_BIAS = 0x0D1F; +// public const int GL_PIXEL_MAP_S_TO_S_SIZE = 0x0CB1; +// public const int GL_PIXEL_MAP_I_TO_I_SIZE = 0x0CB0; +// public const int GL_PIXEL_MAP_I_TO_R_SIZE = 0x0CB2; +// public const int GL_PIXEL_MAP_I_TO_G_SIZE = 0x0CB3; +// public const int GL_PIXEL_MAP_I_TO_B_SIZE = 0x0CB4; +// public const int GL_PIXEL_MAP_I_TO_A_SIZE = 0x0CB5; +// public const int GL_PIXEL_MAP_R_TO_R_SIZE = 0x0CB6; +// public const int GL_PIXEL_MAP_G_TO_G_SIZE = 0x0CB7; +// public const int GL_PIXEL_MAP_B_TO_B_SIZE = 0x0CB8; +// public const int GL_PIXEL_MAP_A_TO_A_SIZE = 0x0CB9; +// public const int GL_PIXEL_MAP_S_TO_S = 0x0C71; +// public const int GL_PIXEL_MAP_I_TO_I = 0x0C70; +// public const int GL_PIXEL_MAP_I_TO_R = 0x0C72; +// public const int GL_PIXEL_MAP_I_TO_G = 0x0C73; +// public const int GL_PIXEL_MAP_I_TO_B = 0x0C74; +// public const int GL_PIXEL_MAP_I_TO_A = 0x0C75; +// public const int GL_PIXEL_MAP_R_TO_R = 0x0C76; +// public const int GL_PIXEL_MAP_G_TO_G = 0x0C77; +// public const int GL_PIXEL_MAP_B_TO_B = 0x0C78; +// public const int GL_PIXEL_MAP_A_TO_A = 0x0C79; +// public const int GL_PACK_ALIGNMENT = 0x0D05; +// public const int GL_PACK_LSB_FIRST = 0x0D01; +// public const int GL_PACK_ROW_LENGTH = 0x0D02; +// public const int GL_PACK_SKIP_PIXELS = 0x0D04; +// public const int GL_PACK_SKIP_ROWS = 0x0D03; +// public const int GL_PACK_SWAP_BYTES = 0x0D00; +// public const int GL_UNPACK_ALIGNMENT = 0x0CF5; +// public const int GL_UNPACK_LSB_FIRST = 0x0CF1; +// public const int GL_UNPACK_ROW_LENGTH = 0x0CF2; +// public const int GL_UNPACK_SKIP_PIXELS = 0x0CF4; +// public const int GL_UNPACK_SKIP_ROWS = 0x0CF3; +// public const int GL_UNPACK_SWAP_BYTES = 0x0CF0; +// public const int GL_ZOOM_X = 0x0D16; +// public const int GL_ZOOM_Y = 0x0D17; +// public const int GL_TEXTURE_ENV = 0x2300; +// public const int GL_TEXTURE_ENV_MODE = 0x2200; +// public const int GL_TEXTURE_1D = 0x0DE0; public const int GL_TEXTURE_2D = 0x0DE1; - public const int GL_TEXTURE_WRAP_S = 0x2802; - public const int GL_TEXTURE_WRAP_T = 0x2803; +// public const int GL_TEXTURE_WRAP_S = 0x2802; +// public const int GL_TEXTURE_WRAP_T = 0x2803; public const int GL_TEXTURE_MAG_FILTER = 0x2800; public const int GL_TEXTURE_MIN_FILTER = 0x2801; - public const int GL_TEXTURE_ENV_COLOR = 0x2201; - public const int GL_TEXTURE_GEN_S = 0x0C60; - public const int GL_TEXTURE_GEN_T = 0x0C61; - public const int GL_TEXTURE_GEN_R = 0x0C62; - public const int GL_TEXTURE_GEN_Q = 0x0C63; - public const int GL_TEXTURE_GEN_MODE = 0x2500; - public const int GL_TEXTURE_BORDER_COLOR = 0x1004; - public const int GL_TEXTURE_WIDTH = 0x1000; - public const int GL_TEXTURE_HEIGHT = 0x1001; - public const int GL_TEXTURE_BORDER = 0x1005; - public const int GL_TEXTURE_COMPONENTS = 0x1003; - public const int GL_TEXTURE_RED_SIZE = 0x805C; - public const int GL_TEXTURE_GREEN_SIZE = 0x805D; - public const int GL_TEXTURE_BLUE_SIZE = 0x805E; - public const int GL_TEXTURE_ALPHA_SIZE = 0x805F; - public const int GL_TEXTURE_LUMINANCE_SIZE = 0x8060; - public const int GL_TEXTURE_INTENSITY_SIZE = 0x8061; - public const int GL_NEAREST_MIPMAP_NEAREST = 0x2700; - public const int GL_NEAREST_MIPMAP_LINEAR = 0x2702; - public const int GL_LINEAR_MIPMAP_NEAREST = 0x2701; - public const int GL_LINEAR_MIPMAP_LINEAR = 0x2703; - public const int GL_OBJECT_LINEAR = 0x2401; - public const int GL_OBJECT_PLANE = 0x2501; - public const int GL_EYE_LINEAR = 0x2400; - public const int GL_EYE_PLANE = 0x2502; - public const int GL_SPHERE_MAP = 0x2402; - public const int GL_DECAL = 0x2101; - public const int GL_MODULATE = 0x2100; +// public const int GL_TEXTURE_ENV_COLOR = 0x2201; +// public const int GL_TEXTURE_GEN_S = 0x0C60; +// public const int GL_TEXTURE_GEN_T = 0x0C61; +// public const int GL_TEXTURE_GEN_R = 0x0C62; +// public const int GL_TEXTURE_GEN_Q = 0x0C63; +// public const int GL_TEXTURE_GEN_MODE = 0x2500; +// public const int GL_TEXTURE_BORDER_COLOR = 0x1004; +// public const int GL_TEXTURE_WIDTH = 0x1000; +// public const int GL_TEXTURE_HEIGHT = 0x1001; +// public const int GL_TEXTURE_BORDER = 0x1005; +// public const int GL_TEXTURE_COMPONENTS = 0x1003; +// public const int GL_TEXTURE_RED_SIZE = 0x805C; +// public const int GL_TEXTURE_GREEN_SIZE = 0x805D; +// public const int GL_TEXTURE_BLUE_SIZE = 0x805E; +// public const int GL_TEXTURE_ALPHA_SIZE = 0x805F; +// public const int GL_TEXTURE_LUMINANCE_SIZE = 0x8060; +// public const int GL_TEXTURE_INTENSITY_SIZE = 0x8061; +// public const int GL_NEAREST_MIPMAP_NEAREST = 0x2700; +// public const int GL_NEAREST_MIPMAP_LINEAR = 0x2702; +// public const int GL_LINEAR_MIPMAP_NEAREST = 0x2701; +// public const int GL_LINEAR_MIPMAP_LINEAR = 0x2703; +// public const int GL_OBJECT_LINEAR = 0x2401; +// public const int GL_OBJECT_PLANE = 0x2501; +// public const int GL_EYE_LINEAR = 0x2400; +// public const int GL_EYE_PLANE = 0x2502; +// public const int GL_SPHERE_MAP = 0x2402; +// public const int GL_DECAL = 0x2101; +// public const int GL_MODULATE = 0x2100; public const int GL_NEAREST = 0x2600; - public const int GL_REPEAT = 0x2901; - public const int GL_CLAMP = 0x2900; - public const int GL_S = 0x2000; - public const int GL_T = 0x2001; - public const int GL_R = 0x2002; - public const int GL_Q = 0x2003; +// public const int GL_REPEAT = 0x2901; +// public const int GL_CLAMP = 0x2900; +// public const int GL_S = 0x2000; +// public const int GL_T = 0x2001; +// public const int GL_R = 0x2002; +// public const int GL_Q = 0x2003; public const int GL_VENDOR = 0x1F00; public const int GL_RENDERER = 0x1F01; public const int GL_VERSION = 0x1F02; @@ -465,5000 +464,5000 @@ namespace Avalonia.OpenGL public const int GL_OUT_OF_MEMORY = 0x0505; public const int GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506; public const int GL_CONTEXT_LOST = 0x0507; - public const int GL_CURRENT_BIT = 0x00000001; - public const int GL_POINT_BIT = 0x00000002; - public const int GL_LINE_BIT = 0x00000004; - public const int GL_POLYGON_BIT = 0x00000008; - public const int GL_POLYGON_STIPPLE_BIT = 0x00000010; - public const int GL_PIXEL_MODE_BIT = 0x00000020; - public const int GL_LIGHTING_BIT = 0x00000040; - public const int GL_FOG_BIT = 0x00000080; +// public const int GL_CURRENT_BIT = 0x00000001; +// public const int GL_POINT_BIT = 0x00000002; +// public const int GL_LINE_BIT = 0x00000004; +// public const int GL_POLYGON_BIT = 0x00000008; +// public const int GL_POLYGON_STIPPLE_BIT = 0x00000010; +// public const int GL_PIXEL_MODE_BIT = 0x00000020; +// public const int GL_LIGHTING_BIT = 0x00000040; +// public const int GL_FOG_BIT = 0x00000080; public const int GL_DEPTH_BUFFER_BIT = 0x00000100; - public const int GL_ACCUM_BUFFER_BIT = 0x00000200; +// public const int GL_ACCUM_BUFFER_BIT = 0x00000200; public const int GL_STENCIL_BUFFER_BIT = 0x00000400; - public const int GL_VIEWPORT_BIT = 0x00000800; - public const int GL_TRANSFORM_BIT = 0x00001000; - public const int GL_ENABLE_BIT = 0x00002000; +// public const int GL_VIEWPORT_BIT = 0x00000800; +// public const int GL_TRANSFORM_BIT = 0x00001000; +// public const int GL_ENABLE_BIT = 0x00002000; public const int GL_COLOR_BUFFER_BIT = 0x00004000; - public const int GL_HINT_BIT = 0x00008000; - public const int GL_EVAL_BIT = 0x00010000; - public const int GL_LIST_BIT = 0x00020000; - public const int GL_TEXTURE_BIT = 0x00040000; - public const int GL_SCISSOR_BIT = 0x00080000; - public const int GL_ALL_ATTRIB_BITS = -1; - public const int GL_PROXY_TEXTURE_1D = 0x8063; - public const int GL_PROXY_TEXTURE_2D = 0x8064; - public const int GL_TEXTURE_PRIORITY = 0x8066; - public const int GL_TEXTURE_RESIDENT = 0x8067; - public const int GL_TEXTURE_BINDING_1D = 0x8068; +// public const int GL_HINT_BIT = 0x00008000; +// public const int GL_EVAL_BIT = 0x00010000; +// public const int GL_LIST_BIT = 0x00020000; +// public const int GL_TEXTURE_BIT = 0x00040000; +// public const int GL_SCISSOR_BIT = 0x00080000; +// public const int GL_ALL_ATTRIB_BITS = -1; +// public const int GL_PROXY_TEXTURE_1D = 0x8063; +// public const int GL_PROXY_TEXTURE_2D = 0x8064; +// public const int GL_TEXTURE_PRIORITY = 0x8066; +// public const int GL_TEXTURE_RESIDENT = 0x8067; +// public const int GL_TEXTURE_BINDING_1D = 0x8068; public const int GL_TEXTURE_BINDING_2D = 0x8069; - public const int GL_TEXTURE_INTERNAL_FORMAT = 0x1003; - public const int GL_ALPHA4 = 0x803B; - public const int GL_ALPHA8 = 0x803C; - public const int GL_ALPHA12 = 0x803D; - public const int GL_ALPHA16 = 0x803E; - public const int GL_LUMINANCE4 = 0x803F; - public const int GL_LUMINANCE8 = 0x8040; - public const int GL_LUMINANCE12 = 0x8041; - public const int GL_LUMINANCE16 = 0x8042; - public const int GL_LUMINANCE4_ALPHA4 = 0x8043; - public const int GL_LUMINANCE6_ALPHA2 = 0x8044; - public const int GL_LUMINANCE8_ALPHA8 = 0x8045; - public const int GL_LUMINANCE12_ALPHA4 = 0x8046; - public const int GL_LUMINANCE12_ALPHA12 = 0x8047; - public const int GL_LUMINANCE16_ALPHA16 = 0x8048; - public const int GL_INTENSITY = 0x8049; - public const int GL_INTENSITY4 = 0x804A; - public const int GL_INTENSITY8 = 0x804B; - public const int GL_INTENSITY12 = 0x804C; - public const int GL_INTENSITY16 = 0x804D; - public const int GL_R3_G3_B2 = 0x2A10; - public const int GL_RGB4 = 0x804F; - public const int GL_RGB5 = 0x8050; - public const int GL_RGB8 = 0x8051; - public const int GL_RGB10 = 0x8052; - public const int GL_RGB12 = 0x8053; - public const int GL_RGB16 = 0x8054; - public const int GL_RGBA2 = 0x8055; - public const int GL_RGBA4 = 0x8056; - public const int GL_RGB5_A1 = 0x8057; +// public const int GL_TEXTURE_INTERNAL_FORMAT = 0x1003; +// public const int GL_ALPHA4 = 0x803B; +// public const int GL_ALPHA8 = 0x803C; +// public const int GL_ALPHA12 = 0x803D; +// public const int GL_ALPHA16 = 0x803E; +// public const int GL_LUMINANCE4 = 0x803F; +// public const int GL_LUMINANCE8 = 0x8040; +// public const int GL_LUMINANCE12 = 0x8041; +// public const int GL_LUMINANCE16 = 0x8042; +// public const int GL_LUMINANCE4_ALPHA4 = 0x8043; +// public const int GL_LUMINANCE6_ALPHA2 = 0x8044; +// public const int GL_LUMINANCE8_ALPHA8 = 0x8045; +// public const int GL_LUMINANCE12_ALPHA4 = 0x8046; +// public const int GL_LUMINANCE12_ALPHA12 = 0x8047; +// public const int GL_LUMINANCE16_ALPHA16 = 0x8048; +// public const int GL_INTENSITY = 0x8049; +// public const int GL_INTENSITY4 = 0x804A; +// public const int GL_INTENSITY8 = 0x804B; +// public const int GL_INTENSITY12 = 0x804C; +// public const int GL_INTENSITY16 = 0x804D; +// public const int GL_R3_G3_B2 = 0x2A10; +// public const int GL_RGB4 = 0x804F; +// public const int GL_RGB5 = 0x8050; +// public const int GL_RGB8 = 0x8051; +// public const int GL_RGB10 = 0x8052; +// public const int GL_RGB12 = 0x8053; +// public const int GL_RGB16 = 0x8054; +// public const int GL_RGBA2 = 0x8055; +// public const int GL_RGBA4 = 0x8056; +// public const int GL_RGB5_A1 = 0x8057; public const int GL_RGBA8 = 0x8058; - public const int GL_RGB10_A2 = 0x8059; - public const int GL_RGBA12 = 0x805A; - public const int GL_RGBA16 = 0x805B; - public const int GL_CLIENT_PIXEL_STORE_BIT = 0x00000001; - public const int GL_CLIENT_VERTEX_ARRAY_BIT = 0x00000002; - public const int GL_ALL_CLIENT_ATTRIB_BITS = -1; - public const int GL_CLIENT_ALL_ATTRIB_BITS = -1; - public const int GL_RESCALE_NORMAL = 0x803A; - public const int GL_CLAMP_TO_EDGE = 0x812F; - public const int GL_MAX_ELEMENTS_VERTICES = 0x80E8; - public const int GL_MAX_ELEMENTS_INDICES = 0x80E9; - public const int GL_BGR = 0x80E0; - public const int GL_BGRA = 0x80E1; - public const int GL_UNSIGNED_BYTE_3_3_2 = 0x8032; - public const int GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362; - public const int GL_UNSIGNED_SHORT_5_6_5 = 0x8363; - public const int GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364; - public const int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033; - public const int GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365; - public const int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034; - public const int GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366; - public const int GL_UNSIGNED_INT_8_8_8_8 = 0x8035; - public const int GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367; - public const int GL_UNSIGNED_INT_10_10_10_2 = 0x8036; - public const int GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368; - public const int GL_LIGHT_MODEL_COLOR_CONTROL = 0x81F8; - public const int GL_SINGLE_COLOR = 0x81F9; - public const int GL_SEPARATE_SPECULAR_COLOR = 0x81FA; - public const int GL_TEXTURE_MIN_LOD = 0x813A; - public const int GL_TEXTURE_MAX_LOD = 0x813B; - public const int GL_TEXTURE_BASE_LEVEL = 0x813C; - public const int GL_TEXTURE_MAX_LEVEL = 0x813D; - public const int GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12; - public const int GL_SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13; - public const int GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22; - public const int GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23; - public const int GL_ALIASED_POINT_SIZE_RANGE = 0x846D; - public const int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E; - public const int GL_PACK_SKIP_IMAGES = 0x806B; - public const int GL_PACK_IMAGE_HEIGHT = 0x806C; - public const int GL_UNPACK_SKIP_IMAGES = 0x806D; - public const int GL_UNPACK_IMAGE_HEIGHT = 0x806E; - public const int GL_TEXTURE_3D = 0x806F; - public const int GL_PROXY_TEXTURE_3D = 0x8070; - public const int GL_TEXTURE_DEPTH = 0x8071; - public const int GL_TEXTURE_WRAP_R = 0x8072; - public const int GL_MAX_3D_TEXTURE_SIZE = 0x8073; - public const int GL_TEXTURE_BINDING_3D = 0x806A; - public const int GL_CONSTANT_COLOR = 0x8001; - public const int GL_ONE_MINUS_CONSTANT_COLOR = 0x8002; - public const int GL_CONSTANT_ALPHA = 0x8003; - public const int GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004; - public const int GL_COLOR_TABLE = 0x80D0; - public const int GL_POST_CONVOLUTION_COLOR_TABLE = 0x80D1; - public const int GL_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D2; - public const int GL_PROXY_COLOR_TABLE = 0x80D3; - public const int GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = 0x80D4; - public const int GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D5; - public const int GL_COLOR_TABLE_SCALE = 0x80D6; - public const int GL_COLOR_TABLE_BIAS = 0x80D7; - public const int GL_COLOR_TABLE_FORMAT = 0x80D8; - public const int GL_COLOR_TABLE_WIDTH = 0x80D9; - public const int GL_COLOR_TABLE_RED_SIZE = 0x80DA; - public const int GL_COLOR_TABLE_GREEN_SIZE = 0x80DB; - public const int GL_COLOR_TABLE_BLUE_SIZE = 0x80DC; - public const int GL_COLOR_TABLE_ALPHA_SIZE = 0x80DD; - public const int GL_COLOR_TABLE_LUMINANCE_SIZE = 0x80DE; - public const int GL_COLOR_TABLE_INTENSITY_SIZE = 0x80DF; - public const int GL_CONVOLUTION_1D = 0x8010; - public const int GL_CONVOLUTION_2D = 0x8011; - public const int GL_SEPARABLE_2D = 0x8012; - public const int GL_CONVOLUTION_BORDER_MODE = 0x8013; - public const int GL_CONVOLUTION_FILTER_SCALE = 0x8014; - public const int GL_CONVOLUTION_FILTER_BIAS = 0x8015; - public const int GL_REDUCE = 0x8016; - public const int GL_CONVOLUTION_FORMAT = 0x8017; - public const int GL_CONVOLUTION_WIDTH = 0x8018; - public const int GL_CONVOLUTION_HEIGHT = 0x8019; - public const int GL_MAX_CONVOLUTION_WIDTH = 0x801A; - public const int GL_MAX_CONVOLUTION_HEIGHT = 0x801B; - public const int GL_POST_CONVOLUTION_RED_SCALE = 0x801C; - public const int GL_POST_CONVOLUTION_GREEN_SCALE = 0x801D; - public const int GL_POST_CONVOLUTION_BLUE_SCALE = 0x801E; - public const int GL_POST_CONVOLUTION_ALPHA_SCALE = 0x801F; - public const int GL_POST_CONVOLUTION_RED_BIAS = 0x8020; - public const int GL_POST_CONVOLUTION_GREEN_BIAS = 0x8021; - public const int GL_POST_CONVOLUTION_BLUE_BIAS = 0x8022; - public const int GL_POST_CONVOLUTION_ALPHA_BIAS = 0x8023; - public const int GL_CONSTANT_BORDER = 0x8151; - public const int GL_REPLICATE_BORDER = 0x8153; - public const int GL_CONVOLUTION_BORDER_COLOR = 0x8154; - public const int GL_COLOR_MATRIX = 0x80B1; - public const int GL_COLOR_MATRIX_STACK_DEPTH = 0x80B2; - public const int GL_MAX_COLOR_MATRIX_STACK_DEPTH = 0x80B3; - public const int GL_POST_COLOR_MATRIX_RED_SCALE = 0x80B4; - public const int GL_POST_COLOR_MATRIX_GREEN_SCALE = 0x80B5; - public const int GL_POST_COLOR_MATRIX_BLUE_SCALE = 0x80B6; - public const int GL_POST_COLOR_MATRIX_ALPHA_SCALE = 0x80B7; - public const int GL_POST_COLOR_MATRIX_RED_BIAS = 0x80B8; - public const int GL_POST_COLOR_MATRIX_GREEN_BIAS = 0x80B9; - public const int GL_POST_COLOR_MATRIX_BLUE_BIAS = 0x80BA; - public const int GL_POST_COLOR_MATRIX_ALPHA_BIAS = 0x80BB; - public const int GL_HISTOGRAM = 0x8024; - public const int GL_PROXY_HISTOGRAM = 0x8025; - public const int GL_HISTOGRAM_WIDTH = 0x8026; - public const int GL_HISTOGRAM_FORMAT = 0x8027; - public const int GL_HISTOGRAM_RED_SIZE = 0x8028; - public const int GL_HISTOGRAM_GREEN_SIZE = 0x8029; - public const int GL_HISTOGRAM_BLUE_SIZE = 0x802A; - public const int GL_HISTOGRAM_ALPHA_SIZE = 0x802B; - public const int GL_HISTOGRAM_LUMINANCE_SIZE = 0x802C; - public const int GL_HISTOGRAM_SINK = 0x802D; - public const int GL_MINMAX = 0x802E; - public const int GL_MINMAX_FORMAT = 0x802F; - public const int GL_MINMAX_SINK = 0x8030; - public const int GL_TABLE_TOO_LARGE = 0x8031; - public const int GL_BLEND_EQUATION = 0x8009; - public const int GL_MIN = 0x8007; - public const int GL_MAX = 0x8008; - public const int GL_FUNC_ADD = 0x8006; - public const int GL_FUNC_SUBTRACT = 0x800A; - public const int GL_FUNC_REVERSE_SUBTRACT = 0x800B; - public const int GL_BLEND_COLOR = 0x8005; +// public const int GL_RGB10_A2 = 0x8059; +// public const int GL_RGBA12 = 0x805A; +// public const int GL_RGBA16 = 0x805B; +// public const int GL_CLIENT_PIXEL_STORE_BIT = 0x00000001; +// public const int GL_CLIENT_VERTEX_ARRAY_BIT = 0x00000002; +// public const int GL_ALL_CLIENT_ATTRIB_BITS = -1; +// public const int GL_CLIENT_ALL_ATTRIB_BITS = -1; +// public const int GL_RESCALE_NORMAL = 0x803A; +// public const int GL_CLAMP_TO_EDGE = 0x812F; +// public const int GL_MAX_ELEMENTS_VERTICES = 0x80E8; +// public const int GL_MAX_ELEMENTS_INDICES = 0x80E9; +// public const int GL_BGR = 0x80E0; +// public const int GL_BGRA = 0x80E1; +// public const int GL_UNSIGNED_BYTE_3_3_2 = 0x8032; +// public const int GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362; +// public const int GL_UNSIGNED_SHORT_5_6_5 = 0x8363; +// public const int GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364; +// public const int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033; +// public const int GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365; +// public const int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034; +// public const int GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366; +// public const int GL_UNSIGNED_INT_8_8_8_8 = 0x8035; +// public const int GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367; +// public const int GL_UNSIGNED_INT_10_10_10_2 = 0x8036; +// public const int GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368; +// public const int GL_LIGHT_MODEL_COLOR_CONTROL = 0x81F8; +// public const int GL_SINGLE_COLOR = 0x81F9; +// public const int GL_SEPARATE_SPECULAR_COLOR = 0x81FA; +// public const int GL_TEXTURE_MIN_LOD = 0x813A; +// public const int GL_TEXTURE_MAX_LOD = 0x813B; +// public const int GL_TEXTURE_BASE_LEVEL = 0x813C; +// public const int GL_TEXTURE_MAX_LEVEL = 0x813D; +// public const int GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12; +// public const int GL_SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13; +// public const int GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22; +// public const int GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23; +// public const int GL_ALIASED_POINT_SIZE_RANGE = 0x846D; +// public const int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E; +// public const int GL_PACK_SKIP_IMAGES = 0x806B; +// public const int GL_PACK_IMAGE_HEIGHT = 0x806C; +// public const int GL_UNPACK_SKIP_IMAGES = 0x806D; +// public const int GL_UNPACK_IMAGE_HEIGHT = 0x806E; +// public const int GL_TEXTURE_3D = 0x806F; +// public const int GL_PROXY_TEXTURE_3D = 0x8070; +// public const int GL_TEXTURE_DEPTH = 0x8071; +// public const int GL_TEXTURE_WRAP_R = 0x8072; +// public const int GL_MAX_3D_TEXTURE_SIZE = 0x8073; +// public const int GL_TEXTURE_BINDING_3D = 0x806A; +// public const int GL_CONSTANT_COLOR = 0x8001; +// public const int GL_ONE_MINUS_CONSTANT_COLOR = 0x8002; +// public const int GL_CONSTANT_ALPHA = 0x8003; +// public const int GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004; +// public const int GL_COLOR_TABLE = 0x80D0; +// public const int GL_POST_CONVOLUTION_COLOR_TABLE = 0x80D1; +// public const int GL_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D2; +// public const int GL_PROXY_COLOR_TABLE = 0x80D3; +// public const int GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = 0x80D4; +// public const int GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D5; +// public const int GL_COLOR_TABLE_SCALE = 0x80D6; +// public const int GL_COLOR_TABLE_BIAS = 0x80D7; +// public const int GL_COLOR_TABLE_FORMAT = 0x80D8; +// public const int GL_COLOR_TABLE_WIDTH = 0x80D9; +// public const int GL_COLOR_TABLE_RED_SIZE = 0x80DA; +// public const int GL_COLOR_TABLE_GREEN_SIZE = 0x80DB; +// public const int GL_COLOR_TABLE_BLUE_SIZE = 0x80DC; +// public const int GL_COLOR_TABLE_ALPHA_SIZE = 0x80DD; +// public const int GL_COLOR_TABLE_LUMINANCE_SIZE = 0x80DE; +// public const int GL_COLOR_TABLE_INTENSITY_SIZE = 0x80DF; +// public const int GL_CONVOLUTION_1D = 0x8010; +// public const int GL_CONVOLUTION_2D = 0x8011; +// public const int GL_SEPARABLE_2D = 0x8012; +// public const int GL_CONVOLUTION_BORDER_MODE = 0x8013; +// public const int GL_CONVOLUTION_FILTER_SCALE = 0x8014; +// public const int GL_CONVOLUTION_FILTER_BIAS = 0x8015; +// public const int GL_REDUCE = 0x8016; +// public const int GL_CONVOLUTION_FORMAT = 0x8017; +// public const int GL_CONVOLUTION_WIDTH = 0x8018; +// public const int GL_CONVOLUTION_HEIGHT = 0x8019; +// public const int GL_MAX_CONVOLUTION_WIDTH = 0x801A; +// public const int GL_MAX_CONVOLUTION_HEIGHT = 0x801B; +// public const int GL_POST_CONVOLUTION_RED_SCALE = 0x801C; +// public const int GL_POST_CONVOLUTION_GREEN_SCALE = 0x801D; +// public const int GL_POST_CONVOLUTION_BLUE_SCALE = 0x801E; +// public const int GL_POST_CONVOLUTION_ALPHA_SCALE = 0x801F; +// public const int GL_POST_CONVOLUTION_RED_BIAS = 0x8020; +// public const int GL_POST_CONVOLUTION_GREEN_BIAS = 0x8021; +// public const int GL_POST_CONVOLUTION_BLUE_BIAS = 0x8022; +// public const int GL_POST_CONVOLUTION_ALPHA_BIAS = 0x8023; +// public const int GL_CONSTANT_BORDER = 0x8151; +// public const int GL_REPLICATE_BORDER = 0x8153; +// public const int GL_CONVOLUTION_BORDER_COLOR = 0x8154; +// public const int GL_COLOR_MATRIX = 0x80B1; +// public const int GL_COLOR_MATRIX_STACK_DEPTH = 0x80B2; +// public const int GL_MAX_COLOR_MATRIX_STACK_DEPTH = 0x80B3; +// public const int GL_POST_COLOR_MATRIX_RED_SCALE = 0x80B4; +// public const int GL_POST_COLOR_MATRIX_GREEN_SCALE = 0x80B5; +// public const int GL_POST_COLOR_MATRIX_BLUE_SCALE = 0x80B6; +// public const int GL_POST_COLOR_MATRIX_ALPHA_SCALE = 0x80B7; +// public const int GL_POST_COLOR_MATRIX_RED_BIAS = 0x80B8; +// public const int GL_POST_COLOR_MATRIX_GREEN_BIAS = 0x80B9; +// public const int GL_POST_COLOR_MATRIX_BLUE_BIAS = 0x80BA; +// public const int GL_POST_COLOR_MATRIX_ALPHA_BIAS = 0x80BB; +// public const int GL_HISTOGRAM = 0x8024; +// public const int GL_PROXY_HISTOGRAM = 0x8025; +// public const int GL_HISTOGRAM_WIDTH = 0x8026; +// public const int GL_HISTOGRAM_FORMAT = 0x8027; +// public const int GL_HISTOGRAM_RED_SIZE = 0x8028; +// public const int GL_HISTOGRAM_GREEN_SIZE = 0x8029; +// public const int GL_HISTOGRAM_BLUE_SIZE = 0x802A; +// public const int GL_HISTOGRAM_ALPHA_SIZE = 0x802B; +// public const int GL_HISTOGRAM_LUMINANCE_SIZE = 0x802C; +// public const int GL_HISTOGRAM_SINK = 0x802D; +// public const int GL_MINMAX = 0x802E; +// public const int GL_MINMAX_FORMAT = 0x802F; +// public const int GL_MINMAX_SINK = 0x8030; +// public const int GL_TABLE_TOO_LARGE = 0x8031; +// public const int GL_BLEND_EQUATION = 0x8009; +// public const int GL_MIN = 0x8007; +// public const int GL_MAX = 0x8008; +// public const int GL_FUNC_ADD = 0x8006; +// public const int GL_FUNC_SUBTRACT = 0x800A; +// public const int GL_FUNC_REVERSE_SUBTRACT = 0x800B; +// public const int GL_BLEND_COLOR = 0x8005; public const int GL_TEXTURE0 = 0x84C0; - public const int GL_TEXTURE1 = 0x84C1; - public const int GL_TEXTURE2 = 0x84C2; - public const int GL_TEXTURE3 = 0x84C3; - public const int GL_TEXTURE4 = 0x84C4; - public const int GL_TEXTURE5 = 0x84C5; - public const int GL_TEXTURE6 = 0x84C6; - public const int GL_TEXTURE7 = 0x84C7; - public const int GL_TEXTURE8 = 0x84C8; - public const int GL_TEXTURE9 = 0x84C9; - public const int GL_TEXTURE10 = 0x84CA; - public const int GL_TEXTURE11 = 0x84CB; - public const int GL_TEXTURE12 = 0x84CC; - public const int GL_TEXTURE13 = 0x84CD; - public const int GL_TEXTURE14 = 0x84CE; - public const int GL_TEXTURE15 = 0x84CF; - public const int GL_TEXTURE16 = 0x84D0; - public const int GL_TEXTURE17 = 0x84D1; - public const int GL_TEXTURE18 = 0x84D2; - public const int GL_TEXTURE19 = 0x84D3; - public const int GL_TEXTURE20 = 0x84D4; - public const int GL_TEXTURE21 = 0x84D5; - public const int GL_TEXTURE22 = 0x84D6; - public const int GL_TEXTURE23 = 0x84D7; - public const int GL_TEXTURE24 = 0x84D8; - public const int GL_TEXTURE25 = 0x84D9; - public const int GL_TEXTURE26 = 0x84DA; - public const int GL_TEXTURE27 = 0x84DB; - public const int GL_TEXTURE28 = 0x84DC; - public const int GL_TEXTURE29 = 0x84DD; - public const int GL_TEXTURE30 = 0x84DE; - public const int GL_TEXTURE31 = 0x84DF; +// public const int GL_TEXTURE1 = 0x84C1; +// public const int GL_TEXTURE2 = 0x84C2; +// public const int GL_TEXTURE3 = 0x84C3; +// public const int GL_TEXTURE4 = 0x84C4; +// public const int GL_TEXTURE5 = 0x84C5; +// public const int GL_TEXTURE6 = 0x84C6; +// public const int GL_TEXTURE7 = 0x84C7; +// public const int GL_TEXTURE8 = 0x84C8; +// public const int GL_TEXTURE9 = 0x84C9; +// public const int GL_TEXTURE10 = 0x84CA; +// public const int GL_TEXTURE11 = 0x84CB; +// public const int GL_TEXTURE12 = 0x84CC; +// public const int GL_TEXTURE13 = 0x84CD; +// public const int GL_TEXTURE14 = 0x84CE; +// public const int GL_TEXTURE15 = 0x84CF; +// public const int GL_TEXTURE16 = 0x84D0; +// public const int GL_TEXTURE17 = 0x84D1; +// public const int GL_TEXTURE18 = 0x84D2; +// public const int GL_TEXTURE19 = 0x84D3; +// public const int GL_TEXTURE20 = 0x84D4; +// public const int GL_TEXTURE21 = 0x84D5; +// public const int GL_TEXTURE22 = 0x84D6; +// public const int GL_TEXTURE23 = 0x84D7; +// public const int GL_TEXTURE24 = 0x84D8; +// public const int GL_TEXTURE25 = 0x84D9; +// public const int GL_TEXTURE26 = 0x84DA; +// public const int GL_TEXTURE27 = 0x84DB; +// public const int GL_TEXTURE28 = 0x84DC; +// public const int GL_TEXTURE29 = 0x84DD; +// public const int GL_TEXTURE30 = 0x84DE; +// public const int GL_TEXTURE31 = 0x84DF; public const int GL_ACTIVE_TEXTURE = 0x84E0; - public const int GL_CLIENT_ACTIVE_TEXTURE = 0x84E1; - public const int GL_MAX_TEXTURE_UNITS = 0x84E2; - public const int GL_NORMAL_MAP = 0x8511; - public const int GL_REFLECTION_MAP = 0x8512; - public const int GL_TEXTURE_CUBE_MAP = 0x8513; - public const int GL_TEXTURE_BINDING_CUBE_MAP = 0x8514; - public const int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; - public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516; - public const int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517; - public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; - public const int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; - public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; - public const int GL_PROXY_TEXTURE_CUBE_MAP = 0x851B; - public const int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; - public const int GL_COMPRESSED_ALPHA = 0x84E9; - public const int GL_COMPRESSED_LUMINANCE = 0x84EA; - public const int GL_COMPRESSED_LUMINANCE_ALPHA = 0x84EB; - public const int GL_COMPRESSED_INTENSITY = 0x84EC; - public const int GL_COMPRESSED_RGB = 0x84ED; - public const int GL_COMPRESSED_RGBA = 0x84EE; - public const int GL_TEXTURE_COMPRESSION_HINT = 0x84EF; - public const int GL_TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0; - public const int GL_TEXTURE_COMPRESSED = 0x86A1; - public const int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2; - public const int GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3; - public const int GL_MULTISAMPLE = 0x809D; - public const int GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E; - public const int GL_SAMPLE_ALPHA_TO_ONE = 0x809F; - public const int GL_SAMPLE_COVERAGE = 0x80A0; - public const int GL_SAMPLE_BUFFERS = 0x80A8; +// public const int GL_CLIENT_ACTIVE_TEXTURE = 0x84E1; +// public const int GL_MAX_TEXTURE_UNITS = 0x84E2; +// public const int GL_NORMAL_MAP = 0x8511; +// public const int GL_REFLECTION_MAP = 0x8512; +// public const int GL_TEXTURE_CUBE_MAP = 0x8513; +// public const int GL_TEXTURE_BINDING_CUBE_MAP = 0x8514; +// public const int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; +// public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516; +// public const int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517; +// public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; +// public const int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; +// public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; +// public const int GL_PROXY_TEXTURE_CUBE_MAP = 0x851B; +// public const int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; +// public const int GL_COMPRESSED_ALPHA = 0x84E9; +// public const int GL_COMPRESSED_LUMINANCE = 0x84EA; +// public const int GL_COMPRESSED_LUMINANCE_ALPHA = 0x84EB; +// public const int GL_COMPRESSED_INTENSITY = 0x84EC; +// public const int GL_COMPRESSED_RGB = 0x84ED; +// public const int GL_COMPRESSED_RGBA = 0x84EE; +// public const int GL_TEXTURE_COMPRESSION_HINT = 0x84EF; +// public const int GL_TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0; +// public const int GL_TEXTURE_COMPRESSED = 0x86A1; +// public const int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2; +// public const int GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3; +// public const int GL_MULTISAMPLE = 0x809D; +// public const int GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E; +// public const int GL_SAMPLE_ALPHA_TO_ONE = 0x809F; +// public const int GL_SAMPLE_COVERAGE = 0x80A0; +// public const int GL_SAMPLE_BUFFERS = 0x80A8; public const int GL_SAMPLES = 0x80A9; - public const int GL_SAMPLE_COVERAGE_VALUE = 0x80AA; - public const int GL_SAMPLE_COVERAGE_INVERT = 0x80AB; - public const int GL_MULTISAMPLE_BIT = 0x20000000; - public const int GL_TRANSPOSE_MODELVIEW_MATRIX = 0x84E3; - public const int GL_TRANSPOSE_PROJECTION_MATRIX = 0x84E4; - public const int GL_TRANSPOSE_TEXTURE_MATRIX = 0x84E5; - public const int GL_TRANSPOSE_COLOR_MATRIX = 0x84E6; - public const int GL_COMBINE = 0x8570; - public const int GL_COMBINE_RGB = 0x8571; - public const int GL_COMBINE_ALPHA = 0x8572; - public const int GL_SOURCE0_RGB = 0x8580; - public const int GL_SOURCE1_RGB = 0x8581; - public const int GL_SOURCE2_RGB = 0x8582; - public const int GL_SOURCE0_ALPHA = 0x8588; - public const int GL_SOURCE1_ALPHA = 0x8589; - public const int GL_SOURCE2_ALPHA = 0x858A; - public const int GL_OPERAND0_RGB = 0x8590; - public const int GL_OPERAND1_RGB = 0x8591; - public const int GL_OPERAND2_RGB = 0x8592; - public const int GL_OPERAND0_ALPHA = 0x8598; - public const int GL_OPERAND1_ALPHA = 0x8599; - public const int GL_OPERAND2_ALPHA = 0x859A; - public const int GL_RGB_SCALE = 0x8573; - public const int GL_ADD_SIGNED = 0x8574; - public const int GL_INTERPOLATE = 0x8575; - public const int GL_SUBTRACT = 0x84E7; - public const int GL_CONSTANT = 0x8576; - public const int GL_PRIMARY_COLOR = 0x8577; - public const int GL_PREVIOUS = 0x8578; - public const int GL_DOT3_RGB = 0x86AE; - public const int GL_DOT3_RGBA = 0x86AF; - public const int GL_CLAMP_TO_BORDER = 0x812D; - public const int GL_TEXTURE0_ARB = 0x84C0; - public const int GL_TEXTURE1_ARB = 0x84C1; - public const int GL_TEXTURE2_ARB = 0x84C2; - public const int GL_TEXTURE3_ARB = 0x84C3; - public const int GL_TEXTURE4_ARB = 0x84C4; - public const int GL_TEXTURE5_ARB = 0x84C5; - public const int GL_TEXTURE6_ARB = 0x84C6; - public const int GL_TEXTURE7_ARB = 0x84C7; - public const int GL_TEXTURE8_ARB = 0x84C8; - public const int GL_TEXTURE9_ARB = 0x84C9; - public const int GL_TEXTURE10_ARB = 0x84CA; - public const int GL_TEXTURE11_ARB = 0x84CB; - public const int GL_TEXTURE12_ARB = 0x84CC; - public const int GL_TEXTURE13_ARB = 0x84CD; - public const int GL_TEXTURE14_ARB = 0x84CE; - public const int GL_TEXTURE15_ARB = 0x84CF; - public const int GL_TEXTURE16_ARB = 0x84D0; - public const int GL_TEXTURE17_ARB = 0x84D1; - public const int GL_TEXTURE18_ARB = 0x84D2; - public const int GL_TEXTURE19_ARB = 0x84D3; - public const int GL_TEXTURE20_ARB = 0x84D4; - public const int GL_TEXTURE21_ARB = 0x84D5; - public const int GL_TEXTURE22_ARB = 0x84D6; - public const int GL_TEXTURE23_ARB = 0x84D7; - public const int GL_TEXTURE24_ARB = 0x84D8; - public const int GL_TEXTURE25_ARB = 0x84D9; - public const int GL_TEXTURE26_ARB = 0x84DA; - public const int GL_TEXTURE27_ARB = 0x84DB; - public const int GL_TEXTURE28_ARB = 0x84DC; - public const int GL_TEXTURE29_ARB = 0x84DD; - public const int GL_TEXTURE30_ARB = 0x84DE; - public const int GL_TEXTURE31_ARB = 0x84DF; - public const int GL_ACTIVE_TEXTURE_ARB = 0x84E0; - public const int GL_CLIENT_ACTIVE_TEXTURE_ARB = 0x84E1; - public const int GL_MAX_TEXTURE_UNITS_ARB = 0x84E2; - public const int GL_DEPTH_STENCIL_MESA = 0x8750; - public const int GL_UNSIGNED_INT_24_8_MESA = 0x8751; - public const int GL_UNSIGNED_INT_8_24_REV_MESA = 0x8752; - public const int GL_UNSIGNED_SHORT_15_1_MESA = 0x8753; - public const int GL_UNSIGNED_SHORT_1_15_REV_MESA = 0x8754; - public const int GL_ALPHA_BLEND_EQUATION_ATI = 0x883D; +// public const int GL_SAMPLE_COVERAGE_VALUE = 0x80AA; +// public const int GL_SAMPLE_COVERAGE_INVERT = 0x80AB; +// public const int GL_MULTISAMPLE_BIT = 0x20000000; +// public const int GL_TRANSPOSE_MODELVIEW_MATRIX = 0x84E3; +// public const int GL_TRANSPOSE_PROJECTION_MATRIX = 0x84E4; +// public const int GL_TRANSPOSE_TEXTURE_MATRIX = 0x84E5; +// public const int GL_TRANSPOSE_COLOR_MATRIX = 0x84E6; +// public const int GL_COMBINE = 0x8570; +// public const int GL_COMBINE_RGB = 0x8571; +// public const int GL_COMBINE_ALPHA = 0x8572; +// public const int GL_SOURCE0_RGB = 0x8580; +// public const int GL_SOURCE1_RGB = 0x8581; +// public const int GL_SOURCE2_RGB = 0x8582; +// public const int GL_SOURCE0_ALPHA = 0x8588; +// public const int GL_SOURCE1_ALPHA = 0x8589; +// public const int GL_SOURCE2_ALPHA = 0x858A; +// public const int GL_OPERAND0_RGB = 0x8590; +// public const int GL_OPERAND1_RGB = 0x8591; +// public const int GL_OPERAND2_RGB = 0x8592; +// public const int GL_OPERAND0_ALPHA = 0x8598; +// public const int GL_OPERAND1_ALPHA = 0x8599; +// public const int GL_OPERAND2_ALPHA = 0x859A; +// public const int GL_RGB_SCALE = 0x8573; +// public const int GL_ADD_SIGNED = 0x8574; +// public const int GL_INTERPOLATE = 0x8575; +// public const int GL_SUBTRACT = 0x84E7; +// public const int GL_CONSTANT = 0x8576; +// public const int GL_PRIMARY_COLOR = 0x8577; +// public const int GL_PREVIOUS = 0x8578; +// public const int GL_DOT3_RGB = 0x86AE; +// public const int GL_DOT3_RGBA = 0x86AF; +// public const int GL_CLAMP_TO_BORDER = 0x812D; +// public const int GL_TEXTURE0_ARB = 0x84C0; +// public const int GL_TEXTURE1_ARB = 0x84C1; +// public const int GL_TEXTURE2_ARB = 0x84C2; +// public const int GL_TEXTURE3_ARB = 0x84C3; +// public const int GL_TEXTURE4_ARB = 0x84C4; +// public const int GL_TEXTURE5_ARB = 0x84C5; +// public const int GL_TEXTURE6_ARB = 0x84C6; +// public const int GL_TEXTURE7_ARB = 0x84C7; +// public const int GL_TEXTURE8_ARB = 0x84C8; +// public const int GL_TEXTURE9_ARB = 0x84C9; +// public const int GL_TEXTURE10_ARB = 0x84CA; +// public const int GL_TEXTURE11_ARB = 0x84CB; +// public const int GL_TEXTURE12_ARB = 0x84CC; +// public const int GL_TEXTURE13_ARB = 0x84CD; +// public const int GL_TEXTURE14_ARB = 0x84CE; +// public const int GL_TEXTURE15_ARB = 0x84CF; +// public const int GL_TEXTURE16_ARB = 0x84D0; +// public const int GL_TEXTURE17_ARB = 0x84D1; +// public const int GL_TEXTURE18_ARB = 0x84D2; +// public const int GL_TEXTURE19_ARB = 0x84D3; +// public const int GL_TEXTURE20_ARB = 0x84D4; +// public const int GL_TEXTURE21_ARB = 0x84D5; +// public const int GL_TEXTURE22_ARB = 0x84D6; +// public const int GL_TEXTURE23_ARB = 0x84D7; +// public const int GL_TEXTURE24_ARB = 0x84D8; +// public const int GL_TEXTURE25_ARB = 0x84D9; +// public const int GL_TEXTURE26_ARB = 0x84DA; +// public const int GL_TEXTURE27_ARB = 0x84DB; +// public const int GL_TEXTURE28_ARB = 0x84DC; +// public const int GL_TEXTURE29_ARB = 0x84DD; +// public const int GL_TEXTURE30_ARB = 0x84DE; +// public const int GL_TEXTURE31_ARB = 0x84DF; +// public const int GL_ACTIVE_TEXTURE_ARB = 0x84E0; +// public const int GL_CLIENT_ACTIVE_TEXTURE_ARB = 0x84E1; +// public const int GL_MAX_TEXTURE_UNITS_ARB = 0x84E2; +// public const int GL_DEPTH_STENCIL_MESA = 0x8750; +// public const int GL_UNSIGNED_INT_24_8_MESA = 0x8751; +// public const int GL_UNSIGNED_INT_8_24_REV_MESA = 0x8752; +// public const int GL_UNSIGNED_SHORT_15_1_MESA = 0x8753; +// public const int GL_UNSIGNED_SHORT_1_15_REV_MESA = 0x8754; +// public const int GL_ALPHA_BLEND_EQUATION_ATI = 0x883D; // 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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; +// 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; } } diff --git a/src/Avalonia.OpenGL/GlEntryPointAttribute.cs b/src/Avalonia.OpenGL/GlEntryPointAttribute.cs index 2ffdaca8fe..3e31de6995 100644 --- a/src/Avalonia.OpenGL/GlEntryPointAttribute.cs +++ b/src/Avalonia.OpenGL/GlEntryPointAttribute.cs @@ -2,117 +2,54 @@ using System; namespace Avalonia.OpenGL { - public interface IGlEntryPointAttribute + [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] + class GlMinVersionEntryPoint : Attribute { - IntPtr GetProcAddress(Func getProcAddress); - } - - public interface IGlEntryPointAttribute - { - IntPtr GetProcAddress(TContext context, Func getProcAddress); - } - - [AttributeUsage(AttributeTargets.Property)] - 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) + public GlMinVersionEntryPoint(string entry, int minVersionMajor, int minVersionMinor) { - EntryPoints = entryPoints; - } -*/ - public IntPtr GetProcAddress(Func 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 - { - private readonly string _entry; - private readonly GlProfileType? _profile; - private readonly int _minVersionMajor; - private readonly int _minVersionMinor; - - public GlMinVersionEntryPoint(string entry, GlProfileType profile, int minVersionMajor, - int minVersionMinor) - { - _entry = entry; - _profile = profile; - _minVersionMajor = minVersionMajor; - _minVersionMinor = minVersionMinor; } - public GlMinVersionEntryPoint(string entry, int minVersionMajor, - int minVersionMinor) + public GlMinVersionEntryPoint(string entry, int minVersionMajor, int minVersionMinor, GlProfileType profile) { - _entry = entry; - _minVersionMajor = minVersionMajor; - _minVersionMinor = minVersionMinor; } + - public IntPtr GetProcAddress(GlInterface.GlContextInfo context, Func getProcAddress) + public static IntPtr GetProcAddress(Func getProcAddress, GlInterface.GlContextInfo context, + string entry, int minVersionMajor, int minVersionMinor, GlProfileType? profile = null) { - if(_profile.HasValue && context.Version.Type != _profile) + if(profile.HasValue && context.Version.Type != profile) return IntPtr.Zero; - if(context.Version.Major<_minVersionMajor) + if(context.Version.Major + [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] + class GlExtensionEntryPoint : Attribute { - private readonly string _entry; - private readonly GlProfileType? _profile; - private readonly string _extension; - - public GlExtensionEntryPoint(string entry, GlProfileType profile, string extension) + public GlExtensionEntryPoint(string entry, string extension) { - _entry = entry; - _profile = profile; - _extension = extension; } - public GlExtensionEntryPoint(string entry, string extension) + public GlExtensionEntryPoint(string entry, string extension, GlProfileType profile) { - _entry = entry; - _extension = extension; } - public IntPtr GetProcAddress(GlInterface.GlContextInfo context, Func getProcAddress) + public static IntPtr GetProcAddress(Func getProcAddress, GlInterface.GlContextInfo context, + string entry, string extension, GlProfileType? profile = null) { // Ignore different profile type - if (_profile.HasValue && _profile != context.Version.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)) + if (!context.Extensions.Contains(extension)) return IntPtr.Zero; - return getProcAddress(_entry); + return getProcAddress(entry); } } } diff --git a/src/Avalonia.OpenGL/GlInterface.cs b/src/Avalonia.OpenGL/GlInterface.cs index 18bebe4cb5..a9dd882e3b 100644 --- a/src/Avalonia.OpenGL/GlInterface.cs +++ b/src/Avalonia.OpenGL/GlInterface.cs @@ -3,14 +3,14 @@ using System.Collections.Generic; using System.Runtime.InteropServices; using System.Text; using Avalonia.Platform.Interop; +using Avalonia.SourceGenerator; using static Avalonia.OpenGL.GlConsts; namespace Avalonia.OpenGL { - public delegate IntPtr GlGetProcAddressDelegate(string procName); - - public unsafe class GlInterface : GlBasicInfoInterface + public unsafe partial class GlInterface : GlBasicInfoInterface { + private readonly Func _getProcAddress; public string Version { get; } public string Vendor { get; } public string Renderer { get; } @@ -35,12 +35,14 @@ namespace Avalonia.OpenGL } } - private GlInterface(GlContextInfo info, Func getProcAddress) : base(getProcAddress, info) + private GlInterface(GlContextInfo info, Func getProcAddress) : base(getProcAddress) { + _getProcAddress = getProcAddress; ContextInfo = info; Version = GetString(GlConsts.GL_VERSION); Renderer = GetString(GlConsts.GL_RENDERER); - Vendor = GetString(GlConsts.GL_VENDOR); + Vendor = GetString(GlConsts.GL_VENDOR); + Initialize(getProcAddress, ContextInfo); } public GlInterface(GlVersion version, Func getProcAddress) : this( @@ -48,92 +50,58 @@ namespace Avalonia.OpenGL { } - public GlInterface(GlVersion version, Func n) : this(version, ConvertNative(n)) + public IntPtr GetProcAddress(string proc) => _getProcAddress(proc); + + [GetProcAddress("glGetError")] + public partial int GetError(); + + [GetProcAddress("glClearStencil")] + public partial void ClearStencil(int s); + + [GetProcAddress("glClearColor")] + public partial void ClearColor(float r, float g, float b, float a); + + [GetProcAddress("glClear")] + public partial void Clear(int bits); + + [GetProcAddress("glViewport")] + public partial void Viewport(int x, int y, int width, int height); + + [GetProcAddress("glFlush")] + public partial void Flush(); + + [GetProcAddress("glFinish")] + public partial void Finish(); + + [GetProcAddress("glGetIntegerv")] + public partial void GetIntegerv(int name, out int rv); + + [GetProcAddress("glGenFramebuffers")] + public partial void GenFramebuffers(int count, int* res); + + public int GenFramebuffer() { - + int rv = 0; + GenFramebuffers(1, &rv); + return rv; } - public static GlInterface FromNativeUtf8GetProcAddress(GlVersion version, Func getProcAddress) => - new GlInterface(version, getProcAddress); - - - public T GetProcAddress(string proc) => Marshal.GetDelegateForFunctionPointer(GetProcAddress(proc)); - - // ReSharper disable UnassignedGetOnlyAutoProperty - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate int GlGetError(); - [GlEntryPoint("glGetError")] - public GlGetError GetError { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlClearStencil(int s); - [GlEntryPoint("glClearStencil")] - public GlClearStencil ClearStencil { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlClearColor(float r, float g, float b, float a); - [GlEntryPoint("glClearColor")] - public GlClearColor ClearColor { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlClear(int bits); - [GlEntryPoint("glClear")] - public GlClear Clear { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlViewport(int x, int y, int width, int height); - [GlEntryPoint("glViewport")] - public GlViewport Viewport { get; } - - [GlEntryPoint("glFlush")] - public UnmanagedAction Flush { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void UnmanagedAction(); - - [GlEntryPoint("glFinish")] - public UnmanagedAction Finish { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate IntPtr GlGetString(int v); - [GlEntryPoint("glGetString")] - public GlGetString GetStringNative { get; } - - public string GetString(int v) + [GetProcAddress("glDeleteFramebuffers")] + public partial void DeleteFramebuffers(int count, int* framebuffers); + + public void DeleteFramebuffer(int fb) { - var ptr = GetStringNative(v); - if (ptr != IntPtr.Zero) - return Marshal.PtrToStringAnsi(ptr); - return null; + DeleteFramebuffers(1, &fb); } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlGetIntegerv(int name, out int rv); - [GlEntryPoint("glGetIntegerv")] - public GlGetIntegerv GetIntegerv { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlGenFramebuffers(int count, int[] res); - [GlEntryPoint("glGenFramebuffers")] - public GlGenFramebuffers GenFramebuffers { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlDeleteFramebuffers(int count, int[] framebuffers); - [GlEntryPoint("glDeleteFramebuffers")] - public GlDeleteFramebuffers DeleteFramebuffers { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlBindFramebuffer(int target, int fb); - [GlEntryPoint("glBindFramebuffer")] - public GlBindFramebuffer BindFramebuffer { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate int GlCheckFramebufferStatus(int target); - [GlEntryPoint("glCheckFramebufferStatus")] - public GlCheckFramebufferStatus CheckFramebufferStatus { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlBlitFramebuffer(int srcX0, + [GetProcAddress("glBindFramebuffer")] + public partial void BindFramebuffer(int target, int fb); + + [GetProcAddress("glCheckFramebufferStatus")] + public partial int CheckFramebufferStatus(int target); + + [GlMinVersionEntryPoint("glBlitFramebuffer", 3, 0), GetProcAddress(true)] + public partial void BlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, @@ -143,89 +111,78 @@ namespace Avalonia.OpenGL int dstY1, int mask, int filter); - [GlMinVersionEntryPoint("glBlitFramebuffer", 3, 0), GlOptionalEntryPoint] - public GlBlitFramebuffer BlitFramebuffer { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlGenRenderbuffers(int count, int[] res); - [GlEntryPoint("glGenRenderbuffers")] - public GlGenRenderbuffers GenRenderbuffers { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlDeleteRenderbuffers(int count, int[] renderbuffers); - [GlEntryPoint("glDeleteRenderbuffers")] - public GlDeleteTextures DeleteRenderbuffers { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlBindRenderbuffer(int target, int fb); - [GlEntryPoint("glBindRenderbuffer")] - public GlBindRenderbuffer BindRenderbuffer { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlRenderbufferStorage(int target, int internalFormat, int width, int height); - [GlEntryPoint("glRenderbufferStorage")] - public GlRenderbufferStorage RenderbufferStorage { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlFramebufferRenderbuffer(int target, int attachment, + + + [GetProcAddress("glGenRenderbuffers")] + public partial void GenRenderbuffers(int count, int* res); + + public int GenRenderbuffer() + { + int rv = 0; + GenRenderbuffers(1, &rv); + return rv; + } + + [GetProcAddress("glDeleteRenderbuffers")] + public partial void DeleteRenderbuffers(int count, int* renderbuffers); + + public void DeleteRenderbuffer(int renderbuffer) + { + DeleteRenderbuffers(1, &renderbuffer); + } + + [GetProcAddress("glBindRenderbuffer")] + public partial void BindRenderbuffer(int target, int fb); + + [GetProcAddress("glRenderbufferStorage")] + public partial void RenderbufferStorage(int target, int internalFormat, int width, int height); + + [GetProcAddress("glFramebufferRenderbuffer")] + public partial void FramebufferRenderbuffer(int target, int attachment, int renderbufferTarget, int renderbuffer); - [GlEntryPoint("glFramebufferRenderbuffer")] - public GlFramebufferRenderbuffer FramebufferRenderbuffer { get; } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlGenTextures(int count, int[] res); - [GlEntryPoint("glGenTextures")] - public GlGenTextures GenTextures { get; } + [GetProcAddress("glGenTextures")] + public partial void GenTextures(int count, int* res); + + public int GenTexture() + { + int rv = 0; + GenTextures(1, &rv); + return rv; + } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlBindTexture(int target, int fb); - [GlEntryPoint("glBindTexture")] - public GlBindTexture BindTexture { get; } + [GetProcAddress("glBindTexture")] + public partial void BindTexture(int target, int fb); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlActiveTexture(int texture); - [GlEntryPoint("glActiveTexture")] - public GlActiveTexture ActiveTexture { get; } + [GetProcAddress("glActiveTexture")] + public partial void ActiveTexture(int texture); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlDeleteTextures(int count, int[] textures); - [GlEntryPoint("glDeleteTextures")] - public GlDeleteTextures DeleteTextures { get; } + [GetProcAddress("glDeleteTextures")] + public partial void DeleteTextures(int count, int* textures); + public void DeleteTexture(int texture) => DeleteTextures(1, &texture); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlTexImage2D(int target, int level, int internalFormat, int width, int height, int border, + [GetProcAddress("glTexImage2D")] + public partial void TexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, IntPtr data); - [GlEntryPoint("glTexImage2D")] - public GlTexImage2D TexImage2D { get; } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, + [GetProcAddress("glCopyTexSubImage2D")] + public partial void CopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height); - - [GlEntryPoint("glCopyTexSubImage2D")] - public GlCopyTexSubImage2D CopyTexSubImage2D { get; } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlTexParameteri(int target, int name, int value); - [GlEntryPoint("glTexParameteri")] - public GlTexParameteri TexParameteri { get; } + [GetProcAddress("glTexParameteri")] + public partial void TexParameteri(int target, int name, int value); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlFramebufferTexture2D(int target, int attachment, + + [GetProcAddress("glFramebufferTexture2D")] + public partial void FramebufferTexture2D(int target, int attachment, int texTarget, int texture, int level); - [GlEntryPoint("glFramebufferTexture2D")] - public GlFramebufferTexture2D FramebufferTexture2D { get; } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate int GlCreateShader(int shaderType); - [GlEntryPoint("glCreateShader")] - public GlCreateShader CreateShader { get; } + [GetProcAddress("glCreateShader")] + public partial int CreateShader(int shaderType); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlShaderSource(int shader, int count, IntPtr strings, IntPtr lengths); - [GlEntryPoint("glShaderSource")] - public GlShaderSource ShaderSource { get; } + [GetProcAddress("glShaderSource")] + public partial void ShaderSource(int shader, int count, IntPtr strings, IntPtr lengths); public void ShaderSourceString(int shader, string source) { @@ -237,20 +194,14 @@ namespace Avalonia.OpenGL } } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlCompileShader(int shader); - [GlEntryPoint("glCompileShader")] - public GlCompileShader CompileShader { get; } + [GetProcAddress("glCompileShader")] + public partial void CompileShader(int shader); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlGetShaderiv(int shader, int name, int* parameters); - [GlEntryPoint("glGetShaderiv")] - public GlGetShaderiv GetShaderiv { get; } + [GetProcAddress("glGetShaderiv")] + public partial void GetShaderiv(int shader, int name, int* parameters); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlGetShaderInfoLog(int shader, int maxLength, out int length, void*infoLog); - [GlEntryPoint("glGetShaderInfoLog")] - public GlGetShaderInfoLog GetShaderInfoLog { get; } + [GetProcAddress("glGetShaderInfoLog")] + public partial void GetShaderInfoLog(int shader, int maxLength, out int length, void* infoLog); public unsafe string CompileShaderAndGetError(int shader, string source) { @@ -268,33 +219,24 @@ namespace Avalonia.OpenGL int len; fixed (void* ptr = logData) GetShaderInfoLog(shader, logLength, out len, ptr); - return Encoding.UTF8.GetString(logData,0, len); + return Encoding.UTF8.GetString(logData, 0, len); } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate int GlCreateProgram(); - [GlEntryPoint("glCreateProgram")] - public GlCreateProgram CreateProgram { get; } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlAttachShader(int program, int shader); - [GlEntryPoint("glAttachShader")] - public GlAttachShader AttachShader { get; } + [GetProcAddress("glCreateProgram")] + public partial int CreateProgram(); + + [GetProcAddress("glAttachShader")] + public partial void AttachShader(int program, int shader); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlLinkProgram(int program); - [GlEntryPoint("glLinkProgram")] - public GlLinkProgram LinkProgram { get; } + [GetProcAddress("glLinkProgram")] + public partial void LinkProgram(int program); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlGetProgramiv(int program, int name, int* parameters); - [GlEntryPoint("glGetProgramiv")] - public GlGetProgramiv GetProgramiv { get; } + [GetProcAddress("glGetProgramiv")] + public partial void GetProgramiv(int program, int name, int* parameters); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlGetProgramInfoLog(int program, int maxLength, out int len, void* infoLog); - [GlEntryPoint("glGetProgramInfoLog")] - public GlGetProgramInfoLog GetProgramInfoLog { get; } + [GetProcAddress("glGetProgramInfoLog")] + public partial void GetProgramInfoLog(int program, int maxLength, out int len, void* infoLog); public unsafe string LinkProgramAndGetError(int program) { @@ -309,13 +251,11 @@ namespace Avalonia.OpenGL int len; fixed (void* ptr = logData) GetProgramInfoLog(program, logLength, out len, ptr); - return Encoding.UTF8.GetString(logData,0, len); + return Encoding.UTF8.GetString(logData, 0, len); } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlBindAttribLocation(int program, int index, IntPtr name); - [GlEntryPoint("glBindAttribLocation")] - public GlBindAttribLocation BindAttribLocation { get; } + [GetProcAddress("glBindAttribLocation")] + public partial void BindAttribLocation(int program, int index, IntPtr name); public void BindAttribLocationString(int program, int index, string name) { @@ -323,32 +263,24 @@ namespace Avalonia.OpenGL BindAttribLocation(program, index, b.DangerousGetHandle()); } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlGenBuffers(int len, int[] rv); - [GlEntryPoint("glGenBuffers")] - public GlGenBuffers GenBuffers { get; } + [GetProcAddress("glGenBuffers")] + public partial void GenBuffers(int len, int* rv); public int GenBuffer() { - var rv = new int[1]; - GenBuffers(1, rv); - return rv[0]; + int rv; + GenBuffers(1, &rv); + return rv; } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlBindBuffer(int target, int buffer); - [GlEntryPoint("glBindBuffer")] - public GlBindBuffer BindBuffer { get; } + [GetProcAddress("glBindBuffer")] + public partial void BindBuffer(int target, int buffer); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlBufferData(int target, IntPtr size, IntPtr data, int usage); - [GlEntryPoint("glBufferData")] - public GlBufferData BufferData { get; } + [GetProcAddress("glBufferData")] + public partial void BufferData(int target, IntPtr size, IntPtr data, int usage); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate int GlGetAttribLocation(int program, IntPtr name); - [GlEntryPoint("glGetAttribLocation")] - public GlGetAttribLocation GetAttribLocation { get; } + [GetProcAddress("glGetAttribLocation")] + public partial int GetAttribLocation(int program, IntPtr name); public int GetAttribLocationString(int program, string name) { @@ -356,36 +288,24 @@ namespace Avalonia.OpenGL return GetAttribLocation(program, b.DangerousGetHandle()); } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlVertexAttribPointer(int index, int size, int type, + [GetProcAddress("glVertexAttribPointer")] + public partial void VertexAttribPointer(int index, int size, int type, int normalized, int stride, IntPtr pointer); - [GlEntryPoint("glVertexAttribPointer")] - public GlVertexAttribPointer VertexAttribPointer { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlEnableVertexAttribArray(int index); - [GlEntryPoint("glEnableVertexAttribArray")] - public GlEnableVertexAttribArray EnableVertexAttribArray { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlUseProgram(int program); - [GlEntryPoint("glUseProgram")] - public GlUseProgram UseProgram { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlDrawArrays(int mode, int first, IntPtr count); - [GlEntryPoint("glDrawArrays")] - public GlDrawArrays DrawArrays { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlDrawElements(int mode, int count, int type, IntPtr indices); - [GlEntryPoint("glDrawElements")] - public GlDrawElements DrawElements { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate int GlGetUniformLocation(int program, IntPtr name); - [GlEntryPoint("glGetUniformLocation")] - public GlGetUniformLocation GetUniformLocation { get; } + + [GetProcAddress("glEnableVertexAttribArray")] + public partial void EnableVertexAttribArray(int index); + + [GetProcAddress("glUseProgram")] + public partial void UseProgram(int program); + + [GetProcAddress("glDrawArrays")] + public partial void DrawArrays(int mode, int first, IntPtr count); + + [GetProcAddress("glDrawElements")] + public partial void DrawElements(int mode, int count, int type, IntPtr indices); + + [GetProcAddress("glGetUniformLocation")] + public partial int GetUniformLocation(int program, IntPtr name); public int GetUniformLocationString(int program, string name) { @@ -393,41 +313,65 @@ namespace Avalonia.OpenGL return GetUniformLocation(program, b.DangerousGetHandle()); } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlUniform1f(int location, float falue); - [GlEntryPoint("glUniform1f")] - public GlUniform1f Uniform1f { get; } - - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlUniformMatrix4fv(int location, int count, bool transpose, void* value); - [GlEntryPoint("glUniformMatrix4fv")] - public GlUniformMatrix4fv UniformMatrix4fv { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlEnable(int what); - [GlEntryPoint("glEnable")] - public GlEnable Enable { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlDeleteBuffers(int count, int[] buffers); - [GlEntryPoint("glDeleteBuffers")] - public GlDeleteBuffers DeleteBuffers { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlDeleteProgram(int program); - [GlEntryPoint("glDeleteProgram")] - public GlDeleteProgram DeleteProgram { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GlDeleteShader(int shader); - [GlEntryPoint("glDeleteShader")] - public GlDeleteShader DeleteShader { get; } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void GLGetRenderbufferParameteriv(int target, int name, int[] value); - [GlEntryPoint("glGetRenderbufferParameteriv")] - public GLGetRenderbufferParameteriv GetRenderbufferParameteriv { get; } + [GetProcAddress("glUniform1f")] + public partial void Uniform1f(int location, float falue); + + + [GetProcAddress("glUniformMatrix4fv")] + public partial void UniformMatrix4fv(int location, int count, bool transpose, void* value); + + [GetProcAddress("glEnable")] + public partial void Enable(int what); + + [GetProcAddress("glDeleteBuffers")] + public partial void DeleteBuffers(int count, int* buffers); + + public void DeleteBuffer(int buffer) => DeleteBuffers(1, &buffer); + + [GetProcAddress("glDeleteProgram")] + public partial void DeleteProgram(int program); + + [GetProcAddress("glDeleteShader")] + public partial void DeleteShader(int shader); + + [GetProcAddress("glGetRenderbufferParameteriv")] + public partial void GetRenderbufferParameteriv(int target, int name, out int value); // ReSharper restore UnassignedGetOnlyAutoProperty + + [GetProcAddress(true)] + [GlMinVersionEntryPoint("glDeleteVertexArrays", 3, 0)] + [GlExtensionEntryPoint("glDeleteVertexArraysOES", "GL_OES_vertex_array_object")] + public partial void DeleteVertexArrays(int count, int* arrays); + + public void DeleteVertexArray(int array) => DeleteVertexArrays(1, &array); + + [GetProcAddress(true)] + [GlMinVersionEntryPoint("glBindVertexArray", 3, 0)] + [GlExtensionEntryPoint("glBindVertexArrayOES", "GL_OES_vertex_array_object")] + public partial void BindVertexArray(int array); + + + [GetProcAddress(true)] + [GlMinVersionEntryPoint("glGenVertexArrays", 3, 0)] + [GlExtensionEntryPoint("glGenVertexArraysOES", "GL_OES_vertex_array_object")] + public partial void GenVertexArrays(int n, int* rv); + + public int GenVertexArray() + { + int rv = 0; + GenVertexArrays(1, &rv); + return rv; + } + + public static GlInterface FromNativeUtf8GetProcAddress(GlVersion version, Func getProcAddress) + { + return new GlInterface(version, s => + { + var ptr = Marshal.StringToHGlobalAnsi(s); + var rv = getProcAddress(ptr); + Marshal.FreeHGlobal(ptr); + return rv; + }); + } } -} +} \ No newline at end of file diff --git a/src/Avalonia.OpenGL/GlInterfaceBase.cs b/src/Avalonia.OpenGL/GlInterfaceBase.cs deleted file mode 100644 index e7dd440e36..0000000000 --- a/src/Avalonia.OpenGL/GlInterfaceBase.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Linq; -using System.Reflection; -using System.Runtime.InteropServices; -using Avalonia.Platform.Interop; - -namespace Avalonia.OpenGL -{ - public class GlInterfaceBase : GlInterfaceBase - { - public GlInterfaceBase(Func getProcAddress) : base(getProcAddress, null) - { - } - - public GlInterfaceBase(Func nativeGetProcAddress) : base(nativeGetProcAddress, null) - { - } - } - - public class GlInterfaceBase - { - private readonly Func _getProcAddress; - public GlInterfaceBase(Func getProcAddress, TContext context) - { - _getProcAddress = getProcAddress; - foreach (var prop in this.GetType().GetProperties()) - { - var attrs = prop.GetCustomAttributes() - .Where(a => - a is IGlEntryPointAttribute || a is IGlEntryPointAttribute) - .ToList(); - if(attrs.Count == 0) - continue; - - var isOptional = prop.GetCustomAttribute() != 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) - { - if (attr is IGlEntryPointAttribute typed) - proc = typed.GetProcAddress(context, getProcAddress); - else if (attr is IGlEntryPointAttribute untyped) - proc = untyped.GetProcAddress(getProcAddress); - if (proc != IntPtr.Zero) - 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 ConvertNative(Func func) => - (proc) => - { - using (var u = new Utf8Buffer(proc)) - { - var rv = func(u); - return rv; - } - }; - - public GlInterfaceBase(Func nativeGetProcAddress, TContext context) : this(ConvertNative(nativeGetProcAddress), context) - { - - } - - public IntPtr GetProcAddress(string proc) => _getProcAddress(proc); - } -} diff --git a/src/Avalonia.ReactiveUI/RoutedViewHost.cs b/src/Avalonia.ReactiveUI/RoutedViewHost.cs index 9269dc70f8..775014d419 100644 --- a/src/Avalonia.ReactiveUI/RoutedViewHost.cs +++ b/src/Avalonia.ReactiveUI/RoutedViewHost.cs @@ -64,6 +64,12 @@ namespace Avalonia.ReactiveUI public static readonly StyledProperty ViewContractProperty = AvaloniaProperty.Register(nameof(ViewContract)); + /// + /// for the property. + /// + public static readonly StyledProperty DefaultContentProperty = + ViewModelViewHost.DefaultContentProperty.AddOwner(); + /// /// Initializes a new instance of the class. /// @@ -106,6 +112,15 @@ namespace Avalonia.ReactiveUI set => SetValue(ViewContractProperty, value); } + /// + /// Gets or sets the content displayed whenever there is no page currently routed. + /// + public object? DefaultContent + { + get => GetValue(DefaultContentProperty); + set => SetValue(DefaultContentProperty, value); + } + /// /// Gets or sets the ReactiveUI view locator used by this router. /// diff --git a/src/Avalonia.ReactiveUI/TransitioningContentControl.cs b/src/Avalonia.ReactiveUI/TransitioningContentControl.cs deleted file mode 100644 index d26e90b2da..0000000000 --- a/src/Avalonia.ReactiveUI/TransitioningContentControl.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.Threading; - -using Avalonia.Animation; -using Avalonia.Controls; -using Avalonia.Styling; - -namespace Avalonia.ReactiveUI -{ - /// - /// A ContentControl that animates the transition when its content is changed. - /// - [Obsolete("Use TransitioningContentControl in Avalonia.Controls namespace")] - public class TransitioningContentControl : ContentControl, IStyleable - { - /// - /// for the property. - /// - public static readonly StyledProperty PageTransitionProperty = - AvaloniaProperty.Register(nameof(PageTransition), - new CrossFade(TimeSpan.FromSeconds(0.5))); - - /// - /// for the property. - /// - public static readonly StyledProperty DefaultContentProperty = - AvaloniaProperty.Register(nameof(DefaultContent)); - - private CancellationTokenSource? _lastTransitionCts; - - /// - /// Gets or sets the animation played when content appears and disappears. - /// - public IPageTransition? PageTransition - { - get => GetValue(PageTransitionProperty); - set => SetValue(PageTransitionProperty, value); - } - - /// - /// Gets or sets the content displayed whenever there is no page currently routed. - /// - public object? DefaultContent - { - get => GetValue(DefaultContentProperty); - set => SetValue(DefaultContentProperty, value); - } - - /// - /// Gets or sets the content with animation. - /// - public new object? Content - { - get => base.Content; - set => UpdateContentWithTransition(value); - } - - /// - /// TransitioningContentControl uses the default ContentControl - /// template from Avalonia default theme. - /// - Type IStyleable.StyleKey => typeof(ContentControl); - - /// - /// Updates the content with transitions. - /// - /// New content to set. - private async void UpdateContentWithTransition(object? content) - { - _lastTransitionCts?.Cancel(); - _lastTransitionCts = new CancellationTokenSource(); - - if (PageTransition != null) - await PageTransition.Start(this, null, true, _lastTransitionCts.Token); - base.Content = content; - if (PageTransition != null) - await PageTransition.Start(null, this, true, _lastTransitionCts.Token); - } - } -} diff --git a/src/Avalonia.ReactiveUI/ViewModelViewHost.cs b/src/Avalonia.ReactiveUI/ViewModelViewHost.cs index 16dee00ebc..869238b377 100644 --- a/src/Avalonia.ReactiveUI/ViewModelViewHost.cs +++ b/src/Avalonia.ReactiveUI/ViewModelViewHost.cs @@ -1,5 +1,8 @@ using System; using System.Reactive.Disposables; + +using Avalonia.Controls; + using ReactiveUI; using Splat; @@ -24,6 +27,12 @@ namespace Avalonia.ReactiveUI public static readonly StyledProperty ViewContractProperty = AvaloniaProperty.Register(nameof(ViewContract)); + /// + /// for the property. + /// + public static readonly StyledProperty DefaultContentProperty = + AvaloniaProperty.Register(nameof(DefaultContent)); + /// /// Initializes a new instance of the class. /// @@ -55,6 +64,15 @@ namespace Avalonia.ReactiveUI set => SetValue(ViewContractProperty, value); } + /// + /// Gets or sets the content displayed whenever there is no page currently routed. + /// + public object? DefaultContent + { + get => GetValue(DefaultContentProperty); + set => SetValue(DefaultContentProperty, value); + } + /// /// Gets or sets the view locator. /// diff --git a/src/Avalonia.Themes.Default/Controls/ButtonSpinner.xaml b/src/Avalonia.Themes.Default/Controls/ButtonSpinner.xaml deleted file mode 100644 index 561ca8bedd..0000000000 --- a/src/Avalonia.Themes.Default/Controls/ButtonSpinner.xaml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/CalendarButton.xaml b/src/Avalonia.Themes.Default/Controls/CalendarButton.xaml deleted file mode 100644 index 3314534b3b..0000000000 --- a/src/Avalonia.Themes.Default/Controls/CalendarButton.xaml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/CalendarDayButton.xaml b/src/Avalonia.Themes.Default/Controls/CalendarDayButton.xaml deleted file mode 100644 index 2d79e62a75..0000000000 --- a/src/Avalonia.Themes.Default/Controls/CalendarDayButton.xaml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/CaptionButtons.xaml b/src/Avalonia.Themes.Default/Controls/CaptionButtons.xaml deleted file mode 100644 index be6642467f..0000000000 --- a/src/Avalonia.Themes.Default/Controls/CaptionButtons.xaml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/Carousel.xaml b/src/Avalonia.Themes.Default/Controls/Carousel.xaml deleted file mode 100644 index baba0649aa..0000000000 --- a/src/Avalonia.Themes.Default/Controls/Carousel.xaml +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/ComboBoxItem.xaml b/src/Avalonia.Themes.Default/Controls/ComboBoxItem.xaml deleted file mode 100644 index a694143bec..0000000000 --- a/src/Avalonia.Themes.Default/Controls/ComboBoxItem.xaml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/ContentControl.xaml b/src/Avalonia.Themes.Default/Controls/ContentControl.xaml deleted file mode 100644 index d32bc399b6..0000000000 --- a/src/Avalonia.Themes.Default/Controls/ContentControl.xaml +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/ContextMenu.xaml b/src/Avalonia.Themes.Default/Controls/ContextMenu.xaml deleted file mode 100644 index 987b72aaa2..0000000000 --- a/src/Avalonia.Themes.Default/Controls/ContextMenu.xaml +++ /dev/null @@ -1,25 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/DataValidationErrors.xaml b/src/Avalonia.Themes.Default/Controls/DataValidationErrors.xaml deleted file mode 100644 index d7bf4bbbf1..0000000000 --- a/src/Avalonia.Themes.Default/Controls/DataValidationErrors.xaml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/DatePicker.xaml b/src/Avalonia.Themes.Default/Controls/DatePicker.xaml deleted file mode 100644 index c1ee941416..0000000000 --- a/src/Avalonia.Themes.Default/Controls/DatePicker.xaml +++ /dev/null @@ -1,337 +0,0 @@ - - - - - 0,0,0,4 - 40 - 40 - 41 - 296 - 456 - 0,3,0,6 - 9,3,0,6 - 0,3,0,6 - 9,3,0,6 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/EmbeddableControlRoot.xaml b/src/Avalonia.Themes.Default/Controls/EmbeddableControlRoot.xaml deleted file mode 100644 index 9ffe51fae8..0000000000 --- a/src/Avalonia.Themes.Default/Controls/EmbeddableControlRoot.xaml +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/Expander.xaml b/src/Avalonia.Themes.Default/Controls/Expander.xaml deleted file mode 100644 index 2f18faf84a..0000000000 --- a/src/Avalonia.Themes.Default/Controls/Expander.xaml +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - Expanded content - - - - - Expanded content - - - - - Expanded content - - - - - Expanded content - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/FocusAdorner.xaml b/src/Avalonia.Themes.Default/Controls/FocusAdorner.xaml deleted file mode 100644 index 2d5e369573..0000000000 --- a/src/Avalonia.Themes.Default/Controls/FocusAdorner.xaml +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/GridSplitter.xaml b/src/Avalonia.Themes.Default/Controls/GridSplitter.xaml deleted file mode 100644 index 490ae01318..0000000000 --- a/src/Avalonia.Themes.Default/Controls/GridSplitter.xaml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/ItemsControl.xaml b/src/Avalonia.Themes.Default/Controls/ItemsControl.xaml deleted file mode 100644 index 19d13b6399..0000000000 --- a/src/Avalonia.Themes.Default/Controls/ItemsControl.xaml +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/Label.xaml b/src/Avalonia.Themes.Default/Controls/Label.xaml deleted file mode 100644 index 1e04d05497..0000000000 --- a/src/Avalonia.Themes.Default/Controls/Label.xaml +++ /dev/null @@ -1,18 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/ListBox.xaml b/src/Avalonia.Themes.Default/Controls/ListBox.xaml deleted file mode 100644 index b1fcb830b3..0000000000 --- a/src/Avalonia.Themes.Default/Controls/ListBox.xaml +++ /dev/null @@ -1,35 +0,0 @@ - - - - diff --git a/src/Avalonia.Themes.Default/Controls/ListBoxItem.xaml b/src/Avalonia.Themes.Default/Controls/ListBoxItem.xaml deleted file mode 100644 index c1360c5d98..0000000000 --- a/src/Avalonia.Themes.Default/Controls/ListBoxItem.xaml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/ManagedFileChooser.xaml b/src/Avalonia.Themes.Default/Controls/ManagedFileChooser.xaml deleted file mode 100644 index f9f77bf455..0000000000 --- a/src/Avalonia.Themes.Default/Controls/ManagedFileChooser.xaml +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Avalonia.Themes.Default/Controls/Menu.xaml b/src/Avalonia.Themes.Default/Controls/Menu.xaml deleted file mode 100644 index 583add1017..0000000000 --- a/src/Avalonia.Themes.Default/Controls/Menu.xaml +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/MenuItem.xaml b/src/Avalonia.Themes.Default/Controls/MenuItem.xaml deleted file mode 100644 index 05c286c1f5..0000000000 --- a/src/Avalonia.Themes.Default/Controls/MenuItem.xaml +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/NativeMenuBar.xaml b/src/Avalonia.Themes.Default/Controls/NativeMenuBar.xaml deleted file mode 100644 index 3b0019eea1..0000000000 --- a/src/Avalonia.Themes.Default/Controls/NativeMenuBar.xaml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/NotificationCard.xaml b/src/Avalonia.Themes.Default/Controls/NotificationCard.xaml deleted file mode 100644 index c411fede11..0000000000 --- a/src/Avalonia.Themes.Default/Controls/NotificationCard.xaml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/OverlayPopupHost.xaml b/src/Avalonia.Themes.Default/Controls/OverlayPopupHost.xaml deleted file mode 100644 index 07d905ea1d..0000000000 --- a/src/Avalonia.Themes.Default/Controls/OverlayPopupHost.xaml +++ /dev/null @@ -1,23 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/PathIcon.xaml b/src/Avalonia.Themes.Default/Controls/PathIcon.xaml deleted file mode 100644 index 039f0ef10c..0000000000 --- a/src/Avalonia.Themes.Default/Controls/PathIcon.xaml +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/src/Avalonia.Themes.Default/Controls/PopupRoot.xaml b/src/Avalonia.Themes.Default/Controls/PopupRoot.xaml deleted file mode 100644 index 5e8f3337ee..0000000000 --- a/src/Avalonia.Themes.Default/Controls/PopupRoot.xaml +++ /dev/null @@ -1,27 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/ProgressBar.xaml b/src/Avalonia.Themes.Default/Controls/ProgressBar.xaml deleted file mode 100644 index 3f684f3936..0000000000 --- a/src/Avalonia.Themes.Default/Controls/ProgressBar.xaml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/RadioButton.xaml b/src/Avalonia.Themes.Default/Controls/RadioButton.xaml deleted file mode 100644 index ae33946009..0000000000 --- a/src/Avalonia.Themes.Default/Controls/RadioButton.xaml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/RepeatButton.xaml b/src/Avalonia.Themes.Default/Controls/RepeatButton.xaml deleted file mode 100644 index 47398966f7..0000000000 --- a/src/Avalonia.Themes.Default/Controls/RepeatButton.xaml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/ScrollBar.xaml b/src/Avalonia.Themes.Default/Controls/ScrollBar.xaml deleted file mode 100644 index 0f8fa4986d..0000000000 --- a/src/Avalonia.Themes.Default/Controls/ScrollBar.xaml +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/Separator.xaml b/src/Avalonia.Themes.Default/Controls/Separator.xaml deleted file mode 100644 index 6a318d2e85..0000000000 --- a/src/Avalonia.Themes.Default/Controls/Separator.xaml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/Slider.xaml b/src/Avalonia.Themes.Default/Controls/Slider.xaml deleted file mode 100644 index bcb330f188..0000000000 --- a/src/Avalonia.Themes.Default/Controls/Slider.xaml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/SplitButton.xaml b/src/Avalonia.Themes.Default/Controls/SplitButton.xaml deleted file mode 100644 index 0c46ce3724..0000000000 --- a/src/Avalonia.Themes.Default/Controls/SplitButton.xaml +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - - - - - 24 - 24 - 1 - 24 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/SplitView.xaml b/src/Avalonia.Themes.Default/Controls/SplitView.xaml deleted file mode 100644 index 10eda2d9cd..0000000000 --- a/src/Avalonia.Themes.Default/Controls/SplitView.xaml +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - - - - 320 - 48 - - 00:00:00.2 - 00:00:00.1 - 0.1,0.9,0.2,1.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/TabControl.xaml b/src/Avalonia.Themes.Default/Controls/TabControl.xaml deleted file mode 100644 index afb5010baa..0000000000 --- a/src/Avalonia.Themes.Default/Controls/TabControl.xaml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/TabItem.xaml b/src/Avalonia.Themes.Default/Controls/TabItem.xaml deleted file mode 100644 index c7748299a0..0000000000 --- a/src/Avalonia.Themes.Default/Controls/TabItem.xaml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/TextBox.xaml b/src/Avalonia.Themes.Default/Controls/TextBox.xaml deleted file mode 100644 index 1885d3b65b..0000000000 --- a/src/Avalonia.Themes.Default/Controls/TextBox.xaml +++ /dev/null @@ -1,203 +0,0 @@ - - - M 11.416016,10 20,1.4160156 18.583984,0 10,8.5839846 1.4160156,0 0,1.4160156 8.5839844,10 0,18.583985 1.4160156,20 10,11.416015 18.583984,20 20,18.583985 Z - m10.051 7.0032c2.215 0 4.0105 1.7901 4.0105 3.9984s-1.7956 3.9984-4.0105 3.9984c-2.215 0-4.0105-1.7901-4.0105-3.9984s1.7956-3.9984 4.0105-3.9984zm0 1.4994c-1.3844 0-2.5066 1.1188-2.5066 2.499s1.1222 2.499 2.5066 2.499 2.5066-1.1188 2.5066-2.499-1.1222-2.499-2.5066-2.499zm0-5.0026c4.6257 0 8.6188 3.1487 9.7267 7.5613 0.10085 0.40165-0.14399 0.80877-0.54686 0.90931-0.40288 0.10054-0.81122-0.14355-0.91208-0.54521-0.94136-3.7492-4.3361-6.4261-8.2678-6.4261-3.9334 0-7.3292 2.6792-8.2689 6.4306-0.10063 0.40171-0.50884 0.64603-0.91177 0.54571s-0.648-0.5073-0.54737-0.90901c1.106-4.4152 5.1003-7.5667 9.728-7.5667z - m0.21967 0.21965c-0.26627 0.26627-0.29047 0.68293-0.07262 0.97654l0.07262 0.08412 4.0346 4.0346c-1.922 1.3495-3.3585 3.365-3.9554 5.7495-0.10058 0.4018 0.14362 0.8091 0.54543 0.9097 0.40182 0.1005 0.80909-0.1436 0.90968-0.5455 0.52947-2.1151 1.8371-3.8891 3.5802-5.0341l1.8096 1.8098c-0.70751 0.7215-1.1438 1.71-1.1438 2.8003 0 2.2092 1.7909 4 4 4 1.0904 0 2.0788-0.4363 2.8004-1.1438l5.9193 5.9195c0.2929 0.2929 0.7677 0.2929 1.0606 0 0.2663-0.2662 0.2905-0.6829 0.0726-0.9765l-0.0726-0.0841-6.1135-6.1142 0.0012-0.0015-1.2001-1.1979-2.8699-2.8693 2e-3 -8e-4 -2.8812-2.8782 0.0012-0.0018-1.1333-1.1305-4.3064-4.3058c-0.29289-0.29289-0.76777-0.29289-1.0607 0zm7.9844 9.0458 3.5351 3.5351c-0.45 0.4358-1.0633 0.704-1.7392 0.704-1.3807 0-2.5-1.1193-2.5-2.5 0-0.6759 0.26824-1.2892 0.7041-1.7391zm1.7959-5.7655c-1.0003 0-1.9709 0.14807-2.8889 0.425l1.237 1.2362c0.5358-0.10587 1.0883-0.16119 1.6519-0.16119 3.9231 0 7.3099 2.6803 8.2471 6.4332 0.1004 0.4018 0.5075 0.6462 0.9094 0.5459 0.4019-0.1004 0.6463-0.5075 0.5459-0.9094-1.103-4.417-5.0869-7.5697-9.7024-7.5697zm0.1947 3.5093 3.8013 3.8007c-0.1018-2.0569-1.7488-3.7024-3.8013-3.8007z - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/TimePicker.xaml b/src/Avalonia.Themes.Default/Controls/TimePicker.xaml deleted file mode 100644 index 0a5147e335..0000000000 --- a/src/Avalonia.Themes.Default/Controls/TimePicker.xaml +++ /dev/null @@ -1,286 +0,0 @@ - - - - - 40 - 1 - 1 - 0,0,0,4 - 40 - 41 - 242 - 456 - 0,3,0,6 - 0,3,0,6 - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/TitleBar.xaml b/src/Avalonia.Themes.Default/Controls/TitleBar.xaml deleted file mode 100644 index 7f8ed24076..0000000000 --- a/src/Avalonia.Themes.Default/Controls/TitleBar.xaml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/ToggleSwitch.xaml b/src/Avalonia.Themes.Default/Controls/ToggleSwitch.xaml deleted file mode 100644 index 2c831cf360..0000000000 --- a/src/Avalonia.Themes.Default/Controls/ToggleSwitch.xaml +++ /dev/null @@ -1,322 +0,0 @@ - - - 0,0,0,6 - 6 - 6 - 0 - 0 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/ToolTip.xaml b/src/Avalonia.Themes.Default/Controls/ToolTip.xaml deleted file mode 100644 index 35c1dceb8d..0000000000 --- a/src/Avalonia.Themes.Default/Controls/ToolTip.xaml +++ /dev/null @@ -1,18 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/TreeView.xaml b/src/Avalonia.Themes.Default/Controls/TreeView.xaml deleted file mode 100644 index 67a683dad9..0000000000 --- a/src/Avalonia.Themes.Default/Controls/TreeView.xaml +++ /dev/null @@ -1,27 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/TreeViewItem.xaml b/src/Avalonia.Themes.Default/Controls/TreeViewItem.xaml deleted file mode 100644 index 1996756001..0000000000 --- a/src/Avalonia.Themes.Default/Controls/TreeViewItem.xaml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/Controls/UserControl.xaml b/src/Avalonia.Themes.Default/Controls/UserControl.xaml deleted file mode 100644 index d6028daff8..0000000000 --- a/src/Avalonia.Themes.Default/Controls/UserControl.xaml +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/Window.xaml b/src/Avalonia.Themes.Default/Controls/Window.xaml deleted file mode 100644 index 9c515ebe30..0000000000 --- a/src/Avalonia.Themes.Default/Controls/Window.xaml +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/src/Avalonia.Themes.Default/Controls/WindowNotificationManager.xaml b/src/Avalonia.Themes.Default/Controls/WindowNotificationManager.xaml deleted file mode 100644 index 7c1efa2e82..0000000000 --- a/src/Avalonia.Themes.Default/Controls/WindowNotificationManager.xaml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/DefaultTheme.xaml b/src/Avalonia.Themes.Default/DefaultTheme.xaml deleted file mode 100644 index 468b723f5b..0000000000 --- a/src/Avalonia.Themes.Default/DefaultTheme.xaml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Avalonia.Themes.Default/DefaultTheme.xaml.cs b/src/Avalonia.Themes.Default/DefaultTheme.xaml.cs deleted file mode 100644 index 598b418977..0000000000 --- a/src/Avalonia.Themes.Default/DefaultTheme.xaml.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Avalonia.Styling; - -namespace Avalonia.Themes.Default -{ - /// - /// The default Avalonia theme. - /// - public class DefaultTheme : Styles - { - } -} diff --git a/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml b/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml index c5bb70bed3..9d04009aed 100644 --- a/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml +++ b/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml @@ -308,6 +308,7 @@ + diff --git a/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml b/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml index 8d38d39bd5..7b673767b8 100644 --- a/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml +++ b/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml @@ -304,6 +304,7 @@ + diff --git a/src/Avalonia.Themes.Fluent/Controls/AutoCompleteBox.xaml b/src/Avalonia.Themes.Fluent/Controls/AutoCompleteBox.xaml index 58295d024f..6004d42120 100644 --- a/src/Avalonia.Themes.Fluent/Controls/AutoCompleteBox.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/AutoCompleteBox.xaml @@ -1,5 +1,5 @@ - + @@ -16,56 +16,56 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/Button.xaml b/src/Avalonia.Themes.Fluent/Controls/Button.xaml index 3fb0d43342..7828fd52ed 100644 --- a/src/Avalonia.Themes.Fluent/Controls/Button.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/Button.xaml @@ -1,4 +1,5 @@ - + @@ -7,14 +8,11 @@ - - - 8,5,8,6 - - + + - - - - - - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ButtonSpinner.xaml b/src/Avalonia.Themes.Fluent/Controls/ButtonSpinner.xaml index 836cc27db3..aa55065f6d 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ButtonSpinner.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ButtonSpinner.xaml @@ -1,58 +1,75 @@ - + - + - - - - - + + + + + + + + + + Error + + + + - - - - - M0,9 L10,0 20,9 19,10 10,2 1,10 z - M0,1 L10,10 20,1 19,0 10,8 1,0 z - + + + M0,9 L10,0 20,9 19,10 10,2 1,10 z + M0,1 L10,10 20,1 19,0 10,8 1,0 z - - + + + + + + + + - - - + + - - - - - - - - - - - - - + + + + + - + diff --git a/src/Avalonia.Themes.Fluent/Controls/Calendar.xaml b/src/Avalonia.Themes.Fluent/Controls/Calendar.xaml index 43e4a1fcea..8d54cb93ca 100644 --- a/src/Avalonia.Themes.Fluent/Controls/Calendar.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/Calendar.xaml @@ -1,17 +1,19 @@ - - + - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/CalendarButton.xaml b/src/Avalonia.Themes.Fluent/Controls/CalendarButton.xaml index 3a6af60983..d1aee7ee9a 100644 --- a/src/Avalonia.Themes.Fluent/Controls/CalendarButton.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/CalendarButton.xaml @@ -1,121 +1,117 @@ - + + + + + + + + - - - - - + - - - - - - - + + + + + + + + + + + + - + - - - + + + - + + + + - + - - + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml b/src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml index c6f70d05e1..54f6a200b8 100644 --- a/src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml @@ -1,32 +1,77 @@ - + - + - - 12 - 32 - - - + + + + + - - - + + + @@ -113,8 +134,11 @@ - + @@ -127,17 +151,15 @@ - - - - - - - - + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/CaptionButtons.xaml b/src/Avalonia.Themes.Fluent/Controls/CaptionButtons.xaml index 62874f4884..c91e008e02 100644 --- a/src/Avalonia.Themes.Fluent/Controls/CaptionButtons.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/CaptionButtons.xaml @@ -1,72 +1,97 @@ - - + + + + + - - - - - - - - - + + + + - - - - - - - - + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/Carousel.xaml b/src/Avalonia.Themes.Fluent/Controls/Carousel.xaml index baba0649aa..2cac701e1b 100644 --- a/src/Avalonia.Themes.Fluent/Controls/Carousel.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/Carousel.xaml @@ -1,17 +1,20 @@ - + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/CheckBox.xaml b/src/Avalonia.Themes.Fluent/Controls/CheckBox.xaml index e9830fb228..9abcf5d32b 100644 --- a/src/Avalonia.Themes.Fluent/Controls/CheckBox.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/CheckBox.xaml @@ -1,297 +1,298 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - + - - - - - + + + + + + - + + + + + + - - - + + + + + + + - + - - - - - + + + + + + - + + + + + + - + + + + + + - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ComboBox.xaml b/src/Avalonia.Themes.Fluent/Controls/ComboBox.xaml index 93ecc438eb..af3b5bc51e 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ComboBox.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ComboBox.xaml @@ -1,5 +1,6 @@ - + @@ -14,19 +15,28 @@ Item 1 Item 2 + + + + + Error + + + + - - 0,0,0,4 - 15 - 7 - 12,5,0,7 - 11,5,32,6 - 32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ComboBoxItem.xaml b/src/Avalonia.Themes.Fluent/Controls/ComboBoxItem.xaml index 0debe87445..581cbaf80a 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ComboBoxItem.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ComboBoxItem.xaml @@ -1,23 +1,20 @@ - + - + Item 1 Item 2 long Item 3 Item 4 + Item 5 - - - + + - - + + - - + + - - - - - - - - - - - - + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/Common.xaml b/src/Avalonia.Themes.Fluent/Controls/Common.xaml deleted file mode 100644 index e09e39d7cb..0000000000 --- a/src/Avalonia.Themes.Fluent/Controls/Common.xaml +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/src/Avalonia.Themes.Fluent/Controls/ContentControl.xaml b/src/Avalonia.Themes.Fluent/Controls/ContentControl.xaml index d32bc399b6..4caf156366 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ContentControl.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ContentControl.xaml @@ -1,16 +1,19 @@ - + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ContextMenu.xaml b/src/Avalonia.Themes.Fluent/Controls/ContextMenu.xaml index df800b4a06..fdd79ed736 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ContextMenu.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ContextMenu.xaml @@ -1,6 +1,5 @@ - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/DataValidationErrors.xaml b/src/Avalonia.Themes.Fluent/Controls/DataValidationErrors.xaml index 649a186c7e..a4055519b6 100644 --- a/src/Avalonia.Themes.Fluent/Controls/DataValidationErrors.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/DataValidationErrors.xaml @@ -1,8 +1,8 @@ - + @@ -14,8 +14,7 @@ @@ -26,10 +25,33 @@ - - + - - - - - - - - - - - - + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/DatePicker.xaml b/src/Avalonia.Themes.Fluent/Controls/DatePicker.xaml index 11d6b9fdfc..bc47f3892e 100644 --- a/src/Avalonia.Themes.Fluent/Controls/DatePicker.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/DatePicker.xaml @@ -5,125 +5,81 @@ // All other rights reserved. --> - - - + + + + + + + + + + Error + + + + + - - - 0,0,0,4 - 40 - 40 - 41 - 296 - 456 - 0,3,0,6 - 9,3,0,6 - 0,3,0,6 - 9,3,0,6 - 1 - - - - - - - - + 0,0,0,4 + 40 + 40 + 41 + 296 + 456 + 0,3,0,6 + 9,3,0,6 + 0,3,0,6 + 9,3,0,6 + 1 - - - - + + + + + + - - - - - - - + + + @@ -138,13 +94,16 @@ - - - - + + + - - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/DateTimePickerShared.xaml b/src/Avalonia.Themes.Fluent/Controls/DateTimePickerShared.xaml new file mode 100644 index 0000000000..be664b375d --- /dev/null +++ b/src/Avalonia.Themes.Fluent/Controls/DateTimePickerShared.xaml @@ -0,0 +1,118 @@ + + + + + + + Standard Item + Month Item + Button + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/DropDownButton.xaml b/src/Avalonia.Themes.Fluent/Controls/DropDownButton.xaml index b96c689ab6..96fd575f4f 100644 --- a/src/Avalonia.Themes.Fluent/Controls/DropDownButton.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/DropDownButton.xaml @@ -1,103 +1,97 @@ - - - - - - - - - - - - - 32 - + + + + + + + + + - - - - - - - + 32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + - + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/EmbeddableControlRoot.xaml b/src/Avalonia.Themes.Fluent/Controls/EmbeddableControlRoot.xaml index 79560be933..f8b4854553 100644 --- a/src/Avalonia.Themes.Fluent/Controls/EmbeddableControlRoot.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/EmbeddableControlRoot.xaml @@ -1,19 +1,22 @@ - + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/Expander.xaml b/src/Avalonia.Themes.Fluent/Controls/Expander.xaml index 33d502772e..7d5bb48333 100644 --- a/src/Avalonia.Themes.Fluent/Controls/Expander.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/Expander.xaml @@ -1,31 +1,41 @@ - + - - - - - - - - + + + + Expanded content + + + + + Expanded content + + + Expanded content - + Expanded content - + + + + + + + Expanded content - + Expanded content @@ -34,72 +44,28 @@ - - 16 - 16 - - 1 - - 1,1,0,1 - 1,1,1,0 - 0,1,1,1 - 1,0,1,1 - - - - - - - - - - - - - + 16 + 16 + 1 + 1,1,0,1 + 1,1,1,0 + 0,1,1,1 + 1,0,1,1 + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + - - + + + + + + + + + - - - - + + + + + + + + - - - - - + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/FluentControls.xaml b/src/Avalonia.Themes.Fluent/Controls/FluentControls.xaml index 5b217e4764..577539b26b 100644 --- a/src/Avalonia.Themes.Fluent/Controls/FluentControls.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/FluentControls.xaml @@ -1,70 +1,78 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/FlyoutPresenter.xaml b/src/Avalonia.Themes.Fluent/Controls/FlyoutPresenter.xaml index 92f8177ead..2dca5b0770 100644 --- a/src/Avalonia.Themes.Fluent/Controls/FlyoutPresenter.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/FlyoutPresenter.xaml @@ -1,9 +1,7 @@ - - - 1 - - - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/FocusAdorner.xaml b/src/Avalonia.Themes.Fluent/Controls/FocusAdorner.xaml index 91bf71ed4d..c3f489da80 100644 --- a/src/Avalonia.Themes.Fluent/Controls/FocusAdorner.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/FocusAdorner.xaml @@ -1,4 +1,4 @@ - 0 diff --git a/src/Avalonia.Themes.Fluent/Controls/GridSplitter.xaml b/src/Avalonia.Themes.Fluent/Controls/GridSplitter.xaml index e3a7b04f33..ca57eccd13 100644 --- a/src/Avalonia.Themes.Fluent/Controls/GridSplitter.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/GridSplitter.xaml @@ -1,24 +1,22 @@ - - - - - + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ItemsControl.xaml b/src/Avalonia.Themes.Fluent/Controls/ItemsControl.xaml index 19d13b6399..fc85b7b9ff 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ItemsControl.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ItemsControl.xaml @@ -1,16 +1,19 @@ - + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/Label.xaml b/src/Avalonia.Themes.Fluent/Controls/Label.xaml index d41e4e2166..ff6909ee87 100644 --- a/src/Avalonia.Themes.Fluent/Controls/Label.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/Label.xaml @@ -1,18 +1,22 @@ - + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ListBox.xaml b/src/Avalonia.Themes.Fluent/Controls/ListBox.xaml index 8011ed9daf..c17dc65cca 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ListBox.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ListBox.xaml @@ -1,4 +1,5 @@ - + @@ -9,15 +10,16 @@ - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ListBoxItem.xaml b/src/Avalonia.Themes.Fluent/Controls/ListBoxItem.xaml index 11f3c12772..fc1d0c5ff1 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ListBoxItem.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ListBoxItem.xaml @@ -1,5 +1,5 @@ - + @@ -12,10 +12,8 @@ - - 12,9,12,12 - - - + - - + + - - - + + - - - + + - + - - - + + - - - + + - - - - + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ManagedFileChooser.xaml b/src/Avalonia.Themes.Fluent/Controls/ManagedFileChooser.xaml index 60e16fcff2..55f4893057 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ManagedFileChooser.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ManagedFileChooser.xaml @@ -1,324 +1,328 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + - - + + + - - - - - - - - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/Menu.xaml b/src/Avalonia.Themes.Fluent/Controls/Menu.xaml index 4eb724a926..f5fd69a67f 100644 --- a/src/Avalonia.Themes.Fluent/Controls/Menu.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/Menu.xaml @@ -1,36 +1,113 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/MenuFlyoutPresenter.xaml b/src/Avalonia.Themes.Fluent/Controls/MenuFlyoutPresenter.xaml index ff50acab5e..6bca00b219 100644 --- a/src/Avalonia.Themes.Fluent/Controls/MenuFlyoutPresenter.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/MenuFlyoutPresenter.xaml @@ -1,6 +1,6 @@ - - - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/MenuItem.xaml b/src/Avalonia.Themes.Fluent/Controls/MenuItem.xaml index d6fcde1ff8..ed29addbc2 100644 --- a/src/Avalonia.Themes.Fluent/Controls/MenuItem.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/MenuItem.xaml @@ -1,60 +1,67 @@ - + - - - - - - - - - - - - - - + + + + + + + 😊 + - - - - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - - - -4 - 0,0,12,0 - 24,0,0,0 - M 1,0 10,10 l -9,10 -1,-1 L 8,10 -0,1 Z - + + -4 + 0,0,12,0 + 24,0,0,0 + M 1,0 10,10 l -9,10 -1,-1 L 8,10 -0,1 Z - - - - - - - - - - - - - - - - - + - - - - - + + + + + - - - - + + + + + - + + + + + - + - + - - + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/MenuScrollViewer.xaml b/src/Avalonia.Themes.Fluent/Controls/MenuScrollViewer.xaml new file mode 100644 index 0000000000..bc71d88a0d --- /dev/null +++ b/src/Avalonia.Themes.Fluent/Controls/MenuScrollViewer.xaml @@ -0,0 +1,98 @@ + + + + + + Item 1 + Item 2 + Item 3 + Item 4 + Item 5 + Item 6 + Item 7 + Item 8 + Item 9 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/NativeMenuBar.xaml b/src/Avalonia.Themes.Fluent/Controls/NativeMenuBar.xaml index bcdec6f61a..d3eaeafd01 100644 --- a/src/Avalonia.Themes.Fluent/Controls/NativeMenuBar.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/NativeMenuBar.xaml @@ -1,31 +1,30 @@ - - - - - - + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/NotificationCard.xaml b/src/Avalonia.Themes.Fluent/Controls/NotificationCard.xaml index 924d977eb5..51dcdd42e3 100644 --- a/src/Avalonia.Themes.Fluent/Controls/NotificationCard.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/NotificationCard.xaml @@ -1,15 +1,15 @@ - + - + - + - - - + - - - - - - + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/NumericUpDown.xaml b/src/Avalonia.Themes.Fluent/Controls/NumericUpDown.xaml index 36ab07e3e3..872367c6da 100644 --- a/src/Avalonia.Themes.Fluent/Controls/NumericUpDown.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/NumericUpDown.xaml @@ -1,17 +1,15 @@ - + - - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/OverlayPopupHost.xaml b/src/Avalonia.Themes.Fluent/Controls/OverlayPopupHost.xaml index 31b43c39cd..28d8fb508c 100644 --- a/src/Avalonia.Themes.Fluent/Controls/OverlayPopupHost.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/OverlayPopupHost.xaml @@ -1,20 +1,23 @@ - + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/PathIcon.xaml b/src/Avalonia.Themes.Fluent/Controls/PathIcon.xaml index d4952b3571..5584eb3ab9 100644 --- a/src/Avalonia.Themes.Fluent/Controls/PathIcon.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/PathIcon.xaml @@ -1,5 +1,5 @@ - + @@ -8,22 +8,18 @@ - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/PopupRoot.xaml b/src/Avalonia.Themes.Fluent/Controls/PopupRoot.xaml index f608cf55f5..5a924830b1 100644 --- a/src/Avalonia.Themes.Fluent/Controls/PopupRoot.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/PopupRoot.xaml @@ -1,10 +1,10 @@ - - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ProgressBar.xaml b/src/Avalonia.Themes.Fluent/Controls/ProgressBar.xaml index 5c0edf19c2..dc591ede12 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ProgressBar.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ProgressBar.xaml @@ -1,22 +1,31 @@ - + - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/RadioButton.xaml b/src/Avalonia.Themes.Fluent/Controls/RadioButton.xaml index e967dc8807..a1c4ba4f2d 100644 --- a/src/Avalonia.Themes.Fluent/Controls/RadioButton.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/RadioButton.xaml @@ -1,4 +1,4 @@ - + @@ -9,7 +9,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/RepeatButton.xaml b/src/Avalonia.Themes.Fluent/Controls/RepeatButton.xaml index 7fa515d3f7..a54187104b 100644 --- a/src/Avalonia.Themes.Fluent/Controls/RepeatButton.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/RepeatButton.xaml @@ -1,28 +1,29 @@ - + + + - - 8,5,8,6 - - - + - + - + - - + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/RichTextBlock.xaml b/src/Avalonia.Themes.Fluent/Controls/RichTextBlock.xaml new file mode 100644 index 0000000000..75af2efcb1 --- /dev/null +++ b/src/Avalonia.Themes.Fluent/Controls/RichTextBlock.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ScrollBar.xaml b/src/Avalonia.Themes.Fluent/Controls/ScrollBar.xaml index 4727ff72b9..4544fbe339 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ScrollBar.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ScrollBar.xaml @@ -1,302 +1,283 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + - - - - - - - - + + + - + + + - + + + + - - - - - - - - - - - - - - - - - + + + + + + - + - + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ScrollViewer.xaml b/src/Avalonia.Themes.Fluent/Controls/ScrollViewer.xaml index b7addcb61e..2c727b4435 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ScrollViewer.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ScrollViewer.xaml @@ -1,24 +1,26 @@ - - + - - - - - - - - + + + Item 1 + Item 2 + Item 3 + Item 4 + Item 5 + Item 6 + Item 7 + Item 8 + Item 9 + + - - - - - - - - - - - - - + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/Separator.xaml b/src/Avalonia.Themes.Fluent/Controls/Separator.xaml index 5d95ccc404..d13bffe5e1 100644 --- a/src/Avalonia.Themes.Fluent/Controls/Separator.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/Separator.xaml @@ -1,7 +1,11 @@ - - - - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/Slider.xaml b/src/Avalonia.Themes.Fluent/Controls/Slider.xaml index cd2c02c567..1e4a7ac097 100644 --- a/src/Avalonia.Themes.Fluent/Controls/Slider.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/Slider.xaml @@ -1,275 +1,397 @@ - + - + + + + + + + + + + Error + + + + + + + + - - 0,0,0,4 - 15 - 15 - 32 - 32 - 10 - 20 - 20 - 20 - 20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - + - - + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/SplitButton.xaml b/src/Avalonia.Themes.Fluent/Controls/SplitButton.xaml index 91c901f567..9a93b2625b 100644 --- a/src/Avalonia.Themes.Fluent/Controls/SplitButton.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/SplitButton.xaml @@ -1,37 +1,120 @@ - - - - + + + + Hello + + + Hello - + Disabled + + + Hello + + + Hello + - - 32 - 32 - 1 - 32 + 32 + 32 + 1 + 32 + + + + - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + @@ -41,211 +124,83 @@ - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/SplitView.xaml b/src/Avalonia.Themes.Fluent/Controls/SplitView.xaml index 55d46e32a1..9feb6c7fc6 100644 --- a/src/Avalonia.Themes.Fluent/Controls/SplitView.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/SplitView.xaml @@ -1,4 +1,4 @@ - @@ -15,219 +15,235 @@ - - 320 - 48 - 00:00:00.2 - 00:00:00.1 - 0.1,0.9,0.2,1.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/TabControl.xaml b/src/Avalonia.Themes.Fluent/Controls/TabControl.xaml index 322f6ce89e..17d179e0cd 100644 --- a/src/Avalonia.Themes.Fluent/Controls/TabControl.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/TabControl.xaml @@ -1,29 +1,24 @@ - + - + - + - + - - 0 0 0 2 - - - - - - - + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/TabItem.xaml b/src/Avalonia.Themes.Fluent/Controls/TabItem.xaml index ebe6f82917..e323be72e2 100644 --- a/src/Avalonia.Themes.Fluent/Controls/TabItem.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/TabItem.xaml @@ -1,21 +1,22 @@ - + + - - 48 - 24 - 2 - - - - - - - - - - + + + + - - + + - - + + - - + + - - + + - - + + - - - + + + - + - - - - + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/TabStrip.xaml b/src/Avalonia.Themes.Fluent/Controls/TabStrip.xaml index 681ac48850..59cb7f6752 100644 --- a/src/Avalonia.Themes.Fluent/Controls/TabStrip.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/TabStrip.xaml @@ -1,4 +1,5 @@ - + @@ -8,7 +9,8 @@ - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/TabStripItem.xaml b/src/Avalonia.Themes.Fluent/Controls/TabStripItem.xaml index 59f68a1547..fab8ba87aa 100644 --- a/src/Avalonia.Themes.Fluent/Controls/TabStripItem.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/TabStripItem.xaml @@ -1,20 +1,21 @@ - + Leaf Arch + Background - - 48 - 2 - - - - - - - - - - - - - + + + + - - + + - - + + - - + + - - + + - - - + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/TextBox.xaml b/src/Avalonia.Themes.Fluent/Controls/TextBox.xaml index 40d9b11f7c..17c69da8fd 100644 --- a/src/Avalonia.Themes.Fluent/Controls/TextBox.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/TextBox.xaml @@ -1,42 +1,106 @@ - + - + + Left + Center + Clear + Reveal Password + Password Revealed + + + Content + - - - 0,0,0,4 - M 11.416016,10 20,1.4160156 18.583984,0 10,8.5839846 1.4160156,0 0,1.4160156 8.5839844,10 0,18.583985 1.4160156,20 10,11.416015 18.583984,20 20,18.583985 Z - m10.051 7.0032c2.215 0 4.0105 1.7901 4.0105 3.9984s-1.7956 3.9984-4.0105 3.9984c-2.215 0-4.0105-1.7901-4.0105-3.9984s1.7956-3.9984 4.0105-3.9984zm0 1.4994c-1.3844 0-2.5066 1.1188-2.5066 2.499s1.1222 2.499 2.5066 2.499 2.5066-1.1188 2.5066-2.499-1.1222-2.499-2.5066-2.499zm0-5.0026c4.6257 0 8.6188 3.1487 9.7267 7.5613 0.10085 0.40165-0.14399 0.80877-0.54686 0.90931-0.40288 0.10054-0.81122-0.14355-0.91208-0.54521-0.94136-3.7492-4.3361-6.4261-8.2678-6.4261-3.9334 0-7.3292 2.6792-8.2689 6.4306-0.10063 0.40171-0.50884 0.64603-0.91177 0.54571s-0.648-0.5073-0.54737-0.90901c1.106-4.4152 5.1003-7.5667 9.728-7.5667z - m0.21967 0.21965c-0.26627 0.26627-0.29047 0.68293-0.07262 0.97654l0.07262 0.08412 4.0346 4.0346c-1.922 1.3495-3.3585 3.365-3.9554 5.7495-0.10058 0.4018 0.14362 0.8091 0.54543 0.9097 0.40182 0.1005 0.80909-0.1436 0.90968-0.5455 0.52947-2.1151 1.8371-3.8891 3.5802-5.0341l1.8096 1.8098c-0.70751 0.7215-1.1438 1.71-1.1438 2.8003 0 2.2092 1.7909 4 4 4 1.0904 0 2.0788-0.4363 2.8004-1.1438l5.9193 5.9195c0.2929 0.2929 0.7677 0.2929 1.0606 0 0.2663-0.2662 0.2905-0.6829 0.0726-0.9765l-0.0726-0.0841-6.1135-6.1142 0.0012-0.0015-1.2001-1.1979-2.8699-2.8693 2e-3 -8e-4 -2.8812-2.8782 0.0012-0.0018-1.1333-1.1305-4.3064-4.3058c-0.29289-0.29289-0.76777-0.29289-1.0607 0zm7.9844 9.0458 3.5351 3.5351c-0.45 0.4358-1.0633 0.704-1.7392 0.704-1.3807 0-2.5-1.1193-2.5-2.5 0-0.6759 0.26824-1.2892 0.7041-1.7391zm1.7959-5.7655c-1.0003 0-1.9709 0.14807-2.8889 0.425l1.237 1.2362c0.5358-0.10587 1.0883-0.16119 1.6519-0.16119 3.9231 0 7.3099 2.6803 8.2471 6.4332 0.1004 0.4018 0.5075 0.6462 0.9094 0.5459 0.4019-0.1004 0.6463-0.5075 0.5459-0.9094-1.103-4.417-5.0869-7.5697-9.7024-7.5697zm0.1947 3.5093 3.8013 3.8007c-0.1018-2.0569-1.7488-3.7024-3.8013-3.8007z - - - - - + 0,0,0,4 + M 11.416016,10 20,1.4160156 18.583984,0 10,8.5839846 1.4160156,0 0,1.4160156 8.5839844,10 0,18.583985 1.4160156,20 10,11.416015 18.583984,20 20,18.583985 Z + m10.051 7.0032c2.215 0 4.0105 1.7901 4.0105 3.9984s-1.7956 3.9984-4.0105 3.9984c-2.215 0-4.0105-1.7901-4.0105-3.9984s1.7956-3.9984 4.0105-3.9984zm0 1.4994c-1.3844 0-2.5066 1.1188-2.5066 2.499s1.1222 2.499 2.5066 2.499 2.5066-1.1188 2.5066-2.499-1.1222-2.499-2.5066-2.499zm0-5.0026c4.6257 0 8.6188 3.1487 9.7267 7.5613 0.10085 0.40165-0.14399 0.80877-0.54686 0.90931-0.40288 0.10054-0.81122-0.14355-0.91208-0.54521-0.94136-3.7492-4.3361-6.4261-8.2678-6.4261-3.9334 0-7.3292 2.6792-8.2689 6.4306-0.10063 0.40171-0.50884 0.64603-0.91177 0.54571s-0.648-0.5073-0.54737-0.90901c1.106-4.4152 5.1003-7.5667 9.728-7.5667z + m0.21967 0.21965c-0.26627 0.26627-0.29047 0.68293-0.07262 0.97654l0.07262 0.08412 4.0346 4.0346c-1.922 1.3495-3.3585 3.365-3.9554 5.7495-0.10058 0.4018 0.14362 0.8091 0.54543 0.9097 0.40182 0.1005 0.80909-0.1436 0.90968-0.5455 0.52947-2.1151 1.8371-3.8891 3.5802-5.0341l1.8096 1.8098c-0.70751 0.7215-1.1438 1.71-1.1438 2.8003 0 2.2092 1.7909 4 4 4 1.0904 0 2.0788-0.4363 2.8004-1.1438l5.9193 5.9195c0.2929 0.2929 0.7677 0.2929 1.0606 0 0.2663-0.2662 0.2905-0.6829 0.0726-0.9765l-0.0726-0.0841-6.1135-6.1142 0.0012-0.0015-1.2001-1.1979-2.8699-2.8693 2e-3 -8e-4 -2.8812-2.8782 0.0012-0.0018-1.1333-1.1305-4.3064-4.3058c-0.29289-0.29289-0.76777-0.29289-1.0607 0zm7.9844 9.0458 3.5351 3.5351c-0.45 0.4358-1.0633 0.704-1.7392 0.704-1.3807 0-2.5-1.1193-2.5-2.5 0-0.6759 0.26824-1.2892 0.7041-1.7391zm1.7959-5.7655c-1.0003 0-1.9709 0.14807-2.8889 0.425l1.237 1.2362c0.5358-0.10587 1.0883-0.16119 1.6519-0.16119 3.9231 0 7.3099 2.6803 8.2471 6.4332 0.1004 0.4018 0.5075 0.6462 0.9094 0.5459 0.4019-0.1004 0.6463-0.5075 0.5459-0.9094-1.103-4.417-5.0869-7.5697-9.7024-7.5697zm0.1947 3.5093 3.8013 3.8007c-0.1018-2.0569-1.7488-3.7024-3.8013-3.8007z - - - - - - + + + + + - + + + + + + + + + + + + + + + + + + + + - + @@ -62,43 +126,50 @@ - - + + - - - - - + + + + + @@ -107,187 +178,85 @@ - - - - - + + + - - + + - + + + - - + + - + + + - + + - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/TimePicker.xaml b/src/Avalonia.Themes.Fluent/Controls/TimePicker.xaml index e03dc76f16..0d1b416d7a 100644 --- a/src/Avalonia.Themes.Fluent/Controls/TimePicker.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/TimePicker.xaml @@ -1,38 +1,84 @@ - - - - 40 - 1 - 1 - 0,0,0,4 - 40 - 41 - 242 - 456 - 0,3,0,6 - 0,3,0,6 - + + + + + + + + + + + Error + + + + + + + - - - + 40 + 1 + 1 + 0,0,0,4 + 40 + 41 + 242 + 456 + 0,3,0,6 + 0,3,0,6 - + + + + + + + + + @@ -46,17 +92,18 @@ + Grid.Row="0" + Content="{TemplateBinding Header}" + ContentTemplate="{TemplateBinding HeaderTemplate}" + Margin="{DynamicResource TimePickerTopHeaderMargin}" + MaxWidth="{DynamicResource TimePickerThemeMaxWidth}" + Foreground="{DynamicResource TimePickerHeaderForeground}" + HorizontalAlignment="Stretch" + VerticalAlignment="Top" /> - @@ -136,45 +179,28 @@ - - - - - + - + - + - - - + + - - - - - - - + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/TitleBar.xaml b/src/Avalonia.Themes.Fluent/Controls/TitleBar.xaml index 4dba5b4ba4..5730b19e78 100644 --- a/src/Avalonia.Themes.Fluent/Controls/TitleBar.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/TitleBar.xaml @@ -1,53 +1,59 @@ - - - - - - - + + + + + + - + + + + + + + + + + + + + + + + - + - + - + - + - - + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ToggleButton.xaml b/src/Avalonia.Themes.Fluent/Controls/ToggleButton.xaml index e0d54d7232..7a46f21534 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ToggleButton.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ToggleButton.xaml @@ -1,5 +1,5 @@ - + @@ -10,10 +10,9 @@ - - 8,5,8,6 - - - - - + + + - + - + - + - + - + - + + - + - + - + - - + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ToggleSwitch.xaml b/src/Avalonia.Themes.Fluent/Controls/ToggleSwitch.xaml index a2b50a859d..aaa20a105c 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ToggleSwitch.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ToggleSwitch.xaml @@ -1,43 +1,27 @@ - - - 0,0,0,6 - 6 - 6 - 0 - + - + - - + + - - - - - - + Content="Header" + OffContent="Off" + OnContent="On"/> + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/ToolTip.xaml b/src/Avalonia.Themes.Fluent/Controls/ToolTip.xaml index 2d18be91cb..bc9dceb545 100644 --- a/src/Avalonia.Themes.Fluent/Controls/ToolTip.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/ToolTip.xaml @@ -1,56 +1,34 @@ - - + - - - Hover Here - - - - + + + Text Content + Very long text content which should exceed the maximum with of the tooltip and wrap. + - ToolTip - A control which pops up a hint when a control is hovered + Multi-line + Control Content - - ToolTip bottom placement - - + + + - - 320 - + 320 - - - - - - - + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/TransitioningContentControl.xaml b/src/Avalonia.Themes.Fluent/Controls/TransitioningContentControl.xaml index 6a4d56ccb7..f1971fe236 100644 --- a/src/Avalonia.Themes.Fluent/Controls/TransitioningContentControl.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/TransitioningContentControl.xaml @@ -1,7 +1,6 @@ - - - + + diff --git a/src/Avalonia.Themes.Fluent/Controls/TreeView.xaml b/src/Avalonia.Themes.Fluent/Controls/TreeView.xaml index 656b72e07b..c340599000 100644 --- a/src/Avalonia.Themes.Fluent/Controls/TreeView.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/TreeView.xaml @@ -1,28 +1,43 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/TreeViewItem.xaml b/src/Avalonia.Themes.Fluent/Controls/TreeViewItem.xaml index f86b67bb6c..83abe7848c 100644 --- a/src/Avalonia.Themes.Fluent/Controls/TreeViewItem.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/TreeViewItem.xaml @@ -1,4 +1,4 @@ - @@ -6,32 +6,29 @@ - - + + - + - + - - 16 - 12 - 12, 0, 12, 0 - M 1,0 10,10 l -9,10 -1,-1 L 8,10 -0,1 Z - M0,1 L10,10 20,1 19,0 10,8 1,0 Z - - + 16 + 12 + 12, 0, 12, 0 + M 1,0 10,10 l -9,10 -1,-1 L 8,10 -0,1 Z + M0,1 L10,10 20,1 19,0 10,8 1,0 Z + - - + + + @@ -79,7 +80,7 @@ @@ -99,83 +100,75 @@ - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - + + + - + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/UserControl.xaml b/src/Avalonia.Themes.Fluent/Controls/UserControl.xaml index d6028daff8..7dc23f652a 100644 --- a/src/Avalonia.Themes.Fluent/Controls/UserControl.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/UserControl.xaml @@ -1,16 +1,24 @@ - diff --git a/src/Avalonia.Themes.Fluent/Controls/Window.xaml b/src/Avalonia.Themes.Fluent/Controls/Window.xaml index 90963c606c..35cc81663f 100644 --- a/src/Avalonia.Themes.Fluent/Controls/Window.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/Window.xaml @@ -1,27 +1,30 @@ - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Fluent/Controls/WindowNotificationManager.xaml b/src/Avalonia.Themes.Fluent/Controls/WindowNotificationManager.xaml index 8d14c2d972..77f49941f0 100644 --- a/src/Avalonia.Themes.Fluent/Controls/WindowNotificationManager.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/WindowNotificationManager.xaml @@ -1,47 +1,57 @@ - - - + - + - + - - + + + diff --git a/src/Avalonia.Themes.Fluent/FluentTheme.cs b/src/Avalonia.Themes.Fluent/FluentTheme.cs index 81601f72a1..79dd81a068 100644 --- a/src/Avalonia.Themes.Fluent/FluentTheme.cs +++ b/src/Avalonia.Themes.Fluent/FluentTheme.cs @@ -174,7 +174,7 @@ namespace Avalonia.Themes.Fluent } } - public SelectorMatchResult TryAttach(IStyleable target, IStyleHost? host) => Loaded.TryAttach(target, host); + public SelectorMatchResult TryAttach(IStyleable target, object? host) => Loaded.TryAttach(target, host); public bool TryGetResource(object key, out object? value) { diff --git a/src/Avalonia.Themes.Default/Accents/Base.xaml b/src/Avalonia.Themes.Simple/Accents/Base.xaml similarity index 100% rename from src/Avalonia.Themes.Default/Accents/Base.xaml rename to src/Avalonia.Themes.Simple/Accents/Base.xaml diff --git a/src/Avalonia.Themes.Default/Accents/BaseDark.xaml b/src/Avalonia.Themes.Simple/Accents/BaseDark.xaml similarity index 100% rename from src/Avalonia.Themes.Default/Accents/BaseDark.xaml rename to src/Avalonia.Themes.Simple/Accents/BaseDark.xaml diff --git a/src/Avalonia.Themes.Default/Accents/BaseLight.xaml b/src/Avalonia.Themes.Simple/Accents/BaseLight.xaml similarity index 100% rename from src/Avalonia.Themes.Default/Accents/BaseLight.xaml rename to src/Avalonia.Themes.Simple/Accents/BaseLight.xaml diff --git a/src/Avalonia.Themes.Default/ApiCompatBaseline.txt b/src/Avalonia.Themes.Simple/ApiCompatBaseline.txt similarity index 100% rename from src/Avalonia.Themes.Default/ApiCompatBaseline.txt rename to src/Avalonia.Themes.Simple/ApiCompatBaseline.txt diff --git a/src/Avalonia.Themes.Default/Avalonia.Themes.Default.csproj b/src/Avalonia.Themes.Simple/Avalonia.Themes.Simple.csproj similarity index 100% rename from src/Avalonia.Themes.Default/Avalonia.Themes.Default.csproj rename to src/Avalonia.Themes.Simple/Avalonia.Themes.Simple.csproj diff --git a/src/Avalonia.Themes.Default/Controls/AutoCompleteBox.xaml b/src/Avalonia.Themes.Simple/Controls/AutoCompleteBox.xaml similarity index 68% rename from src/Avalonia.Themes.Default/Controls/AutoCompleteBox.xaml rename to src/Avalonia.Themes.Simple/Controls/AutoCompleteBox.xaml index fac8ca51f8..65dfaf982b 100644 --- a/src/Avalonia.Themes.Default/Controls/AutoCompleteBox.xaml +++ b/src/Avalonia.Themes.Simple/Controls/AutoCompleteBox.xaml @@ -1,32 +1,34 @@ - - - + + diff --git a/src/Avalonia.Themes.Default/Controls/ToggleButton.xaml b/src/Avalonia.Themes.Simple/Controls/Button.xaml similarity index 53% rename from src/Avalonia.Themes.Default/Controls/ToggleButton.xaml rename to src/Avalonia.Themes.Simple/Controls/Button.xaml index 17fb2af16c..9018677ab6 100644 --- a/src/Avalonia.Themes.Default/Controls/ToggleButton.xaml +++ b/src/Avalonia.Themes.Simple/Controls/Button.xaml @@ -1,40 +1,38 @@ - - - - - - - + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/ButtonSpinner.xaml b/src/Avalonia.Themes.Simple/Controls/ButtonSpinner.xaml new file mode 100644 index 0000000000..9798e5290b --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/ButtonSpinner.xaml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Default/Controls/Calendar.xaml b/src/Avalonia.Themes.Simple/Controls/Calendar.xaml similarity index 65% rename from src/Avalonia.Themes.Default/Controls/Calendar.xaml rename to src/Avalonia.Themes.Simple/Controls/Calendar.xaml index 4b67aa232b..6f7267581b 100644 --- a/src/Avalonia.Themes.Default/Controls/Calendar.xaml +++ b/src/Avalonia.Themes.Simple/Controls/Calendar.xaml @@ -1,12 +1,14 @@ - - - + + diff --git a/src/Avalonia.Themes.Simple/Controls/CalendarButton.xaml b/src/Avalonia.Themes.Simple/Controls/CalendarButton.xaml new file mode 100644 index 0000000000..59fb24663f --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/CalendarButton.xaml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Default/Controls/CalendarDatePicker.xaml b/src/Avalonia.Themes.Simple/Controls/CalendarDatePicker.xaml similarity index 64% rename from src/Avalonia.Themes.Default/Controls/CalendarDatePicker.xaml rename to src/Avalonia.Themes.Simple/Controls/CalendarDatePicker.xaml index 3e2e497d2c..43fc8c7a34 100644 --- a/src/Avalonia.Themes.Default/Controls/CalendarDatePicker.xaml +++ b/src/Avalonia.Themes.Simple/Controls/CalendarDatePicker.xaml @@ -1,20 +1,21 @@ - - - + - + + UseFloatingWatermark="{TemplateBinding UseFloatingWatermark}" + Watermark="{TemplateBinding Watermark}" /> - + + Margin="6,-1,6,6" + IsVisible="False"> @@ -132,8 +133,8 @@ + Margin="6,-3,7,6" + IsVisible="False"> @@ -146,39 +147,33 @@ - - + Stretch="Fill" /> - - - - - - - + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/CaptionButtons.xaml b/src/Avalonia.Themes.Simple/Controls/CaptionButtons.xaml new file mode 100644 index 0000000000..379b92ea17 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/CaptionButtons.xaml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/Carousel.xaml b/src/Avalonia.Themes.Simple/Controls/Carousel.xaml new file mode 100644 index 0000000000..e79e3942c9 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/Carousel.xaml @@ -0,0 +1,21 @@ + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Default/Controls/CheckBox.xaml b/src/Avalonia.Themes.Simple/Controls/CheckBox.xaml similarity index 57% rename from src/Avalonia.Themes.Default/Controls/CheckBox.xaml rename to src/Avalonia.Themes.Simple/Controls/CheckBox.xaml index 170ecdd5b8..10e0b883d5 100644 --- a/src/Avalonia.Themes.Default/Controls/CheckBox.xaml +++ b/src/Avalonia.Themes.Simple/Controls/CheckBox.xaml @@ -1,72 +1,75 @@ - - - - - - - - - + + + + + + + + diff --git a/src/Avalonia.Themes.Default/Controls/ComboBox.xaml b/src/Avalonia.Themes.Simple/Controls/ComboBox.xaml similarity index 65% rename from src/Avalonia.Themes.Default/Controls/ComboBox.xaml rename to src/Avalonia.Themes.Simple/Controls/ComboBox.xaml index 262f63e2d2..d7dabae516 100644 --- a/src/Avalonia.Themes.Default/Controls/ComboBox.xaml +++ b/src/Avalonia.Themes.Simple/Controls/ComboBox.xaml @@ -1,23 +1,7 @@ - - - - - - Item 1 - Item 2 - - - Item 1 - Item 2 - - - - - - - - + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/ComboBoxItem.xaml b/src/Avalonia.Themes.Simple/Controls/ComboBoxItem.xaml new file mode 100644 index 0000000000..c3d8b6f900 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/ComboBoxItem.xaml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/ContentControl.xaml b/src/Avalonia.Themes.Simple/Controls/ContentControl.xaml new file mode 100644 index 0000000000..415b1dc721 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/ContentControl.xaml @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/ContextMenu.xaml b/src/Avalonia.Themes.Simple/Controls/ContextMenu.xaml new file mode 100644 index 0000000000..e99f1c5ac0 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/ContextMenu.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/DataValidationErrors.xaml b/src/Avalonia.Themes.Simple/Controls/DataValidationErrors.xaml new file mode 100644 index 0000000000..da8ec03cd4 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/DataValidationErrors.xaml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/DatePicker.xaml b/src/Avalonia.Themes.Simple/Controls/DatePicker.xaml new file mode 100644 index 0000000000..a6da2ad9f8 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/DatePicker.xaml @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + Error + + + + + + + + + 0,0,0,4 + 40 + 40 + 41 + 296 + 456 + 0,3,0,6 + 9,3,0,6 + 0,3,0,6 + 9,3,0,6 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/DateTimePickerShared.xaml b/src/Avalonia.Themes.Simple/Controls/DateTimePickerShared.xaml new file mode 100644 index 0000000000..5909a1abbf --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/DateTimePickerShared.xaml @@ -0,0 +1,139 @@ + + + + + + + Standard Item + Month Item + Button + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Default/Controls/DropDownButton.xaml b/src/Avalonia.Themes.Simple/Controls/DropDownButton.xaml similarity index 54% rename from src/Avalonia.Themes.Default/Controls/DropDownButton.xaml rename to src/Avalonia.Themes.Simple/Controls/DropDownButton.xaml index 662c6379fb..6a50cd6e36 100644 --- a/src/Avalonia.Themes.Default/Controls/DropDownButton.xaml +++ b/src/Avalonia.Themes.Simple/Controls/DropDownButton.xaml @@ -1,12 +1,14 @@ - - - + - + - + - - + + + diff --git a/src/Avalonia.Themes.Simple/Controls/EmbeddableControlRoot.xaml b/src/Avalonia.Themes.Simple/Controls/EmbeddableControlRoot.xaml new file mode 100644 index 0000000000..79d6c6d917 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/EmbeddableControlRoot.xaml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/Expander.xaml b/src/Avalonia.Themes.Simple/Controls/Expander.xaml new file mode 100644 index 0000000000..9920c9445a --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/Expander.xaml @@ -0,0 +1,256 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Default/Controls/FlyoutPresenter.xaml b/src/Avalonia.Themes.Simple/Controls/FlyoutPresenter.xaml similarity index 78% rename from src/Avalonia.Themes.Default/Controls/FlyoutPresenter.xaml rename to src/Avalonia.Themes.Simple/Controls/FlyoutPresenter.xaml index 3bc5e085ff..08959cfbbe 100644 --- a/src/Avalonia.Themes.Default/Controls/FlyoutPresenter.xaml +++ b/src/Avalonia.Themes.Simple/Controls/FlyoutPresenter.xaml @@ -1,8 +1,10 @@ - - - + + diff --git a/src/Avalonia.Themes.Simple/Controls/FocusAdorner.xaml b/src/Avalonia.Themes.Simple/Controls/FocusAdorner.xaml new file mode 100644 index 0000000000..f1d5f5f2ac --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/FocusAdorner.xaml @@ -0,0 +1,11 @@ + diff --git a/src/Avalonia.Themes.Simple/Controls/GridSplitter.xaml b/src/Avalonia.Themes.Simple/Controls/GridSplitter.xaml new file mode 100644 index 0000000000..f2a3f01397 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/GridSplitter.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/ItemsControl.xaml b/src/Avalonia.Themes.Simple/Controls/ItemsControl.xaml new file mode 100644 index 0000000000..d8cdf96abd --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/ItemsControl.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Default/Controls/TabStripItem.xaml b/src/Avalonia.Themes.Simple/Controls/Label.xaml similarity index 59% rename from src/Avalonia.Themes.Default/Controls/TabStripItem.xaml rename to src/Avalonia.Themes.Simple/Controls/Label.xaml index 61eecc0395..0faa4852f2 100644 --- a/src/Avalonia.Themes.Default/Controls/TabStripItem.xaml +++ b/src/Avalonia.Themes.Simple/Controls/Label.xaml @@ -1,24 +1,22 @@ - - - - + + diff --git a/src/Avalonia.Themes.Simple/Controls/ListBox.xaml b/src/Avalonia.Themes.Simple/Controls/ListBox.xaml new file mode 100644 index 0000000000..7308738681 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/ListBox.xaml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/ListBoxItem.xaml b/src/Avalonia.Themes.Simple/Controls/ListBoxItem.xaml new file mode 100644 index 0000000000..4d918326c8 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/ListBoxItem.xaml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/ManagedFileChooser.xaml b/src/Avalonia.Themes.Simple/Controls/ManagedFileChooser.xaml new file mode 100644 index 0000000000..52d9000396 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/ManagedFileChooser.xaml @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Show hidden files + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/Menu.xaml b/src/Avalonia.Themes.Simple/Controls/Menu.xaml new file mode 100644 index 0000000000..95b259bfa6 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/Menu.xaml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Default/Controls/MenuFlyoutPresenter.xaml b/src/Avalonia.Themes.Simple/Controls/MenuFlyoutPresenter.xaml similarity index 76% rename from src/Avalonia.Themes.Default/Controls/MenuFlyoutPresenter.xaml rename to src/Avalonia.Themes.Simple/Controls/MenuFlyoutPresenter.xaml index d56b46b17c..d974c36d31 100644 --- a/src/Avalonia.Themes.Default/Controls/MenuFlyoutPresenter.xaml +++ b/src/Avalonia.Themes.Simple/Controls/MenuFlyoutPresenter.xaml @@ -1,6 +1,8 @@ - - - + + diff --git a/src/Avalonia.Themes.Simple/Controls/MenuItem.xaml b/src/Avalonia.Themes.Simple/Controls/MenuItem.xaml new file mode 100644 index 0000000000..ec22ee413d --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/MenuItem.xaml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/NativeMenuBar.xaml b/src/Avalonia.Themes.Simple/Controls/NativeMenuBar.xaml new file mode 100644 index 0000000000..8c51ec8609 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/NativeMenuBar.xaml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/NotificationCard.xaml b/src/Avalonia.Themes.Simple/Controls/NotificationCard.xaml new file mode 100644 index 0000000000..524f964afc --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/NotificationCard.xaml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Default/Controls/NumericUpDown.xaml b/src/Avalonia.Themes.Simple/Controls/NumericUpDown.xaml similarity index 71% rename from src/Avalonia.Themes.Default/Controls/NumericUpDown.xaml rename to src/Avalonia.Themes.Simple/Controls/NumericUpDown.xaml index 6740be69bb..d3adfb31e0 100644 --- a/src/Avalonia.Themes.Default/Controls/NumericUpDown.xaml +++ b/src/Avalonia.Themes.Simple/Controls/NumericUpDown.xaml @@ -1,40 +1,39 @@ - - - - + + diff --git a/src/Avalonia.Themes.Simple/Controls/OverlayPopupHost.xaml b/src/Avalonia.Themes.Simple/Controls/OverlayPopupHost.xaml new file mode 100644 index 0000000000..d1f5585c02 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/OverlayPopupHost.xaml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/PathIcon.xaml b/src/Avalonia.Themes.Simple/Controls/PathIcon.xaml new file mode 100644 index 0000000000..4116b5784e --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/PathIcon.xaml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/PopupRoot.xaml b/src/Avalonia.Themes.Simple/Controls/PopupRoot.xaml new file mode 100644 index 0000000000..a5593e3a68 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/PopupRoot.xaml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/ProgressBar.xaml b/src/Avalonia.Themes.Simple/Controls/ProgressBar.xaml new file mode 100644 index 0000000000..5adb5bde7e --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/ProgressBar.xaml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/RadioButton.xaml b/src/Avalonia.Themes.Simple/Controls/RadioButton.xaml new file mode 100644 index 0000000000..c837b44402 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/RadioButton.xaml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Default/Controls/Button.xaml b/src/Avalonia.Themes.Simple/Controls/RepeatButton.xaml similarity index 58% rename from src/Avalonia.Themes.Default/Controls/Button.xaml rename to src/Avalonia.Themes.Simple/Controls/RepeatButton.xaml index a2971c3ff6..73cfd4d810 100644 --- a/src/Avalonia.Themes.Default/Controls/Button.xaml +++ b/src/Avalonia.Themes.Simple/Controls/RepeatButton.xaml @@ -1,36 +1,34 @@ - - - - - - + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/RichTextBlock.xaml b/src/Avalonia.Themes.Simple/Controls/RichTextBlock.xaml new file mode 100644 index 0000000000..c0570282cb --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/RichTextBlock.xaml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/ScrollBar.xaml b/src/Avalonia.Themes.Simple/Controls/ScrollBar.xaml new file mode 100644 index 0000000000..d28ba66f6d --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/ScrollBar.xaml @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Default/Controls/ScrollViewer.xaml b/src/Avalonia.Themes.Simple/Controls/ScrollViewer.xaml similarity index 52% rename from src/Avalonia.Themes.Default/Controls/ScrollViewer.xaml rename to src/Avalonia.Themes.Simple/Controls/ScrollViewer.xaml index aab1b76259..e11fbb6f15 100644 --- a/src/Avalonia.Themes.Default/Controls/ScrollViewer.xaml +++ b/src/Avalonia.Themes.Simple/Controls/ScrollViewer.xaml @@ -1,106 +1,125 @@ - - + - - + - - + + + diff --git a/src/Avalonia.Themes.Simple/Controls/Separator.xaml b/src/Avalonia.Themes.Simple/Controls/Separator.xaml new file mode 100644 index 0000000000..e142cf29ad --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/Separator.xaml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/SimpleControls.xaml b/src/Avalonia.Themes.Simple/Controls/SimpleControls.xaml new file mode 100644 index 0000000000..644c6ed416 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/SimpleControls.xaml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/Slider.xaml b/src/Avalonia.Themes.Simple/Controls/Slider.xaml new file mode 100644 index 0000000000..851ee1b78a --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/Slider.xaml @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/SplitButton.xaml b/src/Avalonia.Themes.Simple/Controls/SplitButton.xaml new file mode 100644 index 0000000000..f0d22aac97 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/SplitButton.xaml @@ -0,0 +1,223 @@ + + + + + + + + + + + 24 + 24 + 1 + 24 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/SplitView.xaml b/src/Avalonia.Themes.Simple/Controls/SplitView.xaml new file mode 100644 index 0000000000..b0e4d0b096 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/SplitView.xaml @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + 320 + 48 + + 00:00:00.2 + 00:00:00.1 + 0.1,0.9,0.2,1.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/TabControl.xaml b/src/Avalonia.Themes.Simple/Controls/TabControl.xaml new file mode 100644 index 0000000000..4d1fcc0336 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/TabControl.xaml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/TabItem.xaml b/src/Avalonia.Themes.Simple/Controls/TabItem.xaml new file mode 100644 index 0000000000..7b6a1d1116 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/TabItem.xaml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Default/Controls/TabStrip.xaml b/src/Avalonia.Themes.Simple/Controls/TabStrip.xaml similarity index 63% rename from src/Avalonia.Themes.Default/Controls/TabStrip.xaml rename to src/Avalonia.Themes.Simple/Controls/TabStrip.xaml index 29ca1e7c94..3960c1d275 100644 --- a/src/Avalonia.Themes.Default/Controls/TabStrip.xaml +++ b/src/Avalonia.Themes.Simple/Controls/TabStrip.xaml @@ -1,11 +1,13 @@ - - - - + + diff --git a/src/Avalonia.Themes.Simple/Controls/TabStripItem.xaml b/src/Avalonia.Themes.Simple/Controls/TabStripItem.xaml new file mode 100644 index 0000000000..b4d7218ec3 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/TabStripItem.xaml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/TextBox.xaml b/src/Avalonia.Themes.Simple/Controls/TextBox.xaml new file mode 100644 index 0000000000..5fa6412688 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/TextBox.xaml @@ -0,0 +1,221 @@ + + M 11.416016,10 20,1.4160156 18.583984,0 10,8.5839846 1.4160156,0 0,1.4160156 8.5839844,10 0,18.583985 1.4160156,20 10,11.416015 18.583984,20 20,18.583985 Z + m10.051 7.0032c2.215 0 4.0105 1.7901 4.0105 3.9984s-1.7956 3.9984-4.0105 3.9984c-2.215 0-4.0105-1.7901-4.0105-3.9984s1.7956-3.9984 4.0105-3.9984zm0 1.4994c-1.3844 0-2.5066 1.1188-2.5066 2.499s1.1222 2.499 2.5066 2.499 2.5066-1.1188 2.5066-2.499-1.1222-2.499-2.5066-2.499zm0-5.0026c4.6257 0 8.6188 3.1487 9.7267 7.5613 0.10085 0.40165-0.14399 0.80877-0.54686 0.90931-0.40288 0.10054-0.81122-0.14355-0.91208-0.54521-0.94136-3.7492-4.3361-6.4261-8.2678-6.4261-3.9334 0-7.3292 2.6792-8.2689 6.4306-0.10063 0.40171-0.50884 0.64603-0.91177 0.54571s-0.648-0.5073-0.54737-0.90901c1.106-4.4152 5.1003-7.5667 9.728-7.5667z + m0.21967 0.21965c-0.26627 0.26627-0.29047 0.68293-0.07262 0.97654l0.07262 0.08412 4.0346 4.0346c-1.922 1.3495-3.3585 3.365-3.9554 5.7495-0.10058 0.4018 0.14362 0.8091 0.54543 0.9097 0.40182 0.1005 0.80909-0.1436 0.90968-0.5455 0.52947-2.1151 1.8371-3.8891 3.5802-5.0341l1.8096 1.8098c-0.70751 0.7215-1.1438 1.71-1.1438 2.8003 0 2.2092 1.7909 4 4 4 1.0904 0 2.0788-0.4363 2.8004-1.1438l5.9193 5.9195c0.2929 0.2929 0.7677 0.2929 1.0606 0 0.2663-0.2662 0.2905-0.6829 0.0726-0.9765l-0.0726-0.0841-6.1135-6.1142 0.0012-0.0015-1.2001-1.1979-2.8699-2.8693 2e-3 -8e-4 -2.8812-2.8782 0.0012-0.0018-1.1333-1.1305-4.3064-4.3058c-0.29289-0.29289-0.76777-0.29289-1.0607 0zm7.9844 9.0458 3.5351 3.5351c-0.45 0.4358-1.0633 0.704-1.7392 0.704-1.3807 0-2.5-1.1193-2.5-2.5 0-0.6759 0.26824-1.2892 0.7041-1.7391zm1.7959-5.7655c-1.0003 0-1.9709 0.14807-2.8889 0.425l1.237 1.2362c0.5358-0.10587 1.0883-0.16119 1.6519-0.16119 3.9231 0 7.3099 2.6803 8.2471 6.4332 0.1004 0.4018 0.5075 0.6462 0.9094 0.5459 0.4019-0.1004 0.6463-0.5075 0.5459-0.9094-1.103-4.417-5.0869-7.5697-9.7024-7.5697zm0.1947 3.5093 3.8013 3.8007c-0.1018-2.0569-1.7488-3.7024-3.8013-3.8007z + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/TimePicker.xaml b/src/Avalonia.Themes.Simple/Controls/TimePicker.xaml new file mode 100644 index 0000000000..c49b3aec4e --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/TimePicker.xaml @@ -0,0 +1,329 @@ + + + + + + + + + + + + + + Error + + + + + + + + + 40 + 1 + 1 + 0,0,0,4 + 40 + 41 + 242 + 456 + 0,3,0,6 + 0,3,0,6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/TitleBar.xaml b/src/Avalonia.Themes.Simple/Controls/TitleBar.xaml new file mode 100644 index 0000000000..a06dfbb834 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/TitleBar.xaml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/ToggleButton.xaml b/src/Avalonia.Themes.Simple/Controls/ToggleButton.xaml new file mode 100644 index 0000000000..2cfbcf6b7a --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/ToggleButton.xaml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/ToggleSwitch.xaml b/src/Avalonia.Themes.Simple/Controls/ToggleSwitch.xaml new file mode 100644 index 0000000000..d00358951a --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/ToggleSwitch.xaml @@ -0,0 +1,301 @@ + + + + + + + + + + + + + + + + + + 0,0,0,6 + 6 + 6 + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/ToolTip.xaml b/src/Avalonia.Themes.Simple/Controls/ToolTip.xaml new file mode 100644 index 0000000000..c4fddd8c4c --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/ToolTip.xaml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Default/Controls/TransitioningContentControl.xaml b/src/Avalonia.Themes.Simple/Controls/TransitioningContentControl.xaml similarity index 68% rename from src/Avalonia.Themes.Default/Controls/TransitioningContentControl.xaml rename to src/Avalonia.Themes.Simple/Controls/TransitioningContentControl.xaml index 6a4d56ccb7..63185e11e6 100644 --- a/src/Avalonia.Themes.Default/Controls/TransitioningContentControl.xaml +++ b/src/Avalonia.Themes.Simple/Controls/TransitioningContentControl.xaml @@ -1,20 +1,21 @@ - - - + + diff --git a/src/Avalonia.Themes.Simple/Controls/TreeView.xaml b/src/Avalonia.Themes.Simple/Controls/TreeView.xaml new file mode 100644 index 0000000000..2bc38a0673 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/TreeView.xaml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/TreeViewItem.xaml b/src/Avalonia.Themes.Simple/Controls/TreeViewItem.xaml new file mode 100644 index 0000000000..8b3452244c --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/TreeViewItem.xaml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/UserControl.xaml b/src/Avalonia.Themes.Simple/Controls/UserControl.xaml new file mode 100644 index 0000000000..3316b0298c --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/UserControl.xaml @@ -0,0 +1,25 @@ + diff --git a/src/Avalonia.Themes.Simple/Controls/Window.xaml b/src/Avalonia.Themes.Simple/Controls/Window.xaml new file mode 100644 index 0000000000..00b108343e --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/Window.xaml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Simple/Controls/WindowNotificationManager.xaml b/src/Avalonia.Themes.Simple/Controls/WindowNotificationManager.xaml new file mode 100644 index 0000000000..6dacf63be5 --- /dev/null +++ b/src/Avalonia.Themes.Simple/Controls/WindowNotificationManager.xaml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Avalonia.Themes.Default/IBitmapToImageConverter.cs b/src/Avalonia.Themes.Simple/IBitmapToImageConverter.cs similarity index 95% rename from src/Avalonia.Themes.Default/IBitmapToImageConverter.cs rename to src/Avalonia.Themes.Simple/IBitmapToImageConverter.cs index 9b7fcecf45..fade026b51 100644 --- a/src/Avalonia.Themes.Default/IBitmapToImageConverter.cs +++ b/src/Avalonia.Themes.Simple/IBitmapToImageConverter.cs @@ -8,7 +8,7 @@ using Avalonia.Controls; using Avalonia.Data.Converters; using Avalonia.Media.Imaging; -namespace Avalonia.Themes.Default +namespace Avalonia.Themes.Simple { internal class IBitmapToImageConverter : IValueConverter { diff --git a/src/Avalonia.Themes.Default/InverseBooleanValueConverter.cs b/src/Avalonia.Themes.Simple/InverseBooleanValueConverter.cs similarity index 94% rename from src/Avalonia.Themes.Default/InverseBooleanValueConverter.cs rename to src/Avalonia.Themes.Simple/InverseBooleanValueConverter.cs index 7befc81b8e..15cc5b4a80 100644 --- a/src/Avalonia.Themes.Default/InverseBooleanValueConverter.cs +++ b/src/Avalonia.Themes.Simple/InverseBooleanValueConverter.cs @@ -2,7 +2,7 @@ using System; using System.Globalization; using Avalonia.Data.Converters; -namespace Avalonia.Themes.Default +namespace Avalonia.Themes.Simple { class InverseBooleanValueConverter : IValueConverter { diff --git a/src/Avalonia.Themes.Simple/Properties/AssemblyInfo.cs b/src/Avalonia.Themes.Simple/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..f00510816a --- /dev/null +++ b/src/Avalonia.Themes.Simple/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using Avalonia.Metadata; + +[assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Themes.Simple")] diff --git a/src/Avalonia.Themes.Default/SimpleTheme.cs b/src/Avalonia.Themes.Simple/SimpleTheme.cs similarity index 89% rename from src/Avalonia.Themes.Default/SimpleTheme.cs rename to src/Avalonia.Themes.Simple/SimpleTheme.cs index 664c95644f..f225cb4c4d 100644 --- a/src/Avalonia.Themes.Default/SimpleTheme.cs +++ b/src/Avalonia.Themes.Simple/SimpleTheme.cs @@ -6,7 +6,7 @@ using Avalonia.Markup.Xaml.Styling; using Avalonia.Styling; #nullable enable -namespace Avalonia.Themes.Default +namespace Avalonia.Themes.Simple { public class SimpleTheme : AvaloniaObject, IStyle, IResourceProvider { @@ -23,9 +23,9 @@ namespace Avalonia.Themes.Default /// Initializes a new instance of the class. /// /// The base URL for the XAML context. - public SimpleTheme(Uri baseUri) + public SimpleTheme(Uri? baseUri = null) { - _baseUri = baseUri; + _baseUri = baseUri ?? new Uri("avares://Avalonia.Themes.Simple/"); InitStyles(_baseUri); } @@ -103,7 +103,7 @@ namespace Avalonia.Themes.Default void IResourceProvider.RemoveOwner(IResourceHost owner) => (Loaded as IResourceProvider)?.RemoveOwner(owner); - public SelectorMatchResult TryAttach(IStyleable target, IStyleHost? host) => Loaded.TryAttach(target, host); + public SelectorMatchResult TryAttach(IStyleable target, object? host) => Loaded.TryAttach(target, host); public bool TryGetResource(object key, out object? value) { @@ -138,18 +138,18 @@ namespace Avalonia.Themes.Default { new StyleInclude(baseUri) { - Source = new Uri("avares://Avalonia.Themes.Default/DefaultTheme.xaml") + Source = new Uri("avares://Avalonia.Themes.Simple/Controls/SimpleControls.xaml") }, new StyleInclude(baseUri) { - Source = new Uri("avares://Avalonia.Themes.Default/Accents/Base.xaml") + Source = new Uri("avares://Avalonia.Themes.Simple/Accents/Base.xaml") } }; _simpleLight = new Styles { new StyleInclude(baseUri) { - Source = new Uri("avares://Avalonia.Themes.Default/Accents/BaseLight.xaml") + Source = new Uri("avares://Avalonia.Themes.Simple/Accents/BaseLight.xaml") } }; @@ -157,7 +157,7 @@ namespace Avalonia.Themes.Default { new StyleInclude(baseUri) { - Source = new Uri("avares://Avalonia.Themes.Default/Accents/BaseDark.xaml") + Source = new Uri("avares://Avalonia.Themes.Simple/Accents/BaseDark.xaml") } }; } diff --git a/src/Avalonia.Themes.Default/SimpleThemeMode.cs b/src/Avalonia.Themes.Simple/SimpleThemeMode.cs similarity index 67% rename from src/Avalonia.Themes.Default/SimpleThemeMode.cs rename to src/Avalonia.Themes.Simple/SimpleThemeMode.cs index be33466327..683c751f10 100644 --- a/src/Avalonia.Themes.Default/SimpleThemeMode.cs +++ b/src/Avalonia.Themes.Simple/SimpleThemeMode.cs @@ -1,4 +1,4 @@ -namespace Avalonia.Themes.Default +namespace Avalonia.Themes.Simple { public enum SimpleThemeMode { diff --git a/src/Avalonia.X11/Avalonia.X11.csproj b/src/Avalonia.X11/Avalonia.X11.csproj index 45a76bc3d6..621e6fabd7 100644 --- a/src/Avalonia.X11/Avalonia.X11.csproj +++ b/src/Avalonia.X11/Avalonia.X11.csproj @@ -11,5 +11,5 @@ - + diff --git a/src/Avalonia.X11/Glx/Glx.cs b/src/Avalonia.X11/Glx/Glx.cs index 37ca7f5603..1a26d7d5f5 100644 --- a/src/Avalonia.X11/Glx/Glx.cs +++ b/src/Avalonia.X11/Glx/Glx.cs @@ -4,111 +4,97 @@ using System.Linq; using System.Runtime.InteropServices; using Avalonia.OpenGL; using Avalonia.Platform.Interop; +using Avalonia.SourceGenerator; + // ReSharper disable UnassignedGetOnlyAutoProperty namespace Avalonia.X11.Glx { - unsafe class GlxInterface : GlInterfaceBase + unsafe partial class GlxInterface { private const string libGL = "libGL.so.1"; - [GlEntryPointAttribute("glXMakeContextCurrent")] - public GlxMakeContextCurrent MakeContextCurrent { get; } - public delegate bool GlxMakeContextCurrent(IntPtr display, IntPtr draw, IntPtr read, IntPtr context); + [GetProcAddress("glXMakeContextCurrent")] + public partial bool MakeContextCurrent(IntPtr display, IntPtr draw, IntPtr read, IntPtr context); - [GlEntryPoint("glXGetCurrentContext")] - public GlxGetCurrentContext GetCurrentContext { get; } - public delegate IntPtr GlxGetCurrentContext(); + [GetProcAddress("glXGetCurrentContext")] + public partial IntPtr GetCurrentContext(); - [GlEntryPoint("glXGetCurrentDisplay")] - public GlxGetCurrentDisplay GetCurrentDisplay { get; } - public delegate IntPtr GlxGetCurrentDisplay(); + [GetProcAddress("glXGetCurrentDisplay")] + public partial IntPtr GetCurrentDisplay(); - [GlEntryPoint("glXGetCurrentDrawable")] - public GlxGetCurrentDrawable GetCurrentDrawable { get; } - public delegate IntPtr GlxGetCurrentDrawable(); + [GetProcAddress("glXGetCurrentDrawable")] + public partial IntPtr GetCurrentDrawable(); - [GlEntryPoint("glXGetCurrentReadDrawable")] - public GlxGetCurrentReadDrawable GetCurrentReadDrawable { get; } - public delegate IntPtr GlxGetCurrentReadDrawable(); + [GetProcAddress("glXGetCurrentReadDrawable")] + public partial IntPtr GetCurrentReadDrawable(); - [GlEntryPoint("glXCreatePbuffer")] - public GlxCreatePbuffer CreatePbuffer { get; } - public delegate IntPtr GlxCreatePbuffer(IntPtr dpy, IntPtr fbc, int[] attrib_list); + [GetProcAddress("glXCreatePbuffer")] + public partial IntPtr CreatePbuffer(IntPtr dpy, IntPtr fbc, int[] attrib_list); - [GlEntryPoint("glXDestroyPbuffer")] - public GlxDestroyPbuffer DestroyPbuffer { get; } - public delegate IntPtr GlxDestroyPbuffer(IntPtr dpy, IntPtr fb); + [GetProcAddress("glXDestroyPbuffer")] + public partial IntPtr DestroyPbuffer(IntPtr dpy, IntPtr fb); - [GlEntryPointAttribute("glXChooseVisual")] - public GlxChooseVisual ChooseVisual { get; } - public delegate XVisualInfo* GlxChooseVisual(IntPtr dpy, int screen, int[] attribList); + [GetProcAddress("glXChooseVisual")] + public partial XVisualInfo* ChooseVisual(IntPtr dpy, int screen, int[] attribList); - [GlEntryPointAttribute("glXCreateContext")] - public GlxCreateContext CreateContext { get; } - public delegate IntPtr GlxCreateContext(IntPtr dpy, XVisualInfo* vis, IntPtr shareList, bool direct); + [GetProcAddress("glXCreateContext")] + public partial IntPtr CreateContext(IntPtr dpy, XVisualInfo* vis, IntPtr shareList, bool direct); - [GlEntryPointAttribute("glXCreateContextAttribsARB")] - public GlxCreateContextAttribsARB CreateContextAttribsARB { get; } - public delegate IntPtr GlxCreateContextAttribsARB(IntPtr dpy, IntPtr fbconfig, IntPtr shareList, + [GetProcAddress("glXCreateContextAttribsARB")] + public partial IntPtr CreateContextAttribsARB(IntPtr dpy, IntPtr fbconfig, IntPtr shareList, bool direct, int[] attribs); [DllImport(libGL, EntryPoint = "glXGetProcAddress")] - public static extern IntPtr GlxGetProcAddress(Utf8Buffer buffer); + public static extern IntPtr GlxGetProcAddress(string buffer); - [GlEntryPointAttribute("glXDestroyContext")] - public GlxDestroyContext DestroyContext { get; } - public delegate void GlxDestroyContext(IntPtr dpy, IntPtr ctx); + [GetProcAddress("glXDestroyContext")] + public partial void DestroyContext(IntPtr dpy, IntPtr ctx); - [GlEntryPointAttribute("glXChooseFBConfig")] - public GlxChooseFBConfig ChooseFBConfig { get; } - public delegate IntPtr* GlxChooseFBConfig(IntPtr dpy, int screen, int[] attrib_list, out int nelements); + [GetProcAddress("glXChooseFBConfig")] + public partial IntPtr* ChooseFBConfig(IntPtr dpy, int screen, int[] attrib_list, out int nelements); - public IntPtr* GlxChooseFbConfig(IntPtr dpy, int screen, IEnumerable attribs, out int nelements) + public IntPtr* ChooseFbConfig(IntPtr dpy, int screen, IEnumerable attribs, out int nelements) { var arr = attribs.Concat(new[]{0}).ToArray(); return ChooseFBConfig(dpy, screen, arr, out nelements); } - [GlEntryPointAttribute("glXGetVisualFromFBConfig")] - public GlxGetVisualFromFBConfig GetVisualFromFBConfig { get; } - public delegate XVisualInfo * GlxGetVisualFromFBConfig(IntPtr dpy, IntPtr config); + [GetProcAddress("glXGetVisualFromFBConfig")] + public partial XVisualInfo * GetVisualFromFBConfig(IntPtr dpy, IntPtr config); - [GlEntryPointAttribute("glXGetFBConfigAttrib")] - public GlxGetFBConfigAttrib GetFBConfigAttrib { get; } - public delegate int GlxGetFBConfigAttrib(IntPtr dpy, IntPtr config, int attribute, out int value); + [GetProcAddress("glXGetFBConfigAttrib")] + public partial int GetFBConfigAttrib(IntPtr dpy, IntPtr config, int attribute, out int value); - [GlEntryPointAttribute("glXSwapBuffers")] - public GlxSwapBuffers SwapBuffers { get; } - public delegate void GlxSwapBuffers(IntPtr dpy, IntPtr drawable); + [GetProcAddress("glXSwapBuffers")] + public partial void SwapBuffers(IntPtr dpy, IntPtr drawable); - [GlEntryPointAttribute("glXWaitX")] - public GlxWaitX WaitX { get; } - public delegate void GlxWaitX(); + [GetProcAddress("glXWaitX")] + public partial void WaitX(); - [GlEntryPointAttribute("glXWaitGL")] - public GlxWaitGL WaitGL { get; } - public delegate void GlxWaitGL(); + [GetProcAddress("glXWaitGL")] + public partial void WaitGL(); - public delegate int GlGetError(); - [GlEntryPoint("glGetError")] - public GlGetError GetError { get; } - public delegate IntPtr GlxQueryExtensionsString(IntPtr display, int screen); - [GlEntryPoint("glXQueryExtensionsString")] - public GlxQueryExtensionsString QueryExtensionsString { get; } + [GetProcAddress("glGetError")] + public partial int GlGetError(); + + + [GetProcAddress("glXQueryExtensionsString")] + public partial IntPtr QueryExtensionsString(IntPtr display, int screen); - public GlxInterface() : base(SafeGetProcAddress) + public GlxInterface() { + Initialize(SafeGetProcAddress); } // Ignores egl functions. @@ -122,10 +108,9 @@ namespace Avalonia.X11.Glx return IntPtr.Zero; } - return GlxConverted(proc); + return GlxGetProcAddress(proc); } - private static readonly Func GlxConverted = ConvertNative(GlxGetProcAddress); public string[] GetExtensions(IntPtr display) { diff --git a/src/Avalonia.X11/X11IconLoader.cs b/src/Avalonia.X11/X11IconLoader.cs index 36939f4103..0357fdd94e 100644 --- a/src/Avalonia.X11/X11IconLoader.cs +++ b/src/Avalonia.X11/X11IconLoader.cs @@ -48,12 +48,6 @@ namespace Avalonia.X11 _width = Math.Min(bitmap.PixelSize.Width, 128); _height = Math.Min(bitmap.PixelSize.Height, 128); _bdata = new uint[_width * _height]; - fixed (void* ptr = _bdata) - { - var iptr = (int*)ptr; - iptr[0] = _width; - iptr[1] = _height; - } using(var rt = AvaloniaLocator.Current.GetService().CreateRenderTarget(new[]{this})) using (var ctx = rt.CreateDrawingContext(null)) ctx.DrawBitmap(bitmap.PlatformImpl, 1, new Rect(bitmap.Size), @@ -65,7 +59,7 @@ namespace Avalonia.X11 { var r = y * _width; for (var x = 0; x < _width; x++) - Data[r + x] = new UIntPtr(_bdata[r + x]); + Data[r + x + 2] = new UIntPtr(_bdata[r + x]); } _bdata = null; @@ -86,7 +80,7 @@ namespace Avalonia.X11 var r = y * _width; var fbr = y * fb.RowBytes / 4; for (var x = 0; x < _width; x++) - fbp[fbr + x] = Data[r + x].ToUInt32(); + fbp[fbr + x] = Data[r + x + 2].ToUInt32(); } } wr.Save(outputStream); diff --git a/src/Avalonia.X11/X11Platform.cs b/src/Avalonia.X11/X11Platform.cs index 7043c60ae7..cc9737668d 100644 --- a/src/Avalonia.X11/X11Platform.cs +++ b/src/Avalonia.X11/X11Platform.cs @@ -277,7 +277,8 @@ namespace Avalonia // and sometimes attempts to use GLX might cause a segfault "llvmpipe" }; - public string WmClass { get; set; } = Assembly.GetEntryAssembly()?.GetName()?.Name ?? "AvaloniaApplication"; + + public string WmClass { get; set; } = Assembly.GetEntryAssembly()?.GetName()?.Name; /// /// Enables multitouch support. The default value is true. diff --git a/src/Avalonia.X11/X11Window.cs b/src/Avalonia.X11/X11Window.cs index 009ccb6159..7b34705b3b 100644 --- a/src/Avalonia.X11/X11Window.cs +++ b/src/Avalonia.X11/X11Window.cs @@ -168,8 +168,7 @@ namespace Avalonia.X11 XChangeProperty(_x11.Display, _handle, _x11.Atoms._NET_WM_WINDOW_TYPE, _x11.Atoms.XA_ATOM, 32, PropertyMode.Replace, new[] {_x11.Atoms._NET_WM_WINDOW_TYPE_NORMAL}, 1); - if (platform.Options.WmClass != null) - SetWmClass(platform.Options.WmClass); + SetWmClass(_platform.Options.WmClass); var surfaces = new List { @@ -1082,12 +1081,24 @@ namespace Avalonia.X11 public void SetWmClass(string wmClass) { - var data = Encoding.ASCII.GetBytes(wmClass); - fixed (void* pdata = data) + // See https://tronche.com/gui/x/icccm/sec-4.html#WM_CLASS + // We don't actually parse the application's command line, so we only use RESOURCE_NAME and argv[0] + var appId = Environment.GetEnvironmentVariable("RESOURCE_NAME") + ?? Process.GetCurrentProcess().ProcessName; + + var encodedAppId = Encoding.ASCII.GetBytes(appId); + var encodedWmClass = Encoding.ASCII.GetBytes(wmClass ?? appId); + + var hint = XAllocClassHint(); + fixed(byte* pAppId = encodedAppId) + fixed (byte* pWmClass = encodedWmClass) { - XChangeProperty(_x11.Display, _handle, _x11.Atoms.XA_WM_CLASS, _x11.Atoms.XA_STRING, 8, - PropertyMode.Replace, pdata, data.Length); + hint->res_name = pAppId; + hint->res_class = pWmClass; + XSetClassHint(_x11.Display, _handle, hint); } + + XFree(hint); } public void SetMinMaxSize(Size minSize, Size maxSize) diff --git a/src/Avalonia.X11/XLib.cs b/src/Avalonia.X11/XLib.cs index 464ec4f1c8..753d5f530c 100644 --- a/src/Avalonia.X11/XLib.cs +++ b/src/Avalonia.X11/XLib.cs @@ -109,6 +109,9 @@ namespace Avalonia.X11 [DllImport(libX11)] public static extern int XFree(IntPtr data); + + [DllImport(libX11)] + public static extern int XFree(void* data); [DllImport(libX11)] public static extern int XRaiseWindow(IntPtr display, IntPtr window); @@ -628,6 +631,12 @@ namespace Avalonia.X11 return XISelectEvents(display, window, emasks, devices.Count); } + + [DllImport(libX11)] + public static extern XClassHint* XAllocClassHint(); + + [DllImport(libX11)] + public static extern int XSetClassHint(IntPtr display, IntPtr window, XClassHint* class_hints); public struct XGeometry { @@ -639,6 +648,11 @@ namespace Avalonia.X11 public int bw; public int d; } + public struct XClassHint + { + public byte* res_name; + public byte* res_class; + } public struct XSyncValue { public int Hi; diff --git a/src/Linux/Avalonia.LinuxFramebuffer/DrmOutputOptions.cs b/src/Linux/Avalonia.LinuxFramebuffer/DrmOutputOptions.cs new file mode 100644 index 0000000000..e92ad02c7a --- /dev/null +++ b/src/Linux/Avalonia.LinuxFramebuffer/DrmOutputOptions.cs @@ -0,0 +1,27 @@ +using Avalonia.LinuxFramebuffer.Output; +using Avalonia.Media; +using JetBrains.Annotations; + +namespace Avalonia.LinuxFramebuffer +{ + public class DrmOutputOptions + { + /// + /// Scaling factor. + /// Default: 1.0 + /// + public double Scaling { get; set; } = 1.0; + + /// + /// If true an two cycle buffer swapping is processed at init. + /// Default: True + /// + public bool EnableInitialBufferSwapping { get; set; } = true; + + /// + /// Color for + /// Default: R0 G0 B0 A0 + /// + public Color InitialBufferSwappingColor { get; set; } = new Color(0, 0, 0, 0); + } +} diff --git a/src/Linux/Avalonia.LinuxFramebuffer/LinuxFramebufferPlatform.cs b/src/Linux/Avalonia.LinuxFramebuffer/LinuxFramebufferPlatform.cs index 4add4c423b..a642766809 100644 --- a/src/Linux/Avalonia.LinuxFramebuffer/LinuxFramebufferPlatform.cs +++ b/src/Linux/Avalonia.LinuxFramebuffer/LinuxFramebufferPlatform.cs @@ -140,6 +140,8 @@ public static class LinuxFramebufferPlatformExtensions public static int StartLinuxDrm(this T builder, string[] args, string card = null, double scaling = 1) where T : AppBuilderBase, new() => StartLinuxDirect(builder, args, new DrmOutput(card) {Scaling = scaling}); + public static int StartLinuxDrm(this T builder, string[] args, string card = null, bool connectorsForceProbe = false, [CanBeNull] DrmOutputOptions options = null) + where T : AppBuilderBase, new() => StartLinuxDirect(builder, args, new DrmOutput(card, connectorsForceProbe, options)); public static int StartLinuxDirect(this T builder, string[] args, IOutputBackend backend) where T : AppBuilderBase, new() diff --git a/src/Linux/Avalonia.LinuxFramebuffer/Output/Drm.cs b/src/Linux/Avalonia.LinuxFramebuffer/Output/Drm.cs index 9c476b1b63..04bc2c1f67 100644 --- a/src/Linux/Avalonia.LinuxFramebuffer/Output/Drm.cs +++ b/src/Linux/Avalonia.LinuxFramebuffer/Output/Drm.cs @@ -162,6 +162,8 @@ namespace Avalonia.LinuxFramebuffer.Output [DllImport(libdrm, SetLastError = true)] public static extern drmModeConnector* drmModeGetConnector(int fd, uint connector); [DllImport(libdrm, SetLastError = true)] + public static extern drmModeConnector* drmModeGetConnectorCurrent(int fd, uint connector); + [DllImport(libdrm, SetLastError = true)] public static extern void drmModeFreeConnector(drmModeConnector* res); [DllImport(libdrm, SetLastError = true)] diff --git a/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs b/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs index 64fafc65f3..070e1a95bc 100644 --- a/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs +++ b/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs @@ -84,7 +84,7 @@ namespace Avalonia.LinuxFramebuffer.Output { public List Connectors { get; }= new List(); internal Dictionary Encoders { get; } = new Dictionary(); - public DrmResources(int fd) + public DrmResources(int fd, bool connectorsForceProbe = false) { var res = drmModeGetResources(fd); if (res == null) @@ -107,7 +107,7 @@ namespace Avalonia.LinuxFramebuffer.Output for (var c = 0; c < res->count_connectors; c++) { - var conn = drmModeGetConnector(fd, res->connectors[c]); + var conn = connectorsForceProbe ? drmModeGetConnector(fd, res->connectors[c]) : drmModeGetConnectorCurrent(fd, res->connectors[c]); Connectors.Add(new DrmConnector(conn)); drmModeFreeConnector(conn); } @@ -164,11 +164,11 @@ namespace Avalonia.LinuxFramebuffer.Output else { Fd = open(path, 2, 0); - if(Fd != -1) throw new Win32Exception($"Couldn't open {path}"); + if(Fd == -1) throw new Win32Exception($"Couldn't open {path}"); } } - public DrmResources GetResources() => new DrmResources(Fd); + public DrmResources GetResources(bool connectorsForceProbe = false) => new DrmResources(Fd, connectorsForceProbe); public void Dispose() { close(Fd); diff --git a/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs b/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs index 46a985c0e8..ce210019c0 100644 --- a/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs +++ b/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs @@ -7,6 +7,7 @@ using Avalonia.OpenGL; using Avalonia.OpenGL.Egl; using Avalonia.OpenGL.Surfaces; using Avalonia.Platform.Interop; +using JetBrains.Annotations; using static Avalonia.LinuxFramebuffer.NativeUnsafeMethods; using static Avalonia.LinuxFramebuffer.Output.LibDrm; using static Avalonia.LinuxFramebuffer.Output.LibDrm.GbmColorFormats; @@ -15,20 +16,35 @@ namespace Avalonia.LinuxFramebuffer.Output { public unsafe class DrmOutput : IGlOutputBackend, IGlPlatformSurface { + private DrmOutputOptions _outputOptions = new(); private DrmCard _card; public PixelSize PixelSize => _mode.Resolution; - public double Scaling { get; set; } + + public double Scaling + { + get => _outputOptions.Scaling; + set => _outputOptions.Scaling = value; + } public IGlContext PrimaryContext => _deferredContext; private EglPlatformOpenGlInterface _platformGl; public IPlatformOpenGlInterface PlatformOpenGlInterface => _platformGl; - public DrmOutput(string path = null) + public DrmOutput(DrmCard card, DrmResources resources, DrmConnector connector, DrmModeInfo modeInfo, + DrmOutputOptions? options = null) { + if(options != null) + _outputOptions = options; + Init(card, resources, connector, modeInfo); + } + public DrmOutput(string path = null, bool connectorsForceProbe = false, [CanBeNull] DrmOutputOptions options = null) + { + if(options != null) + _outputOptions = options; + var card = new DrmCard(path); - var resources = card.GetResources(); - + var resources = card.GetResources(connectorsForceProbe); var connector = resources.Connectors.FirstOrDefault(x => x.Connection == DrmModeConnection.DRM_MODE_CONNECTED); @@ -50,7 +66,7 @@ namespace Avalonia.LinuxFramebuffer.Output } [DllImport("libEGL.so.1")] - static extern IntPtr eglGetProcAddress(Utf8Buffer proc); + static extern IntPtr eglGetProcAddress(string proc); private GbmBoUserDataDestroyCallbackDelegate FbDestroyDelegate; private drmModeModeInfo _mode; @@ -142,9 +158,14 @@ namespace Avalonia.LinuxFramebuffer.Output _deferredContext = _platformGl.PrimaryEglContext; + var initialBufferSwappingColorR = _outputOptions.InitialBufferSwappingColor.R / 255.0f; + var initialBufferSwappingColorG = _outputOptions.InitialBufferSwappingColor.G / 255.0f; + var initialBufferSwappingColorB = _outputOptions.InitialBufferSwappingColor.B / 255.0f; + var initialBufferSwappingColorA = _outputOptions.InitialBufferSwappingColor.A / 255.0f; using (_deferredContext.MakeCurrent(_eglSurface)) { - _deferredContext.GlInterface.ClearColor(0, 0, 0, 0); + _deferredContext.GlInterface.ClearColor(initialBufferSwappingColorR, initialBufferSwappingColorG, + initialBufferSwappingColorB, initialBufferSwappingColorA); _deferredContext.GlInterface.Clear(GlConsts.GL_COLOR_BUFFER_BIT | GlConsts.GL_STENCIL_BUFFER_BIT); _eglSurface.SwapBuffers(); } @@ -162,13 +183,17 @@ namespace Avalonia.LinuxFramebuffer.Output _mode = mode; _currentBo = bo; - // Go trough two cycles of buffer swapping (there are render artifacts otherwise) - for(var c=0;c<2;c++) - using (CreateGlRenderTarget().BeginDraw()) - { - _deferredContext.GlInterface.ClearColor(0, 0, 0, 0); - _deferredContext.GlInterface.Clear(GlConsts.GL_COLOR_BUFFER_BIT | GlConsts.GL_STENCIL_BUFFER_BIT); - } + if (_outputOptions.EnableInitialBufferSwapping) + { + //Go trough two cycles of buffer swapping (there are render artifacts otherwise) + for(var c=0;c<2;c++) + using (CreateGlRenderTarget().BeginDraw()) + { + _deferredContext.GlInterface.ClearColor(initialBufferSwappingColorR, initialBufferSwappingColorG, + initialBufferSwappingColorB, initialBufferSwappingColorA); + _deferredContext.GlInterface.Clear(GlConsts.GL_COLOR_BUFFER_BIT | GlConsts.GL_STENCIL_BUFFER_BIT); + } + } } diff --git a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/AvaloniaXamlIlCompiler.cs b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/AvaloniaXamlIlCompiler.cs index e3a55feac9..f325e6e2d6 100644 --- a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/AvaloniaXamlIlCompiler.cs +++ b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/AvaloniaXamlIlCompiler.cs @@ -46,6 +46,7 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions ); InsertBefore( + new AvaloniaXamlIlControlThemeTransformer(), new AvaloniaXamlIlSelectorTransformer(), new AvaloniaXamlIlControlTemplateTargetTypeMetadataTransformer(), new AvaloniaXamlIlBindingPathParser(), @@ -59,6 +60,10 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions InsertAfter( new XDataTypeTransformer()); + InsertBefore( + new AvaloniaXamlIlDeferredResourceTransformer() + ); + // After everything else InsertBefore( new AddNameScopeRegistration(), @@ -67,6 +72,7 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions new AvaloniaXamlIlCompiledBindingsMetadataRemover() ); + Transformers.Add(new AvaloniaXamlIlControlTemplatePriorityTransformer()); Transformers.Add(new AvaloniaXamlIlMetadataRemover()); Transformers.Add(new AvaloniaXamlIlRootObjectScope()); diff --git a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/AvaloniaXamlIlLanguage.cs b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/AvaloniaXamlIlLanguage.cs index 54eac8f59e..c8fced515d 100644 --- a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/AvaloniaXamlIlLanguage.cs +++ b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/AvaloniaXamlIlLanguage.cs @@ -70,8 +70,8 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions }, InnerServiceProviderFactoryMethod = runtimeHelpers.FindMethod(m => m.Name == "CreateInnerServiceProviderV1"), - IAddChild = typeSystem.GetType("Avalonia.Markup.Xaml.IAddChild"), - IAddChildOfT = typeSystem.GetType("Avalonia.Markup.Xaml.IAddChild`1") + IAddChild = typeSystem.GetType("Avalonia.Metadata.IAddChild"), + IAddChildOfT = typeSystem.GetType("Avalonia.Metadata.IAddChild`1") }; rv.CustomAttributeResolver = new AttributeResolver(typeSystem, rv); diff --git a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlControlTemplatePriorityTransformer.cs b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlControlTemplatePriorityTransformer.cs new file mode 100644 index 0000000000..6cab68e756 --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlControlTemplatePriorityTransformer.cs @@ -0,0 +1,58 @@ +using System.Collections.Generic; +using System.Linq; +using Avalonia.Data; +using XamlX.Ast; +using XamlX.Transform; + +namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers +{ + /// + /// Transforms property assignments within ControlTemplates to use Style priority where possible. + /// + class AvaloniaXamlIlControlTemplatePriorityTransformer : IXamlAstTransformer + { + public IXamlAstNode Transform(AstTransformationContext context, IXamlAstNode node) + { + var bindingPriorityType = context.GetAvaloniaTypes().BindingPriority; + + // The node is a candidate for transformation if: + // - It's a property assignment to an Avalonia property + // - There's a ControlTemplate ancestor + // - The property has a single value + if (node is XamlPropertyAssignmentNode prop && + prop.Property is XamlIlAvaloniaProperty avaloniaProperty && + context.ParentNodes().Any(IsControlTemplate) && + prop.Values.Count == 1) + { + var priorityValueSetters = new List(); + + // Iterate through the possible setters, trying to find a setter on the property + // which has a BindingPriority parameter followed by the parameter of the existing + // setter. + foreach (var setter in prop.PossibleSetters) + { + var s = avaloniaProperty.Setters.FirstOrDefault(x => + x.Parameters[0] == bindingPriorityType && + x.Parameters[1] == setter.Parameters[0]); + if (s != null) + priorityValueSetters.Add(s); + } + + // If any BindingPriority setters were found, use those. + if (priorityValueSetters.Count > 0) + { + prop.PossibleSetters = priorityValueSetters; + prop.Values.Insert(0, new XamlConstantNode(node, bindingPriorityType, (int)BindingPriority.TemplatedParent)); + } + } + + return node; + } + + private static bool IsControlTemplate(IXamlAstNode node) + { + return node is AvaloniaXamlIlTargetTypeMetadataNode tt && + tt.ScopeType == AvaloniaXamlIlTargetTypeMetadataNode.ScopeTypes.ControlTemplate; + } + } +} diff --git a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlControlThemeTransformer.cs b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlControlThemeTransformer.cs new file mode 100644 index 0000000000..1338dc7248 --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlControlThemeTransformer.cs @@ -0,0 +1,39 @@ +using System.Linq; +using XamlX; +using XamlX.Ast; +using XamlX.Transform; +using XamlX.Transform.Transformers; +using XamlX.TypeSystem; + +namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers +{ + class AvaloniaXamlIlControlThemeTransformer : IXamlAstTransformer + { + public IXamlAstNode Transform(AstTransformationContext context, IXamlAstNode node) + { + if (!(node is XamlAstObjectNode on && on.Type.GetClrType().FullName == "Avalonia.Styling.ControlTheme")) + return node; + + // Check if we've already transformed this node. + if (context.ParentNodes().FirstOrDefault() is AvaloniaXamlIlTargetTypeMetadataNode) + return node; + + var targetTypeNode = on.Children.OfType() + .FirstOrDefault(p => p.Property.GetClrProperty().Name == "TargetType") ?? + throw new XamlParseException("ControlTheme must have a TargetType.", node); + + IXamlType targetType; + + if (targetTypeNode.Values[0] is XamlTypeExtensionNode extension) + targetType = extension.Value.GetClrType(); + else if (targetTypeNode.Values[0] is XamlAstTextNode text) + targetType = TypeReferenceResolver.ResolveType(context, text.Text, false, text, true).GetClrType(); + else + throw new XamlParseException("Could not determine TargetType for ControlTheme.", targetTypeNode); + + return new AvaloniaXamlIlTargetTypeMetadataNode(on, + new XamlAstClrTypeReference(targetTypeNode, targetType, false), + AvaloniaXamlIlTargetTypeMetadataNode.ScopeTypes.Style); + } + } +} diff --git a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlDeferredResourceTransformer.cs b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlDeferredResourceTransformer.cs new file mode 100644 index 0000000000..662263e513 --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlDeferredResourceTransformer.cs @@ -0,0 +1,90 @@ +using System.Collections.Generic; +using System.Linq; +using XamlX.Ast; +using XamlX.Emit; +using XamlX.IL; +using XamlX.Transform; +using XamlX.TypeSystem; + +namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers +{ + internal class AvaloniaXamlIlDeferredResourceTransformer : IXamlAstTransformer + { + public IXamlAstNode Transform(AstTransformationContext context, IXamlAstNode node) + { + if (!(node is XamlPropertyAssignmentNode pa) || pa.Values.Count != 2) + return node; + + if (!ShouldBeDeferred(pa.Values[1])) + return node; + + var types = context.GetAvaloniaTypes(); + + if (pa.Property.DeclaringType == types.ResourceDictionary && pa.Property.Name == "Content") + { + pa.Values[1] = new XamlDeferredContentNode(pa.Values[1], types.XamlIlTypes.Object, context.Configuration); + pa.PossibleSetters = new List + { + new XamlDirectCallPropertySetter(types.ResourceDictionaryDeferredAdd), + }; + } + else if (pa.Property.Name == "Resources" && pa.Property.Getter.ReturnType.Equals(types.IResourceDictionary)) + { + pa.Values[1] = new XamlDeferredContentNode(pa.Values[1], types.XamlIlTypes.Object, context.Configuration); + pa.PossibleSetters = new List + { + new AdderSetter(pa.Property.Getter, types.ResourceDictionaryDeferredAdd), + }; + } + + return node; + } + + private static bool ShouldBeDeferred(IXamlAstValueNode node) + { + // XAML compiler is currently strict about value types, allowing them to be created only through converters. + // At the moment it should be safe to not defer structs. + return !node.Type.GetClrType().IsValueType; + } + + class AdderSetter : IXamlPropertySetter, IXamlEmitablePropertySetter + { + private readonly IXamlMethod _getter; + private readonly IXamlMethod _adder; + + public AdderSetter(IXamlMethod getter, IXamlMethod adder) + { + _getter = getter; + _adder = adder; + TargetType = getter.DeclaringType; + Parameters = adder.ParametersWithThis().Skip(1).ToList(); + } + + public IXamlType TargetType { get; } + + public PropertySetterBinderParameters BinderParameters { get; } = new PropertySetterBinderParameters + { + AllowMultiple = true + }; + + public IReadOnlyList Parameters { get; } + public void Emit(IXamlILEmitter emitter) + { + var locals = new Stack(); + // Save all "setter" parameters + for (var c = Parameters.Count - 1; c >= 0; c--) + { + var loc = emitter.LocalsPool.GetLocal(Parameters[c]); + locals.Push(loc); + emitter.Stloc(loc.Local); + } + + emitter.EmitCall(_getter); + while (locals.Count > 0) + using (var loc = locals.Pop()) + emitter.Ldloc(loc.Local); + emitter.EmitCall(_adder, true); + } + } + } +} diff --git a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSetterTransformer.cs b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSetterTransformer.cs index e816265422..6da95be1c1 100644 --- a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSetterTransformer.cs +++ b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSetterTransformer.cs @@ -1,19 +1,14 @@ -using System; using System.Collections.Generic; using System.Linq; -using Avalonia.Data.Core; -using XamlX; using XamlX.Ast; using XamlX.Emit; using XamlX.IL; using XamlX.Transform; -using XamlX.Transform.Transformers; using XamlX.TypeSystem; namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers { using XamlParseException = XamlX.XamlParseException; - using XamlLoadException = XamlX.XamlLoadException; class AvaloniaXamlIlSetterTransformer : IXamlAstTransformer { public IXamlAstNode Transform(AstTransformationContext context, IXamlAstNode node) @@ -22,35 +17,23 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers && on.Type.GetClrType().FullName == "Avalonia.Styling.Setter")) return node; - var parent = context.ParentNodes().OfType() - .FirstOrDefault(p => p.Type.GetClrType().FullName == "Avalonia.Styling.Style"); - - if (parent == null) - throw new XamlParseException( - "Avalonia.Styling.Setter is only valid inside Avalonia.Styling.Style", node); - var selectorProperty = parent.Children.OfType() - .FirstOrDefault(p => p.Property.GetClrProperty().Name == "Selector"); - if (selectorProperty == null) - throw new XamlParseException( - "Can not find parent Style Selector", node); - var selector = selectorProperty.Values.FirstOrDefault() as XamlIlSelectorNode; - if (selector?.TargetType == null) - throw new XamlParseException( - "Can not resolve parent Style Selector type", node); + var targetTypeNode = context.ParentNodes() + .OfType() + .FirstOrDefault(x => x.ScopeType == AvaloniaXamlIlTargetTypeMetadataNode.ScopeTypes.Style) ?? + throw new XamlParseException("Can not find parent Style Selector or ControlTemplate TargetType", node); IXamlType propType = null; var property = @on.Children.OfType() .FirstOrDefault(x => x.Property.GetClrProperty().Name == "Property"); if (property != null) { - var propertyName = property.Values.OfType().FirstOrDefault()?.Text; if (propertyName == null) throw new XamlParseException("Setter.Property must be a string", node); var avaloniaPropertyNode = XamlIlAvaloniaPropertyHelper.CreateNode(context, propertyName, - new XamlAstClrTypeReference(selector, selector.TargetType, false), property.Values[0]); + new XamlAstClrTypeReference(targetTypeNode, targetTypeNode.TargetType.GetClrType(), false), property.Values[0]); property.Values = new List {avaloniaPropertyNode}; propType = avaloniaPropertyNode.AvaloniaPropertyType; } diff --git a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlWellKnownTypes.cs b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlWellKnownTypes.cs index 28787d9b84..dbfbe0e070 100644 --- a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlWellKnownTypes.cs +++ b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlWellKnownTypes.cs @@ -15,6 +15,8 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers public IXamlType AvaloniaObjectExtensions { get; } public IXamlType AvaloniaProperty { get; } public IXamlType AvaloniaPropertyT { get; } + public IXamlType StyledPropertyT { get; } + public IXamlMethod AvaloniaObjectSetStyledPropertyValue { get; } public IXamlType AvaloniaAttachedPropertyT { get; } public IXamlType IBinding { get; } public IXamlMethod AvaloniaObjectBindMethod { get; } @@ -96,6 +98,9 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers public IXamlType TextDecorations { get; } public IXamlType TextTrimming { get; } public IXamlType ISetter { get; } + public IXamlType IResourceDictionary { get; } + public IXamlType ResourceDictionary { get; } + public IXamlMethod ResourceDictionaryDeferredAdd { get; } public AvaloniaXamlIlWellKnownTypes(TransformerConfiguration cfg) { @@ -105,8 +110,14 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers AvaloniaObjectExtensions = cfg.TypeSystem.GetType("Avalonia.AvaloniaObjectExtensions"); AvaloniaProperty = cfg.TypeSystem.GetType("Avalonia.AvaloniaProperty"); AvaloniaPropertyT = cfg.TypeSystem.GetType("Avalonia.AvaloniaProperty`1"); + StyledPropertyT = cfg.TypeSystem.GetType("Avalonia.StyledProperty`1"); AvaloniaAttachedPropertyT = cfg.TypeSystem.GetType("Avalonia.AttachedProperty`1"); BindingPriority = cfg.TypeSystem.GetType("Avalonia.Data.BindingPriority"); + AvaloniaObjectSetStyledPropertyValue = AvaloniaObject + .FindMethod(m => m.IsPublic && !m.IsStatic && m.Name == "SetValue" + && m.Parameters.Count == 3 + && m.Parameters[0].Name == "StyledPropertyBase`1" + && m.Parameters[2].Equals(BindingPriority)); IBinding = cfg.TypeSystem.GetType("Avalonia.Data.IBinding"); IDisposable = cfg.TypeSystem.GetType("System.IDisposable"); ICommand = cfg.TypeSystem.GetType("System.Windows.Input.ICommand"); @@ -210,6 +221,12 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers TextDecorations = cfg.TypeSystem.GetType("Avalonia.Media.TextDecorations"); TextTrimming = cfg.TypeSystem.GetType("Avalonia.Media.TextTrimming"); ISetter = cfg.TypeSystem.GetType("Avalonia.Styling.ISetter"); + IResourceDictionary = cfg.TypeSystem.GetType("Avalonia.Controls.IResourceDictionary"); + ResourceDictionary = cfg.TypeSystem.GetType("Avalonia.Controls.ResourceDictionary"); + ResourceDictionaryDeferredAdd = ResourceDictionary.FindMethod("AddDeferred", XamlIlTypes.Void, true, XamlIlTypes.Object, + cfg.TypeSystem.GetType("System.Func`2").MakeGenericType( + cfg.TypeSystem.GetType("System.IServiceProvider"), + XamlIlTypes.Object)); } } diff --git a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlAvaloniaPropertyHelper.cs b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlAvaloniaPropertyHelper.cs index 7f1b8caf0d..5c7a80e680 100644 --- a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlAvaloniaPropertyHelper.cs +++ b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlAvaloniaPropertyHelper.cs @@ -185,11 +185,24 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions AvaloniaXamlIlWellKnownTypes types) :base(original, original.Name, original.DeclaringType, original.Getter, original.Setters) { + var assignBinding = original.CustomAttributes.Any(ca => ca.Type.Equals(types.AssignBindingAttribute)); + AvaloniaProperty = field; CustomAttributes = original.CustomAttributes; - if (!original.CustomAttributes.Any(ca => ca.Type.Equals(types.AssignBindingAttribute))) + if (!assignBinding) Setters.Insert(0, new BindingSetter(types, original.DeclaringType, field)); - + + // Styled and attached properties can be set with a BindingPriority when they're + // assigned in a ControlTemplate. + if (field.FieldType.GenericTypeDefinition == types.StyledPropertyT || + field.FieldType.GenericTypeDefinition == types.AvaloniaAttachedPropertyT) + { + var propertyType = field.FieldType.GenericArguments[0]; + Setters.Insert(0, new SetValueWithPrioritySetter(types, original.DeclaringType, field, propertyType)); + if (!assignBinding) + Setters.Insert(1, new BindingWithPrioritySetter(types, original.DeclaringType, field)); + } + Setters.Insert(0, new UnsetValueSetter(types, original.DeclaringType, field)); } @@ -240,6 +253,63 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions } } + class BindingWithPrioritySetter : AvaloniaPropertyCustomSetter + { + public BindingWithPrioritySetter(AvaloniaXamlIlWellKnownTypes types, + IXamlType declaringType, + IXamlField avaloniaProperty) : base(types, declaringType, avaloniaProperty) + { + Parameters = new[] { types.BindingPriority, types.IBinding }; + } + + public override void Emit(IXamlILEmitter emitter) + { + using (var bloc = emitter.LocalsPool.GetLocal(Types.IBinding)) + using (var priorityLocal = emitter.LocalsPool.GetLocal(Types.Int)) + emitter + .Stloc(bloc.Local) + .Stloc(priorityLocal.Local) + .Ldsfld(AvaloniaProperty) + .Ldloc(bloc.Local) + // TODO: provide anchor? + .Ldnull(); + emitter.EmitCall(Types.AvaloniaObjectBindMethod, true); + } + } + + class SetValueWithPrioritySetter : AvaloniaPropertyCustomSetter + { + public SetValueWithPrioritySetter(AvaloniaXamlIlWellKnownTypes types, IXamlType declaringType, IXamlField avaloniaProperty, + IXamlType propertyType) + : base(types, declaringType, avaloniaProperty) + { + Parameters = new[] { types.BindingPriority, propertyType }; + } + + public override void Emit(IXamlILEmitter emitter) + { + /* + Current stack: + - object + - binding priority + - value + */ + + var method = Types.AvaloniaObjectSetStyledPropertyValue + .MakeGenericMethod(new[] { Parameters[1] }); + + using (var valueLocal = emitter.LocalsPool.GetLocal(Parameters[1])) + using (var priorityLocal = emitter.LocalsPool.GetLocal(Types.Int)) + emitter + .Stloc(valueLocal.Local) + .Stloc(priorityLocal.Local) + .Ldsfld(AvaloniaProperty) + .Ldloc(valueLocal.Local) + .Ldloc(priorityLocal.Local) + .EmitCall(method, true); + } + } + class UnsetValueSetter : AvaloniaPropertyCustomSetter { public UnsetValueSetter(AvaloniaXamlIlWellKnownTypes types, IXamlType declaringType, IXamlField avaloniaProperty) diff --git a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj index c35cbc35c0..d0c39f0289 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj +++ b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj @@ -15,7 +15,6 @@ - @@ -49,6 +48,7 @@ + diff --git a/src/Markup/Avalonia.Markup.Xaml/Extensions.cs b/src/Markup/Avalonia.Markup.Xaml/Extensions.cs index 263750c316..d937a83010 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Extensions.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Extensions.cs @@ -24,10 +24,10 @@ namespace Avalonia.Markup.Xaml public static IEnumerable GetParents(this IServiceProvider sp) { return sp.GetService().Parents.OfType(); - - } + public static bool IsInControlTemplate(this IServiceProvider sp) => sp.GetService() != null; + public static Type ResolveType(this IServiceProvider ctx, string namespacePrefix, string type) { var tr = ctx.GetService(); diff --git a/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/DynamicResourceExtension.cs b/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/DynamicResourceExtension.cs index 087611bd59..f13ecab4e1 100644 --- a/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/DynamicResourceExtension.cs +++ b/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/DynamicResourceExtension.cs @@ -11,6 +11,7 @@ namespace Avalonia.Markup.Xaml.MarkupExtensions public class DynamicResourceExtension : IBinding { private object? _anchor; + private BindingPriority _priority; public DynamicResourceExtension() { @@ -25,6 +26,9 @@ namespace Avalonia.Markup.Xaml.MarkupExtensions public IBinding ProvideValue(IServiceProvider serviceProvider) { + if (serviceProvider.IsInControlTemplate()) + _priority = BindingPriority.TemplatedParent; + var provideTarget = serviceProvider.GetService(); if (!(provideTarget.TargetObject is IStyledElement)) @@ -53,12 +57,12 @@ namespace Avalonia.Markup.Xaml.MarkupExtensions if (control != null) { var source = control.GetResourceObservable(ResourceKey, GetConverter(targetProperty)); - return InstancedBinding.OneWay(source); + return InstancedBinding.OneWay(source, _priority); } else if (_anchor is IResourceProvider resourceProvider) { var source = resourceProvider.GetResourceObservable(ResourceKey, GetConverter(targetProperty)); - return InstancedBinding.OneWay(source); + return InstancedBinding.OneWay(source, _priority); } return null; diff --git a/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/StaticResourceExtension.cs b/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/StaticResourceExtension.cs index add97a660b..d462a2210e 100644 --- a/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/StaticResourceExtension.cs +++ b/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/StaticResourceExtension.cs @@ -39,6 +39,8 @@ namespace Avalonia.Markup.Xaml.MarkupExtensions targetType = setter.Property.PropertyType; } + var previousWasControlTheme = false; + // Look upwards though the ambient context for IResourceNodes // which might be able to give us the resource. foreach (var parent in stack.Parents) @@ -47,6 +49,21 @@ namespace Avalonia.Markup.Xaml.MarkupExtensions { return ColorToBrushConverter.Convert(value, targetType); } + + // HACK: Temporary fix for #8678. Hard-coded to only work for the DevTools main + // window as we don't want 3rd parties to start relying on this hack. + // + // We need to implement compile-time merging of resource dictionaries and this + // hack can be removed. + if (previousWasControlTheme && + parent is ResourceDictionary hack && + hack.Owner?.GetType().FullName == "Avalonia.Diagnostics.Views.MainWindow" && + hack.Owner.TryGetResource(ResourceKey, out value)) + { + return ColorToBrushConverter.Convert(value, targetType); + } + + previousWasControlTheme = parent is ControlTheme; } if (provideTarget.TargetObject is IControl target && @@ -69,3 +86,4 @@ namespace Avalonia.Markup.Xaml.MarkupExtensions } } } + diff --git a/src/Markup/Avalonia.Markup.Xaml/Styling/StyleInclude.cs b/src/Markup/Avalonia.Markup.Xaml/Styling/StyleInclude.cs index 46b5bc0c40..d92003ad9f 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Styling/StyleInclude.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Styling/StyleInclude.cs @@ -82,7 +82,7 @@ namespace Avalonia.Markup.Xaml.Styling } } - public SelectorMatchResult TryAttach(IStyleable target, IStyleHost? host) => Loaded.TryAttach(target, host); + public SelectorMatchResult TryAttach(IStyleable target, object? host) => Loaded.TryAttach(target, host); public bool TryGetResource(object key, out object? value) { diff --git a/src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/IAvaloniaXamlIlControlTemplateProvider.cs b/src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/IAvaloniaXamlIlControlTemplateProvider.cs new file mode 100644 index 0000000000..ed3f5bfdff --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/IAvaloniaXamlIlControlTemplateProvider.cs @@ -0,0 +1,8 @@ +using System.Collections.Generic; + +namespace Avalonia.Markup.Xaml.XamlIl.Runtime +{ + public interface IAvaloniaXamlIlControlTemplateProvider + { + } +} diff --git a/src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/XamlIlRuntimeHelpers.cs b/src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/XamlIlRuntimeHelpers.cs index c48f386ffd..a0e7fd7dcf 100644 --- a/src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/XamlIlRuntimeHelpers.cs +++ b/src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/XamlIlRuntimeHelpers.cs @@ -42,7 +42,8 @@ namespace Avalonia.Markup.Xaml.XamlIl.Runtime class DeferredParentServiceProvider : IAvaloniaXamlIlParentStackProvider, IServiceProvider, - IRootObjectProvider + IRootObjectProvider, + IAvaloniaXamlIlControlTemplateProvider { private readonly IServiceProvider _parentProvider; private readonly List _parentResourceNodes; @@ -75,6 +76,8 @@ namespace Avalonia.Markup.Xaml.XamlIl.Runtime return this; if (serviceType == typeof(IRootObjectProvider)) return this; + if (serviceType == typeof(IAvaloniaXamlIlControlTemplateProvider)) + return this; return _parentProvider?.GetService(serviceType); } diff --git a/src/Markup/Avalonia.Markup/Data/TemplateBinding.cs b/src/Markup/Avalonia.Markup/Data/TemplateBinding.cs index 265af3c5da..4a3538fff2 100644 --- a/src/Markup/Avalonia.Markup/Data/TemplateBinding.cs +++ b/src/Markup/Avalonia.Markup/Data/TemplateBinding.cs @@ -19,6 +19,7 @@ namespace Avalonia.Data private bool _isSetterValue; private IStyledElement _target = default!; private Type? _targetType; + private bool _hasProducedValue; public TemplateBinding() { @@ -143,10 +144,12 @@ namespace Avalonia.Data } PublishNext(value); + _hasProducedValue = true; } - else + else if (_hasProducedValue) { PublishNext(AvaloniaProperty.UnsetValue); + _hasProducedValue = false; } } diff --git a/src/Shared/SourceGeneratorAttributes.cs b/src/Shared/SourceGeneratorAttributes.cs index fdb5977d23..ac7c82c469 100644 --- a/src/Shared/SourceGeneratorAttributes.cs +++ b/src/Shared/SourceGeneratorAttributes.cs @@ -14,4 +14,28 @@ namespace Avalonia.SourceGenerator public string Namespace { get; } public Type BaseType { get; } } + + + internal class GetProcAddressAttribute : Attribute + { + public GetProcAddressAttribute(string proc) + { + + } + + public GetProcAddressAttribute(string proc, bool optional = false) + { + + } + + public GetProcAddressAttribute(bool optional) + { + + } + + public GetProcAddressAttribute() + { + + } + } } diff --git a/src/Skia/Avalonia.Skia/DrawingContextImpl.cs b/src/Skia/Avalonia.Skia/DrawingContextImpl.cs index 8293769138..99ab60d1ac 100644 --- a/src/Skia/Avalonia.Skia/DrawingContextImpl.cs +++ b/src/Skia/Avalonia.Skia/DrawingContextImpl.cs @@ -10,6 +10,7 @@ using Avalonia.Rendering.SceneGraph; using Avalonia.Rendering.Utilities; using Avalonia.Utilities; using Avalonia.Media.Imaging; +using JetBrains.Annotations; using SkiaSharp; namespace Avalonia.Skia @@ -17,7 +18,7 @@ namespace Avalonia.Skia /// /// Skia based drawing context. /// - internal class DrawingContextImpl : IDrawingContextImpl, ISkiaDrawingContextImpl, IDrawingContextWithAcrylicLikeSupport + internal class DrawingContextImpl : IDrawingContextImpl, IDrawingContextWithAcrylicLikeSupport { private IDisposable[] _disposables; private readonly Vector _dpi; @@ -38,7 +39,8 @@ namespace Avalonia.Skia private readonly SKPaint _fillPaint = new SKPaint(); private readonly SKPaint _boxShadowPaint = new SKPaint(); private static SKShader s_acrylicNoiseShader; - private readonly ISkiaGpuRenderSession _session; + private readonly ISkiaGpuRenderSession _session; + private bool _leased = false; /// /// Context create info. @@ -83,6 +85,47 @@ namespace Avalonia.Skia public ISkiaGpuRenderSession CurrentSession; } + class SkiaLeaseFeature : ISkiaSharpApiLeaseFeature + { + private readonly DrawingContextImpl _context; + + public SkiaLeaseFeature(DrawingContextImpl context) + { + _context = context; + } + + public ISkiaSharpApiLease Lease() + { + _context.CheckLease(); + return new ApiLease(_context); + } + + class ApiLease : ISkiaSharpApiLease + { + private DrawingContextImpl _context; + private readonly SKMatrix _revertTransform; + + public ApiLease(DrawingContextImpl context) + { + _revertTransform = context.Canvas.TotalMatrix; + _context = context; + _context._leased = true; + } + + public SKCanvas SkCanvas => _context.Canvas; + public GRContext GrContext => _context.GrContext; + public SKSurface SkSurface => _context.Surface; + public double CurrentOpacity => _context._currentOpacity; + + public void Dispose() + { + _context.Canvas.SetMatrix(_revertTransform); + _context._leased = false; + _context = null; + } + } + } + /// /// Create new drawing context. /// @@ -123,20 +166,23 @@ namespace Avalonia.Skia public SKCanvas Canvas { get; } public SKSurface Surface { get; } - SKCanvas ISkiaDrawingContextImpl.SkCanvas => Canvas; - SKSurface ISkiaDrawingContextImpl.SkSurface => Surface; - GRContext ISkiaDrawingContextImpl.GrContext => _grContext; - double ISkiaDrawingContextImpl.CurrentOpacity => _currentOpacity; - + private void CheckLease() + { + if (_leased) + throw new InvalidOperationException("The underlying graphics API is currently leased"); + } + /// public void Clear(Color color) { + CheckLease(); Canvas.Clear(color.ToSKColor()); } /// public void DrawBitmap(IRef source, double opacity, Rect sourceRect, Rect destRect, BitmapInterpolationMode bitmapInterpolationMode) { + CheckLease(); var drawableImage = (IDrawableBitmapImpl)source.Item; var s = sourceRect.ToSKRect(); var d = destRect.ToSKRect(); @@ -157,6 +203,7 @@ namespace Avalonia.Skia /// public void DrawBitmap(IRef source, IBrush opacityMask, Rect opacityMaskRect, Rect destRect) { + CheckLease(); PushOpacityMask(opacityMask, opacityMaskRect); DrawBitmap(source, 1, new Rect(0, 0, source.Item.PixelSize.Width, source.Item.PixelSize.Height), destRect, BitmapInterpolationMode.Default); PopOpacityMask(); @@ -165,6 +212,7 @@ namespace Avalonia.Skia /// public void DrawLine(IPen pen, Point p1, Point p2) { + CheckLease(); using (var paint = CreatePaint(_strokePaint, pen, new Size(Math.Abs(p2.X - p1.X), Math.Abs(p2.Y - p1.Y)))) { if (paint.Paint is object) @@ -177,6 +225,7 @@ namespace Avalonia.Skia /// public void DrawGeometry(IBrush brush, IPen pen, IGeometryImpl geometry) { + CheckLease(); var impl = (GeometryImpl) geometry; var size = geometry.Bounds.Size; @@ -260,6 +309,7 @@ namespace Avalonia.Skia { if (rect.Rect.Height <= 0 || rect.Rect.Width <= 0) return; + CheckLease(); var rc = rect.Rect.ToSKRect(); var isRounded = rect.IsRounded; @@ -296,6 +346,7 @@ namespace Avalonia.Skia { if (rect.Rect.Height <= 0 || rect.Rect.Width <= 0) return; + CheckLease(); // Arbitrary chosen values // On OSX Skia breaks OpenGL context when asked to draw, e. g. (0, 0, 623, 6666600) rect if (rect.Rect.Height > 8192 || rect.Rect.Width > 8192) @@ -421,7 +472,8 @@ namespace Avalonia.Skia { if (rect.Height <= 0 || rect.Width <= 0) return; - + CheckLease(); + var rc = rect.ToSKRect(); if (brush != null) @@ -447,6 +499,7 @@ namespace Avalonia.Skia /// public void DrawGlyphRun(IBrush foreground, GlyphRun glyphRun) { + CheckLease(); using (var paintWrapper = CreatePaint(_fillPaint, foreground, glyphRun.Size)) { var glyphRunImpl = (GlyphRunImpl)glyphRun.GlyphRunImpl; @@ -459,18 +512,21 @@ namespace Avalonia.Skia /// public IDrawingContextLayerImpl CreateLayer(Size size) { + CheckLease(); return CreateRenderTarget(size, true); } /// public void PushClip(Rect clip) { + CheckLease(); Canvas.Save(); Canvas.ClipRect(clip.ToSKRect()); } public void PushClip(RoundedRect clip) { + CheckLease(); Canvas.Save(); Canvas.ClipRoundRect(clip.ToSKRoundRect(), antialias:true); } @@ -478,12 +534,14 @@ namespace Avalonia.Skia /// public void PopClip() { + CheckLease(); Canvas.Restore(); } /// public void PushOpacity(double opacity) { + CheckLease(); _opacityStack.Push(_currentOpacity); _currentOpacity *= opacity; } @@ -491,6 +549,7 @@ namespace Avalonia.Skia /// public void PopOpacity() { + CheckLease(); _currentOpacity = _opacityStack.Pop(); } @@ -499,6 +558,7 @@ namespace Avalonia.Skia { if(_disposed) return; + CheckLease(); try { if (_grContext != null) @@ -523,6 +583,7 @@ namespace Avalonia.Skia /// public void PushGeometryClip(IGeometryImpl clip) { + CheckLease(); Canvas.Save(); Canvas.ClipPath(((GeometryImpl)clip).EffectivePath, SKClipOperation.Intersect, true); } @@ -530,12 +591,14 @@ namespace Avalonia.Skia /// public void PopGeometryClip() { + CheckLease(); Canvas.Restore(); } /// public void PushBitmapBlendMode(BitmapBlendingMode blendingMode) { + CheckLease(); _blendingModeStack.Push(_currentBlendingMode); _currentBlendingMode = blendingMode; } @@ -543,14 +606,20 @@ namespace Avalonia.Skia /// public void PopBitmapBlendMode() { + CheckLease(); _currentBlendingMode = _blendingModeStack.Pop(); } - public void Custom(ICustomDrawOperation custom) => custom.Render(this); + public void Custom(ICustomDrawOperation custom) + { + CheckLease(); + custom.Render(this); + } /// public void PushOpacityMask(IBrush mask, Rect bounds) { + CheckLease(); // TODO: This should be disposed var paint = new SKPaint(); @@ -561,6 +630,7 @@ namespace Avalonia.Skia /// public void PopOpacityMask() { + CheckLease(); using (var paint = new SKPaint { BlendMode = SKBlendMode.DstIn }) { Canvas.SaveLayer(paint); @@ -580,6 +650,7 @@ namespace Avalonia.Skia get { return _currentTransform; } set { + CheckLease(); if (_currentTransform == value) return; @@ -596,6 +667,14 @@ namespace Avalonia.Skia } } + [CanBeNull] + public object GetFeature(Type t) + { + if (t == typeof(ISkiaSharpApiLeaseFeature)) + return new SkiaLeaseFeature(this); + return null; + } + /// /// Configure paint wrapper for using gradient brush. /// diff --git a/src/Skia/Avalonia.Skia/Gpu/OpenGl/FboSkiaSurface.cs b/src/Skia/Avalonia.Skia/Gpu/OpenGl/FboSkiaSurface.cs index 8ab275df63..984c1785b7 100644 --- a/src/Skia/Avalonia.Skia/Gpu/OpenGl/FboSkiaSurface.cs +++ b/src/Skia/Avalonia.Skia/Gpu/OpenGl/FboSkiaSurface.cs @@ -27,16 +27,13 @@ namespace Avalonia.Skia gl.GetIntegerv(GL_RENDERBUFFER_BINDING, out var oldRenderbuffer); gl.GetIntegerv(GL_TEXTURE_BINDING_2D, out var oldTexture); - var arr = new int[2]; - + // Generate FBO - gl.GenFramebuffers(1, arr); - _fbo = arr[0]; + _fbo = gl.GenFramebuffer(); gl.BindFramebuffer(GL_FRAMEBUFFER, _fbo); // Create a texture to render into - gl.GenTextures(1, arr); - _texture = arr[0]; + _texture = gl.GenTexture(); gl.BindTexture(GL_TEXTURE_2D, _texture); gl.TexImage2D(GL_TEXTURE_2D, 0, InternalFormat, pixelSize.Width, pixelSize.Height, @@ -48,8 +45,7 @@ namespace Avalonia.Skia var success = false; foreach (var useStencil8 in TrueFalse) { - gl.GenRenderbuffers(1, arr); - _depthStencil = arr[0]; + _depthStencil = gl.GenRenderbuffer(); gl.BindRenderbuffer(GL_RENDERBUFFER, _depthStencil); if (useStencil8) @@ -73,7 +69,7 @@ namespace Avalonia.Skia else { gl.BindRenderbuffer(GL_RENDERBUFFER, oldRenderbuffer); - gl.DeleteRenderbuffers(1, arr); + gl.DeleteRenderbuffer(_depthStencil); } } @@ -83,10 +79,8 @@ namespace Avalonia.Skia if (!success) { - arr[0] = _fbo; - gl.DeleteFramebuffers(1, arr); - arr[0] = _texture; - gl.DeleteTextures(1, arr); + gl.DeleteFramebuffer(_fbo); + gl.DeleteTexture(_texture); throw new OpenGlException("Unable to create FBO with stencil"); } @@ -94,7 +88,7 @@ namespace Avalonia.Skia new GRGlFramebufferInfo((uint)_fbo, SKColorType.Rgba8888.ToGlSizedFormat())); Surface = SKSurface.Create(_grContext, target, surfaceOrigin, SKColorType.Rgba8888); - CanBlit = gl.BlitFramebuffer != null; + CanBlit = gl.IsBlitFramebufferAvailable; } public void Dispose() @@ -106,9 +100,9 @@ namespace Avalonia.Skia var gl = _glContext.GlInterface; if (_fbo != 0) { - gl.DeleteFramebuffers(1, new[] { _fbo }); - gl.DeleteTextures(1, new[] { _texture }); - gl.DeleteRenderbuffers(1, new[] { _depthStencil }); + gl.DeleteFramebuffer(_fbo); + gl.DeleteTexture(_texture); + gl.DeleteRenderbuffer(_depthStencil); _fbo = _texture = _depthStencil = 0; } } diff --git a/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs b/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs index ec8a8436e1..08e0fbd808 100644 --- a/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs +++ b/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs @@ -54,7 +54,7 @@ namespace Avalonia.Skia return null; // Blit feature requires glBlitFramebuffer - if (_glContext.GlInterface.BlitFramebuffer == null) + if (!_glContext.GlInterface.IsBlitFramebufferAvailable) return null; size = new PixelSize(Math.Max(size.Width, 1), Math.Max(size.Height, 1)); diff --git a/src/Skia/Avalonia.Skia/Gpu/OpenGl/OpenGlBitmapImpl.cs b/src/Skia/Avalonia.Skia/Gpu/OpenGl/OpenGlBitmapImpl.cs index 2ebf7c680b..a4617bb4d5 100644 --- a/src/Skia/Avalonia.Skia/Gpu/OpenGl/OpenGlBitmapImpl.cs +++ b/src/Skia/Avalonia.Skia/Gpu/OpenGl/OpenGlBitmapImpl.cs @@ -101,7 +101,7 @@ namespace Avalonia.Skia private bool _disposed; private readonly DisposableLock _lock = new DisposableLock(); - public SharedOpenGlBitmapAttachment(GlOpenGlBitmapImpl bitmap, IGlContext context, Action presentCallback) + public unsafe SharedOpenGlBitmapAttachment(GlOpenGlBitmapImpl bitmap, IGlContext context, Action presentCallback) { _bitmap = bitmap; _context = context; @@ -119,7 +119,8 @@ namespace Avalonia.Skia var gl = _context.GlInterface; var textures = new int[2]; - gl.GenTextures(2, textures); + fixed (int* ptex = textures) + gl.GenTextures(2, ptex); _texture = textures[0]; _frontBuffer = textures[1]; @@ -178,7 +179,7 @@ namespace Avalonia.Skia _presentCallback(); } - public void Dispose() + public unsafe void Dispose() { var gl = _context.GlInterface; _bitmap.Present(null); @@ -191,7 +192,9 @@ namespace Avalonia.Skia if(_disposed) return; _disposed = true; - gl.DeleteTextures(2, new[] { _texture, _frontBuffer }); + var tex = new[] { _texture, _frontBuffer }; + fixed (int* ptex = tex) + gl.DeleteTextures(2, ptex); } } diff --git a/src/Skia/Avalonia.Skia/Helpers/DrawingContextHelper.cs b/src/Skia/Avalonia.Skia/Helpers/DrawingContextHelper.cs index d0b45b7c5d..a078c364a2 100644 --- a/src/Skia/Avalonia.Skia/Helpers/DrawingContextHelper.cs +++ b/src/Skia/Avalonia.Skia/Helpers/DrawingContextHelper.cs @@ -33,7 +33,7 @@ namespace Avalonia.Skia.Helpers /// Unsupported - Wraps a GPU Backed SkiaSurface in an Avalonia DrawingContext. /// [Obsolete] - public static ISkiaDrawingContextImpl WrapSkiaSurface(this SKSurface surface, GRContext grContext, Vector dpi, params IDisposable[] disposables) + public static IDrawingContextImpl WrapSkiaSurface(this SKSurface surface, GRContext grContext, Vector dpi, params IDisposable[] disposables) { var createInfo = new DrawingContextImpl.CreateInfo { @@ -50,7 +50,7 @@ namespace Avalonia.Skia.Helpers /// Unsupported - Wraps a non-GPU Backed SkiaSurface in an Avalonia DrawingContext. /// [Obsolete] - public static ISkiaDrawingContextImpl WrapSkiaSurface(this SKSurface surface, Vector dpi, params IDisposable[] disposables) + public static IDrawingContextImpl WrapSkiaSurface(this SKSurface surface, Vector dpi, params IDisposable[] disposables) { var createInfo = new DrawingContextImpl.CreateInfo { @@ -63,7 +63,7 @@ namespace Avalonia.Skia.Helpers } [Obsolete] - public static ISkiaDrawingContextImpl CreateDrawingContext(Size size, Vector dpi, GRContext grContext = null) + public static IDrawingContextImpl CreateDrawingContext(Size size, Vector dpi, GRContext grContext = null) { if (grContext is null) { @@ -90,9 +90,11 @@ namespace Avalonia.Skia.Helpers } [Obsolete] - public static void DrawTo(this ISkiaDrawingContextImpl source, ISkiaDrawingContextImpl destination, SKPaint paint = null) + public static void DrawTo(this IDrawingContextImpl source, IDrawingContextImpl destination, SKPaint paint = null) { - destination.SkCanvas.DrawSurface(source.SkSurface, new SKPoint(0, 0), paint); + var src = (DrawingContextImpl)source; + var dst = (DrawingContextImpl)destination; + dst.Canvas.DrawSurface(src.Surface, new SKPoint(0, 0), paint); } } } diff --git a/src/Skia/Avalonia.Skia/ISkiaDrawingContextImpl.cs b/src/Skia/Avalonia.Skia/ISkiaDrawingContextImpl.cs deleted file mode 100644 index 1b60154d46..0000000000 --- a/src/Skia/Avalonia.Skia/ISkiaDrawingContextImpl.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Avalonia.Metadata; -using Avalonia.Platform; -using SkiaSharp; - -namespace Avalonia.Skia -{ - [Unstable] - public interface ISkiaDrawingContextImpl : IDrawingContextImpl - { - SKCanvas SkCanvas { get; } - GRContext GrContext { get; } - SKSurface SkSurface { get; } - double CurrentOpacity { get; } - } -} diff --git a/src/Skia/Avalonia.Skia/ISkiaSharpApiLeaseFeature.cs b/src/Skia/Avalonia.Skia/ISkiaSharpApiLeaseFeature.cs new file mode 100644 index 0000000000..b3966c0324 --- /dev/null +++ b/src/Skia/Avalonia.Skia/ISkiaSharpApiLeaseFeature.cs @@ -0,0 +1,20 @@ +using System; +using Avalonia.Metadata; +using SkiaSharp; + +namespace Avalonia.Skia; + +[Unstable] +public interface ISkiaSharpApiLeaseFeature +{ + public ISkiaSharpApiLease Lease(); +} + +[Unstable] +public interface ISkiaSharpApiLease : IDisposable +{ + SKCanvas SkCanvas { get; } + GRContext GrContext { get; } + SKSurface SkSurface { get; } + double CurrentOpacity { get; } +} \ No newline at end of file diff --git a/src/Skia/Avalonia.Skia/ImmutableBitmap.cs b/src/Skia/Avalonia.Skia/ImmutableBitmap.cs index 5628ae177c..6400d67fde 100644 --- a/src/Skia/Avalonia.Skia/ImmutableBitmap.cs +++ b/src/Skia/Avalonia.Skia/ImmutableBitmap.cs @@ -1,11 +1,8 @@ using System; using System.IO; -using System.Runtime.CompilerServices; -using System.Security.Cryptography; using Avalonia.Media.Imaging; using Avalonia.Platform; using Avalonia.Skia.Helpers; -using Avalonia.Media.Imaging; using SkiaSharp; namespace Avalonia.Skia @@ -57,7 +54,8 @@ namespace Avalonia.Skia public ImmutableBitmap(Stream stream, int decodeSize, bool horizontal, BitmapInterpolationMode interpolationMode) { using (var skStream = new SKManagedStream(stream)) - using (var codec = SKCodec.Create(skStream)) + using (var skData = SKData.Create(skStream)) + using (var codec = SKCodec.Create(skData)) { var info = codec.Info; diff --git a/src/Skia/Avalonia.Skia/WriteableBitmapImpl.cs b/src/Skia/Avalonia.Skia/WriteableBitmapImpl.cs index 506edf0627..80bfcc5973 100644 --- a/src/Skia/Avalonia.Skia/WriteableBitmapImpl.cs +++ b/src/Skia/Avalonia.Skia/WriteableBitmapImpl.cs @@ -4,7 +4,6 @@ using System.Threading; using Avalonia.Media.Imaging; using Avalonia.Platform; using Avalonia.Skia.Helpers; -using Avalonia.Media.Imaging; using SkiaSharp; namespace Avalonia.Skia @@ -25,8 +24,9 @@ namespace Avalonia.Skia public WriteableBitmapImpl(Stream stream) { using (var skiaStream = new SKManagedStream(stream)) + using (var skData = SKData.Create(skiaStream)) { - _bitmap = SKBitmap.Decode(skiaStream); + _bitmap = SKBitmap.Decode(skData); if (_bitmap == null) { @@ -41,7 +41,8 @@ namespace Avalonia.Skia public WriteableBitmapImpl(Stream stream, int decodeSize, bool horizontal, BitmapInterpolationMode interpolationMode) { using (var skStream = new SKManagedStream(stream)) - using (var codec = SKCodec.Create(skStream)) + using (var skData = SKData.Create(skStream)) + using (var codec = SKCodec.Create(skData)) { var info = codec.Info; diff --git a/src/Web/Avalonia.Web.Blazor/Interop/Storage/StorageProviderInterop.cs b/src/Web/Avalonia.Web.Blazor/Interop/Storage/StorageProviderInterop.cs index 14dc53d7b5..2bc46e97b5 100644 --- a/src/Web/Avalonia.Web.Blazor/Interop/Storage/StorageProviderInterop.cs +++ b/src/Web/Avalonia.Web.Blazor/Interop/Storage/StorageProviderInterop.cs @@ -145,7 +145,7 @@ namespace Avalonia.Web.Blazor.Interop.Storage public bool CanBookmark => true; - public Task SaveBookmark() + public Task SaveBookmarkAsync() { return FileHandle.InvokeAsync("saveBookmark").AsTask(); } @@ -155,7 +155,7 @@ namespace Avalonia.Web.Blazor.Interop.Storage return Task.FromResult(null); } - public Task ReleaseBookmark() + public Task ReleaseBookmarkAsync() { return FileHandle.InvokeAsync("deleteBookmark").AsTask(); } @@ -174,7 +174,7 @@ namespace Avalonia.Web.Blazor.Interop.Storage } public bool CanOpenRead => true; - public async Task OpenRead() + public async Task OpenReadAsync() { var stream = await FileHandle.InvokeAsync("openRead"); // Remove maxAllowedSize limit, as developer can decide if they read only small part or everything. @@ -182,7 +182,7 @@ namespace Avalonia.Web.Blazor.Interop.Storage } public bool CanOpenWrite => true; - public async Task OpenWrite() + public async Task OpenWriteAsync() { var properties = await FileHandle.InvokeAsync("getProperties"); var streamWriter = await FileHandle.InvokeAsync("openWrite"); @@ -196,5 +196,30 @@ namespace Avalonia.Web.Blazor.Interop.Storage public JSStorageFolder(IJSInProcessObjectReference fileHandle) : base(fileHandle) { } + + public async Task> GetItemsAsync() + { + var items = await FileHandle.InvokeAsync("getItems"); + if (items is null) + { + return Array.Empty(); + } + + var count = items.Invoke("count"); + + return Enumerable.Range(0, count) + .Select(index => + { + var reference = items.Invoke("at", index); + return reference.Invoke("getKind") switch + { + "directory" => (IStorageItem)new JSStorageFolder(reference), + "file" => new JSStorageFile(reference), + _ => null + }; + }) + .Where(i => i is not null) + .ToArray()!; + } } } diff --git a/src/Web/Avalonia.Web.Blazor/Interop/Typescript/StorageProvider.ts b/src/Web/Avalonia.Web.Blazor/Interop/Typescript/StorageProvider.ts index c32eef3226..aee74b9067 100644 --- a/src/Web/Avalonia.Web.Blazor/Interop/Typescript/StorageProvider.ts +++ b/src/Web/Avalonia.Web.Blazor/Interop/Typescript/StorageProvider.ts @@ -14,6 +14,8 @@ declare global { queryPermission(options?: { mode: PermissionsMode }): Promise<"granted" | "denied" | "prompt">; requestPermission(options?: { mode: PermissionsMode }): Promise<"granted" | "denied" | "prompt">; + + entries(): AsyncIterableIterator<[string, FileSystemFileHandle]>; } type WellKnownDirectory = "desktop" | "documents" | "downloads" | "music" | "pictures" | "videos"; type StartInDirectory = WellKnownDirectory | FileSystemFileHandle; @@ -53,7 +55,7 @@ class IndexedDbWrapper { } public connect(): Promise { - var conn = window.indexedDB.open(this.databaseName, 1); + const conn = window.indexedDB.open(this.databaseName, 1); conn.onupgradeneeded = event => { const db = (>event.target).result; @@ -85,7 +87,7 @@ class InnerDbConnection { const os = this.openStore(store, "readwrite"); return new Promise((resolve, reject) => { - var response = os.put(obj, key); + const response = os.put(obj, key); response.onsuccess = () => { resolve(response.result); }; @@ -99,7 +101,7 @@ class InnerDbConnection { const os = this.openStore(store, "readonly"); return new Promise((resolve, reject) => { - var response = os.get(key); + const response = os.get(key); response.onsuccess = () => { resolve(response.result); }; @@ -113,7 +115,7 @@ class InnerDbConnection { const os = this.openStore(store, "readwrite"); return new Promise((resolve, reject) => { - var response = os.delete(key); + const response = os.delete(key); response.onsuccess = () => { resolve(); }; @@ -134,17 +136,20 @@ const avaloniaDb = new IndexedDbWrapper("AvaloniaDb", [ ]) class StorageItem { - constructor(private handle: FileSystemFileHandle, private bookmarkId?: string) { } + constructor(public handle: FileSystemFileHandle, private bookmarkId?: string) { } public getName(): string { return this.handle.name } + public getKind(): string { + return this.handle.kind; + } + public async openRead(): Promise { await this.verityPermissions('read'); - var file = await this.handle.getFile(); - return file; + return await this.handle.getFile(); } public async openWrite(): Promise { @@ -154,7 +159,7 @@ class StorageItem { } public async getProperties(): Promise<{ Size: number, LastModified: number, Type: string }> { - var file = this.handle.getFile && await this.handle.getFile(); + const file = this.handle.getFile && await this.handle.getFile(); return file && { Size: file.size, @@ -163,6 +168,18 @@ class StorageItem { } } + public async getItems(): Promise { + if (this.handle.kind !== "directory"){ + return new StorageItems([]); + } + + const items: StorageItem[] = []; + for await (const [key, value] of this.handle.entries()) { + items.push(new StorageItem(value)); + } + return new StorageItems(items); + } + private async verityPermissions(mode: PermissionsMode): Promise { if (await this.handle.queryPermission({ mode }) === 'granted') { return; @@ -235,12 +252,12 @@ export class StorageProvider { } public static async selectFolderDialog( - startIn: StartInDirectory | null) + startIn: StorageItem | null) : Promise { // 'Picker' API doesn't accept "null" as a parameter, so it should be set to undefined. const options: DirectoryPickerOptions = { - startIn: (startIn || undefined) + startIn: (startIn?.handle || undefined) }; const handle = await window.showDirectoryPicker(options); @@ -248,12 +265,12 @@ export class StorageProvider { } public static async openFileDialog( - startIn: StartInDirectory | null, multiple: boolean, + startIn: StorageItem | null, multiple: boolean, types: FilePickerAcceptType[] | null, excludeAcceptAllOption: boolean) : Promise { const options: OpenFilePickerOptions = { - startIn: (startIn || undefined), + startIn: (startIn?.handle || undefined), multiple, excludeAcceptAllOption, types: (types || undefined) @@ -264,12 +281,12 @@ export class StorageProvider { } public static async saveFileDialog( - startIn: StartInDirectory | null, suggestedName: string | null, + startIn: StorageItem | null, suggestedName: string | null, types: FilePickerAcceptType[] | null, excludeAcceptAllOption: boolean) : Promise { const options: SaveFilePickerOptions = { - startIn: (startIn || undefined), + startIn: (startIn?.handle || undefined), suggestedName: (suggestedName || undefined), excludeAcceptAllOption, types: (types || undefined) diff --git a/src/Windows/Avalonia.Direct2D1/Direct2D1Platform.cs b/src/Windows/Avalonia.Direct2D1/Direct2D1Platform.cs index 7f1af46e97..81fa8c4bce 100644 --- a/src/Windows/Avalonia.Direct2D1/Direct2D1Platform.cs +++ b/src/Windows/Avalonia.Direct2D1/Direct2D1Platform.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using Avalonia.Controls; @@ -9,7 +8,6 @@ using Avalonia.Direct2D1.Media.Imaging; using Avalonia.Media; using Avalonia.Media.Imaging; using Avalonia.Platform; -using Avalonia.Media.Imaging; using SharpDX.DirectWrite; using GlyphRun = Avalonia.Media.GlyphRun; using TextAlignment = Avalonia.Media.TextAlignment; diff --git a/src/Windows/Avalonia.Direct2D1/Media/DrawingContextImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/DrawingContextImpl.cs index a7f1d9c3e5..180ae491b3 100644 --- a/src/Windows/Avalonia.Direct2D1/Media/DrawingContextImpl.cs +++ b/src/Windows/Avalonia.Direct2D1/Media/DrawingContextImpl.cs @@ -614,5 +614,6 @@ namespace Avalonia.Direct2D1.Media } public void Custom(ICustomDrawOperation custom) => custom.Render(this); + public object GetFeature(Type t) => null; } } diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs index d36db107e3..7435e3342e 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs @@ -101,7 +101,6 @@ namespace Avalonia.Win32.Interop.Wpf Size ITopLevelImpl.ClientSize => _finalSize; Size? ITopLevelImpl.FrameSize => null; - IMouseDevice ITopLevelImpl.MouseDevice => _mouse; double ITopLevelImpl.RenderScaling => PresentationSource.FromVisual(this)?.CompositionTarget?.TransformToDevice.M11 ?? 1; diff --git a/src/Windows/Avalonia.Win32/Input/WindowsMouseDevice.cs b/src/Windows/Avalonia.Win32/Input/WindowsMouseDevice.cs index b1064ae25d..224ffdc3fd 100644 --- a/src/Windows/Avalonia.Win32/Input/WindowsMouseDevice.cs +++ b/src/Windows/Avalonia.Win32/Input/WindowsMouseDevice.cs @@ -8,15 +8,28 @@ namespace Avalonia.Win32.Input { class WindowsMouseDevice : MouseDevice { - public WindowsMouseDevice() : base(new WindowsMousePointer()) + private readonly IPointer _pointer; + public WindowsMouseDevice() : base(WindowsMousePointer.CreatePointer(out var pointer)) { - + _pointer = pointer; + } + + // Normally user should use IPointer.Capture instead of MouseDevice.Capture, + // But on Windows we need to handle WM_MOUSE capture manually without having access to the Pointer. + internal void Capture(IInputElement control) + { + _pointer.Capture(control); } - class WindowsMousePointer : Pointer + internal class WindowsMousePointer : Pointer { - public WindowsMousePointer() : base(Pointer.GetNextFreeId(),PointerType.Mouse, true) + private WindowsMousePointer() : base(Pointer.GetNextFreeId(),PointerType.Mouse, true) + { + } + + public static WindowsMousePointer CreatePointer(out WindowsMousePointer pointer) { + return pointer = new WindowsMousePointer(); } protected override void PlatformCapture(IInputElement element) diff --git a/src/Windows/Avalonia.Win32/WinRT/Composition/WinUICompositorConnection.cs b/src/Windows/Avalonia.Win32/WinRT/Composition/WinUICompositorConnection.cs index 5334b90d62..84c3cc5c51 100644 --- a/src/Windows/Avalonia.Win32/WinRT/Composition/WinUICompositorConnection.cs +++ b/src/Windows/Avalonia.Win32/WinRT/Composition/WinUICompositorConnection.cs @@ -120,16 +120,14 @@ namespace Avalonia.Win32.WinRT.Composition private void RunLoop() { + using (var act = _compositor5.RequestCommitAsync()) + act.SetCompleted(new RunLoopHandler(this)); + + while (true) { - var st = Stopwatch.StartNew(); - using (var act = _compositor5.RequestCommitAsync()) - act.SetCompleted(new RunLoopHandler(this)); - while (true) - { - UnmanagedMethods.GetMessage(out var msg, IntPtr.Zero, 0, 0); - lock (_pumpLock) - UnmanagedMethods.DispatchMessage(ref msg); - } + UnmanagedMethods.GetMessage(out var msg, IntPtr.Zero, 0, 0); + lock (_pumpLock) + UnmanagedMethods.DispatchMessage(ref msg); } } diff --git a/src/Windows/Avalonia.Win32/WindowImpl.cs b/src/Windows/Avalonia.Win32/WindowImpl.cs index 2f1a116af7..6d5cba9946 100644 --- a/src/Windows/Avalonia.Win32/WindowImpl.cs +++ b/src/Windows/Avalonia.Win32/WindowImpl.cs @@ -72,7 +72,7 @@ namespace Avalonia.Win32 private const WindowStyles WindowStateMask = (WindowStyles.WS_MAXIMIZE | WindowStyles.WS_MINIMIZE); private readonly TouchDevice _touchDevice; - private readonly MouseDevice _mouseDevice; + private readonly WindowsMouseDevice _mouseDevice; private readonly PenDevice _penDevice; private readonly ManagedDeferredRendererLock _rendererLock; private readonly FramebufferManager _framebuffer; @@ -689,10 +689,9 @@ namespace Avalonia.Win32 public void BeginMoveDrag(PointerPressedEventArgs e) { - _mouseDevice.Capture(null); + e.Pointer.Capture(null); DefWindowProc(_hwnd, (int)WindowsMessage.WM_NCLBUTTONDOWN, new IntPtr((int)HitTestValues.HTCAPTION), IntPtr.Zero); - e.Pointer.Capture(null); } public void BeginResizeDrag(WindowEdge edge, PointerPressedEventArgs e) @@ -702,7 +701,7 @@ namespace Avalonia.Win32 #if USE_MANAGED_DRAG _managedDrag.BeginResizeDrag(edge, ScreenToClient(MouseDevice.Position.ToPoint(_scaling))); #else - _mouseDevice.Capture(null); + e.Pointer.Capture(null); DefWindowProc(_hwnd, (int)WindowsMessage.WM_NCLBUTTONDOWN, new IntPtr((int)s_edgeLookup[edge]), IntPtr.Zero); #endif diff --git a/src/iOS/Avalonia.iOS/LayerFbo.cs b/src/iOS/Avalonia.iOS/LayerFbo.cs index 955aaef59f..9a93cdfb22 100644 --- a/src/iOS/Avalonia.iOS/LayerFbo.cs +++ b/src/iOS/Avalonia.iOS/LayerFbo.cs @@ -10,12 +10,12 @@ namespace Avalonia.iOS private readonly EAGLContext _context; private readonly GlInterface _gl; private readonly CAEAGLLayer _layer; - private int[] _framebuffer; - private int[] _renderbuffer; - private int[] _depthBuffer; + private int _framebuffer; + private int _renderbuffer; + private int _depthBuffer; private bool _disposed; - private LayerFbo(EAGLContext context, GlInterface gl, CAEAGLLayer layer, int[] framebuffer, int[] renderbuffer, int[] depthBuffer) + private LayerFbo(EAGLContext context, GlInterface gl, CAEAGLLayer layer, int framebuffer, int renderbuffer, int depthBuffer) { _context = context; _gl = gl; @@ -30,42 +30,36 @@ namespace Avalonia.iOS if (context != EAGLContext.CurrentContext) return null; - var fb = new int[2]; - var rb = new int[2]; - var db = new int[2]; - - gl.GenRenderbuffers(1, rb); - gl.BindRenderbuffer(GlConsts.GL_RENDERBUFFER, rb[0]); + var rb = gl.GenRenderbuffer(); + gl.BindRenderbuffer(GlConsts.GL_RENDERBUFFER, rb); context.RenderBufferStorage(GlConsts.GL_RENDERBUFFER, layer); - gl.GenFramebuffers(1, fb); - gl.BindFramebuffer(GlConsts.GL_FRAMEBUFFER, fb[0]); - gl.FramebufferRenderbuffer(GlConsts.GL_FRAMEBUFFER, GlConsts.GL_COLOR_ATTACHMENT0, GlConsts.GL_RENDERBUFFER, rb[0]); - - int[] w = new int[1]; - int[] h = new int[1]; - gl.GetRenderbufferParameteriv(GlConsts.GL_RENDERBUFFER, GlConsts.GL_RENDERBUFFER_WIDTH, w); - gl.GetRenderbufferParameteriv(GlConsts.GL_RENDERBUFFER, GlConsts.GL_RENDERBUFFER_HEIGHT, h); + var fb = gl.GenFramebuffer(); + gl.BindFramebuffer(GlConsts.GL_FRAMEBUFFER, fb); + gl.FramebufferRenderbuffer(GlConsts.GL_FRAMEBUFFER, GlConsts.GL_COLOR_ATTACHMENT0, GlConsts.GL_RENDERBUFFER, rb); - gl.GenRenderbuffers(1, db); + gl.GetRenderbufferParameteriv(GlConsts.GL_RENDERBUFFER, GlConsts.GL_RENDERBUFFER_WIDTH, out var w); + gl.GetRenderbufferParameteriv(GlConsts.GL_RENDERBUFFER, GlConsts.GL_RENDERBUFFER_HEIGHT, out var h); + + var db = gl.GenRenderbuffer(); //GL.BindRenderbuffer(RenderbufferTarget.Renderbuffer, depthBuffer); //GL.RenderbufferStorage(RenderbufferTarget.Renderbuffer, RenderbufferInternalFormat.DepthComponent16, w, h); - gl.FramebufferRenderbuffer(GlConsts.GL_FRAMEBUFFER, GlConsts.GL_DEPTH_ATTACHMENT, GlConsts.GL_RENDERBUFFER, db[0]); + gl.FramebufferRenderbuffer(GlConsts.GL_FRAMEBUFFER, GlConsts.GL_DEPTH_ATTACHMENT, GlConsts.GL_RENDERBUFFER, db); var frameBufferError = gl.CheckFramebufferStatus(GlConsts.GL_FRAMEBUFFER); if(frameBufferError != GlConsts.GL_FRAMEBUFFER_COMPLETE) { - gl.DeleteFramebuffers(1, fb); - gl.DeleteRenderbuffers(1, db); - gl.DeleteRenderbuffers(1, rb); + gl.DeleteFramebuffer(fb); + gl.DeleteRenderbuffer(db); + gl.DeleteRenderbuffer(rb); return null; } return new LayerFbo(context, gl, layer, fb, rb, db) { - Width = w[0], - Height = h[0] + Width = w, + Height = h }; } @@ -74,7 +68,7 @@ namespace Avalonia.iOS public void Bind() { - _gl.BindFramebuffer(GlConsts.GL_FRAMEBUFFER, _framebuffer[0]); + _gl.BindFramebuffer(GlConsts.GL_FRAMEBUFFER, _framebuffer); } public void Present() @@ -88,9 +82,9 @@ namespace Avalonia.iOS if(_disposed) return; _disposed = true; - _gl.DeleteFramebuffers(1, _framebuffer); - _gl.DeleteRenderbuffers(1, _depthBuffer); - _gl.DeleteRenderbuffers(1, _renderbuffer); + _gl.DeleteFramebuffer(_framebuffer); + _gl.DeleteRenderbuffer(_depthBuffer); + _gl.DeleteRenderbuffer(_renderbuffer); if (_context != EAGLContext.CurrentContext) throw new InvalidOperationException("Associated EAGLContext is not current"); } diff --git a/src/iOS/Avalonia.iOS/Storage/IOSStorageItem.cs b/src/iOS/Avalonia.iOS/Storage/IOSStorageItem.cs index 6fb296d0e0..a801e83562 100644 --- a/src/iOS/Avalonia.iOS/Storage/IOSStorageItem.cs +++ b/src/iOS/Avalonia.iOS/Storage/IOSStorageItem.cs @@ -1,6 +1,8 @@ using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Linq; using System.Threading.Tasks; using Avalonia.Logging; using Avalonia.Platform.Storage; @@ -49,13 +51,13 @@ internal abstract class IOSStorageItem : IStorageBookmarkItem return Task.FromResult(new IOSStorageFolder(Url.RemoveLastPathComponent())); } - public Task ReleaseBookmark() + public Task ReleaseBookmarkAsync() { // no-op return Task.CompletedTask; } - public Task SaveBookmark() + public Task SaveBookmarkAsync() { try { @@ -102,12 +104,12 @@ internal sealed class IOSStorageFile : IOSStorageItem, IStorageBookmarkFile public bool CanOpenWrite => true; - public Task OpenRead() + public Task OpenReadAsync() { return Task.FromResult(new IOSSecurityScopedStream(Url, FileAccess.Read)); } - public Task OpenWrite() + public Task OpenWriteAsync() { return Task.FromResult(new IOSSecurityScopedStream(Url, FileAccess.Write)); } @@ -118,4 +120,19 @@ internal sealed class IOSStorageFolder : IOSStorageItem, IStorageBookmarkFolder public IOSStorageFolder(NSUrl url) : base(url) { } + + public Task> GetItemsAsync() + { + var content = NSFileManager.DefaultManager.GetDirectoryContent(Url, null, NSDirectoryEnumerationOptions.None, out var error); + if (error is not null) + { + return Task.FromException>(new NSErrorException(error)); + } + + var items = content + .Select(u => u.HasDirectoryPath ? (IStorageItem)new IOSStorageFolder(u) : new IOSStorageFile(u)) + .ToArray(); + + return Task.FromResult>(items); + } } diff --git a/src/tools/Avalonia.Designer.HostApp/Avalonia.Designer.HostApp.csproj b/src/tools/Avalonia.Designer.HostApp/Avalonia.Designer.HostApp.csproj index 1cf68c1605..f509bb21ba 100644 --- a/src/tools/Avalonia.Designer.HostApp/Avalonia.Designer.HostApp.csproj +++ b/src/tools/Avalonia.Designer.HostApp/Avalonia.Designer.HostApp.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/tools/DevGenerators/CompositionGenerator/Generator.KeyFrameAnimation.cs b/src/tools/DevGenerators/CompositionGenerator/Generator.KeyFrameAnimation.cs index 7ad40f68e4..9455f5fac2 100644 --- a/src/tools/DevGenerators/CompositionGenerator/Generator.KeyFrameAnimation.cs +++ b/src/tools/DevGenerators/CompositionGenerator/Generator.KeyFrameAnimation.cs @@ -8,6 +8,8 @@ namespace Avalonia.SourceGenerator.CompositionGenerator using Avalonia.Rendering.Composition.Animations; using Avalonia.Rendering.Composition.Expressions; +// Special license applies License.md + namespace Avalonia.Rendering.Composition {{ "; @@ -56,4 +58,4 @@ namespace Avalonia.Rendering.Composition _output.AddSource("CompositionAnimations.cs", code); } } -} \ No newline at end of file +} diff --git a/src/tools/DevGenerators/GetProcAddressInitialization.cs b/src/tools/DevGenerators/GetProcAddressInitialization.cs new file mode 100644 index 0000000000..64698d1f2e --- /dev/null +++ b/src/tools/DevGenerators/GetProcAddressInitialization.cs @@ -0,0 +1,338 @@ +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace Generator; + +[Generator(LanguageNames.CSharp)] +public class GetProcAddressInitializationGenerator : IIncrementalGenerator +{ + const string GetProcAddressFullName = "global::Avalonia.SourceGenerator.GetProcAddressAttribute"; + + public void Initialize(IncrementalGeneratorInitializationContext context) + { + var allMethodsWithAttributes = context.SyntaxProvider + .CreateSyntaxProvider( + static (s, _) => s is MethodDeclarationSyntax + { + AttributeLists.Count: > 0, + } md && md.Modifiers.Any(m=>m.IsKind(SyntaxKind.PartialKeyword)), + static (context, _) => + (IMethodSymbol)context.SemanticModel.GetDeclaredSymbol(context.Node)!); + + var fieldsWithAttribute = allMethodsWithAttributes + .Where(s => s.HasAttributeWithFullyQualifiedName(GetProcAddressFullName)); + + var all = fieldsWithAttribute.Collect(); + context.RegisterSourceOutput(all, static (context, methods) => + { + foreach (var typeGroup in methods.GroupBy(f => f.ContainingType)) + { + var nextContext = 0; + var contexts = new Dictionary(); + + string GetContextNameFromIndex(int c) => "context" + (c == 0 ? "" : c); + string GetContextName(string type) + { + if (contexts.TryGetValue(type, out var idx)) + return GetContextNameFromIndex(idx); + if (nextContext != 0) + idx += nextContext; + nextContext++; + return GetContextNameFromIndex(contexts[type] = idx); + } + + var classBuilder = new StringBuilder(); + if (typeGroup.Key.ContainingNamespace != null) + classBuilder + .AppendLine("using System;") + .Append("namespace ") + .Append(typeGroup.Key.ContainingNamespace) + .AppendLine(";"); + classBuilder + .Append("unsafe partial class ") + .AppendLine(typeGroup.Key.Name) + .AppendLine("{"); + var initializeBody = new StringBuilder() + .Pad(2) + .AppendLine("var addr = IntPtr.Zero;"); + + foreach (var method in typeGroup) + { + var isOptional = false; + var first = true; + var fieldName = "_addr_" + method.Name; + var delegateType = BuildDelegateType(method); + + void AppendNextAddr() + { + if (first) + { + first = false; + initializeBody.Pad(2); + } + else + initializeBody + .Pad(2) + .Append("if(addr == IntPtr.Zero) "); + } + + initializeBody + .Pad(2).Append("// Initializing ").AppendLine(method.Name) + .Pad(2) + .AppendLine("addr = IntPtr.Zero;"); + foreach (var attr in method.GetAttributes()) + { + if (attr.AttributeClass?.HasFullyQualifiedName(GetProcAddressFullName) == true) + { + string? primaryName = null; + foreach (var arg in attr.ConstructorArguments) + { + if (arg.Value is string name) + primaryName = name; + if (arg.Value is bool opt) + isOptional = opt; + } + + if (primaryName != null) + { + AppendNextAddr(); + initializeBody + .Append("addr = getProcAddress(\"") + .Append(primaryName) + .AppendLine("\");"); + } + } + else + { + if (attr.AttributeClass != null + && attr.AttributeClass.MemberNames.Contains("GetProcAddress")) + { + var getProcMethod = attr.AttributeClass.GetMembers() + .FirstOrDefault(m => m.Name == "GetProcAddress") as IMethodSymbol; + if (getProcMethod == null || !getProcMethod.IsStatic || getProcMethod.Parameters.Length < 2) + continue; + var contextName = + GetContextName(getProcMethod + .Parameters[1].Type + .ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)); + AppendNextAddr(); + initializeBody + .Append("addr = ") + .Append(attr.AttributeClass.GetFullyQualifiedName()) + .Append(".GetProcAddress(") + .Append("getProcAddress, ") + .Append(contextName); + + var syntaxNode = (AttributeSyntax)attr.ApplicationSyntaxReference.GetSyntax(); + foreach (var arg in syntaxNode.ArgumentList.Arguments) + initializeBody.Append(", ").Append(arg.GetText()); + initializeBody.AppendLine(");"); + } + } + } + + if (!isOptional) + { + initializeBody + .Pad(2) + .Append("if (addr == IntPtr.Zero) throw new System.EntryPointNotFoundException(\"") + .Append(fieldName).AppendLine("\");"); + } + + initializeBody + .Pad(2) + .Append(fieldName) + .Append(" = (") + .Append(delegateType) + .AppendLine(")addr;"); + + classBuilder + .Pad(1) + .Append(delegateType); + classBuilder + .Append(fieldName) + .AppendLine(";"); + + classBuilder + .Pad(1) + .Append("public partial ") + .Append(method.ReturnType.GetFullyQualifiedName()) + .Append(" ") + .Append(method.Name) + .Append("("); + var firstArg = true; + foreach (var p in method.Parameters) + { + if (firstArg) + firstArg = false; + else + classBuilder.Append(", "); + AppendRefKind(classBuilder, p.RefKind); + classBuilder + .Append(p.Type.GetFullyQualifiedName()) + .Append(" @") + .Append(p.Name); + } + classBuilder + .AppendLine(")") + .Pad(1) + .AppendLine("{"); + if (isOptional) + classBuilder + .Pad(2) + .Append("if (") + .Append(fieldName) + .Append(" == null) throw new System.EntryPointNotFoundException(\"") + .Append(method.Name) + .AppendLine("\");"); + + foreach(var p in method.Parameters) + if (NeedsPin(p.Type)) + classBuilder.Pad(2) + .Append("fixed(") + .Append(MapToNative(p.Type)) + .Append(" @__p_") + .Append(p.Name) + .Append(" = ") + .Append(p.Name) + .AppendLine(")"); + + classBuilder.Pad(2); + if (!method.ReturnsVoid) + classBuilder.Append("return "); + + var invokeBuilder = new StringBuilder(); + + invokeBuilder + .Append(fieldName) + .Append("("); + firstArg = true; + foreach (var p in method.Parameters) + { + if (firstArg) + firstArg = false; + else + invokeBuilder.Append(", "); + AppendRefKind(invokeBuilder, p.RefKind); + invokeBuilder + .Append("@") + .Append(ConvertToNative(p.Name, p.Type)); + } + + invokeBuilder.Append(")"); + classBuilder.Append(ConvertToManaged(method.ReturnType, invokeBuilder.ToString())); + + classBuilder.AppendLine(";").Pad(1).AppendLine("}"); + if (isOptional) + classBuilder + .Pad(1) + .Append("public bool Is") + .Append(method.Name) + .Append("Available => ") + .Append(fieldName) + .AppendLine(" != null;"); + } + + classBuilder + .Pad(1) + .Append("void Initialize(Func getProcAddress"); + foreach (var kv in contexts.OrderBy(x => x.Value)) + { + classBuilder + .Append(", ") + .Append(kv.Key) + .Append(" ") + .Append(GetContextNameFromIndex(kv.Value)); + } + + classBuilder.AppendLine(")").Pad(1).AppendLine("{"); + classBuilder.Append(initializeBody.ToString()); + classBuilder.Append("}\n}"); + + + context.AddSource(typeGroup.Key.GetFullyQualifiedName().Replace(":", ""), classBuilder.ToString()); + } + }); + + + } + + static StringBuilder AppendRefKind(StringBuilder sb, RefKind kind) + { + if (kind == RefKind.Ref) + sb.Append("ref "); + if (kind == RefKind.Out) + sb.Append("out "); + return sb; + } + + static bool NeedsPin(ITypeSymbol type) + { + if (type.TypeKind == TypeKind.Array) + return true; + return false; + } + + static string ConvertToNative(string name, ITypeSymbol type) + { + if (NeedsPin(type)) + return "__p_" + name; + if (IsBool(type)) + return $"{name} ? 1 : 0"; + return name; + } + + static string ConvertToManaged(ITypeSymbol type, string expr) + { + if (IsBool(type)) + return expr + " != 0"; + return expr; + } + + static bool IsBool(ITypeSymbol type) => type.GetFullyQualifiedName() == "global::System.Boolean" || + type.GetFullyQualifiedName() == "bool"; + + static string MapToNative(ITypeSymbol type) + { + if (type.TypeKind == TypeKind.Array) + return ((IArrayTypeSymbol)type).ElementType.GetFullyQualifiedName() + "*"; + if (IsBool(type)) + return "int"; + return type.GetFullyQualifiedName(); + } + + static string BuildDelegateType(IMethodSymbol method) + { + StringBuilder name = new("delegate* unmanaged[Stdcall]<"); + var firstArg = true; + + void AppendArg(string a, RefKind kind) + { + if (firstArg) + firstArg = false; + else + name.Append(","); + AppendRefKind(name, kind); + name.Append(a); + } + + foreach (var p in method.Parameters) + { + AppendArg(MapToNative(p.Type), p.RefKind); + } + + AppendArg(MapToNative(method.ReturnType), RefKind.None); + name.Append(">"); + return name.ToString(); + } + +} \ No newline at end of file diff --git a/src/tools/DevGenerators/Helpers.cs b/src/tools/DevGenerators/Helpers.cs new file mode 100644 index 0000000000..3da89d2d0e --- /dev/null +++ b/src/tools/DevGenerators/Helpers.cs @@ -0,0 +1,31 @@ +using System.Collections.Immutable; +using System.Text; +using Microsoft.CodeAnalysis; + +namespace Generator; + +static class Helpers +{ + public static StringBuilder Pad(this StringBuilder sb, int count) => sb.Append(' ', count * 4); + + public static string GetFullyQualifiedName(this ISymbol symbol) + { + return symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); + } + + public static bool HasFullyQualifiedName(this ISymbol symbol, string name) + { + return symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) == name; + } + + public static bool HasAttributeWithFullyQualifiedName(this ISymbol symbol, string name) + { + ImmutableArray attributes = symbol.GetAttributes(); + + foreach (AttributeData attribute in attributes) + if (attribute.AttributeClass?.HasFullyQualifiedName(name) == true) + return true; + + return false; + } +} \ No newline at end of file diff --git a/tests/Avalonia.Base.UnitTests/Input/MouseDeviceTests.cs b/tests/Avalonia.Base.UnitTests/Input/MouseDeviceTests.cs index 88abb4a6fa..466aba43ee 100644 --- a/tests/Avalonia.Base.UnitTests/Input/MouseDeviceTests.cs +++ b/tests/Avalonia.Base.UnitTests/Input/MouseDeviceTests.cs @@ -1,9 +1,12 @@ using System; using System.Collections.Generic; using Avalonia.Controls; +using Avalonia.Controls.Presenters; +using Avalonia.Controls.Templates; using Avalonia.Input; using Avalonia.Input.Raw; using Avalonia.Media; +using Avalonia.Platform; using Avalonia.Rendering; using Avalonia.UnitTests; using Moq; @@ -11,71 +14,79 @@ using Xunit; namespace Avalonia.Base.UnitTests.Input { - public class MouseDeviceTests + public class MouseDeviceTests : PointerTestsBase { -#pragma warning disable CS0618 // Type or member is obsolete [Fact] public void Capture_Is_Transferred_To_Parent_When_Control_Removed() { + using var app = UnitTestApplication.Start(new TestServices(inputManager: new InputManager())); + + var renderer = new Mock(); + var device = new MouseDevice(); + var impl = CreateTopLevelImplMock(renderer.Object); + Canvas control; - var root = new TestRoot + Panel rootChild; + var root = CreateInputRoot(impl.Object, rootChild = new Panel + { + Children = + { + (control = new Canvas()) + } + }); + + // Synthesize event to receive a pointer. + IPointer result = null; + root.PointerMoved += (_, a) => { - Child = control = new Canvas(), + result = a.Pointer; }; - var target = new MouseDevice(); + SetHit(renderer, control); + impl.Object.Input!(CreateRawPointerMovedArgs(device, root)); - target.Capture(control); - Assert.Same(control, target.Captured); + Assert.NotNull(result); + + result.Capture(control); + Assert.Same(control, result.Captured); - root.Child = null; + rootChild.Children.Clear(); - Assert.Same(root, target.Captured); + Assert.Same(rootChild, result.Captured); } -#pragma warning restore CS0618 // Type or member is obsolete [Fact] public void GetPosition_Should_Respect_Control_RenderTransform() { + using var app = UnitTestApplication.Start(new TestServices(inputManager: new InputManager())); + var renderer = new Mock(); + var device = new MouseDevice(); + var impl = CreateTopLevelImplMock(renderer.Object); - using (TestApplication(renderer.Object)) + Border border; + var root = CreateInputRoot(impl.Object, new Panel { - var inputManager = InputManager.Instance; - - var root = new TestRoot + Children = { - MouseDevice = new MouseDevice(), - Child = new Border + (border = new Border { Background = Brushes.Black, RenderTransform = new TranslateTransform(10, 0), - } - }; - - SendMouseMove(inputManager, root, new Point(11, 11)); - -#pragma warning disable CS0618 // Type or member is obsolete - var result = root.MouseDevice.GetPosition(root.Child); -#pragma warning restore CS0618 // Type or member is obsolete - Assert.Equal(new Point(1, 11), result); - } - } + }) + } + }); + + + Point? result = null; + root.PointerMoved += (_, a) => + { + result = a.GetPosition(border); + }; - private void SendMouseMove(IInputManager inputManager, TestRoot root, Point p = new Point()) - { - inputManager.ProcessInput(new RawPointerEventArgs( - root.MouseDevice, - 0, - root, - RawPointerEventType.Move, - p, - RawInputModifiers.None)); - } + SetHit(renderer, border); + impl.Object.Input!(CreateRawPointerMovedArgs(device, root, new Point(11, 11))); - private IDisposable TestApplication(IRenderer renderer) - { - return UnitTestApplication.Start( - new TestServices(inputManager: new InputManager())); + Assert.Equal(new Point(1, 11), result); } } } diff --git a/tests/Avalonia.Base.UnitTests/Input/PointerOverTests.cs b/tests/Avalonia.Base.UnitTests/Input/PointerOverTests.cs index a5ca2aef4a..a83b176484 100644 --- a/tests/Avalonia.Base.UnitTests/Input/PointerOverTests.cs +++ b/tests/Avalonia.Base.UnitTests/Input/PointerOverTests.cs @@ -3,14 +3,10 @@ using System; using System.Collections.Generic; using Avalonia.Controls; -using Avalonia.Controls.Presenters; -using Avalonia.Controls.Templates; using Avalonia.Input; using Avalonia.Input.Raw; -using Avalonia.Platform; using Avalonia.Rendering; using Avalonia.UnitTests; -using Avalonia.VisualTree; using Moq; @@ -18,7 +14,7 @@ using Xunit; namespace Avalonia.Base.UnitTests.Input { - public class PointerOverTests + public class PointerOverTests : PointerTestsBase { // https://github.com/AvaloniaUI/Avalonia/issues/2821 [Fact] @@ -448,87 +444,5 @@ namespace Avalonia.Base.UnitTests.Input c.PointerMoved += handler; } } - - private static void SetHit(Mock renderer, IControl? hit) - { - renderer.Setup(x => x.HitTest(It.IsAny(), It.IsAny(), It.IsAny>())) - .Returns(hit is null ? Array.Empty() : new[] { hit }); - - renderer.Setup(x => x.HitTestFirst(It.IsAny(), It.IsAny(), It.IsAny>())) - .Returns(hit); - } - - private static void SetMove(Mock deviceMock, IInputRoot root, IInputElement element) - { - deviceMock.Setup(d => d.ProcessRawEvent(It.IsAny())) - .Callback(() => element.RaiseEvent(CreatePointerMovedArgs(root, element))); - } - - private static Mock CreateTopLevelImplMock(IRenderer renderer) - { - var impl = new Mock(); - impl.DefaultValue = DefaultValue.Mock; - impl.SetupAllProperties(); - impl.SetupGet(r => r.RenderScaling).Returns(1); - impl.Setup(r => r.CreateRenderer(It.IsAny())).Returns(renderer); - impl.Setup(r => r.PointToScreen(It.IsAny())).Returns(p => new PixelPoint((int)p.X, (int)p.Y)); - impl.Setup(r => r.PointToClient(It.IsAny())).Returns(p => new Point(p.X, p.Y)); - return impl; - } - - private static IInputRoot CreateInputRoot(IWindowImpl impl, IControl child) - { - var root = new Window(impl) - { - Width = 100, - Height = 100, - Content = child, - Template = new FuncControlTemplate((w, _) => new ContentPresenter - { - Content = w.Content - }) - }; - root.Show(); - return root; - } - - private static IInputRoot CreateInputRoot(IRenderer renderer, IControl child) - { - return CreateInputRoot(CreateTopLevelImplMock(renderer).Object, child); - } - - private static RawPointerEventArgs CreateRawPointerMovedArgs( - IPointerDevice pointerDevice, - IInputRoot root, - Point? positition = null) - { - return new RawPointerEventArgs(pointerDevice, 0, root, RawPointerEventType.Move, - positition ?? default, default); - } - - private static PointerEventArgs CreatePointerMovedArgs( - IInputRoot root, IInputElement? source, Point? positition = null) - { - return new PointerEventArgs(InputElement.PointerMovedEvent, source, new Mock().Object, root, - positition ?? default, default, PointerPointProperties.None, KeyModifiers.None); - } - - private static Mock CreatePointerDeviceMock( - IPointer? pointer = null, - PointerType pointerType = PointerType.Mouse) - { - if (pointer is null) - { - var pointerMock = new Mock(); - pointerMock.SetupGet(p => p.Type).Returns(pointerType); - pointer = pointerMock.Object; - } - - var pointerDevice = new Mock(); - pointerDevice.Setup(d => d.TryGetPointer(It.IsAny())) - .Returns(pointer); - - return pointerDevice; - } } } diff --git a/tests/Avalonia.Base.UnitTests/Input/PointerTestsBase.cs b/tests/Avalonia.Base.UnitTests/Input/PointerTestsBase.cs new file mode 100644 index 0000000000..1ca6678aef --- /dev/null +++ b/tests/Avalonia.Base.UnitTests/Input/PointerTestsBase.cs @@ -0,0 +1,90 @@ +#nullable enable +using System; +using Avalonia.Controls; +using Avalonia.Controls.Presenters; +using Avalonia.Controls.Templates; +using Avalonia.Input; +using Avalonia.Input.Raw; +using Avalonia.Platform; +using Avalonia.Rendering; +using Avalonia.VisualTree; +using Moq; + +namespace Avalonia.Base.UnitTests.Input; + +public abstract class PointerTestsBase +{ + protected static void SetHit(Mock renderer, IControl? hit) + { + renderer.Setup(x => x.HitTest(It.IsAny(), It.IsAny(), It.IsAny>())) + .Returns(hit is null ? Array.Empty() : new[] { hit }); + + renderer.Setup(x => x.HitTestFirst(It.IsAny(), It.IsAny(), It.IsAny>())) + .Returns(hit); + } + + protected static void SetMove(Mock deviceMock, IInputRoot root, IInputElement element) + { + deviceMock.Setup(d => d.ProcessRawEvent(It.IsAny())) + .Callback(() => element.RaiseEvent(CreatePointerMovedArgs(root, element))); + } + + protected static Mock CreateTopLevelImplMock(IRenderer renderer) + { + var impl = new Mock(); + impl.DefaultValue = DefaultValue.Mock; + impl.SetupAllProperties(); + impl.SetupGet(r => r.RenderScaling).Returns(1); + impl.Setup(r => r.CreateRenderer(It.IsAny())).Returns(renderer); + impl.Setup(r => r.PointToScreen(It.IsAny())).Returns(p => new PixelPoint((int)p.X, (int)p.Y)); + impl.Setup(r => r.PointToClient(It.IsAny())).Returns(p => new Point(p.X, p.Y)); + return impl; + } + + protected static IInputRoot CreateInputRoot(IWindowImpl impl, IControl child) + { + var root = new Window(impl) + { + Width = 100, + Height = 100, + Content = child, + Template = new FuncControlTemplate((w, _) => new ContentPresenter { Content = w.Content }) + }; + root.Show(); + return root; + } + + protected static RawPointerEventArgs CreateRawPointerMovedArgs( + IPointerDevice pointerDevice, + IInputRoot root, + Point? positition = null) + { + return new RawPointerEventArgs(pointerDevice, 0, root, RawPointerEventType.Move, + positition ?? default, default); + } + + protected static PointerEventArgs CreatePointerMovedArgs( + IInputRoot root, IInputElement? source, Point? positition = null) + { + return new PointerEventArgs(InputElement.PointerMovedEvent, source, new Mock().Object, root, + positition ?? default, default, PointerPointProperties.None, KeyModifiers.None); + } + + protected static Mock CreatePointerDeviceMock( + IPointer? pointer = null, + PointerType pointerType = PointerType.Mouse) + { + if (pointer is null) + { + var pointerMock = new Mock(); + pointerMock.SetupGet(p => p.Type).Returns(pointerType); + pointer = pointerMock.Object; + } + + var pointerDevice = new Mock(); + pointerDevice.Setup(d => d.TryGetPointer(It.IsAny())) + .Returns(pointer); + + return pointerDevice; + } +} diff --git a/tests/Avalonia.Base.UnitTests/Rendering/CompositorHitTestingTests.cs b/tests/Avalonia.Base.UnitTests/Rendering/CompositorHitTestingTests.cs index 705c8fad9c..02012bf62b 100644 --- a/tests/Avalonia.Base.UnitTests/Rendering/CompositorHitTestingTests.cs +++ b/tests/Avalonia.Base.UnitTests/Rendering/CompositorHitTestingTests.cs @@ -408,10 +408,34 @@ public class CompositorHitTestingTests : CompositorTestsBase s.AssertHitTest(175, 100, null); } } + + [Fact] + public void HitTest_Should_Not_Hit_Controls_Next_Pixel() + { + using (var s = new CompositorServices(new Size(200, 200))) + { + Border targetRectangle; + + var stackPanel = new StackPanel + { + Orientation = Orientation.Vertical, + HorizontalAlignment = HorizontalAlignment.Left, + Children = + { + new Border { Width = 10, Height = 10, Background= Brushes.Red}, + { targetRectangle = new Border { Width = 10, Height = 10, Background = Brushes.Green} } + } + }; + + s.TopLevel.Content = stackPanel; + + s.AssertHitTest(new Point(5, 10), null, targetRectangle); + } + } private IDisposable TestApplication() { return UnitTestApplication.Start(TestServices.MockPlatformRenderInterface); } -} \ No newline at end of file +} diff --git a/tests/Avalonia.Base.UnitTests/Rendering/DeferredRendererTests_HitTesting.cs b/tests/Avalonia.Base.UnitTests/Rendering/DeferredRendererTests_HitTesting.cs index 33c7b3e0f8..d3fdbb63db 100644 --- a/tests/Avalonia.Base.UnitTests/Rendering/DeferredRendererTests_HitTesting.cs +++ b/tests/Avalonia.Base.UnitTests/Rendering/DeferredRendererTests_HitTesting.cs @@ -537,6 +537,38 @@ namespace Avalonia.Base.UnitTests.Rendering } } + [Fact] + public void HitTest_Should_Not_Hit_Controls_Next_Pixel() + { + using (TestApplication()) + { + Border targetRectangle; + + var root = new TestRoot + { + Width = 50, + Height = 200, + Child = new StackPanel + { + Orientation = Orientation.Vertical, + HorizontalAlignment = HorizontalAlignment.Left, + Children = + { + new Border { Width = 50, Height = 50, Background = Brushes.Red}, + { targetRectangle = new Border { Width = 50, Height = 50, Background = Brushes.Green} } + } + } + }; + + root.Renderer = new DeferredRenderer(root, null); + root.Measure(Size.Infinity); + root.Arrange(new Rect(root.DesiredSize)); + + var result = root.Renderer.HitTest(new Point(25, 50), root, null); + Assert.Equal(new[] { targetRectangle }, result); + } + } + private IDisposable TestApplication() { return UnitTestApplication.Start(TestServices.MockPlatformRenderInterface); diff --git a/tests/Avalonia.Base.UnitTests/Styling/ControlThemeTests.cs b/tests/Avalonia.Base.UnitTests/Styling/ControlThemeTests.cs new file mode 100644 index 0000000000..7a27a02fc4 --- /dev/null +++ b/tests/Avalonia.Base.UnitTests/Styling/ControlThemeTests.cs @@ -0,0 +1,92 @@ +using System; +using Avalonia.Controls; +using Avalonia.Controls.Primitives; +using Avalonia.Styling; +using Xunit; + +namespace Avalonia.Base.UnitTests.Styling +{ + public class ControlThemeTests + { + [Fact] + public void ControlTheme_Cannot_Be_Added_To_Styles() + { + var target = new ControlTheme(typeof(Button)); + var styles = new Styles(); + + Assert.Throws(() => styles.Add(target)); + } + + [Fact] + public void ControlTheme_Cannot_Be_Added_To_Style_Children() + { + var target = new ControlTheme(typeof(Button)); + var style = new Style(); + + Assert.Throws(() => style.Children.Add(target)); + } + + [Fact] + public void ControlTheme_Cannot_Be_Added_To_ControlTheme_Children() + { + var target = new ControlTheme(typeof(Button)); + var other = new ControlTheme(typeof(CheckBox)); + + Assert.Throws(() => other.Children.Add(target)); + } + + [Fact] + public void Style_Without_Selector_Cannot_Be_Added_To_Children() + { + var target = new ControlTheme(typeof(Button)); + var child = new Style(); + + Assert.Throws(() => target.Children.Add(child)); + } + + [Fact] + public void Style_Without_Nesting_Selector_Cannot_Be_Added_To_Children() + { + var target = new ControlTheme(typeof(Button)); + var child = new Style(x => x.OfType +"; + var window = (Window)AvaloniaRuntimeXamlLoader.Load(xaml); + var button = (Button)window.Content; + + window.ApplyTemplate(); + button.ApplyTemplate(); + + var presenter = (ContentPresenter)button.Presenter; + Assert.Equal(Dock.Top, DockPanel.GetDock(presenter)); + + var diagnostic = presenter.GetDiagnostic(DockPanel.DockProperty); + Assert.Equal(BindingPriority.TemplatedParent, diagnostic.Priority); + } + } + + [Fact] + public void ControlTemplate_StaticResources_Are_Set_With_Style_Priority() + { + using (UnitTestApplication.Start(TestServices.StyledWindow)) + { + var xaml = @" + + + Red + + +"; + var window = (Window)AvaloniaRuntimeXamlLoader.Load(xaml); + var button = (Button)window.Content; + + window.ApplyTemplate(); + button.ApplyTemplate(); + + var presenter = (ContentPresenter)button.Presenter; + Assert.Equal(Brushes.Red, presenter.Background); + + var diagnostic = presenter.GetDiagnostic(Button.BackgroundProperty); + Assert.Equal(BindingPriority.TemplatedParent, diagnostic.Priority); + } + } + + [Fact] + public void ControlTemplate_DynamicResources_Are_Set_With_Style_Priority() + { + using (UnitTestApplication.Start(TestServices.StyledWindow)) + { + var xaml = @" + + + Red + + +"; + var window = (Window)AvaloniaRuntimeXamlLoader.Load(xaml); + var button = (Button)window.Content; + + window.ApplyTemplate(); + button.ApplyTemplate(); + + var presenter = (ContentPresenter)button.Presenter; + Assert.Equal(Brushes.Red, presenter.Background); + + var diagnostic = presenter.GetDiagnostic(Button.BackgroundProperty); + Assert.Equal(BindingPriority.TemplatedParent, diagnostic.Priority); + } + } + + [Fact] + public void ControlTemplate_TemplateBindings_Are_Set_With_TemplatedParent_Priority() + { + using (UnitTestApplication.Start(TestServices.StyledWindow)) + { + var xaml = @" + + +"; + var window = (Window)AvaloniaRuntimeXamlLoader.Load(xaml); + var button = (Button)window.Content; + + window.ApplyTemplate(); + button.ApplyTemplate(); + + var presenter = (ContentPresenter)button.Presenter; + Assert.Equal("Foo", presenter.Content); + + var diagnostic = presenter.GetDiagnostic(ContentPresenter.ContentProperty); + Assert.Equal(BindingPriority.TemplatedParent, diagnostic.Priority); + } + } + + [Fact] + public void ControlTemplate_With_Nested_Child_Is_Operational() + { + var xaml = @" + + + + + +"; + var template = AvaloniaRuntimeXamlLoader.Parse(xaml); + + var parent = (ContentControl)template.Build(new ContentControl()).Control; + + Assert.Equal("parent", parent.Name); + + var child = parent.Content as ContentControl; + + Assert.NotNull(child); + + Assert.Equal("child", child.Name); + } + + [Fact] + public void ControlTemplate_With_TargetType_Is_Operational() + { + var xaml = @" + + + +"; + var template = AvaloniaRuntimeXamlLoader.Parse(xaml); + + Assert.Equal(typeof(ContentControl), template.TargetType); + + Assert.IsType(typeof(ContentPresenter), template.Build(new ContentControl()).Control); + } + + [Fact] + public void ControlTemplate_With_Panel_Children_Are_Added() + { + var xaml = @" + + + + + + +"; + var template = AvaloniaRuntimeXamlLoader.Parse(xaml); + + var panel = (Panel)template.Build(new ContentControl()).Control; + + Assert.Equal(2, panel.Children.Count); + + var foo = panel.Children[0]; + var bar = panel.Children[1]; + + Assert.Equal("Foo", foo.Name); + Assert.Equal("Bar", bar.Name); + } + } +} diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/ControlThemeTests.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/ControlThemeTests.cs new file mode 100644 index 0000000000..9eb48311df --- /dev/null +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/ControlThemeTests.cs @@ -0,0 +1,89 @@ +using Avalonia.Controls; +using Avalonia.Media; +using Avalonia.UnitTests; +using Avalonia.VisualTree; +using Xunit; + +namespace Avalonia.Markup.Xaml.UnitTests.Xaml +{ + public class ControlThemeTests : XamlTestBase + { + [Fact] + public void ControlTheme_Can_Be_StaticResource() + { + using (UnitTestApplication.Start(TestServices.StyledWindow)) + { + var xaml = $@" + + + {ControlThemeXaml} + + + +"; + + var window = (Window)AvaloniaRuntimeXamlLoader.Load(xaml); + var button = Assert.IsType(window.Content); + + window.LayoutManager.ExecuteInitialLayoutPass(); + + Assert.NotNull(button.Template); + + var child = Assert.Single(button.GetVisualChildren()); + var border = Assert.IsType(child); + + Assert.Equal(Brushes.Red, border.Background); + } + } + + [Fact] + public void ControlTheme_Can_Be_Set_In_Style() + { + using (UnitTestApplication.Start(TestServices.StyledWindow)) + { + var xaml = $@" + + + {ControlThemeXaml} + + + + + + + +"; + + var window = (Window)AvaloniaRuntimeXamlLoader.Load(xaml); + var button = Assert.IsType(window.Content); + + window.LayoutManager.ExecuteInitialLayoutPass(); + + Assert.NotNull(button.Template); + + var child = Assert.Single(button.GetVisualChildren()); + var border = Assert.IsType(child); + + Assert.Equal(Brushes.Red, border.Background); + } + } + + private const string ControlThemeXaml = @" + + + + + + + +"; + } +} diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/ResourceDictionaryTests.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/ResourceDictionaryTests.cs index 578fa888a3..5066341bbb 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/ResourceDictionaryTests.cs +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/ResourceDictionaryTests.cs @@ -3,6 +3,7 @@ using Avalonia.Controls; using Avalonia.Controls.Presenters; using Avalonia.Controls.Templates; using Avalonia.Media; +using Avalonia.Media.Immutable; using Avalonia.Styling; using Avalonia.UnitTests; using Xunit; @@ -66,6 +67,212 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml } } + [Fact] + public void Item_Is_Added_To_ResourceDictionary_As_Deferred() + { + using (StyledWindow()) + { + var xaml = @" + + +"; + var resources = (ResourceDictionary)AvaloniaRuntimeXamlLoader.Load(xaml); + + Assert.True(resources.ContainsDeferredKey("Red")); + } + } + + [Fact] + public void Item_Added_To_ResourceDictionary_Is_UnDeferred_On_Read() + { + using (StyledWindow()) + { + var xaml = @" + + +"; + var resources = (ResourceDictionary)AvaloniaRuntimeXamlLoader.Load(xaml); + + Assert.True(resources.ContainsDeferredKey("Red")); + + Assert.IsType(resources["Red"]); + + Assert.False(resources.ContainsDeferredKey("Red")); + } + } + + [Fact] + public void Item_Is_Added_To_Window_Resources_As_Deferred() + { + using (StyledWindow()) + { + var xaml = @" + + + + +"; + var window = (Window)AvaloniaRuntimeXamlLoader.Load(xaml); + var resources = (ResourceDictionary)window.Resources; + + Assert.True(resources.ContainsDeferredKey("Red")); + } + } + + [Fact] + public void Item_Is_Added_To_Window_MergedDictionaries_As_Deferred() + { + using (StyledWindow()) + { + var xaml = @" + + + + + + + + + + +"; + var window = (Window)AvaloniaRuntimeXamlLoader.Load(xaml); + var resources = (ResourceDictionary)window.Resources.MergedDictionaries[0]; + + Assert.True(resources.ContainsDeferredKey("Red")); + } + } + + [Fact] + public void Item_Is_Added_To_Style_Resources_As_Deferred() + { + using (StyledWindow()) + { + var xaml = @" +"; + var style = (Style)AvaloniaRuntimeXamlLoader.Load(xaml); + var resources = (ResourceDictionary)style.Resources; + + Assert.True(resources.ContainsDeferredKey("Red")); + } + } + + [Fact] + public void Item_Is_Added_To_Styles_Resources_As_Deferred() + { + using (StyledWindow()) + { + var xaml = @" + + + + +"; + var style = (Styles)AvaloniaRuntimeXamlLoader.Load(xaml); + var resources = (ResourceDictionary)style.Resources; + + Assert.True(resources.ContainsDeferredKey("Red")); + } + } + + [Fact] + public void Item_Can_Be_StaticReferenced_As_Deferred() + { + using (StyledWindow()) + { + var xaml = @" + + + + + +"; + var window = (Window)AvaloniaRuntimeXamlLoader.Load(xaml); + var windowResources = (ResourceDictionary)window.Resources; + var buttonResources = (ResourceDictionary)((Button)window.Content!).Resources; + + Assert.True(windowResources.ContainsDeferredKey("Red")); + Assert.True(buttonResources.ContainsDeferredKey("Red2")); + } + } + + [Fact] + public void Item_StaticReferenced_Is_UnDeferred_On_Read() + { + using (StyledWindow()) + { + var xaml = @" + + + + + +"; + var window = (Window)AvaloniaRuntimeXamlLoader.Load(xaml); + var windowResources = (ResourceDictionary)window.Resources; + var buttonResources = (ResourceDictionary)((Button)window.Content!).Resources; + + Assert.IsType(buttonResources["Red2"]); + + Assert.False(windowResources.ContainsDeferredKey("Red")); + Assert.False(buttonResources.ContainsDeferredKey("Red2")); + } + } + + [Fact] + public void Value_Type_With_Parse_Converter_Should_Not_Be_Deferred() + { + using (StyledWindow()) + { + var xaml = @" + + Red +"; + var resources = (ResourceDictionary)AvaloniaRuntimeXamlLoader.Load(xaml); + + Assert.False(resources.ContainsDeferredKey("Red")); + Assert.IsType(resources["Red"]); + } + } + + [Fact] + public void Value_Type_With_Ctor_Converter_Should_Not_Be_Deferred() + { + using (StyledWindow()) + { + var xaml = @" + + 1 1 1 1 +"; + var resources = (ResourceDictionary)AvaloniaRuntimeXamlLoader.Load(xaml); + + Assert.False(resources.ContainsDeferredKey("Margin")); + Assert.IsType(resources["Margin"]); + } + } + private IDisposable StyledWindow(params (string, string)[] assets) { var services = TestServices.StyledWindow.With( diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/TestTemplatedControl.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/TestTemplatedControl.cs new file mode 100644 index 0000000000..0c862bb66a --- /dev/null +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/TestTemplatedControl.cs @@ -0,0 +1,8 @@ +using Avalonia.Controls.Primitives; + +namespace Avalonia.Markup.Xaml.UnitTests.Xaml +{ + public class TestTemplatedControl : TemplatedControl + { + } +} diff --git a/tests/Avalonia.ReactiveUI.UnitTests/TransitioningContentControlTest.cs b/tests/Avalonia.ReactiveUI.UnitTests/TransitioningContentControlTest.cs index 6ca617d2d4..daa3830b7d 100644 --- a/tests/Avalonia.ReactiveUI.UnitTests/TransitioningContentControlTest.cs +++ b/tests/Avalonia.ReactiveUI.UnitTests/TransitioningContentControlTest.cs @@ -12,14 +12,6 @@ namespace Avalonia.ReactiveUI.UnitTests { public class TransitioningContentControlTest { - [Fact] - public void Transitioning_Control_Should_Derive_Template_From_Content_Control() - { - var target = new TransitioningContentControl(); - var stylable = (IStyledElement)target; - Assert.Equal(typeof(ContentControl),stylable.StyleKey); - } - [Fact] public void Transitioning_Control_Template_Should_Be_Instantiated() { diff --git a/tests/Avalonia.RenderTests/Assets/NotoSansArabic-Regular.ttf b/tests/Avalonia.RenderTests/Assets/NotoSansArabic-Regular.ttf new file mode 100644 index 0000000000..79359c460b Binary files /dev/null and b/tests/Avalonia.RenderTests/Assets/NotoSansArabic-Regular.ttf differ diff --git a/tests/Avalonia.Skia.RenderTests/Avalonia.Skia.RenderTests.csproj b/tests/Avalonia.Skia.RenderTests/Avalonia.Skia.RenderTests.csproj index d3f2b44968..5e481f21c1 100644 --- a/tests/Avalonia.Skia.RenderTests/Avalonia.Skia.RenderTests.csproj +++ b/tests/Avalonia.Skia.RenderTests/Avalonia.Skia.RenderTests.csproj @@ -14,7 +14,7 @@ - + diff --git a/tests/Avalonia.Skia.UnitTests/Media/CustomFontManagerImpl.cs b/tests/Avalonia.Skia.UnitTests/Media/CustomFontManagerImpl.cs index 04b408a666..7d0cf05b0b 100644 --- a/tests/Avalonia.Skia.UnitTests/Media/CustomFontManagerImpl.cs +++ b/tests/Avalonia.Skia.UnitTests/Media/CustomFontManagerImpl.cs @@ -15,6 +15,8 @@ namespace Avalonia.Skia.UnitTests.Media private readonly Typeface _defaultTypeface = new Typeface("resm:Avalonia.Skia.UnitTests.Assets?assembly=Avalonia.Skia.UnitTests#Noto Mono"); + private readonly Typeface _arabicTypeface = + new Typeface("resm:Avalonia.Skia.UnitTests.Assets?assembly=Avalonia.Skia.UnitTests#Noto Sans Arabic"); private readonly Typeface _italicTypeface = new Typeface("resm:Avalonia.Skia.UnitTests.Assets?assembly=Avalonia.Skia.UnitTests#Noto Sans", FontStyle.Italic); private readonly Typeface _emojiTypeface = @@ -22,7 +24,7 @@ namespace Avalonia.Skia.UnitTests.Media public CustomFontManagerImpl() { - _customTypefaces = new[] { _emojiTypeface, _italicTypeface, _defaultTypeface }; + _customTypefaces = new[] { _emojiTypeface, _italicTypeface, _arabicTypeface, _defaultTypeface }; _defaultFamilyName = _defaultTypeface.FontFamily.FamilyNames.PrimaryFamilyName; } @@ -80,6 +82,12 @@ namespace Avalonia.Skia.UnitTests.Media skTypeface = typefaceCollection.Get(typeface); break; } + case "Noto Sans Arabic": + { + var typefaceCollection = SKTypefaceCollectionCache.GetOrAddTypefaceCollection(_arabicTypeface.FontFamily); + skTypeface = typefaceCollection.Get(typeface); + break; + } case FontFamily.DefaultFontFamilyName: case "Noto Mono": { diff --git a/tests/Avalonia.Skia.UnitTests/Media/FontManagerImplTests.cs b/tests/Avalonia.Skia.UnitTests/Media/FontManagerImplTests.cs index df286d709e..649e1fbf3d 100644 --- a/tests/Avalonia.Skia.UnitTests/Media/FontManagerImplTests.cs +++ b/tests/Avalonia.Skia.UnitTests/Media/FontManagerImplTests.cs @@ -33,15 +33,11 @@ namespace Avalonia.Skia.UnitTests.Media { var fontManager = new FontManagerImpl(); - //we need to have a valid font name different from the default one - string fontName = fontManager.GetInstalledFontFamilyNames().First(); - var glyphTypeface = (GlyphTypefaceImpl)fontManager.CreateGlyphTypeface( - new Typeface(new FontFamily($"A, B, {fontName}"), weight: FontWeight.Bold)); + new Typeface(new FontFamily($"A, B, Arial"), weight: FontWeight.Bold)); var skTypeface = glyphTypeface.Typeface; - - Assert.Equal(fontName, skTypeface.FamilyName); + Assert.True(skTypeface.FontWeight >= 600); } diff --git a/tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLayoutTests.cs b/tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLayoutTests.cs index 7e1103d624..43948e9229 100644 --- a/tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLayoutTests.cs +++ b/tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLayoutTests.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Globalization; using System.Linq; using Avalonia.Media; @@ -154,7 +155,7 @@ namespace Avalonia.Skia.UnitTests.Media.TextFormatting { j += inner.Current.Text.Length; - if(j + i > text.Length) + if (j + i > text.Length) { break; } @@ -738,7 +739,7 @@ namespace Avalonia.Skia.UnitTests.Media.TextFormatting var textLine = layout.TextLines[0]; var start = textLine.GetDistanceFromCharacterHit(new CharacterHit(5, 1)); - + var end = textLine.GetDistanceFromCharacterHit(new CharacterHit(6, 1)); var rects = layout.HitTestTextRange(0, 7).ToArray(); @@ -746,7 +747,7 @@ namespace Avalonia.Skia.UnitTests.Media.TextFormatting Assert.Equal(1, rects.Length); var expected = rects[0]; - + Assert.Equal(expected.Left, start); Assert.Equal(expected.Right, end); } @@ -818,11 +819,11 @@ namespace Avalonia.Skia.UnitTests.Media.TextFormatting var expected = text.Substring(textLine.FirstTextSourceIndex, textLine.Length); Assert.Equal(expected, actual); - } + } } } } - + [Fact] public void Should_Layout_Empty_String() { @@ -833,11 +834,187 @@ namespace Avalonia.Skia.UnitTests.Media.TextFormatting Typeface.Default, 12, Brushes.Black); - + Assert.True(layout.Bounds.Height > 0); } } + [Fact] + public void Should_HitTestPoint_RightToLeft() + { + using (Start()) + { + var text = "אאא AAA"; + + var layout = new TextLayout( + text, + Typeface.Default, + 12, + Brushes.Black, + flowDirection: FlowDirection.RightToLeft); + + var firstRun = layout.TextLines[0].TextRuns[0] as ShapedTextCharacters; + + var hit = layout.HitTestPoint(new Point()); + + Assert.Equal(4, hit.TextPosition); + + var currentX = 0.0; + + for (var i = 0; i < firstRun.GlyphRun.GlyphClusters.Count; i++) + { + var cluster = firstRun.GlyphRun.GlyphClusters[i]; + var advance = firstRun.GlyphRun.GlyphAdvances[i]; + + hit = layout.HitTestPoint(new Point(currentX, 0)); + + Assert.Equal(cluster, hit.TextPosition); + + var hitRange = layout.HitTestTextRange(hit.TextPosition, 1); + + var distance = hitRange.First().Left; + + Assert.Equal(currentX, distance); + + currentX += advance; + } + + var secondRun = layout.TextLines[0].TextRuns[1] as ShapedTextCharacters; + + hit = layout.HitTestPoint(new Point(firstRun.Size.Width, 0)); + + Assert.Equal(7, hit.TextPosition); + + hit = layout.HitTestPoint(new Point(layout.TextLines[0].WidthIncludingTrailingWhitespace, 0)); + + Assert.Equal(0, hit.TextPosition); + + currentX = firstRun.Size.Width + 0.5; + + for (var i = 0; i < secondRun.GlyphRun.GlyphClusters.Count; i++) + { + var cluster = secondRun.GlyphRun.GlyphClusters[i]; + var advance = secondRun.GlyphRun.GlyphAdvances[i]; + + hit = layout.HitTestPoint(new Point(currentX, 0)); + + Assert.Equal(cluster, hit.CharacterHit.FirstCharacterIndex); + + var hitRange = layout.HitTestTextRange(hit.CharacterHit.FirstCharacterIndex, hit.CharacterHit.TrailingLength); + + var distance = hitRange.First().Left + 0.5; + + Assert.Equal(currentX, distance); + + currentX += advance; + } + } + } + + [Fact] + public void Should_Get_CharacterHit_From_Distance_RTL() + { + using (Start()) + { + var text = "أَبْجَدِيَّة عَرَبِيَّة"; + + var layout = new TextLayout( + text, + Typeface.Default, + 12, + Brushes.Black); + + var textLine = layout.TextLines[0]; + + var firstRun = (ShapedTextCharacters)textLine.TextRuns[0]; + + var firstCluster = firstRun.ShapedBuffer.GlyphClusters[0]; + + var characterHit = textLine.GetCharacterHitFromDistance(0); + + Assert.Equal(firstCluster, characterHit.FirstCharacterIndex); + + Assert.Equal(text.Length, characterHit.FirstCharacterIndex + characterHit.TrailingLength); + + var distance = textLine.GetDistanceFromCharacterHit(characterHit); + + Assert.Equal(0, distance); + + distance = textLine.GetDistanceFromCharacterHit(new CharacterHit(characterHit.FirstCharacterIndex)); + + var firstAdvance = firstRun.ShapedBuffer.GlyphAdvances[0]; + + Assert.Equal(firstAdvance, distance, 5); + + var rect = layout.HitTestTextPosition(22); + + Assert.Equal(firstAdvance, rect.Left, 5); + + rect = layout.HitTestTextPosition(23); + + Assert.Equal(0, rect.Left, 5); + + } + } + + [Fact] + public void Should_Get_CharacterHit_From_Distance_RTL_With_TextStyles() + { + using (Start()) + { + var text = "أَبْجَدِيَّة عَرَبِيَّة"; + + var i = 0; + + var graphemeEnumerator = new GraphemeEnumerator(text.AsMemory()); + + while (graphemeEnumerator.MoveNext()) + { + var grapheme = graphemeEnumerator.Current; + + var textStyleOverrides = new[] { new ValueSpan(i, grapheme.Text.Length, new GenericTextRunProperties(Typeface.Default, 12, foregroundBrush: Brushes.Red)) }; + + i += grapheme.Text.Length; + + var layout = new TextLayout( + text, + Typeface.Default, + 12, + Brushes.Black, + textStyleOverrides: textStyleOverrides); + + var textLine = layout.TextLines[0]; + + var shapedRuns = textLine.TextRuns.Cast().ToList(); + + var clusters = shapedRuns.SelectMany(x => x.ShapedBuffer.GlyphClusters).ToList(); + + var glyphAdvances = shapedRuns.SelectMany(x => x.ShapedBuffer.GlyphAdvances).ToList(); + + var currentX = 0.0; + + var cluster = text.Length; + + for (int j = 0; j < clusters.Count - 1; j++) + { + var glyphAdvance = glyphAdvances[j]; + + var characterHit = textLine.GetCharacterHitFromDistance(currentX); + + Assert.Equal(cluster, characterHit.FirstCharacterIndex + characterHit.TrailingLength); + + var distance = textLine.GetDistanceFromCharacterHit(new CharacterHit(cluster)); + + Assert.Equal(currentX, distance, 5); + + currentX += glyphAdvance; + + cluster = clusters[j]; + } + } + } + } + private static IDisposable Start() { var disposable = UnitTestApplication.Start(TestServices.MockPlatformRenderInterface diff --git a/tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLineTests.cs b/tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLineTests.cs index 58cb84c4a4..d744ede87d 100644 --- a/tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLineTests.cs +++ b/tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLineTests.cs @@ -867,28 +867,29 @@ namespace Avalonia.Skia.UnitTests.Media.TextFormatting var textBounds = textLine.GetTextBounds(0, 4); - var firstRun = textLine.TextRuns[1] as ShapedTextCharacters; + var secondRun = textLine.TextRuns[1] as ShapedTextCharacters; Assert.Equal(1, textBounds.Count); - Assert.Equal(firstRun.Size.Width, textBounds.Sum(x => x.Rectangle.Width)); + Assert.Equal(secondRun.Size.Width, textBounds.Sum(x => x.Rectangle.Width)); textBounds = textLine.GetTextBounds(4, 3); - var secondRun = textLine.TextRuns[0] as ShapedTextCharacters; + var firstRun = textLine.TextRuns[0] as ShapedTextCharacters; Assert.Equal(1, textBounds.Count); Assert.Equal(3, textBounds[0].TextRunBounds.Sum(x=> x.Length)); - Assert.Equal(secondRun.Size.Width, textBounds.Sum(x => x.Rectangle.Width)); + Assert.Equal(firstRun.Size.Width, textBounds.Sum(x => x.Rectangle.Width)); textBounds = textLine.GetTextBounds(0, 5); Assert.Equal(2, textBounds.Count); Assert.Equal(5, textBounds.Sum(x=> x.TextRunBounds.Sum(x => x.Length))); - Assert.Equal(firstRun.Size.Width, textBounds[0].Rectangle.Width); - Assert.Equal(7.201171875, textBounds[1].Rectangle.Width); - Assert.Equal(textLine.Start + 7.201171875, textBounds[1].Rectangle.Right); + Assert.Equal(secondRun.Size.Width, textBounds[1].Rectangle.Width); + Assert.Equal(7.201171875, textBounds[0].Rectangle.Width); + Assert.Equal(textLine.Start + 7.201171875, textBounds[0].Rectangle.Right); + Assert.Equal(textLine.Start + firstRun.Size.Width, textBounds[1].Rectangle.Left); textBounds = textLine.GetTextBounds(0, text.Length); @@ -896,7 +897,7 @@ namespace Avalonia.Skia.UnitTests.Media.TextFormatting Assert.Equal(7, textBounds.Sum(x => x.TextRunBounds.Sum(x => x.Length))); Assert.Equal(textLine.WidthIncludingTrailingWhitespace, textBounds.Sum(x => x.Rectangle.Width)); } - } + } private class FixedRunsTextSource : ITextSource { diff --git a/tests/Avalonia.UnitTests/Avalonia.UnitTests.csproj b/tests/Avalonia.UnitTests/Avalonia.UnitTests.csproj index 52ef23c966..cb6884cad8 100644 --- a/tests/Avalonia.UnitTests/Avalonia.UnitTests.csproj +++ b/tests/Avalonia.UnitTests/Avalonia.UnitTests.csproj @@ -18,7 +18,7 @@ - + diff --git a/tests/Avalonia.UnitTests/MockWindowingPlatform.cs b/tests/Avalonia.UnitTests/MockWindowingPlatform.cs index 339b87cf88..e30f0fa5f3 100644 --- a/tests/Avalonia.UnitTests/MockWindowingPlatform.cs +++ b/tests/Avalonia.UnitTests/MockWindowingPlatform.cs @@ -34,7 +34,6 @@ namespace Avalonia.UnitTests windowImpl.Setup(x => x.RenderScaling).Returns(1); windowImpl.Setup(x => x.Screen).Returns(CreateScreenMock().Object); windowImpl.Setup(x => x.Position).Returns(() => position); - SetupToplevel(windowImpl); windowImpl.Setup(x => x.CreatePopup()).Returns(() => { @@ -100,8 +99,6 @@ namespace Avalonia.UnitTests { popupImpl.Object.Closed?.Invoke(); }); - - SetupToplevel(popupImpl); return popupImpl; } @@ -144,10 +141,5 @@ namespace Avalonia.UnitTests { return null; } - - private static void SetupToplevel(Mock mock) where T : class, ITopLevelImpl - { - mock.SetupGet(x => x.MouseDevice).Returns(new MouseDevice()); - } } } diff --git a/tests/Avalonia.UnitTests/TestRoot.cs b/tests/Avalonia.UnitTests/TestRoot.cs index 41e29a85c4..138958512f 100644 --- a/tests/Avalonia.UnitTests/TestRoot.cs +++ b/tests/Avalonia.UnitTests/TestRoot.cs @@ -58,9 +58,7 @@ namespace Avalonia.UnitTests public IKeyboardNavigationHandler KeyboardNavigationHandler => null; public IInputElement PointerOverElement { get; set; } - - public IMouseDevice MouseDevice { get; set; } - + public bool ShowAccessKeys { get; set; } public IStyleHost StylingParent { get; set; } diff --git a/tests/Avalonia.UnitTests/TestServices.cs b/tests/Avalonia.UnitTests/TestServices.cs index c1be745aca..49da2794c1 100644 --- a/tests/Avalonia.UnitTests/TestServices.cs +++ b/tests/Avalonia.UnitTests/TestServices.cs @@ -6,7 +6,7 @@ using Avalonia.Markup.Xaml; using Avalonia.Media; using Avalonia.Platform; using Avalonia.Styling; -using Avalonia.Themes.Default; +using Avalonia.Themes.Simple; using Avalonia.Rendering; using System.Reactive.Concurrency; using System.Collections.Generic; @@ -24,7 +24,7 @@ namespace Avalonia.UnitTests renderInterface: new MockPlatformRenderInterface(), standardCursorFactory: Mock.Of(), styler: new Styler(), - theme: () => CreateDefaultTheme(), + theme: () => CreateSimpleTheme(), threadingInterface: Mock.Of(x => x.CurrentThreadIsLoopThread == true), fontManagerImpl: new MockFontManagerImpl(), textShaperImpl: new MockTextShaperImpl(), @@ -81,7 +81,7 @@ namespace Avalonia.UnitTests IScheduler scheduler = null, ICursorFactory standardCursorFactory = null, IStyler styler = null, - Func theme = null, + Func theme = null, IPlatformThreadingInterface threadingInterface = null, IFontManagerImpl fontManagerImpl = null, ITextShaperImpl textShaperImpl = null, @@ -122,7 +122,7 @@ namespace Avalonia.UnitTests public IScheduler Scheduler { get; } public ICursorFactory StandardCursorFactory { get; } public IStyler Styler { get; } - public Func Theme { get; } + public Func Theme { get; } public IPlatformThreadingInterface ThreadingInterface { get; } public IWindowImpl WindowImpl { get; } public IWindowingPlatform WindowingPlatform { get; } @@ -169,18 +169,9 @@ namespace Avalonia.UnitTests windowImpl: windowImpl ?? WindowImpl); } - private static Styles CreateDefaultTheme() + private static IStyle CreateSimpleTheme() { - var result = new Styles - { - new DefaultTheme(), - }; - - var baseLight = (IStyle)AvaloniaXamlLoader.Load( - new Uri("avares://Avalonia.Themes.Default/Accents/BaseLight.xaml")); - result.Add(baseLight); - - return result; + return new SimpleTheme { Mode = SimpleThemeMode.Light }; } private static IPlatformRenderInterface CreateRenderInterfaceMock() diff --git a/tests/Avalonia.UnitTests/UnitTestApplication.cs b/tests/Avalonia.UnitTests/UnitTestApplication.cs index 63c2832b92..260771c9ab 100644 --- a/tests/Avalonia.UnitTests/UnitTestApplication.cs +++ b/tests/Avalonia.UnitTests/UnitTestApplication.cs @@ -71,12 +71,16 @@ namespace Avalonia.UnitTests .Bind().ToConstant(Services.Styler) .Bind().ToConstant(Services.WindowingPlatform) .Bind().ToSingleton(); - var styles = Services.Theme?.Invoke(); + var theme = Services.Theme?.Invoke(); - if (styles != null) + if (theme is Styles styles) { Styles.AddRange(styles); } + else if (theme is not null) + { + Styles.Add(theme); + } } } }