diff --git a/STgSharpTest/StgSharpTest.csproj b/STgSharpTest/StgSharpTest.csproj
new file mode 100644
index 00000000..1ef69cc8
--- /dev/null
+++ b/STgSharpTest/StgSharpTest.csproj
@@ -0,0 +1,36 @@
+
+
+
+ net8.0
+ enable
+ enable
+ preview
+ false
+ true
+ AnyCPU;x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/STgSharpTest/UnitTest1.cs b/STgSharpTest/UnitTest1.cs
new file mode 100644
index 00000000..3b842f5b
--- /dev/null
+++ b/STgSharpTest/UnitTest1.cs
@@ -0,0 +1,118 @@
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+// file="UnitTest1.cs"
+// Project: StgSharp
+// AuthorGroup: Nitload Space
+// Copyright (c) Nitload Space. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the ¡°Software¡±), to deal in the Software without restriction,
+// including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software,
+// and to permit persons to whom the Software is furnished to do so,
+// subject to the following conditions:
+//
+// The above copyright notice and
+// this permission notice shall be included in all copies
+// or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
+// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
+using StgSharp;
+using StgSharp.Collections;
+using StgSharp.Script;
+using StgSharp.Script.Express;
+
+
+//using StgSharp.Model;
+
+using System.Collections.Concurrent;
+using System.Text.RegularExpressions;
+
+namespace STgSharpTest
+{
+ [TestClass]
+ public class UnitTest1
+ {
+ string testExpPath = @"D:\Programmer\stepcode\data\ap203\ap203.exp";
+
+ [TestMethod]
+ public void RegexTest()
+ {
+ string sample = "FILE_DESCRIPTION(('CATIA V5 STEP Exchange'),'2;1');";
+
+ foreach( var match in Regex.Match(
+ sample, @"^(?[A-Z_]+)\s?\((?.+)\)\;" )
+ .Groups ) {
+ Console.WriteLine( $"{match.ToString()}" );
+ Console.WriteLine( "\t\t\t" );
+ }
+ }
+
+ [TestMethod]
+ public void TestSource()
+ {
+ ScriptSourceTransmitter st = new ScriptSourceTransmitter("end", 0);
+ for (int i = 0; i < 10; i++)
+ {
+ st.WriteLine($"Code{i} {new string(' ', i + 1)}-- Comment{i}");
+ }
+ st.WriteLine("Code (* comment");
+ for (int i = 0; i < 10; i++)
+ {
+ st.WriteLine($"comment-code");
+ }
+ st.WriteLine($"comment *) code");
+ for (int i = 0; i < 10; i++)
+ {
+ st.WriteLine($" Code{i} (* (* Comment *) *) Code{i}");
+ }
+ st.WriteLine("end");
+
+ ExpSourceReader reader = new ExpSourceReader(st);
+ while (!st.IsEmpty)
+ {
+ Console.WriteLine(new string(reader.ReadLine()));
+ }
+ }
+
+ [TestMethod]
+ public void TestMethod()
+ {
+ ScriptSourceTransmitter st = new ScriptSourceTransmitter("end", 0);
+ for (int i = 0; i < 10; i++)
+ {
+ st.WriteLine($"Code{i} {new string(' ',i+1)}-- Comment{i}");
+ }
+ st.WriteLine("Code (* comment");
+ for (int i = 0; i < 10; i++)
+ {
+ st.WriteLine($"comment-code");
+ }
+ st.WriteLine($"comment *) code");
+ for (int i = 0; i < 10; i++)
+ {
+ st.WriteLine($" Code{i} (* (* Comment *) *) Code{i}");
+ }
+ st.WriteLine("end");
+
+ ExpSourceReader reader = new ExpSourceReader(st);
+ while (!st.IsEmpty)
+ {
+ Console.WriteLine(reader.ReadToken().Value.ToString());
+ }
+ }
+
+
+}
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Collections/BidirectionalDictionary.cs b/StgSharp.Common/Collections/BidirectionalDictionary.cs
new file mode 100644
index 00000000..7969ef15
--- /dev/null
+++ b/StgSharp.Common/Collections/BidirectionalDictionary.cs
@@ -0,0 +1,194 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="BidirectionalDictionary"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+
+namespace StgSharp.Collections
+{
+ public sealed class BidirectionalDictionary : IBidirectionalDictionary
+ where TFirst: notnull
+ where TSecond: notnull
+ {
+
+ private readonly Dictionary _forward;
+ private readonly Dictionary _reverse;
+
+ public BidirectionalDictionary()
+ {
+ _forward = [];
+ _reverse = [];
+ }
+
+ public TFirst this[TSecond key]
+ {
+ get => _reverse.TryGetValue(key, out TFirst value) ?
+ value :
+ throw new ArgumentException($"Cannot find key {key} in dictionary.");
+ set
+ {
+ if (_reverse.TryGetValue(key, out TFirst origin))
+ {
+ _reverse[key] = value;
+ _ = _forward.Remove(origin);
+ } else
+ {
+ _reverse.Add(key, value);
+ }
+ _forward.Add(value, key);
+ }
+ }
+
+ public TSecond this[TFirst key]
+ {
+ get => _forward.TryGetValue(key, out TSecond value) ?
+ value :
+ throw new ArgumentException($"Cannot find key {key} in dictionary.");
+ set
+ {
+ if (_forward.TryGetValue(key, out TSecond origin))
+ {
+ _forward[key] = value;
+ _ = _reverse.Remove(origin);
+ } else
+ {
+ _forward.Add(key, value);
+ }
+ _reverse.Add(value, key);
+ }
+ }
+
+ public bool IsReadOnly => false;
+
+ public ICollection FirstIndex => _forward.Keys;
+
+ public ICollection SecondIndex => _reverse.Keys;
+
+ public int Count => _forward.Count;
+
+ public IReadOnlyDictionary Forward => new ReadOnlyDictionary(
+ _forward);
+
+ public IReadOnlyDictionary Reverse => new ReadOnlyDictionary(
+ _reverse);
+
+ public void Add(KeyValuePair item)
+ {
+ if (_forward.ContainsKey(item.Key) || _reverse.ContainsKey(item.Value)) {
+ throw new ArgumentException("Duplicate key or value.");
+ }
+ _forward.Add(item.Key, item.Value);
+ _reverse.Add(item.Value, item.Key);
+ }
+
+ public void Add(TFirst key, TSecond value)
+ {
+ if (_forward.ContainsKey(key) || _reverse.ContainsKey(value)) {
+ throw new ArgumentException("Duplicate key or value.");
+ }
+ _forward.Add(key, value);
+ _reverse.Add(value, key);
+ }
+
+ public void Clear()
+ {
+ _forward.Clear();
+ _reverse.Clear();
+ }
+
+ public bool Contains(KeyValuePair item)
+ {
+ return _forward.Contains(item) && _reverse.TryGetValue(item.Value, out TFirst var) && var!.Equals(item.Key);
+ }
+
+ public bool Contains(TSecond key)
+ {
+ return _reverse.ContainsKey(key);
+ }
+
+ public bool Contains(TFirst key)
+ {
+ return _forward.ContainsKey(key);
+ }
+
+ public void CopyTo(KeyValuePair[] array, int arrayIndex)
+ {
+ if (array == null) {
+ throw new ArgumentNullException(nameof(array));
+ }
+ if (arrayIndex < 0 || arrayIndex > array.Length) {
+ throw new ArgumentOutOfRangeException(nameof(arrayIndex));
+ }
+ if (array.Length - arrayIndex < _forward.Count) {
+ throw new ArgumentException("The array is too small to copy the elements.");
+ }
+
+ foreach (KeyValuePair pair in _forward) {
+ array[arrayIndex++] = pair;
+ }
+ }
+
+ public IEnumerator> GetEnumerator()
+ {
+ foreach (KeyValuePair pair in _forward) {
+ yield return pair;
+ }
+ }
+
+ public bool Remove(TFirst key)
+ {
+ throw new NotImplementedException();
+ }
+
+ public bool Remove(KeyValuePair item)
+ {
+ if (_forward.Remove(item.Key)) {
+ return _reverse.Remove(item.Value);
+ }
+ return false;
+ }
+
+ public bool TryGetValue(TFirst key, out TSecond value)
+ {
+ return _forward.TryGetValue(key, out value);
+ }
+
+ public bool TryGetValue(TSecond key, out TFirst value)
+ {
+ return _reverse.TryGetValue(key, out value);
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Collections/CapacityFixedList.cs b/StgSharp.Common/Collections/CapacityFixedList.cs
new file mode 100644
index 00000000..123ed724
--- /dev/null
+++ b/StgSharp.Common/Collections/CapacityFixedList.cs
@@ -0,0 +1,183 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="CapacityFixedList"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+
+namespace StgSharp.Collections
+{
+ public static class CapacityFixedListBuilder
+ {
+
+ internal static CapacityFixedList Create(ReadOnlySpan values)
+ {
+ return new CapacityFixedList(values);
+ }
+
+ }
+
+ [CollectionBuilder(typeof(CapacityFixedListBuilder), nameof(CapacityFixedListBuilder.Create))]
+ public class CapacityFixedList : IList
+ {
+
+ private T[] _values;
+ private int capacity, _index;
+
+ public CapacityFixedList(int size)
+ {
+ _values = new T[size];
+ }
+
+ public CapacityFixedList(ReadOnlySpan values)
+ {
+ _values = values.ToArray();
+ }
+
+ public T this[int index]
+ {
+ get => index < _index ? _values[index] : throw new ArgumentOutOfRangeException(nameof(index));
+ set
+ {
+ if (index < _index)
+ {
+ _values[index] = value;
+ } else
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ }
+ }
+
+ public bool IsReadOnly => false;
+
+ public int Count => _index + 1;
+
+ public void Add(T item)
+ {
+ if (_index < capacity - 1)
+ {
+ _index++;
+ this[_index] = item;
+ }
+ }
+
+ public void Clear()
+ {
+ _values = new T[capacity];
+ _index = 0;
+ }
+
+ public bool Contains(T item)
+ {
+ for (int i = 0; i <= _index; i++)
+ {
+ if (item.Equals(_values[i])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ _values.CopyTo(array, arrayIndex);
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ for (int i = 0; i <= _index; i++) {
+ yield return _values[i];
+ }
+ }
+
+ public int IndexOf(T item)
+ {
+ T v;
+ for (int i = 0; i <= _index; i++)
+ {
+ if ((v = _values[i]) != null && v.Equals(item)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ public bool Remove(T item)
+ {
+ T v;
+ for (int i = 0; i <= _index; i++)
+ {
+ if ((v = _values[i]) != null && v.Equals(item))
+ {
+ _values[i] = _values[_index];
+ _index--;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void RemoveAll(Predicate predicate)
+ {
+ for (int i = _index; i > 0; i--)
+ {
+ if (predicate(_values[i]))
+ {
+ _values[i] = _values[_index];
+ _index--;
+ }
+ }
+ }
+
+ public void RemoveAt(int index)
+ {
+ if (index <= _index)
+ {
+ _values[index] = _values[_index];
+ _index--;
+ }
+ }
+
+ public void Resize(int newSize)
+ {
+ Array.Resize(ref _values, newSize);
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ yield return GetEnumerator();
+ }
+
+ void IList.Insert(int index, T item)
+ {
+ throw new NotSupportedException();
+ }
+
+ }//------------------------------------- End of Class ------------------------------------------
+}
diff --git a/StgSharp.Common/Collections/IBidrirectionalDictionary.cs b/StgSharp.Common/Collections/IBidrirectionalDictionary.cs
new file mode 100644
index 00000000..200558e8
--- /dev/null
+++ b/StgSharp.Common/Collections/IBidrirectionalDictionary.cs
@@ -0,0 +1,84 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="IBidrirectionalDictionary"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System.Collections.Generic;
+
+namespace StgSharp.Collections
+{
+ public interface IBidirectionalDictionary : IDictionary
+ {
+
+ TFirst this[TSecond key] { get; set; }
+
+ ICollection FirstIndex { get; }
+
+ ICollection SecondIndex { get; }
+
+ IReadOnlyDictionary Forward { get; }
+
+ IReadOnlyDictionary Reverse { get; }
+
+ ///
+ /// Determines whether the contains the
+ /// specified key.
+ ///
+ ///
+ /// The value to locate in the .
+ ///
+ ///
+ /// true if the contains an element with
+ /// the specified key; otherwise, false.
+ ///
+ bool Contains(TSecond key);
+
+ ///
+ /// Determines whether the contains the
+ /// specified key.
+ ///
+ ///
+ /// The value to locate in the .
+ ///
+ ///
+ /// true if the contains an element with
+ /// the specified key; otherwise, false.
+ ///
+ bool Contains(TFirst key);
+
+ bool TryGetValue(TSecond key, out TFirst value);
+
+ #pragma warning disable CA1033
+ ICollection IDictionary.Keys => FirstIndex;
+
+ ICollection IDictionary.Values => SecondIndex;
+
+ bool IDictionary.ContainsKey(TFirst key)
+ {
+ return Contains(key);
+ }
+#pragma warning restore CA1033
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Collections/IHashMultiplexer.cs b/StgSharp.Common/Collections/IHashMultiplexer.cs
new file mode 100644
index 00000000..6f0acde4
--- /dev/null
+++ b/StgSharp.Common/Collections/IHashMultiplexer.cs
@@ -0,0 +1,53 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="IHashMultiplexer"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System.Collections.Generic;
+
+namespace StgSharp.Collections
+{
+ public interface IHashMultiplexer : IEqualityComparer
+ {
+
+ int RemainedMultiplexCount { get; set; }
+
+ ///
+ /// Cache hash result for obj with counts.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ void CacheHash(T obj, int count);
+
+ void ExtendCache(int count);
+
+ int ForceComputeHash(T count);
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Collections/ListSegment.cs b/StgSharp.Common/Collections/ListSegment.cs
new file mode 100644
index 00000000..1185648d
--- /dev/null
+++ b/StgSharp.Common/Collections/ListSegment.cs
@@ -0,0 +1,131 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="ListSegment"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Serialization;
+
+namespace StgSharp.Collections
+{
+ ///
+ /// Part of a collection. This contains a direct reference to _origin collection, so all
+ /// change to _origin collection will be reflected in this object.
+ ///
+ ///
+ ///
+ ///
+ public struct ListSegment : ICollection
+ {
+
+ private int _begin;
+ private int _length;
+ private List _collection;
+
+ public ListSegment(List collection, int begin, int length)
+ {
+ ArgumentNullException.ThrowIfNull(collection);
+ ArgumentOutOfRangeException.ThrowIfLessThan(begin, 0);
+ ArgumentOutOfRangeException.ThrowIfLessThan(length, 0);
+ ArgumentOutOfRangeException.ThrowIfLessThan(begin + length, collection.Count);
+ _collection = collection;
+ _begin = begin;
+ _length = length;
+ }
+
+ public T this[int indexValue]
+ {
+ get
+ {
+ ArgumentOutOfRangeException.ThrowIfLessThan(indexValue, 0);
+ ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(indexValue, _length);
+ return _collection[indexValue + _begin];
+ }
+ }
+
+ public T this[Index i]
+ {
+ get
+ {
+ int offset = i.IsFromEnd ? _length - i.Value : i.Value;
+ ArgumentOutOfRangeException.ThrowIfLessThan(offset, 0);
+ ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(offset, _length);
+ return _collection[offset + _begin];
+ }
+ }
+
+ public bool IsReadOnly => true;
+
+ public int Count => _length;
+
+ public bool Contains(T item)
+ {
+ int index = _collection.IndexOf(item);
+ return index >= _begin && index < _length + index;
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ ArgumentNullException.ThrowIfNull(array);
+ Span span = CollectionsMarshal.AsSpan(_collection).Slice(_begin, _length);
+ Span target = new Span(array, arrayIndex, _length);
+ span.CopyTo(target);
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ for (int i = _begin; i < _length; i++) {
+ yield return this[i];
+ }
+ }
+
+ void ICollection.Add(T item)
+ {
+ throw new NotSupportedException();
+ }
+
+ void ICollection.Clear()
+ {
+ throw new NotSupportedException();
+ }
+
+ bool ICollection.Remove(T item)
+ {
+ throw new NotSupportedException();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Collections/RandomAccessibleStack.cs b/StgSharp.Common/Collections/RandomAccessibleStack.cs
new file mode 100644
index 00000000..fabe52ab
--- /dev/null
+++ b/StgSharp.Common/Collections/RandomAccessibleStack.cs
@@ -0,0 +1,181 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="RandomAccessibleStack"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace StgSharp.Collections
+{
+ public class RandomAccessibleStack : IEnumerable
+ {
+
+ private const int DefaultCapacity = 4;
+
+ private T[] _array;
+ private int _size;
+ private int _version;
+
+ ///
+ /// Initializes a new instance of the RandomAccessStack class that is empty and has the
+ /// default initial capacity.
+ ///
+ public RandomAccessibleStack()
+ {
+ _array = new T[DefaultCapacity];
+ }
+
+ ///
+ /// Initializes a new instance of the RandomAccessStack class that is empty and has the
+ /// specified initial capacity.
+ ///
+ public RandomAccessibleStack(int capacity)
+ {
+ if (capacity < 0) {
+ throw new ArgumentOutOfRangeException(
+ nameof(capacity), "Capacity must be non-negative.");
+ }
+
+ _array = new T[capacity];
+ }
+
+ ///
+ /// Gets or sets the element at the specified index in the stack (0 = bottom, Count-1 =
+ /// top).
+ ///
+ public T this[int index]
+ {
+ get
+ {
+ if (index < 0 || index >= _size) {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+
+ return _array[index];
+ }
+ /*
+ set
+ {
+ if( index < 0 || index >= PrimSize ) {
+ throw new ArgumentOutOfRangeException( nameof( index ) );
+ }
+ _array[ index ] = value;
+ _version++;
+ }
+ /**/
+ }
+
+ ///
+ /// Gets the number of elements contained in the stack.
+ ///
+ public int Count => _size;
+
+ ///
+ /// Removes all objects from the stack.
+ ///
+ public void Clear()
+ {
+ Array.Clear(_array, 0, _size);
+ _size = 0;
+ _version++;
+ }
+
+ ///
+ /// Returns an enumerator that iterates through the stack from top to bottom. Throws if
+ /// the stack is modified during iteration.
+ ///
+ public IEnumerator GetEnumerator()
+ {
+ int expectedVersion = _version;
+ for (int i = _size - 1; i >= 0; i--)
+ {
+ if (expectedVersion != _version) {
+ throw new InvalidOperationException(
+ "Collection was modified during enumeration.");
+ }
+
+ yield return _array[i];
+ }
+ }
+
+ ///
+ /// Returns the object at the top of the stack without removing it.
+ ///
+ public T Peek()
+ {
+ if (_size == 0) {
+ throw new InvalidOperationException("Stack is empty.");
+ }
+
+ return _array[_size - 1];
+ }
+
+ ///
+ /// Removes and returns the object at the top of the stack.
+ ///
+ public T Pop()
+ {
+ if (_size == 0) {
+ throw new InvalidOperationException("Stack is empty.");
+ }
+
+ T item = _array[--_size];
+ _array[_size] = default!;
+ _version++;
+ return item;
+ }
+
+ ///
+ /// Adds an item to the top of the stack.
+ ///
+ public void Push(T item)
+ {
+ if (_size == _array.Length) {
+ EnsureCapacity(_size + 1);
+ }
+
+ _array[_size++] = item;
+ _version++;
+ }
+
+ private void EnsureCapacity(int min)
+ {
+ int newCapacity = _array.Length == 0 ? DefaultCapacity : _array.Length * 2;
+ if (newCapacity < min) {
+ newCapacity = min;
+ }
+
+ Array.Resize(ref _array, newCapacity);
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Collections/StringHashMultiplexer.cs b/StgSharp.Common/Collections/StringHashMultiplexer.cs
new file mode 100644
index 00000000..05f2ffc4
--- /dev/null
+++ b/StgSharp.Common/Collections/StringHashMultiplexer.cs
@@ -0,0 +1,162 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="StringHashMultiplexer"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading;
+
+namespace StgSharp.Collections
+{
+ public sealed class StringHashMultiplexer : IHashMultiplexer
+ {
+
+ private int _initCount, _remainedCount, _hashCache, _hashLast;
+ private string _source, _sourceLast;
+
+ public int RemainedMultiplexCount
+ {
+ get => _remainedCount;
+ set => _initCount = value;
+ }
+
+ public void CacheHash(string obj, int count)
+ {
+ _hashCache = ForceComputeHash(obj);
+ _initCount = count;
+ _remainedCount = _initCount;
+ _source = obj;
+ }
+
+ public bool Equals(string x, string y)
+ {
+ return x == y;
+ }
+
+ public void ExtendCache(int count)
+ {
+ _initCount += count;
+ _remainedCount += count;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public unsafe int ForceComputeHash([NotNull] string obj)
+ {
+ int hash;
+ fixed (char* cPtr = obj.AsSpan()) {
+ hash = NativeIntrinsic.Intrinsic.city_hash_simplify(cPtr, obj.Length);
+ }
+ return hash;
+ }
+
+ public int GetHashCode(string obj)
+ {
+ if (_remainedCount > 0 && ReferenceEquals(_source, obj))
+ {
+ _remainedCount--;
+ return _hashCache;
+ }
+ if (ReferenceEquals(_sourceLast, obj)) {
+ return _hashLast;
+ }
+ _sourceLast = obj;
+ _hashLast = ForceComputeHash(obj);
+ return _hashLast;
+ }
+
+ }
+
+ public sealed class ConcurrentStringHashMultiplexer : IHashMultiplexer, IDisposable
+ {
+
+ private bool disposedValue;
+ private readonly ThreadLocal _multiplexers =
+ new(() => new StringHashMultiplexer());
+
+ public int RemainedMultiplexCount
+ {
+ get => _multiplexers.Value!.RemainedMultiplexCount;
+ set => _multiplexers.Value!.RemainedMultiplexCount = value;
+ }
+
+ public void CacheHash(string obj, int count)
+ {
+ throw new NotImplementedException();
+ }
+
+ // ~ConcurrentStringHashMultiplexer()
+ // {
+ // Dispose(disposing: false);
+ // }
+
+ public void Dispose()
+ {
+ Dispose(disposing:true);
+ GC.SuppressFinalize(this);
+ }
+
+ public bool Equals(string x, string y)
+ {
+ return x == y;
+ }
+
+ public void ExtendCache(int count)
+ {
+ _multiplexers.Value!.ExtendCache(count);
+ }
+
+ public unsafe int ForceComputeHash([NotNull] string obj)
+ {
+ int hash;
+ fixed (char* cPtr = obj.AsSpan()) {
+ hash = NativeIntrinsic.Intrinsic.city_hash_simplify(cPtr, obj.Length);
+ }
+ return hash;
+ }
+
+ public int GetHashCode(string obj)
+ {
+ return _multiplexers.Value!.GetHashCode(obj);
+ }
+
+ private void Dispose(bool disposing)
+ {
+ if (!disposedValue)
+ {
+ if (disposing) {
+ _multiplexers.Dispose();
+ }
+
+ disposedValue = true;
+ }
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Controlling/Controls/BattleField.cs b/StgSharp.Common/Controlling/Controls/BattleField.cs
new file mode 100644
index 00000000..8f2b5e8b
--- /dev/null
+++ b/StgSharp.Common/Controlling/Controls/BattleField.cs
@@ -0,0 +1,62 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="BattleField"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Geometries;
+using StgSharp.Graphics;
+
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+// TODO 这玩意如何加载一个渲染流程以获得各个图元还没搞清楚
+
+namespace StgSharp.Controls
+{
+ public class BattleField : ControllingItem
+ {
+
+ public bool IsEntity => true;
+
+ public ReadOnlySpan TextureBox
+ {
+ get => throw new NotImplementedException();
+ }
+
+ public Rectangle BoundingBox { get; set; }
+
+ public Vec2 Position { get; set; }
+
+ public IEnumerator GetEnumerator()
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Controlling/Controls/ButtonGroup.cs b/StgSharp.Common/Controlling/Controls/ButtonGroup.cs
new file mode 100644
index 00000000..2b85ab21
--- /dev/null
+++ b/StgSharp.Common/Controlling/Controls/ButtonGroup.cs
@@ -0,0 +1,149 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="ButtonGroup"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Geometries;
+using StgSharp.Graphics;
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Security.Cryptography.X509Certificates;
+using System.Text;
+using System.Transactions;
+
+namespace StgSharp.Controls
+{
+ public abstract class KeyboardButtonGroup : ControllingItem
+ {
+
+ private List buttonList;
+ private TriggerButton current;
+
+ public KeyboardButtonGroup()
+ {
+ buttonList = new List();
+ }
+
+ public bool IsEntity
+ {
+ get => false;
+ }
+
+ public ReadOnlySpan TextureBox
+ {
+ get => throw new NotSupportedException();
+ }
+
+ public Rectangle BoundingBox { get; set; }
+
+ public TriggerButton CurrentButton
+ {
+ get => current;
+ }
+
+ public Vec2 Position { get; set; }
+
+ protected List AllButton
+ {
+ get => buttonList;
+ }
+
+ public void AddButton(TriggerButton button)
+ {
+ buttonList.Add(button);
+ }
+
+ public abstract void Confirm();
+
+ public IEnumerator GetEnumerator()
+ {
+ foreach (TriggerButton item in buttonList) {
+ yield return item.Single();
+ }
+ }
+
+ public void MoveDown()
+ {
+ TriggerButton button = current;
+ while ((button.Down != null) && button.Down.IsDisabled) {
+ button = button.Right;
+ }
+ if (current == button) {
+ return;
+ }
+ current.DeHighlight();
+ button.Enable();
+ current = button;
+ }
+
+ public void MoveLeft()
+ {
+ TriggerButton button = current;
+ while ((button.Left != null) && button.Left.IsDisabled) {
+ button = button.Left;
+ }
+ if (current == button) {
+ return;
+ }
+ current.DeHighlight();
+ button.Enable();
+ current = button;
+ }
+
+ public void MoveRight()
+ {
+ TriggerButton button = current;
+ while ((button.Right != null) && button.Right.IsDisabled) {
+ button = button.Right;
+ }
+ if (current == button) {
+ return;
+ }
+ current.DeHighlight();
+ button.Enable();
+ current = button;
+ }
+
+ public void MoveUp()
+ {
+ TriggerButton button = current;
+ while ((button.Up != null) && button.Up.IsDisabled) {
+ button = button.Right;
+ }
+ if (current == button) {
+ return;
+ }
+ current.DeHighlight();
+ button.Enable();
+ current = button;
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Controlling/Controls/CharacterIndexImage.cs b/StgSharp.Common/Controlling/Controls/CharacterIndexImage.cs
new file mode 100644
index 00000000..3ff71e2c
--- /dev/null
+++ b/StgSharp.Common/Controlling/Controls/CharacterIndexImage.cs
@@ -0,0 +1,109 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="CharacterIndexImage"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Geometries;
+using StgSharp.Graphics;
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics.Contracts;
+using System.Linq;
+using System.Text;
+
+namespace StgSharp.Controls
+{
+ public class CharacterLineIndexImage : ControllingItem
+ {
+
+ private char[] displayIndex;
+ private char defaultChar;
+
+ private Dictionary texIndex;
+ private int length;
+ private PlainGeometryMesh _tittleMesh;
+
+ public CharacterLineIndexImage(
+ int length,
+ char defaultChar,
+ PlainGeometryMesh tittleMesh,
+ IEnumerable<(char, PlainGeometryMesh)> indexEnumeration)
+ {
+ this.length = length;
+ displayIndex = new char[length];
+ _tittleMesh = tittleMesh;
+ texIndex = indexEnumeration.ToDictionary(item => item.Item1, item => item.Item2);
+ }
+
+ public bool IsEntity
+ {
+ get => true;
+ }
+
+ public ReadOnlySpan TextureBox
+ {
+ get => throw new NotSupportedException();
+ }
+
+ public Rectangle BoundingBox
+ {
+ get => throw new NotImplementedException();
+ set => throw new NotImplementedException();
+ }
+
+ public Vec2 Position
+ {
+ get => throw new NotImplementedException();
+ set => throw new NotImplementedException();
+ }
+
+ public void Display(string message)
+ {
+ if (string.IsNullOrEmpty(message)) {
+ message = string.Empty;
+ }
+
+ string result = (message.Length >= length) ?
+ message.Substring(message.Length - displayIndex.Length) :
+ message.PadLeft(
+ length, defaultChar);
+
+ displayIndex = result.ToCharArray();
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ yield return _tittleMesh;
+ foreach (char item in displayIndex) {
+ yield return texIndex[item];
+ }
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Controlling/Controls/ControllingIntem.cs b/StgSharp.Common/Controlling/Controls/ControllingIntem.cs
new file mode 100644
index 00000000..b93a2066
--- /dev/null
+++ b/StgSharp.Common/Controlling/Controls/ControllingIntem.cs
@@ -0,0 +1,56 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="ControllingIntem"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Geometries;
+using StgSharp.Graphics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+
+namespace StgSharp.Controls
+{
+ public interface ControllingItem : IEnumerable
+ {
+
+ public abstract bool IsEntity { get; }
+
+ public abstract ReadOnlySpan TextureBox { get; }
+
+ public abstract Rectangle BoundingBox { get; set; }
+
+ public abstract Vec2 Position { get; set; }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Controlling/Controls/DecorationBox.cs b/StgSharp.Common/Controlling/Controls/DecorationBox.cs
new file mode 100644
index 00000000..01472dce
--- /dev/null
+++ b/StgSharp.Common/Controlling/Controls/DecorationBox.cs
@@ -0,0 +1,70 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="DecorationBox.cs"
+// Project: StgSharp
+// AuthorGroup: Nitload Space
+// Copyright (c) Nitload Space. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the “Software”), to deal in the Software without restriction,
+// including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software,
+// and to permit persons to whom the Software is furnished to do so,
+// subject to the following conditions:
+//
+// The above copyright notice and
+// this permission notice shall be included in all copies
+// or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED “AS IS”,
+// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Geometries;
+using StgSharp.Graphics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+
+namespace StgSharp.Controls
+{
+ public class DecorationBox : ControllingItem
+ {
+
+ private PlainGeometryMesh renderMesh;
+
+ public DecorationBox(Rectangle bound, Image texture, Vec2[] texCoord)
+ {
+ renderMesh = new PlainGeometryMesh(
+ BoundingBox, new TextureProvider(texture, texCoord));
+ }
+
+ public bool IsEntity => true;
+
+ public ReadOnlySpan TextureBox
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => renderMesh.TextureCoord;
+ }
+
+ public Rectangle BoundingBox { get; set; }
+
+ public Vec2 Position { get; set; }
+
+ public IEnumerator GetEnumerator()
+ {
+ yield return renderMesh;
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Controlling/Controls/MarkingLable.cs b/StgSharp.Common/Controlling/Controls/MarkingLable.cs
new file mode 100644
index 00000000..554d0b08
--- /dev/null
+++ b/StgSharp.Common/Controlling/Controls/MarkingLable.cs
@@ -0,0 +1,83 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="MarkingLable"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Controls;
+using StgSharp.Geometries;
+using StgSharp.Graphics;
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+using StgSharp.Timing;
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace StgSharp.Controls
+{
+ public class MarkingLabel : ControllingItem
+ {
+
+ private PlainGeometryMesh marker;
+
+ private Vec2 _currentPosition, _movementVec;
+
+ public MarkingLabel(PlainGeometryMesh marker)
+ {
+ this.marker = marker;
+ }
+
+ public bool IsEntity => true;
+
+ public ReadOnlySpan TextureBox
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => marker.TextureCoord;
+ }
+
+ public Rectangle BoundingBox { get; set; }
+
+ public Vec2 Position { get; set; }
+
+ public IEnumerator GetEnumerator()
+ {
+ yield return marker;
+ }
+
+ public void Move(Vec2 movement)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void MoveTo(Vec2 target)
+ {
+ Move(target - Position);
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Controlling/Controls/TriggerButton.cs b/StgSharp.Common/Controlling/Controls/TriggerButton.cs
new file mode 100644
index 00000000..f5c612bd
--- /dev/null
+++ b/StgSharp.Common/Controlling/Controls/TriggerButton.cs
@@ -0,0 +1,213 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="TriggerButton"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Controls;
+using StgSharp.Geometries;
+using StgSharp.Graphics;
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using System.Text;
+
+namespace StgSharp.Controls
+{
+ public delegate void RenderButtonTextureCallback(ButtonStatus status, float beginTime, in TextureProvider texture);
+
+ public enum ButtonStatus
+ {
+
+ Error = 0b0,
+ Disable = 0b1,
+ Enable = 0b10,
+ Highlight = 0b100,
+ Confirm = 0b1000,
+
+ DisableToEnable = Disable | Enable,
+ EnableToDisable = -(Enable | DisableToEnable),
+
+ EnableToHighlight = Enable | Highlight,
+ HighlightToEnable = -(Enable | Highlight),
+
+ HighlightToDisable = -(Highlight | Disable),
+
+ }
+
+ public class TriggerButton : ControllingItem
+ {
+
+ private Action? confirmCallback;
+ private Action? disableCallback;
+
+ #nullable enable
+ private Action? enableCallback;
+ private float _statusBeginTime;
+
+ private RenderButtonTextureCallback _renderButton;
+ private TextureProvider _texture;
+
+ #nullable restore
+
+ public TriggerButton()
+ {
+ CurrentStatus = ButtonStatus.Disable;
+ }
+
+ public event Action ConfirmEvent
+ {
+ add { confirmCallback += value; }
+ remove { confirmCallback -= value; }
+ }
+
+ public event Action DisableEvent
+ {
+ add { disableCallback += value; }
+ remove { disableCallback -= value; }
+ }
+
+ public event Action EnableEvent
+ {
+ add { enableCallback += value; }
+ remove { enableCallback -= value; }
+ }
+
+ public event RenderButtonTextureCallback RenderButtonTexture
+ {
+ add
+ {
+ if (_renderButton == null)
+ {
+ _renderButton = value;
+ } else
+ {
+ _renderButton += value;
+ }
+ }
+ remove
+ {
+ if (_renderButton != null) {
+ _renderButton -= value;
+ }
+ }
+ }
+
+ public bool IsHighLighted { get; internal set; }
+
+ public bool IsDisabled { get; internal set; }
+
+ public bool IsEntity => true;
+
+ public ReadOnlySpan TextureBox
+ {
+ get => MemoryMarshal.Cast(_texture.TextureCoordinate);
+ }
+
+ public Rectangle BoundingBox { get; set; }
+
+ public TriggerButton Left { get; internal set; }
+
+ public TriggerButton Right { get; internal set; }
+
+ public TriggerButton Up { get; internal set; }
+
+ public TriggerButton Down { get; internal set; }
+
+ public Vec2 Position { get; set; }
+
+ internal TextureProvider Texture
+ {
+ get => _texture;
+ set => _texture = value;
+ }
+
+ protected ButtonStatus CurrentStatus { get; set; }
+
+ public void DeHighlight()
+ {
+ if (CurrentStatus == ButtonStatus.Highlight) {
+ CurrentStatus = ButtonStatus.HighlightToEnable;
+ }
+ }
+
+ public void Disable()
+ {
+ CurrentStatus = CurrentStatus switch
+ {
+ ButtonStatus.Enable => ButtonStatus.EnableToDisable,
+ ButtonStatus.Highlight => ButtonStatus.HighlightToDisable,
+ _ => CurrentStatus,
+ };
+ if (disableCallback != null) {
+ disableCallback();
+ }
+ }
+
+ public void Enable()
+ {
+ if (CurrentStatus == ButtonStatus.Disable)
+ {
+ CurrentStatus = ButtonStatus.DisableToEnable;
+ } else
+ {
+ return;
+ }
+ if (enableCallback != null) {
+ enableCallback();
+ }
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ _renderButton(CurrentStatus, _statusBeginTime, in _texture);
+ yield return new PlainGeometryMesh(this.BoundingBox, _texture);
+ }
+
+ public void Highlight()
+ {
+ if (CurrentStatus == ButtonStatus.Enable)
+ {
+ CurrentStatus |= ButtonStatus.EnableToHighlight;
+ } else
+ {
+ return;
+ }
+ if (confirmCallback != null) {
+ confirmCallback();
+ }
+ }
+
+ internal void Init(ButtonStatus status)
+ {
+ if (CurrentStatus == ButtonStatus.Error) {
+ CurrentStatus = status;
+ }
+ }
+
+ }//----------------------------------- End of class --------------------------------------------
+}
diff --git a/StgSharp.Common/Controlling/KeyEnum.cs b/StgSharp.Common/Controlling/KeyEnum.cs
new file mode 100644
index 00000000..c2ac0553
--- /dev/null
+++ b/StgSharp.Common/Controlling/KeyEnum.cs
@@ -0,0 +1,234 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="KeyEnum"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics;
+using StgSharp.Graphics.OpenGL;
+
+using System;
+
+namespace StgSharp
+{
+ public enum KeyboardKey : int
+ {
+
+ UNKNOWN = -1,
+ None = 0,
+ Space = 32,
+ Apostrophe = 39/*'*/,
+ Comma = 44/*,*/,
+ Minus = 45/*-*/,
+ Period = 46/*.*/,
+ Slash = 47/*/*/,
+ Zero = 48,
+ One = 49,
+ Two = 50,
+ Three = 51,
+ Four = 52,
+ Five = 53,
+ Six = 54,
+ Seven = 55,
+ Eight = 56,
+ Nine = 57,
+ Semicolon = 59/*,*/,
+ Equal = 61/*=*/,
+ A = 65,
+ B = 66,
+ C = 67,
+ D = 68,
+ E = 69,
+ F = 70,
+ G = 71,
+ H = 72,
+ I = 73,
+ J = 74,
+ K = 75,
+ L = 76,
+ M = 77,
+ N = 78,
+ O = 79,
+ P = 80,
+ Q = 81,
+ R = 82,
+ S = 83,
+ T = 84,
+ U = 85,
+ V = 86,
+ W = 87,
+ X = 88,
+ Y = 89,
+ Z = 90,
+ LeftBracket = 91/*[*/,
+ BACKSLASH = 92/*\*/,
+ RightBracket = 93/*]*/,
+ GraveAccent = 96/*`*/,
+ World1 = 161/*non-US#1*/,
+ World2 = 162/*non-US#2*/,
+ Esc = 256,
+ Enter = 257,
+ Tab = 258,
+ Backspace = 259,
+ Insert = 260,
+ Delete = 261,
+ Right = 262,
+ Left = 263,
+ Down = 264,
+ Up = 265,
+ PgUp = 266,
+ PgDown = 267,
+ Home = 268,
+ End = 269,
+ CapsLock = 280,
+ ScrollLock = 281,
+ NumLock = 282,
+ PrintScreen = 283,
+ Pause = 284,
+ F1 = 290,
+ F2 = 291,
+ F3 = 292,
+ F4 = 293,
+ F5 = 294,
+ F6 = 295,
+ F7 = 296,
+ F8 = 297,
+ F9 = 298,
+ F10 = 299,
+ F11 = 300,
+ F12 = 301,
+ F13 = 302,
+ F14 = 303,
+ F15 = 304,
+ F16 = 305,
+ F17 = 306,
+ F18 = 307,
+ F19 = 308,
+ F20 = 309,
+ F21 = 310,
+ F22 = 311,
+ F23 = 312,
+ F24 = 313,
+ F25 = 314,
+ NumPad0 = 320,
+ NumPad1 = 321,
+ NumPad2 = 322,
+ NumPad3 = 323,
+ NumPad4 = 324,
+ NumPad5 = 325,
+ NumPad6 = 326,
+ NumPad7 = 327,
+ NumPad8 = 328,
+ NumPad9 = 329,
+ NumPadDec = 330,
+ NumPadDiv = 331,
+ NumPadMul = 332,
+ NumPadSub = 333,
+ NumPadAdd = 334,
+ NumPadAnter = 335,
+ NumPadEqual = 336,
+ LeftShift = 340,
+ LeftControl = 341,
+ LeftAlt = 342,
+ LeftSuper = 343,
+ RightShift = 344,
+ RightControl = 345,
+ RightAlt = 346,
+ RightSuper = 347,
+ Menu = 348,
+ First = Space,
+ Last = Menu,
+
+ }
+
+ #pragma warning disable CA1707
+ #pragma warning disable CA1712
+ #pragma warning disable CA1008
+ #pragma warning disable CA1027
+ public enum Joystick : int
+ #pragma warning restore CA1027
+ {
+
+ Joystick_1 = FrameworkConstant. JOYSTICK_1,
+ Joystick_2 = FrameworkConstant. JOYSTICK_2,
+ Joystick_3 = FrameworkConstant. JOYSTICK_3,
+ Joystick_4 = FrameworkConstant. JOYSTICK_4,
+ Joystick_5 = FrameworkConstant. JOYSTICK_5,
+ Joystick_6 = FrameworkConstant. JOYSTICK_6,
+ Joystick_7 = FrameworkConstant. JOYSTICK_7,
+ Joystick_8 = FrameworkConstant. JOYSTICK_8,
+ Joystick_9 = FrameworkConstant. JOYSTICK_9,
+ Joystick_10 = FrameworkConstant.JOYSTICK_10,
+ Joystick_11 = FrameworkConstant.JOYSTICK_11,
+ Joystick_12 = FrameworkConstant.JOYSTICK_12,
+ Joystick_13 = FrameworkConstant.JOYSTICK_13,
+ Joystick_14 = FrameworkConstant.JOYSTICK_14,
+ Joystick_15 = FrameworkConstant.JOYSTICK_15,
+ Joystick_16 = FrameworkConstant.JOYSTICK_16,
+ First = Joystick_1,
+ Last = Joystick_16
+
+ }
+
+ [System.Flags]
+ public enum Mouse : int
+ {
+
+ Button1 = 0,
+ Button2 = 1,
+ Button3 = 2,
+ Button4 = 3,
+ Button5 = 4,
+ Button6 = 5,
+ Button7 = 6,
+ Button8 = 7,
+ First = Button1,
+ Last = Button8,
+ Left = Button1,
+ Right = Button2,
+ Middle = Button3
+
+ }
+
+ #pragma warning restore CA1707
+ #pragma warning restore CA1712
+ #pragma warning restore CA7008
+
+ internal enum InputEquipment
+ {
+
+ Keyboard,
+ Mouse,
+ Joystick
+
+ }
+
+ public enum KeyStatus : int
+ {
+
+ RELEASE = 0,
+ PRESS = 1
+
+ }
+}
diff --git a/StgSharp.Common/Controlling/KeyEventAttribute.cs b/StgSharp.Common/Controlling/KeyEventAttribute.cs
new file mode 100644
index 00000000..36e936d5
--- /dev/null
+++ b/StgSharp.Common/Controlling/KeyEventAttribute.cs
@@ -0,0 +1,66 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="KeyEventAttribute"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp
+{
+ [AttributeUsage(AttributeTargets.Method)]
+ public class KeyEventAttribute : Attribute
+ {
+
+ internal int _equipment;
+ internal int _keyStat;
+ internal int _keyTarget;
+
+ public KeyEventAttribute(KeyboardKey key, KeyStatus status)
+ {
+ _equipment = (int)InputEquipment.Keyboard;
+ _keyTarget = (int)key;
+ _keyStat = (int)status;
+ }
+
+ public KeyEventAttribute(Joystick joystick, KeyStatus status)
+ {
+ _equipment = (int)InputEquipment.Keyboard;
+ _keyTarget = (int)joystick;
+ _keyStat = (int)status;
+ }
+
+ public KeyEventAttribute(Mouse mouse, KeyStatus status)
+ {
+ _equipment = (int)InputEquipment.Keyboard;
+ _keyTarget = (int)mouse;
+ _keyStat = (int)status;
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Controlling/UsrActivity/IClickTrigger.cs b/StgSharp.Common/Controlling/UsrActivity/IClickTrigger.cs
new file mode 100644
index 00000000..fe9e90ee
--- /dev/null
+++ b/StgSharp.Common/Controlling/UsrActivity/IClickTrigger.cs
@@ -0,0 +1,42 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="IClickTrigger"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace StgSharp.Controlling.UsrActivity
+{
+ public interface IClickTrigger
+ {
+
+ public int TargetKeyOrButtonID { get; }
+
+ public KeyStatus TriggeredStatus { get; }
+
+ }
+}
diff --git a/StgSharp.Common/Controlling/UsrActivity/JoystickTrigger.cs b/StgSharp.Common/Controlling/UsrActivity/JoystickTrigger.cs
new file mode 100644
index 00000000..2331d2ad
--- /dev/null
+++ b/StgSharp.Common/Controlling/UsrActivity/JoystickTrigger.cs
@@ -0,0 +1,86 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="JoystickTrigger"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace StgSharp.Controlling.UsrActivity
+{
+ public readonly struct JoystickTrigger : IClickTrigger, IEquatable
+ {
+
+ private readonly Joystick _stick;
+ private readonly KeyStatus _status;
+
+ public JoystickTrigger(Joystick targetKey, KeyStatus status)
+ {
+ this._stick = targetKey;
+ _status = status;
+ }
+
+ public int TargetKeyOrButtonID => (int)_stick;
+
+ public Joystick Stick
+ {
+ get => _stick;
+ }
+
+ public KeyStatus TriggeredStatus => _status;
+
+ public override bool Equals(object obj)
+ {
+ return base.Equals(obj);
+ }
+
+ public override int GetHashCode()
+ {
+ return ((int)_stick) + (17 * ((int)_status));
+ }
+
+ public override string ToString()
+ {
+ return $"Key {_stick} triggered when {_status}";
+ }
+
+ public static bool operator !=(JoystickTrigger left, JoystickTrigger right)
+ {
+ return !(left == right);
+ }
+
+ public static bool operator ==(JoystickTrigger left, JoystickTrigger right)
+ {
+ return (left._status == right._status) && (left._stick == right._stick);
+ }
+
+ bool IEquatable.Equals(JoystickTrigger other)
+ {
+ return other == this;
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Controlling/UsrActivity/KeyTrigger.cs b/StgSharp.Common/Controlling/UsrActivity/KeyTrigger.cs
new file mode 100644
index 00000000..2f310e4c
--- /dev/null
+++ b/StgSharp.Common/Controlling/UsrActivity/KeyTrigger.cs
@@ -0,0 +1,82 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="KeyTrigger"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Data.Common;
+using System.Text;
+
+namespace StgSharp.Controlling.UsrActivity
+{
+ public readonly struct KeyTrigger : IClickTrigger, IEquatable
+ {
+
+ private readonly KeyboardKey _targetKey;
+ private readonly KeyStatus _triggerStat;
+
+ public KeyTrigger(KeyboardKey targetKey, KeyStatus targetStat)
+ {
+ this._targetKey = targetKey;
+ this._triggerStat = targetStat;
+ }
+
+ public int TargetKeyOrButtonID => (int)_targetKey;
+
+ public KeyStatus TriggeredStatus => _triggerStat;
+
+ public override bool Equals(object obj)
+ {
+ return base.Equals(obj);
+ }
+
+ public override int GetHashCode()
+ {
+ return ((int)_targetKey) + (17 * ((int)_triggerStat));
+ }
+
+ public override string ToString()
+ {
+ return $"Key {_targetKey} triggered when {_triggerStat}";
+ }
+
+ public static bool operator !=(KeyTrigger left, KeyTrigger right)
+ {
+ return !(left == right);
+ }
+
+ public static bool operator ==(KeyTrigger left, KeyTrigger right)
+ {
+ return (left._triggerStat == right._triggerStat) && (left._targetKey == right._targetKey);
+ }
+
+ bool IEquatable.Equals(KeyTrigger other)
+ {
+ return other == this;
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Controlling/UsrActivity/MouseTrigger.cs b/StgSharp.Common/Controlling/UsrActivity/MouseTrigger.cs
new file mode 100644
index 00000000..4df57366
--- /dev/null
+++ b/StgSharp.Common/Controlling/UsrActivity/MouseTrigger.cs
@@ -0,0 +1,69 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="MouseTrigger"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.SymbolStore;
+using System.Text;
+
+namespace StgSharp.Controlling.UsrActivity
+{
+ public readonly struct MouseTrigger : IClickTrigger, IEquatable
+ {
+
+ private readonly KeyStatus _status;
+ private readonly Mouse _mouse;
+
+ public MouseTrigger(Mouse mouse, KeyStatus status)
+ {
+ _mouse = mouse;
+ _status = status;
+ }
+
+ public int TargetKeyOrButtonID => (int)_mouse;
+
+ public KeyStatus TriggeredStatus => _status;
+
+ public bool Equals(MouseTrigger other)
+ {
+ return this == other;
+ }
+
+ public static bool operator !=(MouseTrigger left, MouseTrigger right)
+ {
+ return left._mouse != right._mouse || left._status != right._status;
+ }
+
+ public static bool operator ==(MouseTrigger left, MouseTrigger right)
+ {
+ return left._mouse == right._mouse && left._status == right._status;
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Controlling/UsrActivity/TriggetFactory.cs b/StgSharp.Common/Controlling/UsrActivity/TriggetFactory.cs
new file mode 100644
index 00000000..dc29cfb6
--- /dev/null
+++ b/StgSharp.Common/Controlling/UsrActivity/TriggetFactory.cs
@@ -0,0 +1,88 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="TriggetFactory"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace StgSharp.Controlling.UsrActivity
+{
+ public static class TriggetBuilder
+ {
+
+ private const int JoystickMax = (int)Joystick.Last + 1;
+ private const int JoystickMin = (int)Joystick.First - 1;
+ private const int KeyboardMax = (int)KeyboardKey.Last + 1;
+ private const int KeyboardMin = (int)KeyboardKey.First - 1;
+ private const int MouseMax = (int)Mouse.Last + 1;
+ private const int MouseMin = (int)Mouse.First - 1;
+
+ private static KeyTrigger keyboardtemp;
+ private static MouseTrigger mousetemp;
+
+ public static JoystickTrigger BuildJoystickClickTrigger(int keyCode, KeyStatus status)
+ {
+ if (keyCode > MouseMin && keyCode < MouseMax) {
+ return new JoystickTrigger((Joystick)keyCode, status);
+ }
+ throw new InvalidOperationException("Known key code or key is not on joystick.");
+ }
+
+ public static KeyTrigger BuildKeyboardClickTrigger(int keyCode, KeyStatus status)
+ {
+ if (keyCode > KeyboardMin && keyCode < KeyboardMax) {
+ return new KeyTrigger((KeyboardKey)keyCode, status);
+ }
+ throw new InvalidOperationException("Known key code or kay is not on keyboard.");
+ }
+
+ public static MouseTrigger BuildMouseClickTrigger(int keyCode, KeyStatus status)
+ {
+ if (keyCode >= MouseMin && keyCode <= MouseMax) {
+ return new MouseTrigger((Mouse)keyCode, status);
+ }
+ throw new InvalidOperationException("Known key code or key is not on mouse.");
+ }
+
+ public static IClickTrigger BuildTrigger(int keyCode, KeyStatus status)
+ {
+ if (keyCode > KeyboardMin && keyCode < KeyboardMax) {
+ return new KeyTrigger((KeyboardKey)keyCode, status);
+ }
+ if (keyCode > JoystickMin && keyCode < JoystickMax) {
+ return new JoystickTrigger((Joystick)keyCode, status);
+ }
+ if (keyCode >= MouseMin && keyCode <= MouseMax) {
+ return new MouseTrigger((Mouse)keyCode, status);
+ }
+ throw new InvalidOperationException("Known key code.");
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Counter.cs b/StgSharp.Common/Counter.cs
new file mode 100644
index 00000000..c74b7765
--- /dev/null
+++ b/StgSharp.Common/Counter.cs
@@ -0,0 +1,111 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Counter"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Numerics;
+
+namespace StgSharp
+{
+ public class Counter where T: unmanaged, INumber
+ {
+
+ internal dynamic _value;
+ internal readonly T _defaultValue;
+ internal readonly T _defualtDecreament;
+
+ internal readonly T _defualtIncreament;
+
+ public Counter(T defaultValue, T defaultIncrement, T defaultDecrement)
+ {
+ _value = defaultValue;
+ _defaultValue = defaultValue;
+ _defualtIncreament = defaultIncrement;
+ _defualtDecreament = defaultDecrement;
+ }
+
+ public T DecrementSpan => _defualtDecreament;
+
+ public T IncrementSpan => _defualtIncreament;
+
+ public T CurrentSpan => _value - _defaultValue;
+
+ public T Value
+ {
+ get => _value;
+ set => _value = value;
+ }
+
+ public void Add(T value)
+ {
+ _value += value;
+ }
+
+ public void QuickAdd()
+ {
+ _value += _defualtIncreament;
+ }
+
+ public void QuickSub()
+ {
+ _value -= _defualtDecreament;
+ }
+
+ public void Reset()
+ {
+ _value = _defaultValue;
+ }
+
+ public void Sub(T value)
+ {
+ _value -= value;
+ }
+
+ public override string ToString() => Value.ToString();
+
+ public static Counter operator --(Counter counter)
+ {
+ counter.QuickSub();
+ return counter;
+ }
+
+ public static Counter operator ++(Counter counter)
+ {
+ counter.QuickAdd();
+ return counter;
+ }
+
+ public static implicit operator T(Counter counter)
+ {
+ return counter switch
+ {
+ null => T.Zero,
+ _ => counter.Value
+ };
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Data/GlobalData/root.cs b/StgSharp.Common/Data/GlobalData/root.cs
new file mode 100644
index 00000000..a8c2b707
--- /dev/null
+++ b/StgSharp.Common/Data/GlobalData/root.cs
@@ -0,0 +1,39 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="root"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Internal;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp
+{
+ public static unsafe partial class World { }//------------------ end of class ---------------------
+}
diff --git a/StgSharp.Common/Data/RandomGenerator.cs b/StgSharp.Common/Data/RandomGenerator.cs
new file mode 100644
index 00000000..51ae4a18
--- /dev/null
+++ b/StgSharp.Common/Data/RandomGenerator.cs
@@ -0,0 +1,144 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="RandomGenerator"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.HighPerformance;
+
+using System;
+using System.IO;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Xml.Serialization;
+
+namespace StgSharp.Data
+{
+ public unsafe class RandomGenerator
+ {
+
+ private byte[] currentKey;
+ private readonly byte[] originKey;
+
+ public RandomGenerator() : this(DateTime.UtcNow.ToBinary()) { }
+
+ public RandomGenerator(object source)
+ {
+ ArgumentNullException.ThrowIfNull(source);
+ XmlSerializer s = new(source.GetType());
+ using (StringWriter sw = new())
+ {
+ s.Serialize(sw, source);
+ string data = sw.ToString();
+ originKey = Encoding.Unicode.GetBytes(data);
+ }
+ currentKey = [
+ 0,
+ 0,
+ 0,
+ 0
+ ];
+ fixed (byte* o = originKey, c = currentKey) {
+ *(int*)c = UnsafeCompute.CityHashSimplify((char*)o, 0, originKey.Length / 2);
+ }
+ TotalGeneratedRandom = 0;
+ }
+
+ public int TotalGeneratedRandom
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get;
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private set;
+ }
+
+ public unsafe int GenRandomInt()
+ {
+ uint source = PrivateRand();
+ TotalGeneratedRandom++;
+ M64 m = new M64();
+ m.Member(0) = source;
+ m.Member(1) = source;
+ return (m << (TotalGeneratedRandom % 32)).Member(1);
+ }
+
+ public byte GenRandomInt8()
+ {
+ TotalGeneratedRandom++;
+ if (TotalGeneratedRandom % 4 == 0) {
+ PrivateRand();
+ }
+ return currentKey[TotalGeneratedRandom % 4];
+ }
+
+ public float GenRandomSingle()
+ {
+ TotalGeneratedRandom++;
+
+ while (true)
+ {
+ uint
+ temp0 = PrivateRand(),
+ temp1 = PrivateRand();
+
+ if (temp0 * temp1 != 0)
+ {
+ float ret = temp0 % temp1 * 1.0f / temp1;
+ if (ret < 0.335f)
+ {
+ ret = ret * ((ret * (-0.7811934f)) + 1.4489113f);
+ } else
+ {
+ ret = (ret * ((ret * (-0.1158368f)) + 1.0580600f)) + 0.0590584f;
+ }
+ if (ret > 1)
+ {
+ continue;
+ }
+ return ret;
+ }
+ }
+ }
+
+ public void Reset()
+ {
+ currentKey = originKey;
+ TotalGeneratedRandom = 0;
+ }
+
+ private unsafe uint PrivateRand()
+ {
+ uint ret;
+ fixed (byte* bptr = currentKey)
+ {
+ *(int*)bptr = UnsafeCompute.CityHashSimplify((char*)bptr, currentKey.Length / 2);
+ ret = *(uint*)bptr;
+ }
+
+ // Console.WriteLine(ret.ToString(16));
+ return ret;
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Data/SSD/Area.cs b/StgSharp.Common/Data/SSD/Area.cs
new file mode 100644
index 00000000..2a27e1b2
--- /dev/null
+++ b/StgSharp.Common/Data/SSD/Area.cs
@@ -0,0 +1,44 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Area"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Internal.FileIO;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Internal
+{
+ ///
+ /// An independent storage area, used as the only folder type in root folder. Contains several
+ /// files reference as virtual disc. Data is actually stored in s in certain RAID mode.
+ ///
+ public partial class Area { }
+}
diff --git a/StgSharp.Common/Data/SSD/DataHead.cs b/StgSharp.Common/Data/SSD/DataHead.cs
new file mode 100644
index 00000000..cfa53ead
--- /dev/null
+++ b/StgSharp.Common/Data/SSD/DataHead.cs
@@ -0,0 +1,77 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="DataHead"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.HighPerformance;
+
+using System;
+using System.Numerics;
+using System.Runtime.InteropServices;
+
+namespace StgSharp.Internal
+{
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public struct SSDSegmentHead
+ {
+
+ [FieldOffset(12)] internal byte size;
+
+ [FieldOffset(0)] internal M128 data;
+ [FieldOffset(13)] public byte selfDefine_1;
+ [FieldOffset(14)] public byte selfDefine_2;
+ [FieldOffset(15)] public byte selfDefine_3;
+
+ [FieldOffset(0)] public int globalID;
+ [FieldOffset(4)] public int nextID;
+ [FieldOffset(8)] public int previousHash;
+
+ public int Size
+ {
+ get => ((int)size) + 1;
+ set
+ {
+ if ((value > 256) || (value < 0)) {
+ throw new ArgumentOutOfRangeException();
+ }
+ size = (byte)(value - 1);
+ }
+ }
+
+ public unsafe byte[] GetBytes()
+ {
+ byte[] ret = new byte[16];
+ fixed (M128* vptr = &data)
+ {
+ byte* bptr = (byte*)vptr;
+ for (int i = 0; i < 15; i++) {
+ ret[i] = *bptr;
+ }
+ }
+ return ret;
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Data/SSD/DataSegment.cs b/StgSharp.Common/Data/SSD/DataSegment.cs
new file mode 100644
index 00000000..b3699772
--- /dev/null
+++ b/StgSharp.Common/Data/SSD/DataSegment.cs
@@ -0,0 +1,186 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="DataSegment"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.HighPerformance;
+using StgSharp.HighPerformance;
+using StgSharp.Internal.Intrinsic;
+
+using StgSharp.Mathematics;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Numerics;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Internal
+{
+ [StructLayout(LayoutKind.Explicit, Size = World.ssdSegmentLength * 16)]
+ public unsafe struct SSDSegment : IComparable, IComparable
+ {
+
+ [FieldOffset(16)] public fixed byte Data[16 * (World.ssdSegmentLength - 1)];
+ [FieldOffset(12)] public int DataHash;
+ [FieldOffset(8)] public int PreviousHash;
+ [FieldOffset(0 * 16)] public SSDSegmentHead Head;
+
+ public SSDSegment(int previousHash)
+ {
+ this.PreviousHash = previousHash;
+ }
+
+ public byte this[int index]
+ {
+ get
+ {
+ if (index > (16 * (World.ssdSegmentLength - 1)) - 1) {
+ throw new IndexOutOfRangeException();
+ }
+ return Data[index];
+ }
+
+ set
+ {
+ if (index > (16 * (World.ssdSegmentLength - 1)) - 1) {
+ throw new IndexOutOfRangeException();
+ }
+ Data[index] = value;
+ }
+ }
+
+ public int ID
+ {
+ get { return Head.globalID; }
+ set { Head.globalID = value; }
+ }
+
+ public short Size => Head.size;
+
+ public void FillRandomBytes(int begin)
+ {
+ if (begin > 255) {
+ return;
+ }
+ for (int i = begin; i < 255; i++) {
+ Data[i] = Scalar.Random();
+ }
+ }
+
+ public static SSDSegment FromStream(byte[] stream)
+ {
+ if (stream.Length != 16 * World.ssdSegmentLength) {
+ throw new ArgumentException();
+ }
+ SSDSegment ret = new SSDSegment();
+ fixed (byte* bptr = stream)
+ {
+ ret.Head.data = *(M128*)bptr;
+ for (int i = 1; i < World.ssdSegmentLength; i++) {
+ ret.WriteData(i - 1, *(M128*)(bptr + (16 * i)));
+ }
+ }
+ return ret;
+ }
+
+ public byte[] GetBytes()
+ {
+ byte[] ret = new byte[16 * World.ssdSegmentLength];
+ fixed (M128* mptr = &Head.data)
+ {
+ fixed (byte* aptr = ret)
+ {
+ Vector4* vsptr = (Vector4*)mptr;
+ Vector4* vtptr = (Vector4*)aptr;
+ for (int i = 0; i < 18; i++) {
+ *(vtptr + i) = *(vsptr + i);
+ }
+ }
+ }
+
+ return ret;
+ }
+
+ public int GetDataHash()
+ {
+ Vector4 v = Vector4.One;
+ fixed (M128* mptr = &Head.data)
+ {
+ Vector4* vptr = (Vector4*)mptr;
+ for (int i = 0; i < World.ssdSegmentLength - 1; i += 1) {
+ v += (*vptr) * 31;
+ }
+ }
+ M128 m = new M128(v);
+ DataHash = m.Vec.GetHashCode();
+ return DataHash;
+ }
+
+ public override int GetHashCode()
+ {
+ int ret = 17;
+ fixed (M128* mptr = &Head.data)
+ {
+ Vector4* vptr = (Vector4*)mptr;
+ for (int i = 0; i < World.ssdSegmentLength; i++) {
+ ret = (ret + (*vptr).GetHashCode()) * 31;
+ }
+ }
+ return ret;
+ }
+
+ public unsafe T ReadData(int index) where T: unmanaged
+ {
+ fixed (byte* bptr = Data)
+ {
+ T* tptr = (T*)bptr;
+ return *(tptr + index);
+ }
+ }
+
+ public unsafe void WriteData(int index, T value) where T: unmanaged
+ {
+ fixed (byte* bptr = Data)
+ {
+ T* tptr = (T*)bptr;
+ *(tptr + index) = value;
+ }
+ }
+
+ int IComparable.CompareTo(int other)
+ {
+ return ID.CompareTo(other);
+ }
+
+ int IComparable.CompareTo(SSDSegment other)
+ {
+ return ID.CompareTo(other.ID);
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Data/SSD/SSD.cs b/StgSharp.Common/Data/SSD/SSD.cs
new file mode 100644
index 00000000..c13805bc
--- /dev/null
+++ b/StgSharp.Common/Data/SSD/SSD.cs
@@ -0,0 +1,64 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="SSD"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Internal.FileIO;
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+namespace StgSharp.Internal
+{
+ public partial class SSD
+ {
+
+ private Dictionary fileList;
+
+ private FileStream file;
+ private SSDrawHead head;
+
+ public SSD()
+ {
+ fileList = new Dictionary();
+ }
+
+ public SSD(FileStream fileStream)
+ {
+ fileList = new Dictionary();
+ file = fileStream;
+ }
+
+ public static SSD FromFile(string fileRoute)
+ {
+ return new SSD(new FileStream(fileRoute, FileMode.Open, FileAccess.Read))
+ {
+ };
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Data/SSD/SSDVirtualFolder.cs b/StgSharp.Common/Data/SSD/SSDVirtualFolder.cs
new file mode 100644
index 00000000..b49d7382
--- /dev/null
+++ b/StgSharp.Common/Data/SSD/SSDVirtualFolder.cs
@@ -0,0 +1,77 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="SSDVirtualFolder"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Internal.FileIO;
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+
+namespace StgSharp.Internal
+{
+ public class SSDFolder : ISSDSerializable
+ {
+
+ internal Dictionary folders;
+ internal int _folderID;
+ internal string _name;
+
+ internal SSDFolder()
+ {
+ folders = new Dictionary();
+ }
+
+ internal SSDFolder(string name)
+ {
+ if (name == "root") {
+ throw new ArgumentException(
+ "Name cannot be root," + "it is preserved for root file indexer.");
+ }
+ if (name == "default") {
+ throw new ArgumentException(
+ "Name cannot be default," + "it is preserved for default file id provider.");
+ }
+ _name = name;
+ folders = new Dictionary();
+ }
+
+ public SerializableTypeCode SSDTypeCode => SerializableTypeCode.VirtualFolder;
+
+ public void FromBytes(byte[] stream)
+ {
+ throw new NotImplementedException();
+ }
+
+ // TODO TOUGH TO Get Bytes from virtual folders
+ public byte[] GetBytes()
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Data/SSD/SSDraw.cs b/StgSharp.Common/Data/SSD/SSDraw.cs
new file mode 100644
index 00000000..34896a49
--- /dev/null
+++ b/StgSharp.Common/Data/SSD/SSDraw.cs
@@ -0,0 +1,68 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="SSDraw"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics.ShaderEdit;
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Numerics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Security.Cryptography;
+using System.Text;
+using System.Xml.Serialization;
+
+namespace StgSharp.Internal.FileIO
+{
+ public class SSDraw
+ {
+
+ private byte[] data;
+
+ public SSDraw(string name, Stream streamSource)
+ {
+ if ((streamSource == null) || (streamSource.Length == 0)) {
+ throw new ArgumentNullException(nameof(streamSource));
+ }
+ Name = name;
+ data = new byte[streamSource.Length];
+ streamSource.Read(data.AsSpan());
+ }
+
+ public SSDrawHead Head { get; set; }
+
+ public string Name { get; set; }
+
+ }
+
+ [StructLayout(LayoutKind.Explicit, Size = 32 * 16)]
+ public unsafe struct SSDrawHead { }
+}
diff --git a/StgSharp.Common/Data/Serialize/Define.cs b/StgSharp.Common/Data/Serialize/Define.cs
new file mode 100644
index 00000000..44898c8f
--- /dev/null
+++ b/StgSharp.Common/Data/Serialize/Define.cs
@@ -0,0 +1,38 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Define"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace StgSharp.Internal
+{
+ ///
+ /// A class contains a sets of methods to serialize several types
+ ///
+ public static partial class Serializer { }
+}
diff --git a/StgSharp.Common/Data/Serialize/ISSDSerializable.cs b/StgSharp.Common/Data/Serialize/ISSDSerializable.cs
new file mode 100644
index 00000000..c2b7ea60
--- /dev/null
+++ b/StgSharp.Common/Data/Serialize/ISSDSerializable.cs
@@ -0,0 +1,103 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="ISSDSerializable"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Internal
+{
+ public interface ISSDSerializable
+ {
+
+ public SerializableTypeCode SSDTypeCode { get; }
+
+ public byte[] GetBytes();
+
+ internal void FromBytes(byte[] stream);
+
+ }
+
+ public enum SerializableTypeCode
+ {
+
+ Unknown = 0,
+ IndexTable = 1,
+ PixelImage = 2,
+ VectorImage = 3,
+ Audio = 4,
+ Shader = 5,
+ Text = 6,
+ RawData = 7,
+ VirtualFolder = int.MaxValue,
+
+ }
+
+ public static partial class Serializer
+ {
+
+ public static T Deserialize(byte[] stream) where T: ISSDSerializable
+ {
+ T serializableObject = Activator.CreateInstance();
+ serializableObject.FromBytes(stream);
+ return serializableObject;
+ }
+
+ public static string GetNameTail(SerializableTypeCode typeCode)
+ {
+ switch (typeCode)
+ {
+ case SerializableTypeCode.IndexTable:
+ return "_idt";
+ case SerializableTypeCode.PixelImage:
+ return "_pim";
+ case SerializableTypeCode.VectorImage:
+ return "_vim";
+ case SerializableTypeCode.Audio:
+ return "_wav";
+ case SerializableTypeCode.Shader:
+ return "_gls";
+ case SerializableTypeCode.Text:
+ return "_txt";
+ case SerializableTypeCode.RawData:
+ return "_raw";
+ case SerializableTypeCode.VirtualFolder:
+ return "_fod";
+ default:
+ throw new ArgumentException("Unknown file type");
+ }
+ }
+
+ public static byte[] Serialize(ISSDSerializable serializableObject)
+ {
+ return serializableObject.GetBytes();
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Data/ValueBox.cs b/StgSharp.Common/Data/ValueBox.cs
new file mode 100644
index 00000000..f978951b
--- /dev/null
+++ b/StgSharp.Common/Data/ValueBox.cs
@@ -0,0 +1,91 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="ValueBox"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Data
+{
+ public interface IValueBox
+ {
+
+ ref object ValueReference { get; }
+
+ static virtual IValueBox AsGeneric(IValueBox box) where T: unmanaged
+ {
+ if (box is not IValueBox genericBox) {
+ return null;
+ }
+ return genericBox;
+ }
+
+ static virtual bool IsGeneric(IValueBox box) where T: unmanaged
+ {
+ return box is IValueBox;
+ }
+
+ }
+
+ public interface IValueBox where T: unmanaged
+ {
+
+ T Value { get; set; }
+
+ }
+
+ ///
+ /// A class attempt to reduce cost of boxing, though still a bit slower than direct access to
+ /// _origin value type instance.
+ ///
+ ///
+ /// Type of instance to be boxed.
+ ///
+ public class ValueBox : IValueBox, IValueBox where T: unmanaged
+ {
+
+ private T _value;
+
+ public ValueBox(T value)
+ {
+ _value = value;
+ }
+
+ public ref object ValueReference => ref Unsafe.As(ref _value);
+
+ public T Value
+ {
+ get => _value;
+ set => _value = value;
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Environment/Dialogue.cs b/StgSharp.Common/Environment/Dialogue.cs
new file mode 100644
index 00000000..9f1b507c
--- /dev/null
+++ b/StgSharp.Common/Environment/Dialogue.cs
@@ -0,0 +1,177 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Dialogue"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.IO.Pipes;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading;
+
+namespace StgSharp
+{
+ public static class Dialogue
+ {
+
+ private static Process? _dialogueProcess;
+ private static AnonymousPipeServerStream _dialogueClientPipe,_dialogueServerPipe;
+ private static ConcurrentBag msgCache = new ConcurrentBag();
+ private static int _readAndWriteThreadId;
+ private static ProcessStartInfo _dialogueProcessInfo;
+ private static StreamReader _dr;
+ private static StreamWriter _dw;
+
+ public static bool NeedShowWhenStartup { get; set; }
+
+ public static void PostError(Exception ex)
+ {
+ CreateDialogueProcessIfNotExist();
+
+ _dw.WriteLine($"posterror {ex.Message}");
+
+ _dialogueProcess!.Exited -= DialogueProcessExitCallback;
+ }
+
+ public static void SetReadAndWriteThread(Thread thread)
+ {
+ _readAndWriteThreadId = thread.ManagedThreadId;
+ }
+
+ internal static void CreateDialogueProcessIfNotExist()
+ {
+ if (_dialogueProcess != null) {
+ return;
+ }
+ if (!File.Exists(_dialogueProcessInfo.FileName)) { }
+ _dialogueProcess = Process.Start(_dialogueProcessInfo);
+
+ _dr = new StreamReader(_dialogueClientPipe);
+ _dw = new StreamWriter(_dialogueServerPipe);
+
+ _dialogueProcess!.Exited += DialogueProcessExitCallback;
+
+ _dialogueServerPipe.DisposeLocalCopyOfClientHandle();
+ _dialogueClientPipe.DisposeLocalCopyOfClientHandle();
+ }
+
+ internal static void LoadDialogue()
+ {
+ _dialogueServerPipe = new AnonymousPipeServerStream(
+ PipeDirection.Out, HandleInheritability.Inheritable);
+ _dialogueClientPipe = new AnonymousPipeServerStream(
+ PipeDirection.In, HandleInheritability.Inheritable);
+
+ string route = Assembly.GetAssembly(typeof(World)).Location;
+ string path = Path.GetDirectoryName(route);
+
+ string exeName;
+
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ exeName = ".exe";
+ } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ||
+ RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ exeName = string.Empty;
+ } else
+ {
+ throw new PlatformNotSupportedException("Unknown OS platform");
+ }
+
+ string consoleRoute = Path.Combine(
+ path, @"StgSharpTerminalDialogue", $@"StgSharpTerminalDialogue{exeName}");
+
+ _dialogueProcessInfo = new ProcessStartInfo
+ {
+ FileName = consoleRoute,
+ Arguments =
+ $"{_dialogueServerPipe.GetClientHandleAsString()} {_dialogueClientPipe.GetClientHandleAsString()}",
+ UseShellExecute = true,
+ RedirectStandardOutput = false,
+ };
+ }
+
+ internal static void PostMessage(string instruction, params string[] operands)
+ {
+ CreateDialogueProcessIfNotExist();
+
+ _dw.WriteLine($"{instruction} {operands}");
+ }
+
+ internal static void UnloadDialogue()
+ {
+ if (_dialogueProcess != null) {
+ _dialogueProcess.Kill();
+ }
+ _dialogueProcess = null;
+
+ _dialogueServerPipe.Dispose();
+ _dialogueClientPipe.Dispose();
+ }
+
+ internal static string WaitCertainReturn(string target)
+ {
+ if (_dialogueProcess == null) {
+ return string.Empty;
+ }
+
+ string temp = string .Empty;
+ do
+ {
+ temp = _dr.ReadLine();
+ temp = temp ?? string.Empty;
+ if (!temp!.StartsWith(target))
+ {
+ break;
+ }
+ } while (true);
+
+ int index = temp.IndexOf(' ');
+ return index != -1 ? temp.Substring(index + 1) : string.Empty;
+ }
+
+ private static void AssertThread()
+ {
+ if (_readAndWriteThreadId != Environment.CurrentManagedThreadId) {
+ throw new InvalidOperationException(
+ "Communication with dialogue can only call from certain thread.");
+ }
+ }
+
+ private static void DialogueProcessExitCallback(object? sender, EventArgs e)
+ {
+ _dialogueProcess = null;
+ _dr.Close();
+ _dw.Close();
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Environment/ErrorDefine.cs b/StgSharp.Common/Environment/ErrorDefine.cs
new file mode 100644
index 00000000..3a668dab
--- /dev/null
+++ b/StgSharp.Common/Environment/ErrorDefine.cs
@@ -0,0 +1,44 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="ErrorDefine"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp
+{
+ public class UniformEmptyReferenceException : Exception
+ {
+
+ public UniformEmptyReferenceException(string program, string name)
+ : base(
+ $"Location -1 returned when trying to find uniform {name} in shader program {program}") { }
+
+ }
+}
diff --git a/StgSharp.Common/Environment/GlobalSetting.cs b/StgSharp.Common/Environment/GlobalSetting.cs
new file mode 100644
index 00000000..2c68369b
--- /dev/null
+++ b/StgSharp.Common/Environment/GlobalSetting.cs
@@ -0,0 +1,110 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="GlobalSetting"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Security.Cryptography;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp
+{
+ public static unsafe partial class World
+ {
+
+ internal const int ssdSegmentLength = 16;
+
+ private static byte[] _currentHash = [];
+
+ private static bool _inited;
+
+ public static byte[] CurrentAssemblyHash
+ {
+ get
+ {
+ if (_currentHash == null)
+ {
+ string route = Assembly.GetExecutingAssembly().Location;
+ string time = DateTime.UtcNow.ToString();
+ using (SHA256 sh = SHA256.Create())
+ {
+ byte[] bytes = Encoding.UTF8.GetBytes(route);
+ _currentHash = sh.ComputeHash(bytes);
+ }
+ }
+ return _currentHash;
+ }
+ }
+
+ public static int MainThreadID
+ {
+ get => (_mainThreadID == -1) ?
+ throw new InvalidOperationException(
+ "StgSharp environment is not inited. Main thread id is not available") :
+ _mainThreadID;
+ internal set => _mainThreadID = value;
+ }
+
+ private static int _mainThreadID { get; set; } = -1;
+
+ ///
+ /// CustomizeInit an instance of OpenGL program, This method should be called before any
+ /// other World api.
+ ///
+ public static void InitGL(int majorVersion, int minorVersion)
+ {
+ if (API == default) {
+ API = GraphicAPI.GL;
+ }
+ if (API != GraphicAPI.GL) {
+ return;
+ }
+ GraphicFramework.InternalInitGL(majorVersion, minorVersion);
+ }
+
+ public static class GlobalSetting
+ {
+
+ private static bool vSyncActivated;
+
+ public static bool VSyncActivated
+ {
+ get => vsyncActivated;
+ set
+ {
+ GraphicFramework.glfwSwapInterval(value ? 1 : 0);
+ vsyncActivated = value;
+ }
+ }
+
+ }
+
+ }//-------------------------------------- End of Class ---------------------------------------//
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Environment/Monitors.cs b/StgSharp.Common/Environment/Monitors.cs
new file mode 100644
index 00000000..0c050c27
--- /dev/null
+++ b/StgSharp.Common/Environment/Monitors.cs
@@ -0,0 +1,57 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Monitors"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Runtime.InteropServices;
+
+namespace StgSharp
+{
+ public static partial class World
+ {
+
+ public static unsafe IntPtr[] MonitorsHandleArray
+ {
+ get
+ {
+ if (MonitorsArray == null)
+ {
+ int count = 0;
+ IntPtr* arrayHandle = GraphicFramework.glfwGetMonitors(&count);
+ MonitorsArray = new IntPtr[count];
+ Marshal.Copy((IntPtr)arrayHandle, MonitorsArray, 0, count);
+ Marshal.FreeHGlobal((IntPtr)arrayHandle);
+ }
+ return MonitorsArray;
+ }
+ }
+
+ public static nint[] MonitorsArray { get; set; } = [];
+
+ public static IntPtr DefaultMonitor => MonitorsHandleArray[0];
+
+ }
+}
diff --git a/StgSharp.Common/Environment/Platform.cs b/StgSharp.Common/Environment/Platform.cs
new file mode 100644
index 00000000..e62b875d
--- /dev/null
+++ b/StgSharp.Common/Environment/Platform.cs
@@ -0,0 +1,223 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Platform"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace StgSharp
+{
+ internal enum GraphicAPI : byte
+ {
+
+ GL,
+ VK
+
+ }
+
+ public static partial class World
+ {
+
+ ///
+ /// Version of current World platform. Main version represent in hundred's digit, and sub
+ /// version represent in ten's digit.
+ ///
+ public const long version = 430;
+
+ private static bool vsyncActivated;
+
+ private static uint markCount = 0;
+ internal static GraphicAPI API = default;
+
+ public static int DefaultSIMDAlignment => NativeIntrinsic.IntrinsicLevel switch
+ {
+ IntrinsicLevel.SSE => 16,
+ IntrinsicLevel.AVX2 => 32,
+ IntrinsicLevel.AVX512 => 64,
+ IntrinsicLevel.NEON => 16,
+ IntrinsicLevel.Non => 8,
+ _ => 8,
+ };
+
+ public static ModuleToInitializeCollection Initialize()
+ {
+ return new ModuleToInitializeCollection(new Initializer());
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static void LogError(Exception ex)
+ {
+ DefaultLog.InternalWriteLog(ex.Message, LogType.Error);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static void LogInfo(string log)
+ {
+ DefaultLog.InternalWriteLog(log, LogType.Info);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static void LogWarning(string log)
+ {
+ DefaultLog.InternalWriteLog(log, LogType.Warning);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static void LogWarning(Exception notVerySeriesException)
+ {
+ DefaultLog.InternalWriteLog(notVerySeriesException.Message, LogType.Warning);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static void Mark(bool needConsole)
+ {
+ markCount++;
+ if (needConsole) {
+ Console.WriteLine(markCount);
+ }
+ }
+
+ public static void Terminate(int exitCode)
+ {
+ MainTimeProvider.StopProvidingTime();
+ GraphicFramework.glfwTerminate();
+ Environment.Exit(exitCode);
+ }
+
+ public static void Track(
+ object target,
+ string message,
+ bool isConsole,
+ [CallerFilePath] string filePath = "",
+ [CallerMemberName] string callerName = "",
+ [CallerLineNumber] int lineNumber = 0)
+ {
+ Type t = target.GetType();
+ string log = $"Tracked object: {nameof(target)}\t\tType:{t.Name}\n";
+ FieldInfo[] fieldInfo = t.GetFields(
+ BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
+ log += "|\tFieldName\t|\tFieldType\t|\tFieldValue\t|\n";
+ foreach (FieldInfo field in fieldInfo) {
+ log += $"|{field.Name}\t\t|{field.FieldType}\t\t|{field.GetValue(target)}\t\t|\n";
+ }
+ log += $"Tracking at:\n{filePath}\t{callerName}\tline {lineNumber}\n";
+ log += $"Additional information:\n{message}\n";
+ if (isConsole)
+ {
+ Console.WriteLine(log);
+ } else
+ {
+ DefaultLog.InternalWriteLog(log, LogType.Info);
+ }
+ }
+
+ ///
+ /// Write a log message to log file, and mark the _level of this message.
+ ///
+ ///
+ /// A string contains information of how current evironment runs.
+ ///
+ ///
+ /// The severity of current message.
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static void WriteLog(string message, LogType logType)
+ {
+ DefaultLog.InternalWriteLog(message, logType);
+ }
+
+ internal static TDele ConvertAPI(IntPtr funcPtr)
+ {
+ if (funcPtr == IntPtr.Zero) {
+ throw new InvalidCastException(
+ "Failed to convert api, the function pointer is zero.");
+ }
+ try
+ {
+ return Marshal.GetDelegateForFunctionPointer(funcPtr);
+ }
+ catch (Exception)
+ {
+ throw;
+ }
+ }
+
+ internal static Delegate ConvertAPI(IntPtr funcPtr, Type T)
+ {
+ if (funcPtr == IntPtr.Zero) {
+ throw new InvalidCastException(
+ "Failed to convert api, the function pointer is zero.");
+ }
+ try
+ {
+ return Marshal.GetDelegateForFunctionPointer(funcPtr, T);
+ }
+ catch (Exception)
+ {
+ throw;
+ }
+ }
+
+ internal static unsafe void InternalInitialize()
+ {
+ // Initialize time provider and start providing time
+ MainTimeProvider.StartProvidingTime();
+ GraphicFramework.LoadGlfw();
+ if (GraphicFramework.glfwInit() == 0) {
+ throw new Exception("Failed to init system graphic environment.");
+ }
+ DefaultLog.InternalAppendLog("\n\n\n");
+ DefaultLog.InternalWriteLog(
+ $"Program {Assembly.GetEntryAssembly()!.FullName} on {Environment.MachineName} Started.", LogType.Info);
+ MainThreadID = System.Environment.CurrentManagedThreadId;
+
+
+ Dialogue.LoadDialogue();
+ if (Dialogue.NeedShowWhenStartup) {
+ Dialogue.CreateDialogueProcessIfNotExist();
+ }
+
+ NativeIntrinsic.InitIntrinsicContext();
+ }
+
+ internal class Initializer : IStaticModule
+ {
+
+ public string ModuleName => "StgSharp";
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void InitializeModule()
+ {
+ World.InternalInitialize();
+ }
+
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Environment/globalKeyStat.cs b/StgSharp.Common/Environment/globalKeyStat.cs
new file mode 100644
index 00000000..3e307a0f
--- /dev/null
+++ b/StgSharp.Common/Environment/globalKeyStat.cs
@@ -0,0 +1,49 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="globalKeyStat"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp
+{
+ public static partial class World
+ {
+
+ private static ConcurrentDictionary keyListener
+ = new ConcurrentDictionary();
+
+ public static KeyStatus CheckKey(KeyboardKey key)
+ {
+ return keyListener.GetOrAdd((int)key, KeyStatus.RELEASE);
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/Coordination/CoordinationBase.cs b/StgSharp.Common/Geometries/Coordination/CoordinationBase.cs
new file mode 100644
index 00000000..9d36839c
--- /dev/null
+++ b/StgSharp.Common/Geometries/Coordination/CoordinationBase.cs
@@ -0,0 +1,78 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="CoordinationBase"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics.Graphic;
+
+using System.Runtime.CompilerServices;
+
+namespace StgSharp.Geometries
+{
+ public abstract class CoordinationBase
+ {
+
+ private bool globalCoordAvailable;
+ private CoordinationBase localCoordination;
+ private Matrix44 coordMat;
+
+ public CoordinationBase(CoordinationBase localCoordination)
+ {
+ this.localCoordination = localCoordination;
+ coordMat = new Matrix44();
+ }
+
+ public virtual Point LocalOrigin
+ {
+ get => new Point(coordMat.column[3].XYZ);
+ internal set => coordMat.column[3].XYZ = value.Coord;
+ }
+
+ public virtual Vec3 LocalX
+ {
+ get => coordMat.column[3].XYZ;
+ internal set => coordMat.column[3].XYZ = value;
+ }
+
+ public virtual Vec3 LocalY
+ {
+ get => coordMat.column[3].XYZ;
+ internal set => coordMat.column[3].XYZ = value;
+ }
+
+ public virtual Vec3 LocalZ
+ {
+ get => coordMat.column[3].XYZ;
+ set => coordMat.column[3].XYZ = value;
+ }
+
+ protected ref Matrix44 CoordMat
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => ref coordMat;
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/Coordination/PlainCoordinate.cs b/StgSharp.Common/Geometries/Coordination/PlainCoordinate.cs
new file mode 100644
index 00000000..3a482cb8
--- /dev/null
+++ b/StgSharp.Common/Geometries/Coordination/PlainCoordinate.cs
@@ -0,0 +1,57 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="PlainCoordinate"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections.Generic;
+using System.Net.Http.Headers;
+using System.Text;
+
+namespace StgSharp.Geometries
+{
+ public class PlainCoordinate : CoordinationBase
+ {
+
+ public PlainCoordinate(CoordinationBase local, Point origin, Vec3 xAxis, Vec3 yAxis)
+ : base(local)
+ {
+ CoordMat = Matrix44.Unit;
+
+ CoordMat.column[0] = new Vec4(xAxis, 0);
+ CoordMat.column[1] = new Vec4(yAxis, 0);
+ CoordMat.column[2] = new Vec4(Linear.Normalize(Vec3.Cross(xAxis, yAxis)), 0);
+
+ LocalOrigin = origin;
+ }
+
+ public static PlainCoordinate StandardPlainCoordination { get; } = new(null, new Point(0, 0, 0),
+ new Vec3(1, 0, 0), new Vec3(0, 1, 0));
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/Coordination/SpaceCoordinate.cs b/StgSharp.Common/Geometries/Coordination/SpaceCoordinate.cs
new file mode 100644
index 00000000..6a6b098c
--- /dev/null
+++ b/StgSharp.Common/Geometries/Coordination/SpaceCoordinate.cs
@@ -0,0 +1,44 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="SpaceCoordinate"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace StgSharp.Geometries
+{
+ public class SpaceCoordinate : CoordinationBase
+ {
+
+ public SpaceCoordinate(CoordinationBase localCoordination, Point origin, Vec3 xAxis, Vec3 yAxis, Vec3 zAxis)
+ : base(localCoordination) { }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/Coordination/StreamLocalCoordinate.cs b/StgSharp.Common/Geometries/Coordination/StreamLocalCoordinate.cs
new file mode 100644
index 00000000..94b989f9
--- /dev/null
+++ b/StgSharp.Common/Geometries/Coordination/StreamLocalCoordinate.cs
@@ -0,0 +1,43 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="StreamLocalCoordinate"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Geometries
+{
+ /*
+ public class StreamLocalCoordinate : CoordinationBase
+ {
+ }
+ /**/
+}
diff --git a/StgSharp.Common/Geometries/GemoryException.cs b/StgSharp.Common/Geometries/GemoryException.cs
new file mode 100644
index 00000000..d8117f18
--- /dev/null
+++ b/StgSharp.Common/Geometries/GemoryException.cs
@@ -0,0 +1,61 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="GemoryException"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Runtime.Serialization;
+
+namespace StgSharp.Geometries
+{
+ public unsafe class ToUpperDimensionException : Exception
+ {
+
+ protected ToUpperDimensionException(SerializationInfo info, StreamingContext context) : base(info, context) { }
+
+ public ToUpperDimensionException() { }
+
+ public ToUpperDimensionException(string message) : base(message) { }
+
+ public ToUpperDimensionException(string message, Exception innerException) : base(message, innerException) { }
+
+ }
+
+ ///
+ /// 当几何体调用了过多的CalcVec方法时,产生UnusedVertexException异常
+ ///
+ public class UnusedVertexException : Exception
+ {
+
+ protected UnusedVertexException(SerializationInfo info, StreamingContext context) : base(info, context) { }
+
+ public UnusedVertexException() { }
+
+ public UnusedVertexException(string message) : base(message) { }
+
+ public UnusedVertexException(string message, Exception innerException) : base(message, innerException) { }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/GeometryOperation/GeometryOperation.cs b/StgSharp.Common/Geometries/GeometryOperation/GeometryOperation.cs
new file mode 100644
index 00000000..efdc757e
--- /dev/null
+++ b/StgSharp.Common/Geometries/GeometryOperation/GeometryOperation.cs
@@ -0,0 +1,113 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="GeometryOperation"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics.Graphic;
+using StgSharp.Timing;
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace StgSharp.Geometries
+{
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ public delegate Vec3 GeometryMotionDelegate(TimeSpanProvider timeSource, out float rotation);
+
+ public class GeometryMotion
+ {
+
+ private bool isIncrementMode;
+ private bool sourceIsStatic;
+ private GeometryMotionDelegate movement;
+ private IntPtr handle;
+ private TimeSpanProvider time;
+
+ public unsafe GeometryMotion(
+ bool isIncreament,
+ TimeSpanProvider timeSource,
+ GeometryMotionDelegate motionDelegate)
+ {
+ isIncrementMode = isIncreament;
+ time = timeSource;
+ if (motionDelegate == null)
+ {
+ handle = (IntPtr)(delegate*)&defaultMotion;
+ movement = defaultMotion;
+ } else if (motionDelegate.Method.IsStatic)
+ {
+ sourceIsStatic = true;
+ handle = Marshal.GetFunctionPointerForDelegate(motionDelegate);
+ movement = motionDelegate;
+ } else
+ {
+ movement = motionDelegate;
+ }
+
+ // sourceIsStatic = false;
+ }
+
+ public bool IsIncrement
+ {
+ get => isIncrementMode;
+ }
+
+ public static GeometryMotion DefaultMotion
+ {
+ get => new GeometryMotion(true, null, null);
+ }
+
+ public unsafe void RunMotion(ref Vec3 coord, ref float rotation)
+ {
+ float rot;
+ Vec3 vec;
+ if (sourceIsStatic)
+ {
+ vec = ((delegate* unmanaged[Cdecl])handle)(
+ time, out rot);
+ } else
+ {
+ vec = movement(time, out rot);
+ }
+
+ if (isIncrementMode)
+ {
+ coord += vec;
+ rotation += rot;
+ } else
+ {
+ coord = vec;
+ rotation = rot;
+ }
+ }
+
+ private static Vec3 defaultMotion(TimeSpanProvider provider, out float rotation)
+ {
+ rotation = 0;
+ return Vec3.Zero;
+ }
+
+ }//------------------------------- End of Class -------------------------------
+}
diff --git a/StgSharp.Common/Geometries/GeometryScaler/Angle.cs b/StgSharp.Common/Geometries/GeometryScaler/Angle.cs
new file mode 100644
index 00000000..3dbf89a2
--- /dev/null
+++ b/StgSharp.Common/Geometries/GeometryScaler/Angle.cs
@@ -0,0 +1,175 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Angle"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Mathematics
+{
+ public static partial class GeometryScaler
+ {
+
+ internal const float DegToRad = 180 / Scalar.Pi;
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static float Cos(Radius r)
+ {
+ return MathF.Cos(r._radius);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static float Cos(Degree r)
+ {
+ return MathF.Cos(r._degree / DegToRad);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static float Sin(Radius r)
+ {
+ return MathF.Sin(r._radius);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static float Sin(Degree r)
+ {
+ return MathF.Sin(r._degree / DegToRad);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static float Tan(Radius r)
+ {
+ return MathF.Tan(r._radius);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static float Tan(Degree r)
+ {
+ return MathF.Tan(r._degree / DegToRad);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Degree ToDegree(float value)
+ {
+ return new Degree(value);
+ }
+
+ }
+
+ public struct Degree
+ {
+
+ internal float _degree;
+
+ public Degree(float dgree)
+ {
+ _degree = dgree;
+ }
+
+ public static implicit operator Radius(Degree d)
+ {
+ return new Radius(d._degree / GeometryScaler.DegToRad);
+ }
+
+ }
+
+ public struct Radius
+ {
+
+ internal float _radius;
+
+ [Obsolete("Unsafe, you may forget this is radius.", true)]
+ public Radius() { }
+
+ public Radius(float radius)
+ {
+ _radius = radius;
+ }
+
+ public static Radius Zero
+ {
+ get => new Radius(0);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Radius operator -(Radius r)
+ {
+ return new Radius(-r._radius);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Radius operator -(Radius left, Radius Right)
+ {
+ return new Radius(left._radius - Right._radius);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator !=(Radius left, Radius right)
+ {
+ return left._radius != right._radius;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Radius operator *(Radius left, float right)
+ {
+ return new Radius(left._radius * right);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Radius operator /(Radius left, float right)
+ {
+ return new Radius(left._radius / right);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static float operator /(Radius left, Radius right)
+ {
+ return left._radius / right._radius;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Radius operator +(Radius left, Radius Right)
+ {
+ return new Radius(left._radius + Right._radius);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator ==(Radius left, Radius right)
+ {
+ return left._radius == right._radius;
+ }
+
+ public static implicit operator Degree(Radius r)
+ {
+ return new Degree((r._radius * 180) / Scalar.Pi);
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/IGeometry.cs b/StgSharp.Common/Geometries/IGeometry.cs
new file mode 100644
index 00000000..d88eb569
--- /dev/null
+++ b/StgSharp.Common/Geometries/IGeometry.cs
@@ -0,0 +1,57 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="IGeometry"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Geometries
+{
+ public interface IGeometry
+ {
+
+ public Point this[int index] { get; set; }
+
+ #pragma warning disable CA1819
+ public Vec4[] VertexStream
+ #pragma warning restore CA1819
+ { get; }
+
+ public CoordinationBase Coordination { get; }
+
+ public int VertexCount { get; }
+
+ public ReadOnlySpan VertexIndices { get; }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/IGeomtryBuffer.cs b/StgSharp.Common/Geometries/IGeomtryBuffer.cs
new file mode 100644
index 00000000..3cb80107
--- /dev/null
+++ b/StgSharp.Common/Geometries/IGeomtryBuffer.cs
@@ -0,0 +1,37 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="IGeomtryBuffer"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Geometries
+{
+ public interface IGeomtryBuffer { }
+}
diff --git a/StgSharp.Common/Geometries/IInstancing.cs b/StgSharp.Common/Geometries/IInstancing.cs
new file mode 100644
index 00000000..ecab0a6d
--- /dev/null
+++ b/StgSharp.Common/Geometries/IInstancing.cs
@@ -0,0 +1,73 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="IInstancing"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Numerics;
+using System.Security.Cryptography.X509Certificates;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Geometries
+{
+ public interface IInstancing
+ {
+
+ public float Rotation { get { return GlobalBuffer.CoordAndRotationList[BufferId].W; } set
+ {
+ Vec4 temp = GlobalBuffer.CoordAndRotationList[
+ BufferId];
+ temp.W = value;
+ GlobalBuffer.CoordAndRotationList[
+ BufferId] = temp;
+ } }
+
+ public float Scale { get { return GlobalBuffer.ScalingList[BufferId]; } set { GlobalBuffer.ScalingList[BufferId] = value; } }
+
+ public GeometryMotion Motion { get; set; }
+
+ public IInstancingBuffer GlobalBuffer { get; internal set; }
+
+ public int BufferId { get; internal set; }
+
+ public Vec3 CenterPositionGlobal { get; internal set; }
+
+ public Vec3 Coord { get { return GlobalBuffer.CoordAndRotationList[BufferId].XYZ; } set { GlobalBuffer.CoordAndRotationList[BufferId] = new Vec4(value.reg); } }
+
+ public void Move()
+ {
+ (Vec3 coord, float rotation) = (Coord, Rotation);
+ Motion.RunMotion(ref coord, ref rotation);
+ (Coord, Rotation) = (coord, rotation);
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/IInstancingBuffer.cs b/StgSharp.Common/Geometries/IInstancingBuffer.cs
new file mode 100644
index 00000000..654ccb99
--- /dev/null
+++ b/StgSharp.Common/Geometries/IInstancingBuffer.cs
@@ -0,0 +1,53 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="IInstancingBuffer"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace StgSharp.Geometries
+{
+ public interface IInstancingBuffer
+ {
+
+ public Span CoordAndRotationSpan { get; }
+
+ public Span ScalingSpan { get; }
+
+ internal IGeometry TypicalShape { get; }
+
+ internal List InstanceList { get; }
+
+ internal List CoordAndRotationList { get; }
+
+ internal List ScalingList { get; }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Cordinate.cs b/StgSharp.Common/Geometries/PlainGeometry/Cordinate.cs
new file mode 100644
index 00000000..6fa362cf
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Cordinate.cs
@@ -0,0 +1,78 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Cordinate"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Geometries
+{
+ [StructLayout(LayoutKind.Sequential)]
+ public struct PartialPlainCoordinate
+ {
+ /*
+ internal Matrix32 axis;
+
+ ///
+ /// The _origin of this coordinate.
+ ///
+ public Vec3 origin;
+
+ public PartialPlainCoordinate( Vec3 origin, Vec3 horiziontial, Vec3 vertical )
+ {
+ this.origin = origin;
+ axis = new Matrix32();
+ Unsafe.SkipInit( out axis.mat );
+ axis.colum0 = horiziontial;
+ axis.colum1 = vertical;
+ }
+
+ ///
+ /// The horizontial axis of the coordinate. Point to the right direction.
+ ///
+ public Vec3 axis_H => axis.colum0;
+
+ ///
+ /// The vertical axis of the coordinate. Point to the top direction.
+ ///
+ public Vec3 axis_V => axis.colum1;
+
+ [MethodImpl( MethodImplOptions.AggressiveInlining )]
+ public Vec3 GetRealLocate( Vec2 raletiveLocation )
+ {
+ return origin + axis.VerticalVecMultiply( raletiveLocation );
+ }
+ */
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Define/GeometryOperation.cs b/StgSharp.Common/Geometries/PlainGeometry/Define/GeometryOperation.cs
new file mode 100644
index 00000000..755b1762
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Define/GeometryOperation.cs
@@ -0,0 +1,45 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="GeometryOperation"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System.Runtime.CompilerServices;
+
+namespace StgSharp.Geometries
+{
+ public static unsafe class GeometryOperation
+ {
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vec3 DefaultMotion(int tick)
+ {
+ return default(Vec3);
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Define/IPlainEntity.cs b/StgSharp.Common/Geometries/PlainGeometry/Define/IPlainEntity.cs
new file mode 100644
index 00000000..375e0604
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Define/IPlainEntity.cs
@@ -0,0 +1,70 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="IPlainEntity"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Geometries
+{
+ public interface IPlainEntity
+ {
+
+ public Vec2 CenterPosition { get; set; }
+
+ public bool CollideWith(IPlainEntity entity);
+
+ }
+
+ public class PlainEntity : IPlainEntity
+ {
+
+ private PlainGeometry _shape;
+
+ public PlainEntity(PlainGeometry shape)
+ {
+ _shape = shape;
+ }
+
+ bool IPlainEntity.CollideWith(IPlainEntity entity)
+ {
+ throw new NotImplementedException();
+ }
+
+ Vec2 IPlainEntity.CenterPosition
+ {
+ get => _shape.Coordination.LocalOrigin.Coord.XY;
+ set => throw new InvalidOperationException();
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Define/ParticleOnPlain.cs b/StgSharp.Common/Geometries/PlainGeometry/Define/ParticleOnPlain.cs
new file mode 100644
index 00000000..02f2bba0
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Define/ParticleOnPlain.cs
@@ -0,0 +1,74 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="ParticleOnPlain"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Numerics;
+using System.Security.Cryptography.X509Certificates;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Geometries
+{
+ public class ParticleOnPlain : IInstancing, IPlainEntity
+ {
+
+ public ParticleOnPlain(PlainInstancingBuffer buffer)
+ {
+ if (buffer == null) {
+ throw new ArgumentNullException(paramName:nameof(buffer));
+ }
+ GlobalBuffer = buffer;
+ BufferId = buffer.CreateInstanceID();
+ ((IInstancingBuffer)buffer).InstanceList.Add(this);
+ }
+
+ public GeometryMotion Motion { get; set; }
+
+ public IInstancingBuffer GlobalBuffer { get; set; }
+
+ public int BufferId { get; set; }
+
+ Vec3 IInstancing.CenterPositionGlobal { get; set; }
+
+ bool IPlainEntity.CollideWith(IPlainEntity entity)
+ {
+ throw new NotImplementedException();
+ }
+
+ Vec2 IPlainEntity.CenterPosition
+ {
+ get => GlobalBuffer.CoordAndRotationList[BufferId].XY;
+ set => throw new NotImplementedException();
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Define/PlainGeometry.cs b/StgSharp.Common/Geometries/PlainGeometry/Define/PlainGeometry.cs
new file mode 100644
index 00000000..45e87a2e
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Define/PlainGeometry.cs
@@ -0,0 +1,67 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="PlainGeometry"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics;
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.ComponentModel;
+
+namespace StgSharp.Geometries
+{
+ ///
+ /// Plain geometry only contains straight sides.
+ ///
+ public abstract class PlainGeometry : IGeometry
+ {
+
+ protected Vec4[] vertexMat;
+ internal CoordinationBase coordinate;
+
+ internal PlainGeometry(CoordinationBase coordination)
+ {
+ coordinate = coordination;
+ }
+
+ public Point this[int index]
+ {
+ get => new Point(vertexMat[index]);
+ set => vertexMat[index].vec = value.coordVec;
+ }
+
+ public int VertexCount => this.vertexMat.Length;
+
+ public abstract ReadOnlySpan VertexIndices { get; }
+
+ #pragma warning disable CA1819
+ public Vec4[] VertexStream => vertexMat;
+
+ public CoordinationBase Coordination => this.coordinate;
+#pragma warning restore CA1819
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs b/StgSharp.Common/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs
new file mode 100644
index 00000000..452fcb6c
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs
@@ -0,0 +1,187 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="PlainInstancingBuffer"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+using StgSharp.Mathematics.Numeric;
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics.Contracts;
+using System.Linq;
+using System.Numerics;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace StgSharp.Geometries
+{
+ public class PlainInstancingBuffer : IDisposable, IEnumerable, IInstancingBuffer where T: IInstancing
+ {
+
+ private bool disposedValue;
+
+ private CoordinatePlain globalCoordinate;
+ private List coordList;
+ private List instanceList;
+ private List scalingList;
+ private Mutex mutex;
+
+ public PlainInstancingBuffer()
+ {
+ coordList = new List(capacity:100);
+ instanceList = new List(capacity:100);
+ scalingList = new List(capacity:100);
+ coordArray = Array.Empty();
+ scaleArray = Array.Empty();
+ mutex = new Mutex();
+ }
+
+ public List InstanceList
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => instanceList;
+ }
+
+ public List CoordAndRotationList
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => coordList;
+ }
+
+ public List ScalingList
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => scalingList;
+ }
+
+ public Span CoordAndRotationSpan
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => CollectionsMarshal.AsSpan(coordList);
+ }
+
+ public Span ScalingSpan
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => CollectionsMarshal.AsSpan(scalingList);
+ }
+
+ public int CreateInstanceID()
+ {
+ mutex.WaitOne();
+ int ret = instanceList.Count;
+ coordList.Add(new Vec4());
+ scalingList.Add(0);
+ mutex.ReleaseMutex();
+ return ret;
+ }
+
+ // ~PlainInstancingBuffer()
+ // {
+ // Dispose(disposing: false);
+ // }
+
+ public void Dispose()
+ {
+ Dispose(disposing:true);
+ GC.SuppressFinalize(this);
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ foreach (IInstancing item in instanceList) {
+ yield return (T)item;
+ }
+ }
+
+ public void Remove(T instance)
+ {
+ mutex.WaitOne();
+ if (instance.GlobalBuffer != this) {
+ throw new ArgumentException(
+ message:"instance does not belong to current Particle Buffer",
+ paramName:nameof(instance));
+ }
+ int index = instance.BufferId;
+ IInstancing temp = instanceList[^1];
+ instanceList[instance.BufferId] = temp;
+ temp.BufferId = instance.BufferId;
+
+ coordList[instance.BufferId] = coordList[^1];
+ scalingList[instance.BufferId] = scalingList[^1];
+
+ instanceList.RemoveAt(instanceList.Count - 1);
+ coordList.RemoveAt(coordList.Count - 1);
+ scalingList.RemoveAt(scalingList.Count - 1);
+ mutex.ReleaseMutex();
+ }
+
+ public void UpdateAllParticles()
+ {
+ foreach (IInstancing particle in instanceList) {
+ particle.Move();
+ }
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!disposedValue)
+ {
+ if (disposing) {
+ mutex.Dispose();
+ }
+
+ coordList.Clear();
+ instanceList.Clear();
+ scalingList.Clear();
+ disposedValue = true;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ foreach (IInstancing item in instanceList) {
+ yield return (T)item;
+ }
+ }
+
+ IGeometry IInstancingBuffer.TypicalShape => throw new NotImplementedException();
+
+ #region field of mem opt
+
+ private Vec4[] coordArray;
+ private float[] scaleArray;
+
+ #endregion
+ }
+}
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Parallelogram.cs b/StgSharp.Common/Geometries/PlainGeometry/Parallelogram.cs
new file mode 100644
index 00000000..cacdf6ed
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Parallelogram.cs
@@ -0,0 +1,78 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Parallelogram"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+
+namespace StgSharp.Geometries
+{
+ public class Parallelogram : Polygon4
+ {
+
+ internal readonly Func movCenterOperation = GeometryOperation.DefaultMotion;
+
+ internal Point center;
+
+ public Parallelogram(float v0x, float v0y, float v1x, float v1y, float v2x, float v2y, float v3x, float v3y)
+ : base(v0x, v0y, v1x, v1y, v2x, v2y, v3x, v3y)
+ {
+ #if DEBUG
+ if (this[0].Coord + this[2].Coord != this[1].Coord + this[3].Coord)
+ {
+ DefaultLog.InternalWriteLog(
+ "Init of geometry item failed, because four vertices cannot form a rectangle.",
+ LogType.Warning);
+ }
+ #endif
+ }
+
+ public Parallelogram(
+ PlainCoordinate coordination,
+ float v0x,
+ float v0y,
+ float v1x,
+ float v1y,
+ float v2x,
+ float v2y,
+ float v3x,
+ float v3y)
+ : base(coordination, v0x, v0y, v1x, v1y, v2x, v2y, v3x, v3y)
+ {
+ #if DEBUG
+ if (this[0].Coord + this[2].Coord != this[1].Coord + this[3].Coord)
+ {
+ DefaultLog.InternalWriteLog(
+ "Init of geometry item failed, because four vertices cannot form a rectangle.",
+ LogType.Warning);
+ }
+ #endif
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Plain.cs b/StgSharp.Common/Geometries/PlainGeometry/Plain.cs
new file mode 100644
index 00000000..ccb02f9a
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Plain.cs
@@ -0,0 +1,86 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Plain"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System.Numerics;
+
+namespace StgSharp.Geometries
+{
+ public unsafe class Plain
+ {
+
+ internal readonly float d = -1;
+ internal Vec3 _origin;
+
+ internal Vec3 plainParameter;
+ internal Vec3 vec1;
+ internal Vec3 vec2;
+
+ public Plain(Vec3 o, Vec3 v1, Vec3 v2)
+ {
+ this._origin = o;
+ this.vec1 = v1 - (v2 * (v1.Y / v2.Y)); //xz
+ this.vec2 = v2 - (vec1 * (v2.X / v1.X)); //yz
+
+ // |_origin|-k1*|vec1|-k2*|vec2| --> plainParameter.Z;
+ plainParameter.Z = _origin.Z - (vec1.Z * (_origin.X / vec1.X)) - (vec2.Z * (_origin.Y / vec2.Y));
+
+ // plainParameter.Z -> plainParameter.X, plainParameter.Y
+ plainParameter.X = vec1.X * (vec1.Z / plainParameter.Z);
+ plainParameter.Y = vec2.Y * (vec2.Z / plainParameter.Z);
+
+ plainParameter.X = 1 / plainParameter.X;
+ plainParameter.Y = 1 / plainParameter.Y;
+ plainParameter.Z = 1 / plainParameter.Z;
+ }
+
+ public Plain(Point p1, Point p2, Point p3)
+ {
+ Vec3 origin = p1.Coord;
+ Vec3 v1 = p2.Coord - origin;
+ Vec3 v2 = p3.Coord - origin;
+
+
+ vec1 = v1 - (v2 * (v1.Y / v2.Y)); //xz
+ vec2 = v2 - (vec1 * (v2.X / v1.X)); //yz
+
+ // |_origin|-k1*|vec1|-k2*|vec2| --> plainParameter.Z;
+ plainParameter.Z = origin.Z - (vec1.Z * (origin.X / vec1.X)) - (vec2.Z * (origin.Y / vec2.Y));
+
+ // plainParameter.Z --> plainParameter.X, plainParameter.Y
+ plainParameter.X = vec1.X * (vec1.Z / plainParameter.Z);
+ plainParameter.Y = vec2.Y * (vec2.Z / plainParameter.Z);
+
+ plainParameter.X = 1 / plainParameter.X;
+ plainParameter.Y = 1 / plainParameter.Y;
+ plainParameter.Z = 1 / plainParameter.Z;
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Polygon4.cs b/StgSharp.Common/Geometries/PlainGeometry/Polygon4.cs
new file mode 100644
index 00000000..007569c0
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Polygon4.cs
@@ -0,0 +1,121 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Polygon4"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Numerics;
+
+namespace StgSharp.Geometries
+{
+ public class Polygon4 : PlainGeometry
+ {
+
+ protected static int[] Indices = [
+ 0,
+ 1,
+ 2,
+ 0,
+ 2,
+ 3
+ ];
+
+ internal Polygon4()
+ : base(PlainCoordinate.StandardPlainCoordination)
+ {
+ vertexMat = new Vec4[4];
+ }
+
+ internal Polygon4(Vec4[] rawCoord)
+ : base(PlainCoordinate.StandardPlainCoordination)
+ {
+ if (rawCoord.Length != 4) {
+ throw new ArgumentOutOfRangeException(nameof(rawCoord));
+ }
+ vertexMat = rawCoord;
+ }
+
+ public Polygon4(Point topLeft, Point topRight, Point bottomRight, Point bottomLeft)
+ : base(PlainCoordinate.StandardPlainCoordination)
+ {
+ this[0] = topLeft;
+ this[1] = topRight;
+ this[2] = bottomRight;
+ this[3] = bottomLeft;
+ }
+
+ public Polygon4(
+ CoordinationBase coordinate,
+ PlainCoordinate coordination,
+ Point topLeft,
+ Point topRight,
+ Point bottomRight,
+ Point bottomLeft)
+ : base(coordinate)
+ {
+ this[0] = topLeft;
+ this[1] = topRight;
+ this[2] = bottomRight;
+ this[3] = bottomLeft;
+ }
+
+ public Polygon4(float v0x, float v0y, float v1x, float v1y, float v2x, float v2y, float v3x, float v3y)
+ : base(PlainCoordinate.StandardPlainCoordination)
+ {
+ vertexMat = new Vec4[4];
+
+ this[0] = new Point(v0x, v0y, 0);
+ this[1] = new Point(v1x, v1y, 0);
+ this[2] = new Point(v2x, v2y, 0);
+ this[3] = new Point(v3x, v3y, 0);
+ }
+
+ public Polygon4(
+ PlainCoordinate coordination,
+ float v0x,
+ float v0y,
+ float v1x,
+ float v1y,
+ float v2x,
+ float v2y,
+ float v3x,
+ float v3y)
+ : base(coordination)
+ {
+ vertexMat = new Vec4[4];
+
+ this[0] = new Point(v0x, v0y, 0);
+ this[1] = new Point(v1x, v1y, 0);
+ this[2] = new Point(v2x, v2y, 0);
+ this[3] = new Point(v3x, v3y, 0);
+ }
+
+ public override ReadOnlySpan VertexIndices => Indices;
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Polygon5.cs b/StgSharp.Common/Geometries/PlainGeometry/Polygon5.cs
new file mode 100644
index 00000000..320dddda
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Polygon5.cs
@@ -0,0 +1,103 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Polygon5"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Numerics;
+
+namespace StgSharp.Geometries
+{
+ public unsafe class Polygon5 : PlainGeometry
+ {
+
+ internal static int[] Indices = [
+ 0,
+ 1,
+ 2,
+ 0,
+ 2,
+ 3,
+ 0,
+ 3,
+ 4
+ ];
+
+ public unsafe Polygon5()
+ : base(PlainCoordinate.StandardPlainCoordination)
+ {
+ vertexMat = new Vec4[5];
+ }
+
+ public Polygon5(
+ float v0x,
+ float v0y,
+ float v1x,
+ float v1y,
+ float v2x,
+ float v2y,
+ float v3x,
+ float v3y,
+ float v4x,
+ float v4y)
+ : base(PlainCoordinate.StandardPlainCoordination)
+ {
+ vertexMat = new Vec4[5];
+ this[0] = new Point(v0x, v0y, 0);
+ this[1] = new Point(v1x, v1y, 0);
+ this[2] = new Point(v2x, v2y, 0);
+ this[3] = new Point(v3x, v3y, 0);
+ this[4] = new Point(v4x, v4y, 0);
+ }
+
+ public Polygon5(
+ PlainCoordinate coordination,
+ float v0x,
+ float v0y,
+ float v1x,
+ float v1y,
+ float v2x,
+ float v2y,
+ float v3x,
+ float v3y,
+ float v4x,
+ float v4y)
+ : base(coordination)
+ {
+ vertexMat = new Vec4[5];
+ this[0] = new Point(v0x, v0y, 0);
+ this[1] = new Point(v1x, v1y, 0);
+ this[2] = new Point(v2x, v2y, 0);
+ this[3] = new Point(v3x, v3y, 0);
+ this[4] = new Point(v4x, v4y, 0);
+ }
+
+ public override ReadOnlySpan VertexIndices => Indices;
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Polygon6.cs b/StgSharp.Common/Geometries/PlainGeometry/Polygon6.cs
new file mode 100644
index 00000000..3cd6d964
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Polygon6.cs
@@ -0,0 +1,84 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Polygon6"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Numerics;
+
+namespace StgSharp.Geometries
+{
+ public class Polygon6 : PlainGeometry
+ {
+
+ internal static int[] Indices = [
+ 0,
+ 1,
+ 2,
+ 0,
+ 2,
+ 3,
+ 0,
+ 3,
+ 4,
+ 0,
+ 4,
+ 5
+ ];
+
+ public Polygon6()
+ : base(PlainCoordinate.StandardPlainCoordination)
+ {
+ vertexMat = new Vec4[6];
+ }
+
+ public Polygon6(
+ PlainCoordinate coordination,
+ Vec2 vert0,
+ Vec2 vert1,
+ Vec2 vert2,
+ Vec2 vert3,
+ Vec2 vert4,
+ Vec2 vert5,
+ Vec2 vert6)
+ : base(coordination)
+ {
+ vertexMat = new Vec4[6];
+ vertexMat[0].reg = vert0.reg;
+ vertexMat[1].reg = vert1.reg;
+ vertexMat[2].reg = vert2.reg;
+ vertexMat[3].reg = vert3.reg;
+ vertexMat[4].reg = vert4.reg;
+ vertexMat[5].reg = vert5.reg;
+ vertexMat[6].reg = vert6.reg;
+ }
+
+ public override ReadOnlySpan VertexIndices => Indices;
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Rectangle.cs b/StgSharp.Common/Geometries/PlainGeometry/Rectangle.cs
new file mode 100644
index 00000000..56389b05
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Rectangle.cs
@@ -0,0 +1,87 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Rectangle"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Numerics;
+
+namespace StgSharp.Geometries
+{
+ public class Rectangle : Parallelogram
+ {
+
+ public Rectangle(float v0x, float v0y, float v1x, float v1y, float v2x, float v2y, float v3x, float v3y)
+ : base(v0x, v0y, v1x, v1y, v2x, v2y, v3x, v3y)
+ {
+ #if DEBUG
+ Vec2 side0 = (this[0].Coord - this[1].Coord).XY;
+ Vec2 side1 = (this[2].Coord - this[1].Coord).XY;
+ if (side0.Cross(side1) == 0) {
+ throw new ArgumentException();
+ }
+ #endif
+ }
+
+ public Rectangle(
+ PlainCoordinate coordination,
+ float v0x,
+ float v0y,
+ float v1x,
+ float v1y,
+ float v2x,
+ float v2y,
+ float v3x,
+ float v3y)
+ : base(coordination, v0x, v0y, v1x, v1y, v2x, v2y, v3x, v3y)
+ {
+ #if DEBUG
+ Vec2 side0 = (this[0].Coord - this[1].Coord).XY;
+ Vec2 side1 = (this[2].Coord - this[1].Coord).XY;
+ if (side0.Cross(side1) == 0) {
+ throw new ArgumentException();
+ }
+ #endif
+ }
+
+ ///
+ /// Calculate movement to center
+ ///
+ ///
+ /// CurrentPipeline time tick
+ ///
+ ///
+ ///
+ ///
+ public virtual Vec3 MovCenter(uint tick)
+ {
+ return default(Vec3);
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Square.cs b/StgSharp.Common/Geometries/PlainGeometry/Square.cs
new file mode 100644
index 00000000..15f04494
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Square.cs
@@ -0,0 +1,47 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Square"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+
+using System.Numerics;
+
+namespace StgSharp.Geometries
+{
+ ///
+ /// A square
+ ///
+ public class Square : Rectangle
+ {
+
+ public Square(float v0x, float v0y, float v1x, float v1y, float v2x, float v2y, float v3x, float v3y)
+ : base(v0x, v0y, v1x, v1y, v2x, v2y, v3x, v3y)
+ {
+ if (true) { }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Geometries/PlainGeometry/Triangle.cs b/StgSharp.Common/Geometries/PlainGeometry/Triangle.cs
new file mode 100644
index 00000000..e35b018c
--- /dev/null
+++ b/StgSharp.Common/Geometries/PlainGeometry/Triangle.cs
@@ -0,0 +1,87 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Triangle"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics;
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Numerics;
+
+namespace StgSharp.Geometries
+{
+ public unsafe class Triangle : PlainGeometry
+ {
+
+ internal static int[] Indices = [
+ 0,
+ 1,
+ 2
+ ];
+
+ public Triangle()
+ : base(PlainCoordinate.StandardPlainCoordination)
+ {
+ vertexMat = new Vec4[3];
+ }
+
+ public Triangle(Point vertex01, Point vertex02, Point vertex03)
+ : base(PlainCoordinate.StandardPlainCoordination)
+ {
+ this[0] = vertex01;
+ this[1] = vertex02;
+ this[2] = vertex03;
+ }
+
+ public Triangle(PlainCoordinate coordination, Point vertex01, Point vertex02, Point vertex03)
+ : base(coordination)
+ {
+ this[0] = vertex01;
+ this[1] = vertex02;
+ this[2] = vertex03;
+ }
+
+ public Triangle(float v0x, float v0y, float v1x, float v1y, float v2x, float v2y)
+ : base(PlainCoordinate.StandardPlainCoordination)
+ {
+ this[0] = new Point(v0x, v0y, 0);
+ this[1] = new Point(v1x, v1y, 0);
+ this[2] = new Point(v2x, v2y, 0);
+ }
+
+ public Triangle(PlainCoordinate coordination, float v0x, float v0y, float v1x, float v1y, float v2x, float v2y)
+ : base(coordination)
+ {
+ this[0] = new Point(v0x, v0y, 0);
+ this[1] = new Point(v1x, v1y, 0);
+ this[2] = new Point(v2x, v2y, 0);
+ }
+
+ public override ReadOnlySpan VertexIndices => Indices;
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/Point.cs b/StgSharp.Common/Geometries/Point.cs
new file mode 100644
index 00000000..96a8db7c
--- /dev/null
+++ b/StgSharp.Common/Geometries/Point.cs
@@ -0,0 +1,70 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Point"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections.Generic;
+using System.Numerics;
+using System.Runtime.InteropServices;
+using System.Text;
+
+namespace StgSharp.Geometries
+{
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public struct Point
+ {
+
+ [FieldOffset(0)] private Vec3 coord;
+ [FieldOffset(0)] internal Vector4 coordVec;
+
+ internal Point(Vec4 vector)
+ {
+ coordVec = vector.vec;
+ coordVec.W = 1;
+ }
+
+ public Point(Vec3 coord)
+ {
+ Coord = coord;
+ coordVec.W = 1;
+ }
+
+ public Point(float x, float y, float z)
+ {
+ coordVec = new Vector4(x, y, z, 1);
+ }
+
+ public Vec3 Coord
+ {
+ get => coord;
+ set { coord = value; }
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Geometries/SpaceGeometry/Class1.cs b/StgSharp.Common/Geometries/SpaceGeometry/Class1.cs
new file mode 100644
index 00000000..60e2a685
--- /dev/null
+++ b/StgSharp.Common/Geometries/SpaceGeometry/Class1.cs
@@ -0,0 +1,35 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Class1"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace StgSharp.Geometries.SpaceGeometry
+{
+ internal class Class1 { }
+}
diff --git a/StgSharp.Common/Geometries/SpaceGeometry/TriangulatedSurface.cs b/StgSharp.Common/Geometries/SpaceGeometry/TriangulatedSurface.cs
new file mode 100644
index 00000000..ee9a7611
--- /dev/null
+++ b/StgSharp.Common/Geometries/SpaceGeometry/TriangulatedSurface.cs
@@ -0,0 +1,146 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="TriangulatedSurface"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.HighPerformance;
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Graphic;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.Intrinsics;
+using System.Text;
+
+namespace StgSharp.Geometries
+{
+ public class TriangulatedSurface
+ {
+
+ private HashSet<(int begin,int end)> _sides;
+
+ private List> _sideIndices;
+ private List _triangleIndices;
+ private List _vertices;
+
+ public TriangulatedSurface()
+ {
+ _triangleIndices = new List();
+ _vertices = new List();
+ _sides = new HashSet<(int,int)>();
+ _sideIndices = new List>();
+ }
+
+ /**/
+ public IEnumerable> SideIndicesEnumeratble
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => _sideIndices ;
+ }
+
+ /*
+ public Triangle GetTriangle( int index )
+ {
+ Vec3HP v1,v2,v3;
+ int t = index * 3;
+ v1 = _vertices[ t + 0 ];
+ v2 = _vertices[ t + 1 ];
+ v3 = _vertices[ t + 2 ];
+ return new Triangle( v1, v2, v3 );
+ }
+ /**/
+
+ public Span VertexSpan
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => CollectionsMarshal.AsSpan(_vertices);
+ }
+
+ public Span TriangleIndicesSpan
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => CollectionsMarshal.AsSpan(_triangleIndices);
+ }
+
+ /**/
+ public void AddIndicesByOrder(int v1, int v2, int v3)
+ {
+ _triangleIndices.Add(v1);
+ _triangleIndices.Add(v2);
+ _triangleIndices.Add(v3);
+ if (!(_sides.Remove((v1,v2)) || _sides.Remove((v2, v1)))) {
+ _ = _sides.Add((v1, v2));
+ }
+ if (!(_sides.Remove((v2, v3)) || _sides.Remove((v3, v2)))) {
+ _ = _sides.Add((v2, v3));
+ }
+ if (!(_sides.Remove((v3, v1)) || _sides.Remove((v1, v3)))) {
+ _ = _sides.Add((v3, v1));
+ }
+ }
+
+ public void AddVertexByOrder(Vec3 vertex)
+ {
+ _vertices.Add(vertex);
+ }
+
+ public int TriangleCount()
+ {
+ return _triangleIndices.Count / 3;
+ }
+
+ public void TrimExcess()
+ {
+ _triangleIndices.TrimExcess();
+ _vertices.TrimExcess();
+ Dictionary side_dictionary = _sides.ToDictionary(x => x.begin, x => x.end);
+ int begin = side_dictionary.First().Key;
+ List sideLoop = new(begin);
+ _sideIndices.Add(sideLoop);
+ while (side_dictionary.Count > 0)
+ {
+ if (side_dictionary.Remove(begin, out begin))
+ {
+ sideLoop.Add(begin);
+ } else
+ {
+ begin = side_dictionary.First().Key;
+ sideLoop = new List(begin);
+ _sideIndices.Add(sideLoop);
+ }
+ }
+ _sideIndices.TrimExcess();
+ }
+
+ public int VertexCount()
+ {
+ return _vertices.Count;
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Global.cs b/StgSharp.Common/Global.cs
new file mode 100644
index 00000000..b4d9803e
--- /dev/null
+++ b/StgSharp.Common/Global.cs
@@ -0,0 +1,96 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Global"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+global using StgSharp.Internal;
+global using StgSharp.Internal.Intrinsic;
+global
+
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+
+[assembly: InternalsVisibleTo("StgSharp.Mathematics")]
+
+[assembly: SuppressMessage(
+ "Design",
+ "CA1008:枚举应具有零值",
+ Justification = "<挂起>",
+ Scope = "type",
+ Target = "~T:StgSharp.Graphics.OpenGL.ShaderStatus")]
+[assembly: SuppressMessage(
+ "Naming",
+ "CA1715:标识符应具有正确的前缀",
+ Justification = "<挂起>",
+ Scope = "member",
+ Target = "~M:StgSharp.Graphics.OpenGL.ShaderProgram.GetUniform``2(System.String)~StgSharp.Graphics.OpenGL.Uniform{``0,``1}")]
+[assembly: SuppressMessage(
+ "Naming",
+ "CA1715:标识符应具有正确的前缀",
+ Justification = "<挂起>",
+ Scope = "member",
+ Target = "~M:StgSharp.Graphics.OpenGL.ShaderProgram.GetUniform``3(System.String)~StgSharp.Graphics.OpenGL.Uniform{``0,``1,``2}")]
+[assembly: SuppressMessage(
+ "Naming",
+ "CA1715:标识符应具有正确的前缀",
+ Justification = "<挂起>",
+ Scope = "member",
+ Target = "~M:StgSharp.Graphics.OpenGL.ShaderProgram.GetUniform``4(System.String)~StgSharp.Graphics.OpenGL.Uniform{``0,``1,``2,``3}")]
+[assembly: SuppressMessage(
+ "Naming",
+ "CA1715:标识符应具有正确的前缀",
+ Justification = "<挂起>",
+ Scope = "type",
+ Target = "~T:StgSharp.Graphics.OpenGL.Uniform`4")]
+[assembly: SuppressMessage(
+ "Design",
+ "CA1043:将整型或字符串参数用于索引器",
+ Justification = "<挂起>",
+ Scope = "member",
+ Target = "~P:StgSharp.MVVM.ViewBase.IViewResponder`1.Item(StgSharp.Controlling.UsrActivity.ITrigger)")]
+[assembly: SuppressMessage(
+ "Design",
+ "CA1043:将整型或字符串参数用于索引器",
+ Justification = "<挂起>",
+ Scope = "member",
+ Target = "~P:StgSharp.MVVM.ViewBase.ViewResponder`1.Item(StgSharp.Controlling.UsrActivity.ITrigger)")]
+[assembly: SuppressMessage(
+ "Performance",
+ "CA1864:首选 \"IDictionary.TryAdd(TKey, TValue)\" 方法",
+ Justification = "<挂起>",
+ Scope = "member",
+ Target = "~P:StgSharp.MVVM.ViewBase.ViewRender`1.Item(System.String)")]
+[assembly: SuppressMessage(
+ "Design",
+ "CA1033:接口方法应可由子类型调用",
+ Justification = "<挂起>",
+ Scope = "member",
+ Target = "~P:StgSharp.Collections.IBidirectionalDictionary`2.System#Collections#Generic#IDictionary#Keys")]
+[assembly: SuppressMessage(
+ "Design",
+ "CA1033:接口方法应可由子类型调用",
+ Justification = "<挂起>",
+ Scope = "member",
+ Target = "~P:StgSharp.Collections.IBidirectionalDictionary`2.System#Collections#Generic#IDictionary#Values")]
diff --git a/StgSharp.Common/Graphics/CPUanimation/IImageProvider.cs b/StgSharp.Common/Graphics/CPUanimation/IImageProvider.cs
new file mode 100644
index 00000000..63095bd9
--- /dev/null
+++ b/StgSharp.Common/Graphics/CPUanimation/IImageProvider.cs
@@ -0,0 +1,40 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="IImageProvider"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace StgSharp.Graphics
+{
+ public interface IImageProvider
+ {
+
+ Image ProvideImage();
+
+ }
+}
diff --git a/StgSharp.Common/Graphics/CPUanimation/ImageHelper.cs b/StgSharp.Common/Graphics/CPUanimation/ImageHelper.cs
new file mode 100644
index 00000000..559e4f06
--- /dev/null
+++ b/StgSharp.Common/Graphics/CPUanimation/ImageHelper.cs
@@ -0,0 +1,83 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="ImageHelper"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Text;
+
+namespace StgSharp.Graphics
+{
+ public static class ImageHelper
+ {
+
+ public static void Resize(Image i, int width, int height, ImageMovement move)
+ {
+ if (i == null) {
+ throw new ArgumentNullException(nameof(i));
+ }
+ if (i.Size == (width, height)) {
+ return;
+ }
+ if (!Enum.IsDefined(typeof(ImageMovement), move)) {
+ throw new InvalidEnumArgumentException(nameof(move));
+ }
+ byte[] oldData = i.Data;
+ i.Data = new byte[width * height * i.PixelSize];
+ i.Height = height;
+ i.Width = width;
+ i.PixelUpdateCount++;
+ switch (move)
+ {
+ case ImageMovement.Discard:
+ break;
+ case ImageMovement.Top:
+ break;
+ default:
+ throw new NotImplementedException();
+ }
+ }
+
+ }
+
+ [Flags]
+ public enum ImageMovement
+ {
+#pragma warning disable CA1008
+ Discard = 0,
+ #pragma warning restore CA1008
+ Top = 1,
+ Bottom = 2,
+ Left = 4,
+ Right = 8,
+ TopLeft = Top | Left,
+ BottomLeft = Bottom | Left,
+ TopRight = Top | Right,
+ BottomRight = Bottom | Right,
+
+ }
+}
diff --git a/StgSharp.Common/Graphics/Define/BufferObjectBase.cs b/StgSharp.Common/Graphics/Define/BufferObjectBase.cs
new file mode 100644
index 00000000..7047e002
--- /dev/null
+++ b/StgSharp.Common/Graphics/Define/BufferObjectBase.cs
@@ -0,0 +1,86 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="BufferObjectBase"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics;
+using StgSharp.Graphics.OpenGL;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Graphics
+{
+ ///
+ /// Interface of all kinds OpenGL BufferHandle objects
+ ///
+ public abstract class BufferObjectBase : IDisposable
+ {
+
+ protected GlHandle[] _bufferHandle;
+ protected RenderStream binding;
+
+ ///
+ /// Get the only handle to one of the Object instance
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public GlHandle this[int index] => _bufferHandle[index];
+
+ ///
+ /// Bind a BufferHandle instance to OpenGL
+ ///
+ ///
+ /// Index of handle of the object in this instance to be bind
+ ///
+ public abstract void Bind(int index);
+
+ public void Dispose()
+ {
+ Dispose(disposing:true);
+ GC.SuppressFinalize(this);
+ }
+
+ ///
+ public override string ToString()
+ {
+ return $"This is a {GetType().FullName}, containing {_bufferHandle.Length} buffer handles: {_bufferHandle.ToString()}.";
+ }
+
+ protected abstract void Dispose(bool disposing);
+
+ ~BufferObjectBase()
+ {
+ Dispose(disposing:false);
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Graphics/IGraphicAPIs.cs b/StgSharp.Common/Graphics/IGraphicAPIs.cs
new file mode 100644
index 00000000..823c60f1
--- /dev/null
+++ b/StgSharp.Common/Graphics/IGraphicAPIs.cs
@@ -0,0 +1,40 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="IGraphicAPIs"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace StgSharp.Graphics
+{
+ public interface IGraphicAPIs
+ {
+
+ public IntPtr GraphicApiPackageHandle { get; }
+
+ }
+}
diff --git a/StgSharp.Common/Graphics/Image.cs b/StgSharp.Common/Graphics/Image.cs
new file mode 100644
index 00000000..102a4350
--- /dev/null
+++ b/StgSharp.Common/Graphics/Image.cs
@@ -0,0 +1,191 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Image"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics.OpenGL;
+
+using System;
+using System.Runtime.CompilerServices;
+
+namespace StgSharp.Graphics
+{
+ public class Image : ISSDSerializable, IImageProvider
+ {
+
+ private byte[] _data;
+ private ImageInfo _rawInfo;
+ private int _pixelUpdateCount = 0;
+
+ internal unsafe Image()
+ {
+ _rawInfo = new ImageInfo();
+ }
+
+ internal Image(ImageInfo information)
+ {
+ _rawInfo = information;
+ _data = [];
+
+ // int length = _rawInfo.width * _rawInfo.height * _rawInfo.channel;
+ }
+
+ public (int width, int height) Size
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get => (_rawInfo.Width, _rawInfo.Height);
+ }
+
+ public byte[] PixelBuffer
+ {
+ get
+ {
+ if ((_data.Length == 0) || (_data == null))
+ {
+ GetBytes();
+ return _data!;
+ }
+ return _data;
+ }
+ }
+
+ public ImageChannel Channel => _rawInfo.Channel;
+
+ ///
+ /// Hash code of time pixels updated last time.
+ ///
+ public int PixelUpdateCount
+ {
+ get => _pixelUpdateCount;
+ internal set => _pixelUpdateCount = value;
+ }
+
+ public int ChannelCount => _rawInfo.ChannelCount;
+
+ public int Height
+ {
+ get => _rawInfo.Height;
+ internal set => _rawInfo.Height = value;
+ }
+
+ public int Width
+ {
+ get => _rawInfo.Width;
+ internal set => _rawInfo.Width = value;
+ }
+
+ public int PixelSize => ImageInfo.GetPixelSize(_rawInfo.pixelLayout, _rawInfo.Channel);
+
+ public PixelChannelLayout PixelLayout
+ {
+ get => _rawInfo.pixelLayout;
+ private set => _rawInfo.pixelLayout = value;
+ }
+
+ public SerializableTypeCode SSDTypeCode => SerializableTypeCode.PixelImage;
+
+ internal ref byte[] Data => ref _data;
+
+ public void FromBytes(byte[] stream) { }
+
+ public static unsafe Image FromFile(string route, ImageLoader loader)
+ {
+ Image ret = new Image();
+ fixed (ImageInfo* iptr = &ret._rawInfo) {
+ GraphicFramework.InternalLoadImage(route, iptr, loader);
+ }
+ return ret;
+ }
+
+ public static Image FromMemory((int width, int height) size, ImageChannel channel, byte[] stream)
+ {
+ ImageInfo _info = new ImageInfo
+ {
+ Height = size.height,
+ Width = size.width,
+ Channel = channel,
+ StreamPtr = IntPtr.Zero
+ };
+ Image ret = new Image(_info);
+ ret.PixelLayout = PixelChannelLayout.Byte;
+ ret._data = stream;
+ return ret;
+ }
+
+ public static Image FromMemory(
+ (int width, int height) size,
+ ImageChannel channel,
+ PixelChannelLayout layout,
+ byte[] stream)
+ {
+ ImageInfo _info = new ImageInfo
+ {
+ Height = size.height,
+ Width = size.width,
+ Channel = channel,
+ StreamPtr = IntPtr.Zero
+ };
+ Image ret = new Image(_info);
+ ret.PixelLayout = layout;
+ ret._data = stream;
+ return ret;
+ }
+
+ public unsafe byte[] GetBytes()
+ {
+ if (_data.Length == 0)
+ {
+ int size = Width * Height * ImageInfo.GetPixelSize(PixelLayout, Channel);
+ _data = new Span((byte*)_rawInfo.StreamPtr, size).ToArray();
+ fixed (ImageInfo* pptr = &_rawInfo) {
+ GraphicFramework.InternalUnloadImage(pptr);
+ }
+ _rawInfo.StreamPtr = IntPtr.Zero;
+ }
+ return _data;
+ }
+
+ public Image ProvideImage()
+ {
+ return this;
+ }
+
+ internal static Image FromMemory(ImageInfo info, byte[] data, int operationCount)
+ {
+ return new Image
+ {
+ _rawInfo = info,
+ _data = data,
+ _pixelUpdateCount = operationCount
+ };
+ }
+
+ byte[] ISSDSerializable.GetBytes()
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Graphics/ImageInfo.cs b/StgSharp.Common/Graphics/ImageInfo.cs
new file mode 100644
index 00000000..9bd73916
--- /dev/null
+++ b/StgSharp.Common/Graphics/ImageInfo.cs
@@ -0,0 +1,162 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="ImageInfo"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics.OpenGL;
+using System;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Text;
+
+namespace StgSharp.Graphics
+{
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
+ public delegate IntPtr ImageLoader(
+ string name,
+ ref int width,
+ ref int height,
+ ref int definedChannel,
+ int desiredChannel);
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct ImageInfo
+ {
+
+ private ImageChannel channel;
+ private int height;
+ private int width;
+ private IntPtr pixelPtr;
+ internal PixelChannelLayout pixelLayout;
+
+ public ImageChannel Channel
+ {
+ get => channel;
+ set { channel = value; }
+ }
+
+ public int ChannelCount
+ {
+ get => GetChannelCount(channel);
+ }
+
+ public int Height
+ {
+ get => height;
+ set => height = value;
+ }
+
+ public int StreamSize
+ {
+ get => width * height * GetPixelSize(
+ pixelLayout, channel);
+ }
+
+ public int Width
+ {
+ get => width;
+ set => width = value;
+ }
+
+ public IntPtr StreamPtr
+ {
+ get => pixelPtr;
+ internal set => pixelPtr = value;
+ }
+
+ public override int GetHashCode()
+ {
+ int hash = 17;
+ hash = (hash * 17) + width;
+ hash = (hash * 17) + height;
+ hash = (hash * 17) + (int)channel;
+ return hash;
+ }
+
+ public override string ToString()
+ {
+ return $"{channel}\t{width}\t{height}\t{(ulong)StreamPtr}";
+ }
+
+ internal static int GetChannelCount(ImageChannel channel)
+ {
+ return channel switch
+ {
+ ImageChannel.SingleColor => 1,
+ ImageChannel.DoubleColor => 2,
+ ImageChannel.TripleColor => 3,
+ ImageChannel.WithAlphaChannel => 4,
+ _ => throw new InvalidCastException(
+ "Unknown color channel decoding setting.")
+ };
+ }
+
+ internal static int GetPixelSize(PixelChannelLayout layout, ImageChannel channel)
+ {
+ return layout switch
+ {
+ PixelChannelLayout.UByte => sizeof(byte) * GetChannelCount(
+ channel),
+ PixelChannelLayout.Byte => sizeof(byte) * GetChannelCount(
+ channel),
+ PixelChannelLayout.UShort => sizeof(short) * GetChannelCount(
+ channel),
+ PixelChannelLayout.Short => sizeof(short) * GetChannelCount(
+ channel),
+ PixelChannelLayout.UInt => sizeof(int) * GetChannelCount(
+ channel),
+ PixelChannelLayout.Int => sizeof(int) * GetChannelCount(
+ channel),
+ PixelChannelLayout.Float => sizeof(float) * GetChannelCount(
+ channel),
+ PixelChannelLayout.UByte332 => sizeof(byte),
+ PixelChannelLayout.UByte233Rev => sizeof(byte),
+ PixelChannelLayout.UShort565 => sizeof(short),
+ PixelChannelLayout.UShort565Rev => sizeof(short),
+ PixelChannelLayout.UShort4444 => sizeof(short),
+ PixelChannelLayout.UShort4444Rev => sizeof(short),
+ PixelChannelLayout.UShort5551 => sizeof(short),
+ PixelChannelLayout.UShort1555Rev => sizeof(short),
+ PixelChannelLayout.UInt8888 => sizeof(int),
+ PixelChannelLayout.UInt8888Rev => sizeof(int),
+ PixelChannelLayout.UInt1010102 => sizeof(int),
+ PixelChannelLayout.UInt2101010Rev => sizeof(int),
+ _ => throw new ArgumentException("Unknown layout type"),
+ };
+ }
+
+ }
+
+ public enum ImageChannel : uint
+ {
+
+ SingleColor = glConst.RED,
+ DoubleColor = glConst.RG,
+ TripleColor = glConst.RGB,
+ WithAlphaChannel = glConst.RGBA,
+
+ }
+}
diff --git a/StgSharp.Common/Graphics/OpenGL/Buffer/AutoTexture.cs b/StgSharp.Common/Graphics/OpenGL/Buffer/AutoTexture.cs
new file mode 100644
index 00000000..3119cb3a
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/Buffer/AutoTexture.cs
@@ -0,0 +1,160 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="AutoTexture"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Collections;
+using StgSharp.Graphics;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+using System.Threading.Tasks;
+
+namespace StgSharp.Graphics.OpenGL
+{
+ ///
+ /// A collection of a sets of OpenGL textures. The collection can automatically select one of
+ /// the texture with minimum costs to upgrade pixels to BufferHandle. Usually is used for loading, but not for
+ /// target of .
+ ///
+ public sealed class AutoTextureGL
+ {
+
+ private TextureProperty[] propertyCache;
+ private BidirectionalDictionary imageIndexMap = new BidirectionalDictionary(
+ );
+ private Dictionary imageUpdateIndex = new Dictionary();
+
+ private int _size, _currentIndex;
+ private LinkedList usedTextureIndex;
+ private Queue unusedTextureUnitIndex;
+ private TextureGL texturePackage;
+
+ private TextureProperty _textureProperty;
+
+ private AutoTextureGL(TextureGL texture)
+ {
+ texturePackage = texture;
+ _size = texture.Count;
+ imageIndexMap = new BidirectionalDictionary();
+ unusedTextureUnitIndex = new Queue(Enumerable.Range(0, _size));
+ usedTextureIndex = new LinkedList();
+ propertyCache = new TextureProperty[_size];
+ }
+
+ public AutoTextureGL(int textureObjectSize, [NotNull]glRender binding)
+ {
+ this._size = textureObjectSize;
+ imageIndexMap = new BidirectionalDictionary();
+ texturePackage = new TextureGL(textureObjectSize, binding);
+ unusedTextureUnitIndex = new Queue(Enumerable.Range(0, _size));
+ usedTextureIndex = new LinkedList();
+ propertyCache = new TextureProperty[_size];
+ }
+
+ public TextureProperty DefaultTextureProperty
+ {
+ get => _textureProperty;
+ set => _textureProperty = value;
+ }
+
+ private OpenGLFunction GL
+ {
+ get => texturePackage.GL;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void SelectTextureAndBind(Image i)
+ {
+ TextureProperty property = _textureProperty;
+
+ SelectTextureAndBind(i, property);
+ }
+
+ public void SelectTextureAndBind([NotNull]Image i, TextureProperty property)
+ {
+ // usable texture with image match
+ if (imageIndexMap.TryGetValue(i, out int index))
+ {
+ // prop setting match
+ if (propertyCache[index] == property)
+ {
+ _currentIndex = index; //GL.Assert(true);
+ texturePackage.Bind2D(index); //GL.Assert(true);
+ if (i.PixelUpdateCount != imageUpdateIndex[i])
+ {
+ texturePackage.LoadTexture(index, i); //GL.Assert(true);
+ }
+ } else
+ {
+ _currentIndex = index; //GL.Assert(true);
+ texturePackage.Bind2D(index); //GL.Assert(true);
+ texturePackage.Set2dProperty(index, property); //GL.Assert(true);
+ if (i.PixelUpdateCount != imageUpdateIndex[i])
+ {
+ texturePackage.LoadTexture(index, i); //GL.Assert(true);
+ }
+ }
+ } else
+ {
+ if (unusedTextureUnitIndex.TryDequeue(out int newIndex))
+ {
+ // has extra unused texture object
+ imageIndexMap.Add(i, index);
+ texturePackage.Bind2D(index);
+ texturePackage.Set2dProperty(index, property);
+ texturePackage.LoadTexture(index, i);
+ usedTextureIndex.AddLast(newIndex);
+ propertyCache[newIndex] = property;
+ imageUpdateIndex[i] = i.PixelUpdateCount;
+ } else
+ {
+ // recycle from current
+ int reusedIndex = usedTextureIndex.First!.Value;
+ usedTextureIndex.RemoveFirst();
+ usedTextureIndex.AddLast(reusedIndex);
+ imageIndexMap[i] = reusedIndex;
+ propertyCache[newIndex] = property;
+ imageUpdateIndex[i] = i.PixelUpdateCount;
+ }
+ }
+ }
+
+ public static AutoTextureGL ToAuto([NotNull]TextureGL texture)
+ {
+ if (texture.IndexOfCurrentTexture != -1) {
+ throw new InvalidOperationException("Texture to be converted has been editted.");
+ }
+ return new AutoTextureGL(texture);
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Graphics/OpenGL/Buffer/EBO.cs b/StgSharp.Common/Graphics/OpenGL/Buffer/EBO.cs
new file mode 100644
index 00000000..b137ca90
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/Buffer/EBO.cs
@@ -0,0 +1,81 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="EBO"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics;
+using StgSharp.Graphics.OpenGL;
+
+using StgSharp.Mathematics;
+
+using System;
+using System.Collections.Generic;
+using System.Numerics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Text;
+
+namespace StgSharp.Graphics.OpenGL
+{
+ ///
+ /// A collection of handle to Element BufferHandle Object in OpenglFunc. Each value indexed from instance of this class this is the only handle to
+ /// one Element BufferHandle Object.
+ ///
+ public sealed unsafe class ElementBuffer : GlBufferObjectBase
+ {
+
+ internal ElementBuffer(int n, glRender binding)
+ : base(binding)
+ {
+ _bufferHandle = GL.GenBuffers(n);
+ }
+
+ public sealed override void Bind(int index)
+ {
+ GL.BindBuffer(BufferType.ElementArrayBuffer, _bufferHandle[index]);
+ }
+
+ public void SetValue(int index, T[] bufferArray, BufferUsage usage) where T: unmanaged, INumber
+ {
+ GL.BindBuffer(BufferType.ElementArrayBuffer, _bufferHandle[index]);
+ GL.SetBufferData(BufferType.ElementArrayBuffer, bufferArray, usage);
+ }
+
+ public void SetValue(int index, ReadOnlySpan bufferSpan, BufferUsage usage) where T: unmanaged, INumber
+ {
+ GL.BindBuffer(BufferType.ElementArrayBuffer, _bufferHandle[index]);
+ GL.SetBufferData(BufferType.ElementArrayBuffer, bufferSpan, usage);
+ }
+
+ protected sealed override void Dispose(bool disposing)
+ {
+ if (disposing) {
+ GL.DeleteBuffers(_bufferHandle);
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Graphics/OpenGL/Buffer/FBO.cs b/StgSharp.Common/Graphics/OpenGL/Buffer/FBO.cs
new file mode 100644
index 00000000..cbc9383e
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/Buffer/FBO.cs
@@ -0,0 +1,104 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="FBO"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Graphics.OpenGL
+{
+ #pragma warning disable CA1008
+ #pragma warning disable CA1028
+ public enum FrameBufferTarget : uint
+ #pragma warning restore CA1028
+ #pragma warning restore CA1008
+ {
+
+ Read = glConst.READ_FRAMEBUFFER,
+ All = glConst.FRAMEBUFFER,
+ Draw = glConst.DRAW_FRAMEBUFFER,
+
+ }
+
+ public sealed class FrameBuffer : GlBufferObjectBase
+ {
+
+ internal unsafe FrameBuffer(int count, glRender binding)
+ : base(binding)
+ {
+ _bufferHandle = GL.GenFrameBuffers(count);
+ }
+
+ ///
+ /// Bind the frame BufferHandle object with _label frame BufferHandle to the frame
+ /// BufferHandle target specified by target. will
+ /// be set as default target.
+ ///
+ ///
+ /// Index of object to be binded in handle set
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public override unsafe void Bind(int index)
+ {
+ GL.BindFrameBuffer(FrameBufferTarget.All, _bufferHandle[index]);
+ }
+
+ ///
+ /// Bind the frame BufferHandle object with _label frame BufferHandle to the frame
+ /// BufferHandle target specified by target. Target of this frame BufferHandle should be
+ /// set manually.
+ ///
+ ///
+ /// The frame BufferHandle target of the binding operation.
+ ///
+ ///
+ /// Index of object to be binded in handle set
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public unsafe void Bind(FrameBufferTarget target, int index)
+ {
+ GL.BindFrameBuffer(target, _bufferHandle[index]);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static void BindNull()
+ {
+ OpenGLFunction.CurrentGL.BindFrameBuffer(FrameBufferTarget.All, GlHandle.Zero);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Graphics/OpenGL/Buffer/GLBufferObjectBase.cs b/StgSharp.Common/Graphics/OpenGL/Buffer/GLBufferObjectBase.cs
new file mode 100644
index 00000000..a3c5c756
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/Buffer/GLBufferObjectBase.cs
@@ -0,0 +1,50 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="GLBufferObjectBase"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics.OpenGL;
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace StgSharp.Graphics.OpenGL
+{
+ public abstract class GlBufferObjectBase : BufferObjectBase
+ {
+
+ private readonly glRender _contextBinding;
+
+ protected GlBufferObjectBase(glRender contextBinding)
+ {
+ binding = contextBinding;
+ _contextBinding = contextBinding;
+ }
+
+ protected OpenGLFunction GL => _contextBinding.GL;
+
+ }
+}
diff --git a/StgSharp.Common/Graphics/OpenGL/Buffer/RBO.cs b/StgSharp.Common/Graphics/OpenGL/Buffer/RBO.cs
new file mode 100644
index 00000000..13868597
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/Buffer/RBO.cs
@@ -0,0 +1,67 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="RBO"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics;
+using System;
+using System.Collections.Generic;
+using System.Security.Principal;
+using System.Text;
+
+namespace StgSharp.Graphics.OpenGL
+{
+ public sealed class RenderBuffer : GlBufferObjectBase
+ {
+
+ public RenderBuffer(int count, glRender binding)
+ : base(binding)
+ {
+ _bufferHandle = GL.GenRenderBuffer(count);
+ }
+
+ public override void Bind(int index)
+ {
+ GL.BindRenderBuffer(this[index]);
+ }
+
+ public void Store(RenderBufferInternalFormat format, (int width, int height) size)
+ {
+ if ((size.width > binding.Width) || (size.height > binding.Height)) {
+ World.LogWarning("FrameBuffer is larger than current canvas binding");
+ }
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ foreach (GlHandle item in _bufferHandle)
+ {
+ Console.WriteLine("removing a render buffer");
+ GL.DeleteRenderBuffer(item);
+ }
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Graphics/OpenGL/Buffer/TextureGL.cs b/StgSharp.Common/Graphics/OpenGL/Buffer/TextureGL.cs
new file mode 100644
index 00000000..23058ecb
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/Buffer/TextureGL.cs
@@ -0,0 +1,279 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="TextureGL"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics;
+using StgSharp.HighPerformance;
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace StgSharp.Graphics.OpenGL
+{
+ public sealed unsafe class TextureGL
+ {
+
+ private int currentEditingTextureIndex;
+
+ private OpenGLFunction _gl;
+ internal GlHandle[] _textureHandle;
+
+ internal TextureGL(int count, glRender binding)
+ {
+ // sourceList = new Image[count];
+ this._gl = binding.GL;
+ _textureHandle = _gl.GenTextures(count);
+ }
+
+ public GlHandle this[int index]
+ {
+ get => _textureHandle[index];
+ }
+
+ public int Count
+ {
+ get => _textureHandle.Length;
+ }
+
+ // internal Image[] sourceList;
+
+ public int IndexOfCurrentTexture
+ {
+ get => currentEditingTextureIndex;
+ }
+
+ internal OpenGLFunction GL => _gl;
+
+ public void ActivateAs(TextureUnit unit)
+ {
+ _gl.ActiveTextureUnit((uint)unit);
+ }
+
+ public void Bind2D(int index)
+ {
+ currentEditingTextureIndex = index;
+ _gl.BindTexture(glConst.TEXTURE_2D, _textureHandle[index]);
+ }
+
+ ///
+ /// Load an to certain texture.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public unsafe void LoadTexture(int index, Image i)
+ {
+ byte[] handle = i.PixelBuffer;
+ _gl.TextureImage2d(
+ Texture2DTarget.Texture2D, 0, i.Channel, (uint)i.Width, (uint)i.Height, i.Channel, i.PixelLayout,
+ pixels:handle);
+ _gl.GenerateMipmap(Texture2DTarget.Texture2D);
+ }
+
+ #region texture setting
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void Set2dFilterProperty(int index, TextureFilter onMinify, TextureFilter onMagnify)
+ {
+ #if DEBUG
+ if (index != currentEditingTextureIndex)
+ {
+ throw new InvalidOperationException(
+ "Texture to be editted is not the one being activated.");
+ }
+ #endif
+ _gl.TextureParameter(glConst.TEXTURE_2D, glConst.TEXTURE_MIN_FILTER, (int)onMinify);
+ _gl.TextureParameter(glConst.TEXTURE_2D, glConst.TEXTURE_MAG_FILTER,
+ (int)onMagnify);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void Set2dWrapProperty(int index, TextureWrap onHorizontial, TextureWrap onVertical)
+ {
+ #if DEBUG
+ if (index != currentEditingTextureIndex)
+ {
+ throw new InvalidOperationException(
+ "Texture to be editted is not the one being activated.");
+ }
+ #endif
+ _gl.TextureParameter(glConst.TEXTURE_2D, glConst.TEXTURE_WRAP_S,
+ (int)onHorizontial);
+ _gl.TextureParameter(glConst.TEXTURE_2D, glConst.TEXTURE_WRAP_T, (int)onVertical);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void Set2dProperty(int index, TextureProperty property)
+ {
+ Set2dFilterProperty(index, property.FilterOnMinify, property.FilterOnMagnify);
+ Set2dWrapProperty(index, property.WrapOnHorizontial, property.WrapOnVertical);
+ }
+
+ #endregion texture setting
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public struct TextureProperty
+ {
+
+ [FieldOffset(0)] private M128 mask;
+ [FieldOffset(0)] private TextureFilter mag;
+ [FieldOffset(4)] private TextureFilter min;
+
+ [FieldOffset(8)] private TextureWrap hori;
+ [FieldOffset(12)] private TextureWrap vert;
+
+ public TextureProperty(
+ TextureFilter onMagnify,
+ TextureFilter onMinify,
+ TextureWrap onHorizontial,
+ TextureWrap onVertical)
+ {
+ FilterOnMagnify = onMagnify;
+ FilterOnMinify = onMinify;
+ WrapOnHorizontial = onHorizontial;
+ WrapOnVertical = onVertical;
+ }
+
+ public TextureFilter FilterOnMagnify
+ {
+ get => mag;
+ set => mag = value;
+ }
+
+ public TextureFilter FilterOnMinify
+ {
+ get => min;
+ set => min = value;
+ }
+
+ public TextureWrap WrapOnHorizontial
+ {
+ get => hori;
+ set => hori = value;
+ }
+
+ public TextureWrap WrapOnVertical
+ {
+ get => vert;
+ set => vert = value;
+ }
+
+ public override bool Equals([NotNullWhen(true)] object obj)
+ {
+ return base.Equals(obj);
+ }
+
+ public override int GetHashCode()
+ {
+ return HashCode.Combine(
+ FilterOnMagnify, FilterOnMagnify, WrapOnHorizontial, WrapOnVertical);
+ }
+
+ public override string ToString()
+ {
+ return $"FilterOnMagnify:{FilterOnMagnify}, " + $"FilterOnMagnify:{FilterOnMagnify}, " + $"WrapOnHorizontial:{WrapOnHorizontial}, " + $"WrapOnVertical:{WrapOnVertical}";
+ }
+
+ public static bool operator !=(TextureProperty left, TextureProperty right)
+ {
+ return left.mask != right.mask;
+ }
+
+ public static bool operator ==(TextureProperty left, TextureProperty right)
+ {
+ return left.mask == right.mask;
+ }
+
+ public static implicit operator TextureProperty(
+ (
+ TextureFilter onMagnify, TextureFilter onMinify,
+ TextureWrap onHorizontial, TextureWrap onVertical
+ ) propertyValueTuple)
+ {
+ return new TextureProperty(
+ propertyValueTuple.onMagnify, propertyValueTuple.onMinify,
+ propertyValueTuple.onHorizontial, propertyValueTuple.onVertical);
+ }
+
+ }
+
+ #pragma warning disable CA1008
+ public enum TextureFilter
+ #pragma warning restore CA1008
+ {
+
+ Nearest = glConst.NEAREST,
+ Linear = glConst.LINEAR,
+ NearestLinearMipmap = glConst.NEAREST_MIPMAP_LINEAR,
+ LinearLinearMipmap = glConst.LINEAR_MIPMAP_LINEAR,
+ NearestNearestMipmap = glConst.NEAREST_MIPMAP_NEAREST,
+ LinearNearestMipmap = glConst.LINEAR_MIPMAP_NEAREST,
+
+ }
+
+ #pragma warning disable CA1008
+ public enum TextureUnit
+ #pragma warning restore CA1008
+ {
+
+ Unit0 = glConst.TEXTURE0,
+ Unit1 = glConst.TEXTURE1,
+ Unit2 = glConst.TEXTURE2,
+ Unit3 = glConst.TEXTURE3,
+ Unit4 = glConst.TEXTURE4,
+ Unit5 = glConst.TEXTURE5,
+ Unit6 = glConst.TEXTURE6,
+ Unit7 = glConst.TEXTURE7,
+ Unit8 = glConst.TEXTURE8,
+ Unit9 = glConst.TEXTURE9,
+ Unit10 = glConst.TEXTURE10,
+ Unit11 = glConst.TEXTURE11,
+ Unit12 = glConst.TEXTURE12,
+ Unit13 = glConst.TEXTURE13,
+ Unit14 = glConst.TEXTURE14,
+ Unit15 = glConst.TEXTURE15,
+
+ }
+
+ #pragma warning disable CA1008
+ public enum TextureWrap
+ #pragma warning restore CA1008
+ {
+
+ Repeat = glConst.REPEAT,
+ MirroredRepeat = glConst.MIRRORED_REPEAT,
+ ClampToEdge = glConst.CLAMP_TO_EDGE,
+ ClampToBorder = glConst.CLAMP_TO_BORDER,
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Graphics/OpenGL/Buffer/VAO.cs b/StgSharp.Common/Graphics/OpenGL/Buffer/VAO.cs
new file mode 100644
index 00000000..b9cab902
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/Buffer/VAO.cs
@@ -0,0 +1,77 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="VAO"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics;
+using System;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace StgSharp.Graphics.OpenGL
+{
+ public sealed unsafe class VertexArray : GlBufferObjectBase
+ {
+
+ internal VertexArray(int n, glRender binding)
+ : base(binding)
+ {
+ _bufferHandle = GL.GenVertexArrays(n);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public sealed override void Bind(int index)
+ {
+ GL.BindVertexArray(_bufferHandle[index]);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static void BindNull()
+ {
+ OpenGLFunction.CurrentGL.BindVertexArray(GlHandle.Zero);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void SetVertexAttribute(
+ uint attributeIndex,
+ int vertexLength,
+ TypeCode dataType,
+ bool isNomalized,
+ uint stride,
+ int pointer)
+ {
+ GL.SetVertexAttribute(attributeIndex, vertexLength, dataType, isNomalized, stride, pointer);
+ }
+
+ protected sealed override void Dispose(bool disposing)
+ {
+ if (disposing) {
+ GL.DeleteVertexArrays(_bufferHandle);
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Graphics/OpenGL/Buffer/VBO.cs b/StgSharp.Common/Graphics/OpenGL/Buffer/VBO.cs
new file mode 100644
index 00000000..1797a163
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/Buffer/VBO.cs
@@ -0,0 +1,183 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="VBO"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics;
+using StgSharp.Mathematics;
+using StgSharp.Mathematics.Numeric;
+
+using System;
+using System.Collections.Generic;
+using System.Net.Security;
+using System.Numerics;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Text;
+
+namespace StgSharp.Graphics.OpenGL
+{
+ public sealed unsafe class VertexBuffer : GlBufferObjectBase
+ {
+
+ internal VertexBuffer(int n, glRender binding)
+ : base(binding)
+ {
+ _bufferHandle = GL.GenBuffers(n);
+ }
+
+ public sealed override void Bind(int index)
+ {
+ GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]);
+ }
+
+ ///
+ ///
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void Unbind()
+ {
+ GL.BindBuffer(BufferType.ArrayBuffer, GlHandle.Zero);
+ }
+
+ ///
+ /// Set _data to current vertex BufferHandle object
+ ///
+ ///
+ /// Type of bufferData
+ ///
+ ///
+ /// Index to find certain VBO in this instance
+ ///
+ ///
+ /// Data to write in
+ ///
+ ///
+ /// How OpenGL use these _data, defined by
+ ///
+ public void WriteMatrixData(int index, ref IMatrix bufferData, BufferUsage usage)
+ where T: unmanaged, INumber
+ {
+ GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]);
+ GL.SetBufferData(BufferType.ArrayBuffer, bufferData.AsSpan(), usage);
+ }
+
+ ///
+ /// Set _data to current vertex BufferHandle object
+ ///
+ ///
+ /// Type of bufferData
+ ///
+ ///
+ /// Index to find certain VBO in this instance
+ ///
+ ///
+ /// Data to write in
+ ///
+ ///
+ /// How OpenGL use these _data, defined by
+ ///
+ public void WriteScalerData(int index, T[] bufferArray, BufferUsage usage) where T: unmanaged, INumber
+ {
+ GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]);
+ GL.SetBufferData(BufferType.ArrayBuffer, bufferArray, usage);
+ }
+
+ ///
+ /// Set _data to current vertex BufferHandle object
+ ///
+ ///
+ /// Type of bufferData
+ ///
+ ///
+ /// Index to find certain VBO in this instance
+ ///
+ ///
+ /// A of _data to write in
+ ///
+ ///
+ /// How OpenGL use these _data, defined by
+ ///
+ public void WriteScalerData(int index, ReadOnlySpan scalerSpan, BufferUsage usage)
+ where T: unmanaged,INumber
+ {
+ GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]);
+ GL.SetBufferData(BufferType.ArrayBuffer, scalerSpan, usage);
+ }
+
+ ///
+ /// Set data to current vertex BufferHandle object
+ ///
+ ///
+ /// Type of bufferData
+ ///
+ ///
+ /// Index to find certain VBO in this instance
+ ///
+ ///
+ /// A of data to write in
+ ///
+ ///
+ /// How OpenGL use these data, defined by
+ ///
+ public void WriteVectorData(int index, ReadOnlySpan vectorSpan, BufferUsage usage)
+ where T: unmanaged, IUnmanagedVector
+ {
+ GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]);
+ GL.SetBufferVectorData(BufferType.ArrayBuffer, vectorSpan, usage);
+ }
+
+ ///
+ /// Set _data to current vertex BufferHandle object
+ ///
+ ///
+ /// Type of bufferData
+ ///
+ ///
+ /// Index to find certain VBO in this instance
+ ///
+ ///
+ /// A array of _data to write in
+ ///
+ ///
+ /// How OpenGL use these _data, defined by
+ ///
+ public void WriteVectorData(int index, T[] vectorArray, BufferUsage usage)
+ where T: unmanaged, IUnmanagedVector
+ {
+ GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]);
+ GL.SetBufferVectorData(BufferType.ArrayBuffer, vectorArray, usage);
+ }
+
+ protected sealed override void Dispose(bool disposing)
+ {
+ if (disposing) {
+ GL.DeleteBuffers(_bufferHandle);
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Graphics/OpenGL/ShaderEdit/IglConvertable.cs b/StgSharp.Common/Graphics/OpenGL/ShaderEdit/IglConvertable.cs
new file mode 100644
index 00000000..b555891b
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/ShaderEdit/IglConvertable.cs
@@ -0,0 +1,65 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="IglConvertable"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics.OpenGL;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Graphics.ShaderEdit
+{
+ public interface IglConvertable
+ {
+
+ ///
+ ///
+ ///
+ public void DisplayGLtypeDefinition();
+
+ ///
+ ///
+ ///
+ public void GainAllUniforms(ShaderProgram source, params string[] uniformName);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ShaderStruct GetConvertedGLtype();
+
+ ///
+ ///
+ ///
+ public void SetAllUniforms();
+
+ }
+}
diff --git a/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Shader.cs b/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Shader.cs
new file mode 100644
index 00000000..fa2b7fd7
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Shader.cs
@@ -0,0 +1,283 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Shader"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp;
+using StgSharp.Graphics;
+using StgSharp.Internal;
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.IO;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Xml.Linq;
+
+namespace StgSharp.Graphics.OpenGL
+{
+ public abstract partial class glRender : RenderStream
+ {
+
+ ///
+ /// Create an instance of program
+ ///
+ ///
+ /// New instance of instance.
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ protected sealed override ShaderProgram CreateShaderProgram()
+ {
+ return new ShaderProgram(this);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ protected sealed override Shader CreateShaderSegment(ShaderType type, int count)
+ {
+ return new Shader(GL.CreateShaderSet(count, type), type, this);
+ }
+
+ }
+
+ public class Shader : ISSDSerializable
+ {
+
+ private readonly OpenGLFunction GL;
+ internal readonly GlHandle[] handle;
+ public readonly ShaderType type;
+
+ internal unsafe Shader(GlHandle[] handle, ShaderType usage, glRender stream)
+ {
+ this.handle = handle;
+ GL = stream.GL;
+ type = usage;
+ }
+
+ public SerializableTypeCode SSDTypeCode => SerializableTypeCode.Shader;
+
+ ///
+ /// Attach one shader code to a shader program.
+ ///
+ ///
+ /// Shader program to attach
+ ///
+ ///
+ /// Index of shader code in current shader code set.
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void AttachTo(int index, [NotNull]ShaderProgram target)
+ {
+ GL.AttachShader(target.handle, handle[index]);
+ }
+
+ public void CheckStatus(int index, ShaderStatus status)
+ {
+ string log = GL.GetShaderStatus(this, index, (int)status);
+ if (!string.IsNullOrEmpty(log)) {
+ throw new InvalidOperationException($"{$"Shader Error \t{status}\n"}{log}");
+ }
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public unsafe void Compile(int index, ReadOnlySpan codeU8Stream)
+ {
+ GL.LoadShaderSource(handle[index], codeU8Stream);
+ GL.CompileShader(handle[index]);
+ CheckStatus(index, ShaderStatus.CompileStatus);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public unsafe void Compile(int index, byte[] codeStream)
+ {
+ ArgumentNullException.ThrowIfNull(codeStream);
+ GL.LoadShaderSource(handle[index], codeStream);
+ GL.CompileShader(handle[index]);
+ CheckStatus(index, ShaderStatus.CompileStatus);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public unsafe void Compile(int index, string codeStream)
+ {
+ ArgumentNullException.ThrowIfNull(codeStream);
+ GL.LoadShaderSource(handle[index], codeStream.AsSpan());
+ GL.CompileShader(handle[index]);
+ CheckStatus(index, ShaderStatus.CompileStatus);
+ }
+
+ public void FromBytes(byte[] stream)
+ {
+ throw new NotImplementedException();
+ }
+
+ public static byte[] FromCodeFile(string fileRoute)
+ {
+ string str = File.ReadAllText(fileRoute);
+ if (string.IsNullOrEmpty(str)) {
+ throw new InvalidOperationException($"Cannot load and GLSL code from {fileRoute}");
+ }
+ return Encoding.UTF8.GetBytes(str);
+ }
+
+ public byte[] GetBytes()
+ {
+ return Array.Empty();
+ }
+
+ public byte[] GetBytes(out int length)
+ {
+ throw new NotImplementedException();
+ }
+
+ public override string ToString()
+ {
+ return $"This is a {type} shader, its shader handles are {handle.ToString()}.";
+ }
+
+ }
+
+ public enum ShaderStatus : int
+ {
+
+ CompileStatus = glConst.COMPILE_STATUS,
+
+ }
+
+ public class ShaderProgram
+ {
+
+ private readonly OpenGLFunction GL;
+ internal readonly GlHandle handle;
+
+ ///
+ /// CustomizeInit a program with no shader attached.
+ ///
+ internal unsafe ShaderProgram(glRender binding)
+ {
+ GL = binding.GL;
+ handle = GL.CreateProgram();
+ }
+
+ ///
+ /// Get a uniform form current shader, the value type of the uniform should be provided.
+ ///
+ ///
+ /// ContextName of the Uniform in shader code
+ ///
+ ///
+ ///
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public unsafe Uniform GetUniform(string name) where T: unmanaged
+ {
+ return new Uniform(GL.GetUniformLocation(this.handle, name));
+ }
+
+ ///
+ /// Get a uniform form current shader, the value type of the uniform should be provided.
+ ///
+ ///
+ /// ContextName of the Uniform in shader code
+ ///
+ ///
+ ///
+ ///
+ public unsafe Uniform GetUniform(string name) where T: unmanaged where U: struct
+ {
+ return new Uniform(GL.GetUniformLocation(this.handle, name));
+ }
+
+ ///
+ /// Get a uniform form current shader, the value type of the uniform should be provided.
+ ///
+ ///
+ /// ContextName of the Uniform in shader code
+ ///
+ ///
+ ///
+ ///
+ public unsafe Uniform GetUniform(string name) where T: unmanaged where U: struct
+ where V: struct
+ {
+ return new Uniform(GL.GetUniformLocation(this.handle, name));
+ }
+
+ ///
+ /// Get a uniform form current shader, the value type of the uniform should be provided.
+ ///
+ ///
+ /// ContextName of the Uniform in shader code
+ ///
+ ///
+ ///
+ ///
+ public unsafe Uniform GetUniform(string name) where T: unmanaged where U: struct
+ where V: struct
+ where W: struct
+ {
+ return new Uniform(GL.GetUniformLocation(this.handle, name));
+ }
+
+ ///
+ /// Link the shader to current viewPortDisplay.
+ ///
+ public unsafe void Link()
+ {
+ if (GraphicFramework.InternalLinkShaderProgram(
+ (OpenglContext*)this.GL.ContextHandle, handle.Value) == 0)
+ {
+ IntPtr logPtr = GraphicFramework.InternalReadSSCLog();
+ try
+ {
+ byte[] logByte = new byte[512];
+ Marshal.Copy(logPtr, logByte, 0, 512);
+ string log = Encoding.UTF8.GetString(logByte);
+ log = log.Replace("\0", string.Empty);
+ DefaultLog.InternalWriteLog(log, LogType.Error);
+ }
+ catch (Exception ex)
+ {
+ DefaultLog.InternalWriteLog(ex.Message, LogType.Error);
+ }
+ }
+ }
+
+ ///
+ /// Let the current viewPortDisplay use this shader.
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public unsafe void Use()
+ {
+ GL.UseProgram(handle);
+ }
+
+ ~ShaderProgram()
+ {
+ // handle.Dispose();
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Uniform.cs b/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Uniform.cs
new file mode 100644
index 00000000..209a21de
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Uniform.cs
@@ -0,0 +1,184 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="Uniform"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.Graphics;
+using StgSharp.Mathematics.Graphic;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+
+namespace StgSharp.Graphics.OpenGL
+{
+ public class Uniform
+ {
+
+ internal GlHandle id;
+
+ public GlHandle Handle => id;
+
+ }
+
+ public sealed class Uniform : Uniform where T: unmanaged
+ {
+
+ internal Uniform() { }
+
+ internal unsafe Uniform(GlHandle id)
+ {
+ this.id = id;
+ }
+
+ internal static Uniform FromHandle(GlHandle handle)
+ {
+ return new Uniform
+ {
+ id = handle
+ };
+ }
+
+ }
+
+ public sealed class Uniform : Uniform where T: unmanaged where U: struct
+ {
+
+ internal Uniform() { }
+
+ internal unsafe Uniform(GlHandle id)
+ {
+ this.id = id;
+ }
+
+ internal static Uniform FromHandle(GlHandle handle)
+ {
+ return new Uniform
+ {
+ id = handle
+ };
+ }
+
+ }
+
+ public sealed class Uniform : Uniform where T: unmanaged where U: struct where V: struct
+ {
+
+ internal Uniform() { }
+
+ internal unsafe Uniform(GlHandle id)
+ {
+ this.id = id;
+ }
+
+ internal static Uniform FromHandle(GlHandle handle)
+ {
+ return new Uniform
+ {
+ id = handle
+ };
+ }
+
+ }
+
+ public sealed class Uniform : Uniform where T: unmanaged where U: struct where V: struct where W: struct
+ {
+
+ internal Uniform() { }
+
+ internal unsafe Uniform(GlHandle id)
+ {
+ this.id = id;
+ }
+
+ internal static Uniform FromHandle(GlHandle handle)
+ {
+ return new Uniform
+ {
+ id = handle
+ };
+ }
+
+ }
+
+ public unsafe partial class OpenGLFunction
+ {
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void SetUniformValue([NotNull] Uniform uniform, Matrix44 mat)
+ {
+ Matrix44 temp = mat;
+ Context.glUniformMatrix4fv(uniform.id.SignedValue, 1, false, (float*)&temp);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void SetUniformValue([NotNull]Uniform uniform, Vec4 vec)
+ {
+ Vec4 temp = vec;
+ Context.glUniform1fv(uniform.id.SignedValue, 4, &temp.reg);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void SetUniformValue([NotNull]Uniform uniform, Vec4 vec)
+ {
+ Vec4 temp = vec;
+ Context.glUniform1fv(uniform.id.SignedValue, 4, &temp.reg);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void SetUniformValue([NotNull]Uniform uniform, float v0)
+ {
+ Context.glUniform1f(uniform.id.SignedValue, v0);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void SetUniformValue([NotNull]Uniform uniform, int i0)
+ {
+ Context.glUniform1i(uniform.id.SignedValue, i0);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void SetUniformValue([NotNull] Uniform uniform, float v0, float v1)
+ {
+ Context.glUniform2f(uniform.id.SignedValue, v0, v1);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void SetUniformValue([NotNull] Uniform uniform, float v0, float v1, float v2)
+ {
+ Context.glUniform3f(uniform.id.SignedValue, v0, v1, v2);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void SetUniformValue(
+ [NotNull] Uniform uniform,
+ float v0,
+ float v1,
+ float v2,
+ float v3)
+ {
+ Context.glUniform4f(uniform.id.SignedValue, v0, v1, v2, v3);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Graphics/OpenGL/glApiManager.cs b/StgSharp.Common/Graphics/OpenGL/glApiManager.cs
new file mode 100644
index 00000000..c41d44e8
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/glApiManager.cs
@@ -0,0 +1,3465 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="glApiManager"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.HighPerformance;
+using StgSharp.Mathematics;
+using StgSharp.MVVM;
+using StgSharp.MVVM;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Text;
+
+namespace StgSharp.Graphics.OpenGL
+{
+ public static partial class glManager
+ {
+
+ private const int glExtension = 0x1f03;
+ private const int glVersion = 0x1f02;
+
+ private static readonly string[] glBranch = {
+ "OpenGL ES-CM ",
+ "OpenGL ES-CL ",
+ "OpenGL ES ",
+ "OpenGL SC "
+ };
+
+ private static string glExtensionList;
+
+ // --------------------------------------------------------------------------------
+
+ ///
+ /// Get the function pointer of given OpenGL api _label
+ ///
+ ///
+ /// ContextName of the OpenGL api
+ ///
+ ///
+ /// The funtion pointer of the api in stream of
+ ///
+ public static IntPtr LoadGLfunc(string name)
+ {
+ IntPtr ret = GraphicFramework.glfwGetProcAddress(Encoding.UTF8.GetBytes(name));
+ if (ret == default)
+ {
+ DefaultLog.InternalAppendLog(
+ $"Cannot load OpenGL api called {name}, this api may not exist or supported.");
+ return ret;
+ }
+ return ret;
+ }
+
+ ///
+ /// Load all supported OpenGL APIs and bind them to given .
+ ///
+ ///
+ /// The handle to current OpenGL viewPortDisplay
+ ///
+ public static unsafe void LoadOpenGLApiTo(IntPtr contextHandle)
+ {
+ OpenglContext* context = (OpenglContext*)contextHandle;
+ if ((IntPtr)context->glGetString != IntPtr.Zero) {
+ return;
+ }
+ delegate*, IntPtr> loader = &GraphicFramework.glfwGetProcAddress;
+ IntPtr proc = GraphicFramework.glfwGetProcAddress("glGetString"u8);
+ if (proc == IntPtr.Zero)
+ {
+ #if DEBUG
+ Console.WriteLine("Cannot load GL.");
+ #endif
+ throw new Exception("Cannot load gl");
+ }
+ context->glGetString = (delegate*)proc;
+
+ string coreVersion;
+ if (context->glGetString(glVersion) == IntPtr.Zero) {
+ DefaultLog.InternalWriteLog("Failed to call glGetString", LogType.Error);
+ }
+ coreVersion = Marshal.PtrToStringAnsi(context->glGetString(glVersion)) ?? string.Empty;
+
+ foreach (string branch in glBranch)
+ {
+ if (coreVersion.Contains(branch)) {
+ coreVersion.Replace(branch, string.Empty);
+ }
+ }
+ string[] versionSep = coreVersion!.Split('.');
+ int majorVersion = int.Parse(versionSep[0]);
+ int minorVersion = int.Parse(versionSep[1]);
+ CheckCoreVersion(majorVersion, minorVersion);
+
+
+ if (LoadGLcore10(context, loader) &&
+ LoadGLcore11(context, loader) &&
+ LoadGLcore12(context, loader) &&
+ LoadGLcore13(context, loader) &&
+ LoadGLcore14(context, loader) &&
+ LoadGLcore15(context, loader) &&
+ LoadGLcore20(context, loader) &&
+ LoadGLcore21(context, loader) &&
+ LoadGLcore30(context, loader) &&
+ LoadGLcore31(context, loader) &&
+ LoadGLcore32(context, loader) &&
+ LoadGLcore33(context, loader) &&
+ LoadGLcore40(context, loader) &&
+ LoadGLcore41(context, loader) &&
+ LoadGLcore42(context, loader) &&
+ LoadGLcore43(context, loader) &&
+ LoadGLcore44(context, loader) &&
+ LoadGLcore45(context, loader) &&
+ LoadGLcore46(context, loader)) { }
+
+ uint code = context->glGetError();
+ if (code != 0)
+ {
+ Console.WriteLine(code);
+ throw new GlExecutionException(code);
+ }
+
+ int extensionCount;
+ context->glGetIntegerv(glConst.NUM_EXTENSIONS, &extensionCount);
+ if (extensionCount == 0)
+ {
+ DefaultLog.InternalWriteLog(
+ "No supported OpenGL extensions are found.", LogType.Info);
+ return;
+ }
+
+ HashSet extensions = [];
+
+ for (uint i = 0; i < extensionCount; i++)
+ {
+ byte* strPtr = context->glGetStringi(glConst.EXTENSIONS, i);
+ extensions.Add(Marshal.PtrToStringAnsi((IntPtr)strPtr) ?? string.Empty);
+ }
+
+ DefaultLog.InternalWriteLog(
+ $"{$"Find OpenGL extensions:"}{Environment.NewLine}{string.Join(';', extensions)}",
+ LogType.Info);
+
+ #region checkGLextensions
+
+ if (extensions.Contains("gl_4DFX_multisample"))
+ {
+ _4DFX_multisample = true;
+ extensions.Remove("gl_4DFX_multisample");
+ }
+ if (extensions.Contains("gl_3DFX_tbuffer"))
+ {
+ _3DFX_tbuffer = true;
+ extensions.Remove("gl_3DFX_tbuffer");
+ }
+ if (extensions.Contains("gl_3DFX_texture_compression_FXT1"))
+ {
+ _3DFX_texture_compression_FXT1 = true;
+ extensions.Remove("gl_3DFX_texture_compression_FXT1");
+ }
+ if (extensions.Contains("gl_AMD_blend_minmax_factor"))
+ {
+ AMD_blend_minmax_factor = true;
+ extensions.Remove("glAMD_blend_minmax_factor");
+ }
+ if (extensions.Contains("gl_AMD_conservative_depth"))
+ {
+ AMD_conservative_depth = true;
+ extensions.Remove("glAMD_conservative_depth");
+ }
+ if (extensions.Contains("gl_AMD_debug_output"))
+ {
+ AMD_debug_output = true;
+ extensions.Remove("glAMD_debug_output");
+ }
+ if (extensions.Contains("gl_AMD_depth_clamp_separate"))
+ {
+ AMD_depth_clamp_separate = true;
+ extensions.Remove("glAMD_depth_clamp_separate");
+ }
+ if (extensions.Contains("gl_AMD_draw_buffers_blend"))
+ {
+ AMD_draw_buffers_blend = true;
+ extensions.Remove("glAMD_draw_buffers_blend");
+ }
+ if (extensions.Contains("gl_AMD_framebuffer_multisample_advanced"))
+ {
+ AMD_framebuffer_multisample_advanced = true;
+ extensions.Remove("glAMD_framebuffer_multisample_advanced");
+ }
+ if (extensions.Contains("gl_AMD_framebuffer_sample_positions"))
+ {
+ AMD_framebuffer_sample_positions = true;
+ extensions.Remove("glAMD_framebuffer_sample_positions");
+ }
+ if (extensions.Contains("gl_AMD_gcn_shader"))
+ {
+ AMD_gcn_shader = true;
+ extensions.Remove("glAMD_gcn_shader");
+ }
+ if (extensions.Contains("gl_AMD_gpu_shader_half_float"))
+ {
+ AMD_gpu_shader_half_float = true;
+ extensions.Remove("glAMD_gpu_shader_half_float");
+ }
+ if (extensions.Contains("gl_AMD_gpu_shader_int16"))
+ {
+ AMD_gpu_shader_int16 = true;
+ extensions.Remove("glAMD_gpu_shader_int16");
+ }
+ if (extensions.Contains("gl_AMD_gpu_shader_int64"))
+ {
+ AMD_gpu_shader_int64 = true;
+ extensions.Remove("glAMD_gpu_shader_int64");
+ }
+ if (extensions.Contains("gl_AMD_interleaved_elements"))
+ {
+ AMD_interleaved_elements = true;
+ extensions.Remove("glAMD_interleaved_elements");
+ }
+ if (extensions.Contains("gl_AMD_multi_draw_indirect"))
+ {
+ AMD_multi_draw_indirect = true;
+ extensions.Remove("glAMD_multi_draw_indirect");
+ }
+ if (extensions.Contains("gl_AMD_name_gen_delete"))
+ {
+ AMD_name_gen_delete = true;
+ extensions.Remove("glAMD_name_gen_delete");
+ }
+ if (extensions.Contains("gl_AMD_occlusion_query_event"))
+ {
+ AMD_occlusion_query_event = true;
+ extensions.Remove("glAMD_occlusion_query_event");
+ }
+ if (extensions.Contains("gl_AMD_performance_monitor"))
+ {
+ AMD_performance_monitor = true;
+ extensions.Remove("glAMD_performance_monitor");
+ }
+ if (extensions.Contains("gl_AMD_pinned_memory"))
+ {
+ AMD_pinned_memory = true;
+ extensions.Remove("glAMD_pinned_memory");
+ }
+ if (extensions.Contains("gl_AMD_query_buffer_object"))
+ {
+ AMD_query_buffer_object = true;
+ extensions.Remove("glAMD_query_buffer_object");
+ }
+ if (extensions.Contains("gl_AMD_sample_positions"))
+ {
+ AMD_sample_positions = true;
+ extensions.Remove("glAMD_sample_positions");
+ }
+ if (extensions.Contains("gl_AMD_seamless_cubemap_per_texture"))
+ {
+ AMD_seamless_cubemap_per_texture = true;
+ extensions.Remove("glAMD_seamless_cubemap_per_texture");
+ }
+ if (extensions.Contains("gl_AMD_shader_atomic_counter_ops"))
+ {
+ AMD_shader_atomic_counter_ops = true;
+ extensions.Remove("glAMD_shader_atomic_counter_ops");
+ }
+ if (extensions.Contains("gl_AMD_shader_ballot"))
+ {
+ AMD_shader_ballot = true;
+ extensions.Remove("glAMD_shader_ballot");
+ }
+ if (extensions.Contains("gl_AMD_shader_explicit_vertex_parameter"))
+ {
+ AMD_shader_explicit_vertex_parameter = true;
+ extensions.Remove("glAMD_shader_explicit_vertex_parameter");
+ }
+ if (extensions.Contains("gl_AMD_shader_gpu_shader_half_float_fetch"))
+ {
+ AMD_shader_gpu_shader_half_float_fetch = true;
+ extensions.Remove("glAMD_shader_gpu_shader_half_float_fetch");
+ }
+ if (extensions.Contains("gl_AMD_shader_image_load_store_lod"))
+ {
+ AMD_shader_image_load_store_lod = true;
+ extensions.Remove("glAMD_shader_image_load_store_lod");
+ }
+ if (extensions.Contains("gl_AMD_shader_stencil_export"))
+ {
+ AMD_shader_stencil_export = true;
+ extensions.Remove("glAMD_shader_stencil_export");
+ }
+ if (extensions.Contains("gl_AMD_shader_trinary_minmax"))
+ {
+ AMD_shader_trinary_minmax = true;
+ extensions.Remove("glAMD_shader_trinary_minmax");
+ }
+ if (extensions.Contains("gl_AMD_sparse_texture"))
+ {
+ AMD_sparse_texture = true;
+ extensions.Remove("glAMD_sparse_texture");
+ }
+ if (extensions.Contains("gl_AMD_stencil_operation_extended"))
+ {
+ AMD_stencil_operation_extended = true;
+ extensions.Remove("glAMD_stencil_operation_extended");
+ }
+ if (extensions.Contains("gl_AMD_texture_gather_bias_lod"))
+ {
+ AMD_texture_gather_bias_lod = true;
+ extensions.Remove("glAMD_texture_gather_bias_lod");
+ }
+ if (extensions.Contains("gl_AMD_texture_texture4"))
+ {
+ AMD_texture_texture4 = true;
+ extensions.Remove("glAMD_texture_texture4");
+ }
+ if (extensions.Contains("gl_AMD_transform_feedback3_lines_triangles"))
+ {
+ AMD_transform_feedback3_lines_triangles = true;
+ extensions.Remove("glAMD_transform_feedback3_lines_triangles");
+ }
+ if (extensions.Contains("gl_AMD_transform_feedback4"))
+ {
+ AMD_transform_feedback4 = true;
+ extensions.Remove("glAMD_transform_feedback4");
+ }
+ if (extensions.Contains("gl_AMD_vertex_shader_layer"))
+ {
+ AMD_vertex_shader_layer = true;
+ extensions.Remove("glAMD_vertex_shader_layer");
+ }
+ if (extensions.Contains("gl_AMD_vertex_shader_tessellator"))
+ {
+ AMD_vertex_shader_tessellator = true;
+ extensions.Remove("glAMD_vertex_shader_tessellator");
+ }
+ if (extensions.Contains("gl_AMD_vertex_shader_viewport_index"))
+ {
+ AMD_vertex_shader_viewport_index = true;
+ extensions.Remove("glAMD_vertex_shader_viewport_index");
+ }
+ if (extensions.Contains("gl_APPLE_aux_depth_stencil"))
+ {
+ APPLE_aux_depth_stencil = true;
+ extensions.Remove("glAPPLE_aux_depth_stencil");
+ }
+ if (extensions.Contains("gl_APPLE_client_storage"))
+ {
+ APPLE_client_storage = true;
+ extensions.Remove("glAPPLE_client_storage");
+ }
+ if (extensions.Contains("gl_APPLE_element_array"))
+ {
+ APPLE_element_array = true;
+ extensions.Remove("glAPPLE_element_array");
+ }
+ if (extensions.Contains("gl_APPLE_fence"))
+ {
+ APPLE_fence = true;
+ extensions.Remove("glAPPLE_fence");
+ }
+ if (extensions.Contains("gl_APPLE_float_pixels"))
+ {
+ APPLE_float_pixels = true;
+ extensions.Remove("glAPPLE_float_pixels");
+ }
+ if (extensions.Contains("gl_APPLE_flush_buffer_range"))
+ {
+ APPLE_flush_buffer_range = true;
+ extensions.Remove("glAPPLE_flush_buffer_range");
+ }
+ if (extensions.Contains("gl_APPLE_object_purgeable"))
+ {
+ APPLE_object_purgeable = true;
+ extensions.Remove("glAPPLE_object_purgeable");
+ }
+ if (extensions.Contains("gl_APPLE_rgb_422"))
+ {
+ APPLE_rgb_422 = true;
+ extensions.Remove("glAPPLE_rgb_422");
+ }
+ if (extensions.Contains("gl_APPLE_row_bytes"))
+ {
+ APPLE_row_bytes = true;
+ extensions.Remove("glAPPLE_row_bytes");
+ }
+ if (extensions.Contains("gl_APPLE_specular_vector"))
+ {
+ APPLE_specular_vector = true;
+ extensions.Remove("glAPPLE_specular_vector");
+ }
+ if (extensions.Contains("gl_APPLE_texture_range"))
+ {
+ APPLE_texture_range = true;
+ extensions.Remove("glAPPLE_texture_range");
+ }
+ if (extensions.Contains("gl_APPLE_transform_hint"))
+ {
+ APPLE_transform_hint = true;
+ extensions.Remove("glAPPLE_transform_hint");
+ }
+ if (extensions.Contains("gl_APPLE_vertex_array_object"))
+ {
+ APPLE_vertex_array_object = true;
+ extensions.Remove("glAPPLE_vertex_array_object");
+ }
+ if (extensions.Contains("gl_APPLE_vertex_array_range"))
+ {
+ APPLE_vertex_array_range = true;
+ extensions.Remove("glAPPLE_vertex_array_range");
+ }
+ if (extensions.Contains("gl_APPLE_vertex_program_evaluators"))
+ {
+ APPLE_vertex_program_evaluators = true;
+ extensions.Remove("glAPPLE_vertex_program_evaluators");
+ }
+ if (extensions.Contains("gl_APPLE_ycbcr_422"))
+ {
+ APPLE_ycbcr_422 = true;
+ extensions.Remove("glAPPLE_ycbcr_422");
+ }
+ if (extensions.Contains("gl_ARB_ES2_compatibility"))
+ {
+ ARB_ES2_compatibility = true;
+ extensions.Remove("glARB_ES2_compatibility");
+ }
+ if (extensions.Contains("gl_ARB_ES3_1_compatibility"))
+ {
+ ARB_ES3_1_compatibility = true;
+ extensions.Remove("glARB_ES3_1_compatibility");
+ }
+ if (extensions.Contains("gl_ARB_ES3_2_compatibility"))
+ {
+ ARB_ES3_2_compatibility = true;
+ extensions.Remove("glARB_ES3_2_compatibility");
+ }
+ if (extensions.Contains("gl_ARB_ES3_compatibility"))
+ {
+ ARB_ES3_compatibility = true;
+ extensions.Remove("glARB_ES3_compatibility");
+ }
+ if (extensions.Contains("gl_ARB_arrays_of_arrays"))
+ {
+ ARB_arrays_of_arrays = true;
+ extensions.Remove("glARB_arrays_of_arrays");
+ }
+ if (extensions.Contains("gl_ARB_base_instance"))
+ {
+ ARB_base_instance = true;
+ extensions.Remove("glARB_base_instance");
+ }
+ if (extensions.Contains("gl_ARB_bindless_texture"))
+ {
+ ARB_bindless_texture = true;
+ extensions.Remove("glARB_bindless_texture");
+ }
+ if (extensions.Contains("gl_ARB_blend_func_extended"))
+ {
+ ARB_blend_func_extended = true;
+ extensions.Remove("glARB_blend_func_extended");
+ }
+ if (extensions.Contains("gl_ARB_buffer_storage"))
+ {
+ ARB_buffer_storage = true;
+ extensions.Remove("glARB_buffer_storage");
+ }
+ if (extensions.Contains("gl_ARB_cl_event"))
+ {
+ ARB_cl_event = true;
+ extensions.Remove("glARB_cl_event");
+ }
+ if (extensions.Contains("gl_ARB_clear_buffer_object"))
+ {
+ ARB_clear_buffer_object = true;
+ extensions.Remove("glARB_clear_buffer_object");
+ }
+ if (extensions.Contains("gl_ARB_clear_texture"))
+ {
+ ARB_clear_texture = true;
+ extensions.Remove("glARB_clear_texture");
+ }
+ if (extensions.Contains("gl_ARB_clip_control"))
+ {
+ ARB_clip_control = true;
+ extensions.Remove("glARB_clip_control");
+ }
+ if (extensions.Contains("gl_ARB_color_buffer_float"))
+ {
+ ARB_color_buffer_float = true;
+ extensions.Remove("glARB_color_buffer_float");
+ }
+ if (extensions.Contains("gl_ARB_compatibility"))
+ {
+ ARB_compatibility = true;
+ extensions.Remove("glARB_compatibility");
+ }
+ if (extensions.Contains("gl_ARB_compressed_texture_pixel_storage"))
+ {
+ ARB_compressed_texture_pixel_storage = true;
+ extensions.Remove("glARB_compressed_texture_pixel_storage");
+ }
+ if (extensions.Contains("gl_ARB_compute_shader"))
+ {
+ ARB_compute_shader = true;
+ extensions.Remove("glARB_compute_shader");
+ }
+ if (extensions.Contains("gl_ARB_compute_variable_group_size"))
+ {
+ ARB_compute_variable_group_size = true;
+ extensions.Remove("glARB_compute_variable_group_size");
+ }
+ if (extensions.Contains("gl_ARB_conditional_render_inverted"))
+ {
+ ARB_conditional_render_inverted = true;
+ extensions.Remove("glARB_conditional_render_inverted");
+ }
+ if (extensions.Contains("gl_ARB_conservative_depth"))
+ {
+ ARB_conservative_depth = true;
+ extensions.Remove("glARB_conservative_depth");
+ }
+ if (extensions.Contains("gl_ARB_copy_buffer"))
+ {
+ ARB_copy_buffer = true;
+ extensions.Remove("glARB_copy_buffer");
+ }
+ if (extensions.Contains("gl_ARB_copy_image"))
+ {
+ ARB_copy_image = true;
+ extensions.Remove("glARB_copy_image");
+ }
+ if (extensions.Contains("gl_ARB_cull_distance"))
+ {
+ ARB_cull_distance = true;
+ extensions.Remove("glARB_cull_distance");
+ }
+ if (extensions.Contains("gl_ARB_debug_output"))
+ {
+ ARB_debug_output = true;
+ extensions.Remove("glARB_debug_output");
+ }
+ if (extensions.Contains("gl_ARB_depth_buffer_float"))
+ {
+ ARB_depth_buffer_float = true;
+ extensions.Remove("glARB_depth_buffer_float");
+ }
+ if (extensions.Contains("gl_ARB_depth_clamp"))
+ {
+ ARB_depth_clamp = true;
+ extensions.Remove("glARB_depth_clamp");
+ }
+ if (extensions.Contains("gl_ARB_depth_texture"))
+ {
+ ARB_depth_texture = true;
+ extensions.Remove("glARB_depth_texture");
+ }
+ if (extensions.Contains("gl_ARB_derivative_control"))
+ {
+ ARB_derivative_control = true;
+ extensions.Remove("glARB_derivative_control");
+ }
+ if (extensions.Contains("gl_ARB_direct_state_access"))
+ {
+ ARB_direct_state_access = true;
+ extensions.Remove("glARB_direct_state_access");
+ }
+ if (extensions.Contains("gl_ARB_draw_buffers"))
+ {
+ ARB_draw_buffers = true;
+ extensions.Remove("glARB_draw_buffers");
+ }
+ if (extensions.Contains("gl_ARB_draw_buffers_blend"))
+ {
+ ARB_draw_buffers_blend = true;
+ extensions.Remove("glARB_draw_buffers_blend");
+ }
+ if (extensions.Contains("gl_ARB_draw_elements_base_vertex"))
+ {
+ ARB_draw_elements_base_vertex = true;
+ extensions.Remove("glARB_draw_elements_base_vertex");
+ }
+ if (extensions.Contains("gl_ARB_draw_indirect"))
+ {
+ ARB_draw_indirect = true;
+ extensions.Remove("glARB_draw_indirect");
+ }
+ if (extensions.Contains("gl_ARB_draw_instanced"))
+ {
+ ARB_draw_instanced = true;
+ extensions.Remove("glARB_draw_instanced");
+ }
+ if (extensions.Contains("gl_ARB_enhanced_layouts"))
+ {
+ ARB_enhanced_layouts = true;
+ extensions.Remove("glARB_enhanced_layouts");
+ }
+ if (extensions.Contains("gl_ARB_explicit_attrib_location"))
+ {
+ ARB_explicit_attrib_location = true;
+ extensions.Remove("glARB_explicit_attrib_location");
+ }
+ if (extensions.Contains("gl_ARB_explicit_uniform_location"))
+ {
+ ARB_explicit_uniform_location = true;
+ extensions.Remove("glARB_explicit_uniform_location");
+ }
+ if (extensions.Contains("gl_ARB_fragment_coord_conventions"))
+ {
+ ARB_fragment_coord_conventions = true;
+ extensions.Remove("glARB_fragment_coord_conventions");
+ }
+ if (extensions.Contains("gl_ARB_fragment_layer_viewport"))
+ {
+ ARB_fragment_layer_viewport = true;
+ extensions.Remove("glARB_fragment_layer_viewport");
+ }
+ if (extensions.Contains("gl_ARB_fragment_program"))
+ {
+ ARB_fragment_program = true;
+ extensions.Remove("glARB_fragment_program");
+ }
+ if (extensions.Contains("gl_ARB_fragment_program_shadow"))
+ {
+ ARB_fragment_program_shadow = true;
+ extensions.Remove("glARB_fragment_program_shadow");
+ }
+ if (extensions.Contains("gl_ARB_fragment_shader"))
+ {
+ ARB_fragment_shader = true;
+ extensions.Remove("glARB_fragment_shader");
+ }
+ if (extensions.Contains("gl_ARB_fragment_shader_interlock"))
+ {
+ ARB_fragment_shader_interlock = true;
+ extensions.Remove("glARB_fragment_shader_interlock");
+ }
+ if (extensions.Contains("gl_ARB_framebuffer_no_attachments"))
+ {
+ ARB_framebuffer_no_attachments = true;
+ extensions.Remove("glARB_framebuffer_no_attachments");
+ }
+ if (extensions.Contains("gl_ARB_framebuffer_object"))
+ {
+ ARB_framebuffer_object = true;
+ extensions.Remove("glARB_framebuffer_object");
+ }
+ if (extensions.Contains("gl_ARB_framebuffer_sRGB"))
+ {
+ ARB_framebuffer_sRGB = true;
+ extensions.Remove("glARB_framebuffer_sRGB");
+ }
+ if (extensions.Contains("gl_ARB_geometry_shader4"))
+ {
+ ARB_geometry_shader4 = true;
+ extensions.Remove("glARB_geometry_shader4");
+ }
+ if (extensions.Contains("gl_ARB_get_program_binary"))
+ {
+ ARB_get_program_binary = true;
+ extensions.Remove("glARB_get_program_binary");
+ }
+ if (extensions.Contains("gl_ARB_get_texture_sub_image"))
+ {
+ ARB_get_texture_sub_image = true;
+ extensions.Remove("glARB_get_texture_sub_image");
+ }
+ if (extensions.Contains("gl_ARB_gl_spirv"))
+ {
+ ARB_gl_spirv = true;
+ extensions.Remove("glARB_gl_spirv");
+ }
+ if (extensions.Contains("gl_ARB_gpu_shader5"))
+ {
+ ARB_gpu_shader5 = true;
+ extensions.Remove("glARB_gpu_shader5");
+ }
+ if (extensions.Contains("gl_ARB_gpu_shader_fp64"))
+ {
+ ARB_gpu_shader_fp64 = true;
+ extensions.Remove("glARB_gpu_shader_fp64");
+ }
+ if (extensions.Contains("gl_ARB_gpu_shader_int64"))
+ {
+ ARB_gpu_shader_int64 = true;
+ extensions.Remove("glARB_gpu_shader_int64");
+ }
+ if (extensions.Contains("gl_ARB_half_float_pixel"))
+ {
+ ARB_half_float_pixel = true;
+ extensions.Remove("glARB_half_float_pixel");
+ }
+ if (extensions.Contains("gl_ARB_half_float_vertex"))
+ {
+ ARB_half_float_vertex = true;
+ extensions.Remove("glARB_half_float_vertex");
+ }
+ if (extensions.Contains("gl_ARB_imaging"))
+ {
+ ARB_imaging = true;
+ extensions.Remove("glARB_imaging");
+ }
+ if (extensions.Contains("gl_ARB_indirect_parameters"))
+ {
+ ARB_indirect_parameters = true;
+ extensions.Remove("glARB_indirect_parameters");
+ }
+ if (extensions.Contains("gl_ARB_instanced_arrays"))
+ {
+ ARB_instanced_arrays = true;
+ extensions.Remove("glARB_instanced_arrays");
+ }
+ if (extensions.Contains("gl_ARB_internalformat_query"))
+ {
+ ARB_internalformat_query = true;
+ extensions.Remove("glARB_internalformat_query");
+ }
+ if (extensions.Contains("gl_ARB_internalformat_query2"))
+ {
+ ARB_internalformat_query2 = true;
+ extensions.Remove("glARB_internalformat_query2");
+ }
+ if (extensions.Contains("gl_ARB_invalidate_subdata"))
+ {
+ ARB_invalidate_subdata = true;
+ extensions.Remove("glARB_invalidate_subdata");
+ }
+ if (extensions.Contains("gl_ARB_map_buffer_alignment"))
+ {
+ ARB_map_buffer_alignment = true;
+ extensions.Remove("glARB_map_buffer_alignment");
+ }
+ if (extensions.Contains("gl_ARB_map_buffer_range"))
+ {
+ ARB_map_buffer_range = true;
+ extensions.Remove("glARB_map_buffer_range");
+ }
+ if (extensions.Contains("gl_ARB_matrix_palette"))
+ {
+ ARB_matrix_palette = true;
+ extensions.Remove("glARB_matrix_palette");
+ }
+ if (extensions.Contains("gl_ARB_multi_bind"))
+ {
+ ARB_multi_bind = true;
+ extensions.Remove("glARB_multi_bind");
+ }
+ if (extensions.Contains("gl_ARB_multi_draw_indirect"))
+ {
+ ARB_multi_draw_indirect = true;
+ extensions.Remove("glARB_multi_draw_indirect");
+ }
+ if (extensions.Contains("gl_ARB_multisample"))
+ {
+ ARB_multisample = true;
+ extensions.Remove("glARB_multisample");
+ }
+ if (extensions.Contains("gl_ARB_multitexture"))
+ {
+ ARB_multitexture = true;
+ extensions.Remove("glARB_multitexture");
+ }
+ if (extensions.Contains("gl_ARB_occlusion_query"))
+ {
+ ARB_occlusion_query = true;
+ extensions.Remove("glARB_occlusion_query");
+ }
+ if (extensions.Contains("gl_ARB_occlusion_query2"))
+ {
+ ARB_occlusion_query2 = true;
+ extensions.Remove("glARB_occlusion_query2");
+ }
+ if (extensions.Contains("gl_ARB_parallel_shader_compile"))
+ {
+ ARB_parallel_shader_compile = true;
+ extensions.Remove("glARB_parallel_shader_compile");
+ }
+ if (extensions.Contains("gl_ARB_pipeline_statistics_query"))
+ {
+ ARB_pipeline_statistics_query = true;
+ extensions.Remove("glARB_pipeline_statistics_query");
+ }
+ if (extensions.Contains("gl_ARB_pixel_buffer_object"))
+ {
+ ARB_pixel_buffer_object = true;
+ extensions.Remove("glARB_pixel_buffer_object");
+ }
+ if (extensions.Contains("gl_ARB_point_parameters"))
+ {
+ ARB_point_parameters = true;
+ extensions.Remove("glARB_point_parameters");
+ }
+ if (extensions.Contains("gl_ARB_point_sprite"))
+ {
+ ARB_point_sprite = true;
+ extensions.Remove("glARB_point_sprite");
+ }
+ if (extensions.Contains("gl_ARB_polygon_offset_clamp"))
+ {
+ ARB_polygon_offset_clamp = true;
+ extensions.Remove("glARB_polygon_offset_clamp");
+ }
+ if (extensions.Contains("gl_ARB_post_depth_coverage"))
+ {
+ ARB_post_depth_coverage = true;
+ extensions.Remove("glARB_post_depth_coverage");
+ }
+ if (extensions.Contains("gl_ARB_program_interface_query"))
+ {
+ ARB_program_interface_query = true;
+ extensions.Remove("glARB_program_interface_query");
+ }
+ if (extensions.Contains("gl_ARB_provoking_vertex"))
+ {
+ ARB_provoking_vertex = true;
+ extensions.Remove("glARB_provoking_vertex");
+ }
+ if (extensions.Contains("gl_ARB_query_buffer_object"))
+ {
+ ARB_query_buffer_object = true;
+ extensions.Remove("glARB_query_buffer_object");
+ }
+ if (extensions.Contains("gl_ARB_robust_buffer_access_behavior"))
+ {
+ ARB_robust_buffer_access_behavior = true;
+ extensions.Remove("glARB_robust_buffer_access_behavior");
+ }
+ if (extensions.Contains("gl_ARB_robustness"))
+ {
+ ARB_robustness = true;
+ extensions.Remove("glARB_robustness");
+ }
+ if (extensions.Contains("gl_ARB_robustness_isolation"))
+ {
+ ARB_robustness_isolation = true;
+ extensions.Remove("glARB_robustness_isolation");
+ }
+ if (extensions.Contains("gl_ARB_sample_locations"))
+ {
+ ARB_sample_locations = true;
+ extensions.Remove("glARB_sample_locations");
+ }
+ if (extensions.Contains("gl_ARB_sample_shading"))
+ {
+ ARB_sample_shading = true;
+ extensions.Remove("glARB_sample_shading");
+ }
+ if (extensions.Contains("gl_ARB_sampler_objects"))
+ {
+ ARB_sampler_objects = true;
+ extensions.Remove("glARB_sampler_objects");
+ }
+ if (extensions.Contains("gl_ARB_seamless_cube_map"))
+ {
+ ARB_seamless_cube_map = true;
+ extensions.Remove("glARB_seamless_cube_map");
+ }
+ if (extensions.Contains("gl_ARB_seamless_cubemap_per_texture"))
+ {
+ ARB_seamless_cubemap_per_texture = true;
+ extensions.Remove("glARB_seamless_cubemap_per_texture");
+ }
+ if (extensions.Contains("gl_ARB_separate_shader_objects"))
+ {
+ ARB_separate_shader_objects = true;
+ extensions.Remove("glARB_separate_shader_objects");
+ }
+ if (extensions.Contains("gl_ARB_shader_atomic_counter_ops"))
+ {
+ ARB_shader_atomic_counter_ops = true;
+ extensions.Remove("glARB_shader_atomic_counter_ops");
+ }
+ if (extensions.Contains("gl_ARB_shader_atomic_counters"))
+ {
+ ARB_shader_atomic_counters = true;
+ extensions.Remove("glARB_shader_atomic_counters");
+ }
+ if (extensions.Contains("gl_ARB_shader_ballot"))
+ {
+ ARB_shader_ballot = true;
+ extensions.Remove("glARB_shader_ballot");
+ }
+ if (extensions.Contains("gl_ARB_shader_bit_encoding"))
+ {
+ ARB_shader_bit_encoding = true;
+ extensions.Remove("glARB_shader_bit_encoding");
+ }
+ if (extensions.Contains("gl_ARB_shader_clock"))
+ {
+ ARB_shader_clock = true;
+ extensions.Remove("glARB_shader_clock");
+ }
+ if (extensions.Contains("gl_ARB_shader_draw_parameters"))
+ {
+ ARB_shader_draw_parameters = true;
+ extensions.Remove("glARB_shader_draw_parameters");
+ }
+ if (extensions.Contains("gl_ARB_shader_group_vote"))
+ {
+ ARB_shader_group_vote = true;
+ extensions.Remove("glARB_shader_group_vote");
+ }
+ if (extensions.Contains("gl_ARB_shader_image_load_store"))
+ {
+ ARB_shader_image_load_store = true;
+ extensions.Remove("glARB_shader_image_load_store");
+ }
+ if (extensions.Contains("gl_ARB_shader_image_size"))
+ {
+ ARB_shader_image_size = true;
+ extensions.Remove("glARB_shader_image_size");
+ }
+ if (extensions.Contains("gl_ARB_shader_objects"))
+ {
+ ARB_shader_objects = true;
+ extensions.Remove("glARB_shader_objects");
+ }
+ if (extensions.Contains("gl_ARB_shader_precision"))
+ {
+ ARB_shader_precision = true;
+ extensions.Remove("glARB_shader_precision");
+ }
+ if (extensions.Contains("gl_ARB_shader_stencil_export"))
+ {
+ ARB_shader_stencil_export = true;
+ extensions.Remove("glARB_shader_stencil_export");
+ }
+ if (extensions.Contains("gl_ARB_shader_storage_buffer_object"))
+ {
+ ARB_shader_storage_buffer_object = true;
+ extensions.Remove("glARB_shader_storage_buffer_object");
+ }
+ if (extensions.Contains("gl_ARB_shader_subroutine"))
+ {
+ ARB_shader_subroutine = true;
+ extensions.Remove("glARB_shader_subroutine");
+ }
+ if (extensions.Contains("gl_ARB_shader_texture_image_samples"))
+ {
+ ARB_shader_texture_image_samples = true;
+ extensions.Remove("glARB_shader_texture_image_samples");
+ }
+ if (extensions.Contains("gl_ARB_shader_texture_lod"))
+ {
+ ARB_shader_texture_lod = true;
+ extensions.Remove("glARB_shader_texture_lod");
+ }
+ if (extensions.Contains("gl_ARB_shader_viewport_layer_array"))
+ {
+ ARB_shader_viewport_layer_array = true;
+ extensions.Remove("glARB_shader_viewport_layer_array");
+ }
+ if (extensions.Contains("gl_ARB_shading_language_100"))
+ {
+ ARB_shading_language_100 = true;
+ extensions.Remove("glARB_shading_language_100");
+ }
+ if (extensions.Contains("gl_ARB_shading_language_420pack"))
+ {
+ ARB_shading_language_420pack = true;
+ extensions.Remove("glARB_shading_language_420pack");
+ }
+ if (extensions.Contains("gl_ARB_shading_language_include"))
+ {
+ ARB_shading_language_include = true;
+ extensions.Remove("glARB_shading_language_include");
+ }
+ if (extensions.Contains("gl_ARB_shading_language_packing"))
+ {
+ ARB_shading_language_packing = true;
+ extensions.Remove("glARB_shading_language_packing");
+ }
+ if (extensions.Contains("gl_ARB_shadow"))
+ {
+ ARB_shadow = true;
+ extensions.Remove("glARB_shadow");
+ }
+ if (extensions.Contains("gl_ARB_shadow_ambient"))
+ {
+ ARB_shadow_ambient = true;
+ extensions.Remove("glARB_shadow_ambient");
+ }
+ if (extensions.Contains("gl_ARB_sparse_buffer"))
+ {
+ ARB_sparse_buffer = true;
+ extensions.Remove("glARB_sparse_buffer");
+ }
+ if (extensions.Contains("gl_ARB_sparse_texture"))
+ {
+ ARB_sparse_texture = true;
+ extensions.Remove("glARB_sparse_texture");
+ }
+ if (extensions.Contains("gl_ARB_sparse_texture2"))
+ {
+ ARB_sparse_texture2 = true;
+ extensions.Remove("glARB_sparse_texture2");
+ }
+ if (extensions.Contains("gl_ARB_sparse_texture_clamp"))
+ {
+ ARB_sparse_texture_clamp = true;
+ extensions.Remove("glARB_sparse_texture_clamp");
+ }
+ if (extensions.Contains("gl_ARB_spirv_extensions"))
+ {
+ ARB_spirv_extensions = true;
+ extensions.Remove("glARB_spirv_extensions");
+ }
+ if (extensions.Contains("gl_ARB_stencil_texturing"))
+ {
+ ARB_stencil_texturing = true;
+ extensions.Remove("glARB_stencil_texturing");
+ }
+ if (extensions.Contains("gl_ARB_sync"))
+ {
+ ARB_sync = true;
+ extensions.Remove("glARB_sync");
+ }
+ if (extensions.Contains("gl_ARB_tessellation_shader"))
+ {
+ ARB_tessellation_shader = true;
+ extensions.Remove("glARB_tessellation_shader");
+ }
+ if (extensions.Contains("gl_ARB_texture_barrier"))
+ {
+ ARB_texture_barrier = true;
+ extensions.Remove("glARB_texture_barrier");
+ }
+ if (extensions.Contains("gl_ARB_texture_border_clamp"))
+ {
+ ARB_texture_border_clamp = true;
+ extensions.Remove("glARB_texture_border_clamp");
+ }
+ if (extensions.Contains("gl_ARB_texture_buffer_object"))
+ {
+ ARB_texture_buffer_object = true;
+ extensions.Remove("glARB_texture_buffer_object");
+ }
+ if (extensions.Contains("gl_ARB_texture_buffer_object_rgb32"))
+ {
+ ARB_texture_buffer_object_rgb32 = true;
+ extensions.Remove("glARB_texture_buffer_object_rgb32");
+ }
+ if (extensions.Contains("gl_ARB_texture_buffer_range"))
+ {
+ ARB_texture_buffer_range = true;
+ extensions.Remove("glARB_texture_buffer_range");
+ }
+ if (extensions.Contains("gl_ARB_texture_compression"))
+ {
+ ARB_texture_compression = true;
+ extensions.Remove("glARB_texture_compression");
+ }
+ if (extensions.Contains("gl_ARB_texture_compression_bptc"))
+ {
+ ARB_texture_compression_bptc = true;
+ extensions.Remove("glARB_texture_compression_bptc");
+ }
+ if (extensions.Contains("gl_ARB_texture_compression_rgtc"))
+ {
+ ARB_texture_compression_rgtc = true;
+ extensions.Remove("glARB_texture_compression_rgtc");
+ }
+ if (extensions.Contains("gl_ARB_texture_cube_map"))
+ {
+ ARB_texture_cube_map = true;
+ extensions.Remove("glARB_texture_cube_map");
+ }
+ if (extensions.Contains("gl_ARB_texture_cube_map_array"))
+ {
+ ARB_texture_cube_map_array = true;
+ extensions.Remove("glARB_texture_cube_map_array");
+ }
+ if (extensions.Contains("gl_ARB_texture_env_add"))
+ {
+ ARB_texture_env_add = true;
+ extensions.Remove("glARB_texture_env_add");
+ }
+ if (extensions.Contains("gl_ARB_texture_env_combine"))
+ {
+ ARB_texture_env_combine = true;
+ extensions.Remove("glARB_texture_env_combine");
+ }
+ if (extensions.Contains("gl_ARB_texture_env_crossbar"))
+ {
+ ARB_texture_env_crossbar = true;
+ extensions.Remove("glARB_texture_env_crossbar");
+ }
+ if (extensions.Contains("gl_ARB_texture_env_dot3"))
+ {
+ ARB_texture_env_dot3 = true;
+ extensions.Remove("glARB_texture_env_dot3");
+ }
+ if (extensions.Contains("gl_ARB_texture_filter_anisotropic"))
+ {
+ ARB_texture_filter_anisotropic = true;
+ extensions.Remove("glARB_texture_filter_anisotropic");
+ }
+ if (extensions.Contains("gl_ARB_texture_filter_minmax"))
+ {
+ ARB_texture_filter_minmax = true;
+ extensions.Remove("glARB_texture_filter_minmax");
+ }
+ if (extensions.Contains("gl_ARB_texture_float"))
+ {
+ ARB_texture_float = true;
+ extensions.Remove("glARB_texture_float");
+ }
+ if (extensions.Contains("gl_ARB_texture_gather"))
+ {
+ ARB_texture_gather = true;
+ extensions.Remove("glARB_texture_gather");
+ }
+ if (extensions.Contains("gl_ARB_texture_mirror_clamp_to_edge"))
+ {
+ ARB_texture_mirror_clamp_to_edge = true;
+ extensions.Remove("glARB_texture_mirror_clamp_to_edge");
+ }
+ if (extensions.Contains("gl_ARB_texture_mirrored_repeat"))
+ {
+ ARB_texture_mirrored_repeat = true;
+ extensions.Remove("glARB_texture_mirrored_repeat");
+ }
+ if (extensions.Contains("gl_ARB_texture_multisample"))
+ {
+ ARB_texture_multisample = true;
+ extensions.Remove("glARB_texture_multisample");
+ }
+ if (extensions.Contains("gl_ARB_texture_non_power_of_two"))
+ {
+ ARB_texture_non_power_of_two = true;
+ extensions.Remove("glARB_texture_non_power_of_two");
+ }
+ if (extensions.Contains("gl_ARB_texture_query_levels"))
+ {
+ ARB_texture_query_levels = true;
+ extensions.Remove("glARB_texture_query_levels");
+ }
+ if (extensions.Contains("gl_ARB_texture_query_lod"))
+ {
+ ARB_texture_query_lod = true;
+ extensions.Remove("glARB_texture_query_lod");
+ }
+ if (extensions.Contains("gl_ARB_texture_rectangle"))
+ {
+ ARB_texture_rectangle = true;
+ extensions.Remove("glARB_texture_rectangle");
+ }
+ if (extensions.Contains("gl_ARB_texture_rg"))
+ {
+ ARB_texture_rg = true;
+ extensions.Remove("glARB_texture_rg");
+ }
+ if (extensions.Contains("gl_ARB_texture_rgb10_a2ui"))
+ {
+ ARB_texture_rgb10_a2ui = true;
+ extensions.Remove("glARB_texture_rgb10_a2ui");
+ }
+ if (extensions.Contains("gl_ARB_texture_stencil8"))
+ {
+ ARB_texture_stencil8 = true;
+ extensions.Remove("glARB_texture_stencil8");
+ }
+ if (extensions.Contains("gl_ARB_texture_storage"))
+ {
+ ARB_texture_storage = true;
+ extensions.Remove("glARB_texture_storage");
+ }
+ if (extensions.Contains("gl_ARB_texture_storage_multisample"))
+ {
+ ARB_texture_storage_multisample = true;
+ extensions.Remove("glARB_texture_storage_multisample");
+ }
+ if (extensions.Contains("gl_ARB_texture_swizzle"))
+ {
+ ARB_texture_swizzle = true;
+ extensions.Remove("glARB_texture_swizzle");
+ }
+ if (extensions.Contains("gl_ARB_texture_view"))
+ {
+ ARB_texture_view = true;
+ extensions.Remove("glARB_texture_view");
+ }
+ if (extensions.Contains("gl_ARB_timer_query"))
+ {
+ ARB_timer_query = true;
+ extensions.Remove("glARB_timer_query");
+ }
+ if (extensions.Contains("gl_ARB_transform_feedback2"))
+ {
+ ARB_transform_feedback2 = true;
+ extensions.Remove("glARB_transform_feedback2");
+ }
+ if (extensions.Contains("gl_ARB_transform_feedback3"))
+ {
+ ARB_transform_feedback3 = true;
+ extensions.Remove("glARB_transform_feedback3");
+ }
+ if (extensions.Contains("gl_ARB_transform_feedback_instanced"))
+ {
+ ARB_transform_feedback_instanced = true;
+ extensions.Remove("glARB_transform_feedback_instanced");
+ }
+ if (extensions.Contains("gl_ARB_transform_feedback_overflow_query"))
+ {
+ ARB_transform_feedback_overflow_query = true;
+ extensions.Remove("glARB_transform_feedback_overflow_query");
+ }
+ if (extensions.Contains("gl_ARB_transpose_matrix"))
+ {
+ ARB_transpose_matrix = true;
+ extensions.Remove("glARB_transpose_matrix");
+ }
+ if (extensions.Contains("gl_ARB_uniform_buffer_object"))
+ {
+ ARB_uniform_buffer_object = true;
+ extensions.Remove("glARB_uniform_buffer_object");
+ }
+ if (extensions.Contains("gl_ARB_vertex_array_bgra"))
+ {
+ ARB_vertex_array_bgra = true;
+ extensions.Remove("glARB_vertex_array_bgra");
+ }
+ if (extensions.Contains("gl_ARB_vertex_array_object"))
+ {
+ ARB_vertex_array_object = true;
+ extensions.Remove("glARB_vertex_array_object");
+ }
+ if (extensions.Contains("gl_ARB_vertex_attrib_64bit"))
+ {
+ ARB_vertex_attrib_64bit = true;
+ extensions.Remove("glARB_vertex_attrib_64bit");
+ }
+ if (extensions.Contains("gl_ARB_vertex_attrib_binding"))
+ {
+ ARB_vertex_attrib_binding = true;
+ extensions.Remove("glARB_vertex_attrib_binding");
+ }
+ if (extensions.Contains("gl_ARB_vertex_blend"))
+ {
+ ARB_vertex_blend = true;
+ extensions.Remove("glARB_vertex_blend");
+ }
+ if (extensions.Contains("gl_ARB_vertex_buffer_object"))
+ {
+ ARB_vertex_buffer_object = true;
+ extensions.Remove("glARB_vertex_buffer_object");
+ }
+ if (extensions.Contains("gl_ARB_vertex_program"))
+ {
+ ARB_vertex_program = true;
+ extensions.Remove("glARB_vertex_program");
+ }
+ if (extensions.Contains("gl_ARB_vertex_shader"))
+ {
+ ARB_vertex_shader = true;
+ extensions.Remove("glARB_vertex_shader");
+ }
+ if (extensions.Contains("gl_ARB_vertex_type_10f_11f_11f_rev"))
+ {
+ ARB_vertex_type_10f_11f_11f_rev = true;
+ extensions.Remove("glARB_vertex_type_10f_11f_11f_rev");
+ }
+ if (extensions.Contains("gl_ARB_vertex_type_2_10_10_10_rev"))
+ {
+ ARB_vertex_type_2_10_10_10_rev = true;
+ extensions.Remove("glARB_vertex_type_2_10_10_10_rev");
+ }
+ if (extensions.Contains("gl_ARB_viewport_array"))
+ {
+ ARB_viewport_array = true;
+ extensions.Remove("glARB_viewport_array");
+ }
+ if (extensions.Contains("gl_ARB_window_pos"))
+ {
+ ARB_window_pos = true;
+ extensions.Remove("glARB_window_pos");
+ }
+ if (extensions.Contains("gl_ATI_draw_buffers"))
+ {
+ ATI_draw_buffers = true;
+ extensions.Remove("glATI_draw_buffers");
+ }
+ if (extensions.Contains("gl_ATI_element_array"))
+ {
+ ATI_element_array = true;
+ extensions.Remove("glATI_element_array");
+ }
+ if (extensions.Contains("gl_ATI_envmap_bumpmap"))
+ {
+ ATI_envmap_bumpmap = true;
+ extensions.Remove("glATI_envmap_bumpmap");
+ }
+ if (extensions.Contains("gl_ATI_fragment_shader"))
+ {
+ ATI_fragment_shader = true;
+ extensions.Remove("glATI_fragment_shader");
+ }
+ if (extensions.Contains("gl_ATI_map_object_buffer"))
+ {
+ ATI_map_object_buffer = true;
+ extensions.Remove("glATI_map_object_buffer");
+ }
+ if (extensions.Contains("gl_ATI_meminfo"))
+ {
+ ATI_meminfo = true;
+ extensions.Remove("glATI_meminfo");
+ }
+ if (extensions.Contains("gl_ATI_pixel_format_float"))
+ {
+ ATI_pixel_format_float = true;
+ extensions.Remove("glATI_pixel_format_float");
+ }
+ if (extensions.Contains("gl_ATI_pn_triangles"))
+ {
+ ATI_pn_triangles = true;
+ extensions.Remove("glATI_pn_triangles");
+ }
+ if (extensions.Contains("gl_ATI_separate_stencil"))
+ {
+ ATI_separate_stencil = true;
+ extensions.Remove("glATI_separate_stencil");
+ }
+ if (extensions.Contains("gl_ATI_text_fragment_shader"))
+ {
+ ATI_text_fragment_shader = true;
+ extensions.Remove("glATI_text_fragment_shader");
+ }
+ if (extensions.Contains("gl_ATI_texture_env_combine3"))
+ {
+ ATI_texture_env_combine3 = true;
+ extensions.Remove("glATI_texture_env_combine3");
+ }
+ if (extensions.Contains("gl_ATI_texture_float"))
+ {
+ ATI_texture_float = true;
+ extensions.Remove("glATI_texture_float");
+ }
+ if (extensions.Contains("gl_ATI_texture_mirror_once"))
+ {
+ ATI_texture_mirror_once = true;
+ extensions.Remove("glATI_texture_mirror_once");
+ }
+ if (extensions.Contains("gl_ATI_vertex_array_object"))
+ {
+ ATI_vertex_array_object = true;
+ extensions.Remove("glATI_vertex_array_object");
+ }
+ if (extensions.Contains("gl_ATI_vertex_attrib_array_object"))
+ {
+ ATI_vertex_attrib_array_object = true;
+ extensions.Remove("glATI_vertex_attrib_array_object");
+ }
+ if (extensions.Contains("gl_ATI_vertex_streams"))
+ {
+ ATI_vertex_streams = true;
+ extensions.Remove("glATI_vertex_streams");
+ }
+ if (extensions.Contains("gl_EXT_422_pixels"))
+ {
+ EXT_422_pixels = true;
+ extensions.Remove("glEXT_422_pixels");
+ }
+ if (extensions.Contains("gl_EXT_EGL_image_storage"))
+ {
+ EXT_EGL_image_storage = true;
+ extensions.Remove("glEXT_EGL_image_storage");
+ }
+ if (extensions.Contains("gl_EXT_EGL_sync"))
+ {
+ EXT_EGL_sync = true;
+ extensions.Remove("glEXT_EGL_sync");
+ }
+ if (extensions.Contains("gl_EXT_abgr"))
+ {
+ EXT_abgr = true;
+ extensions.Remove("glEXT_abgr");
+ }
+ if (extensions.Contains("gl_EXT_bgra"))
+ {
+ EXT_bgra = true;
+ extensions.Remove("glEXT_bgra");
+ }
+ if (extensions.Contains("gl_EXT_bindable_uniform"))
+ {
+ EXT_bindable_uniform = true;
+ extensions.Remove("glEXT_bindable_uniform");
+ }
+ if (extensions.Contains("gl_EXT_blend_color"))
+ {
+ EXT_blend_color = true;
+ extensions.Remove("glEXT_blend_color");
+ }
+ if (extensions.Contains("gl_EXT_blend_equation_separate"))
+ {
+ EXT_blend_equation_separate = true;
+ extensions.Remove("glEXT_blend_equation_separate");
+ }
+ if (extensions.Contains("gl_EXT_blend_func_separate"))
+ {
+ EXT_blend_func_separate = true;
+ extensions.Remove("glEXT_blend_func_separate");
+ }
+ if (extensions.Contains("gl_EXT_blend_logic_op"))
+ {
+ EXT_blend_logic_op = true;
+ extensions.Remove("glEXT_blend_logic_op");
+ }
+ if (extensions.Contains("gl_EXT_blend_minmax"))
+ {
+ EXT_blend_minmax = true;
+ extensions.Remove("glEXT_blend_minmax");
+ }
+ if (extensions.Contains("gl_EXT_blend_subtract"))
+ {
+ EXT_blend_subtract = true;
+ extensions.Remove("glEXT_blend_subtract");
+ }
+ if (extensions.Contains("gl_EXT_clip_volume_hint"))
+ {
+ EXT_clip_volume_hint = true;
+ extensions.Remove("glEXT_clip_volume_hint");
+ }
+ if (extensions.Contains("gl_EXT_cmyka"))
+ {
+ EXT_cmyka = true;
+ extensions.Remove("glEXT_cmyka");
+ }
+ if (extensions.Contains("gl_EXT_color_subtable"))
+ {
+ EXT_color_subtable = true;
+ extensions.Remove("glEXT_color_subtable");
+ }
+ if (extensions.Contains("gl_EXT_compiled_vertex_array"))
+ {
+ EXT_compiled_vertex_array = true;
+ extensions.Remove("glEXT_compiled_vertex_array");
+ }
+ if (extensions.Contains("gl_EXT_convolution"))
+ {
+ EXT_convolution = true;
+ extensions.Remove("glEXT_convolution");
+ }
+ if (extensions.Contains("gl_EXT_coordinate_frame"))
+ {
+ EXT_coordinate_frame = true;
+ extensions.Remove("glEXT_coordinate_frame");
+ }
+ if (extensions.Contains("gl_EXT_copy_texture"))
+ {
+ EXT_copy_texture = true;
+ extensions.Remove("glEXT_copy_texture");
+ }
+ if (extensions.Contains("gl_EXT_cull_vertex"))
+ {
+ EXT_cull_vertex = true;
+ extensions.Remove("glEXT_cull_vertex");
+ }
+ if (extensions.Contains("gl_EXT_debug_label"))
+ {
+ EXT_debug_label = true;
+ extensions.Remove("glEXT_debug_label");
+ }
+ if (extensions.Contains("gl_EXT_debug_marker"))
+ {
+ EXT_debug_marker = true;
+ extensions.Remove("glEXT_debug_marker");
+ }
+ if (extensions.Contains("gl_EXT_depth_bounds_test"))
+ {
+ EXT_depth_bounds_test = true;
+ extensions.Remove("glEXT_depth_bounds_test");
+ }
+ if (extensions.Contains("gl_EXT_direct_state_access"))
+ {
+ EXT_direct_state_access = true;
+ extensions.Remove("glEXT_direct_state_access");
+ }
+ if (extensions.Contains("gl_EXT_draw_buffers2"))
+ {
+ EXT_draw_buffers2 = true;
+ extensions.Remove("glEXT_draw_buffers2");
+ }
+ if (extensions.Contains("gl_EXT_draw_instanced"))
+ {
+ EXT_draw_instanced = true;
+ extensions.Remove("glEXT_draw_instanced");
+ }
+ if (extensions.Contains("gl_EXT_draw_range_elements"))
+ {
+ EXT_draw_range_elements = true;
+ extensions.Remove("glEXT_draw_range_elements");
+ }
+ if (extensions.Contains("gl_EXT_external_buffer"))
+ {
+ EXT_external_buffer = true;
+ extensions.Remove("glEXT_external_buffer");
+ }
+ if (extensions.Contains("gl_EXT_fog_coord"))
+ {
+ EXT_fog_coord = true;
+ extensions.Remove("glEXT_fog_coord");
+ }
+ if (extensions.Contains("gl_EXT_framebuffer_blit"))
+ {
+ EXT_framebuffer_blit = true;
+ extensions.Remove("glEXT_framebuffer_blit");
+ }
+ if (extensions.Contains("gl_EXT_framebuffer_blit_layers"))
+ {
+ EXT_framebuffer_blit_layers = true;
+ extensions.Remove("glEXT_framebuffer_blit_layers");
+ }
+ if (extensions.Contains("gl_EXT_framebuffer_multisample"))
+ {
+ EXT_framebuffer_multisample = true;
+ extensions.Remove("glEXT_framebuffer_multisample");
+ }
+ if (extensions.Contains("gl_EXT_framebuffer_multisample_blit_scaled"))
+ {
+ EXT_framebuffer_multisample_blit_scaled = true;
+ extensions.Remove("glEXT_framebuffer_multisample_blit_scaled");
+ }
+ if (extensions.Contains("gl_EXT_framebuffer_object"))
+ {
+ EXT_framebuffer_object = true;
+ extensions.Remove("glEXT_framebuffer_object");
+ }
+ if (extensions.Contains("gl_EXT_framebuffer_sRGB"))
+ {
+ EXT_framebuffer_sRGB = true;
+ extensions.Remove("glEXT_framebuffer_sRGB");
+ }
+ if (extensions.Contains("gl_EXT_geometry_shader4"))
+ {
+ EXT_geometry_shader4 = true;
+ extensions.Remove("glEXT_geometry_shader4");
+ }
+ if (extensions.Contains("gl_EXT_gpu_program_parameters"))
+ {
+ EXT_gpu_program_parameters = true;
+ extensions.Remove("glEXT_gpu_program_parameters");
+ }
+ if (extensions.Contains("gl_EXT_gpu_shader4"))
+ {
+ EXT_gpu_shader4 = true;
+ extensions.Remove("glEXT_gpu_shader4");
+ }
+ if (extensions.Contains("gl_EXT_histogram"))
+ {
+ EXT_histogram = true;
+ extensions.Remove("glEXT_histogram");
+ }
+ if (extensions.Contains("gl_EXT_index_array_formats"))
+ {
+ EXT_index_array_formats = true;
+ extensions.Remove("glEXT_index_array_formats");
+ }
+ if (extensions.Contains("gl_EXT_index_func"))
+ {
+ EXT_index_func = true;
+ extensions.Remove("glEXT_index_func");
+ }
+ if (extensions.Contains("gl_EXT_index_material"))
+ {
+ EXT_index_material = true;
+ extensions.Remove("glEXT_index_material");
+ }
+ if (extensions.Contains("gl_EXT_index_texture"))
+ {
+ EXT_index_texture = true;
+ extensions.Remove("glEXT_index_texture");
+ }
+ if (extensions.Contains("gl_EXT_light_texture"))
+ {
+ EXT_light_texture = true;
+ extensions.Remove("glEXT_light_texture");
+ }
+ if (extensions.Contains("gl_EXT_memory_object"))
+ {
+ EXT_memory_object = true;
+ extensions.Remove("glEXT_memory_object");
+ }
+ if (extensions.Contains("gl_EXT_memory_object_fd"))
+ {
+ EXT_memory_object_fd = true;
+ extensions.Remove("glEXT_memory_object_fd");
+ }
+ if (extensions.Contains("gl_EXT_memory_object_win32"))
+ {
+ EXT_memory_object_win32 = true;
+ extensions.Remove("glEXT_memory_object_win32");
+ }
+ if (extensions.Contains("gl_EXT_misc_attribute"))
+ {
+ EXT_misc_attribute = true;
+ extensions.Remove("glEXT_misc_attribute");
+ }
+ if (extensions.Contains("gl_EXT_multi_draw_arrays"))
+ {
+ EXT_multi_draw_arrays = true;
+ extensions.Remove("glEXT_multi_draw_arrays");
+ }
+ if (extensions.Contains("gl_EXT_multisample"))
+ {
+ EXT_multisample = true;
+ extensions.Remove("glEXT_multisample");
+ }
+ if (extensions.Contains("gl_EXT_multiview_tessellation_geometry_shader"))
+ {
+ EXT_multiview_tessellation_geometry_shader = true;
+ extensions.Remove("glEXT_multiview_tessellation_geometry_shader");
+ }
+ if (extensions.Contains("gl_EXT_multiview_texture_multisample"))
+ {
+ EXT_multiview_texture_multisample = true;
+ extensions.Remove("glEXT_multiview_texture_multisample");
+ }
+ if (extensions.Contains("gl_EXT_multiview_timer_query"))
+ {
+ EXT_multiview_timer_query = true;
+ extensions.Remove("glEXT_multiview_timer_query");
+ }
+ if (extensions.Contains("gl_EXT_packed_depth_stencil"))
+ {
+ EXT_packed_depth_stencil = true;
+ extensions.Remove("glEXT_packed_depth_stencil");
+ }
+ if (extensions.Contains("gl_EXT_packed_float"))
+ {
+ EXT_packed_float = true;
+ extensions.Remove("glEXT_packed_float");
+ }
+ if (extensions.Contains("gl_EXT_packed_pixels"))
+ {
+ EXT_packed_pixels = true;
+ extensions.Remove("glEXT_packed_pixels");
+ }
+ if (extensions.Contains("gl_EXT_paletted_texture"))
+ {
+ EXT_paletted_texture = true;
+ extensions.Remove("glEXT_paletted_texture");
+ }
+ if (extensions.Contains("gl_EXT_pixel_buffer_object"))
+ {
+ EXT_pixel_buffer_object = true;
+ extensions.Remove("glEXT_pixel_buffer_object");
+ }
+ if (extensions.Contains("gl_EXT_pixel_transform"))
+ {
+ EXT_pixel_transform = true;
+ extensions.Remove("glEXT_pixel_transform");
+ }
+ if (extensions.Contains("gl_EXT_pixel_transform_color_table"))
+ {
+ EXT_pixel_transform_color_table = true;
+ extensions.Remove("glEXT_pixel_transform_color_table");
+ }
+ if (extensions.Contains("gl_EXT_point_parameters"))
+ {
+ EXT_point_parameters = true;
+ extensions.Remove("glEXT_point_parameters");
+ }
+ if (extensions.Contains("gl_EXT_polygon_offset"))
+ {
+ EXT_polygon_offset = true;
+ extensions.Remove("glEXT_polygon_offset");
+ }
+ if (extensions.Contains("gl_EXT_polygon_offset_clamp"))
+ {
+ EXT_polygon_offset_clamp = true;
+ extensions.Remove("glEXT_polygon_offset_clamp");
+ }
+ if (extensions.Contains("gl_EXT_post_depth_coverage"))
+ {
+ EXT_post_depth_coverage = true;
+ extensions.Remove("glEXT_post_depth_coverage");
+ }
+ if (extensions.Contains("gl_EXT_provoking_vertex"))
+ {
+ EXT_provoking_vertex = true;
+ extensions.Remove("glEXT_provoking_vertex");
+ }
+ if (extensions.Contains("gl_EXT_raster_multisample"))
+ {
+ EXT_raster_multisample = true;
+ extensions.Remove("glEXT_raster_multisample");
+ }
+ if (extensions.Contains("gl_EXT_rescale_normal"))
+ {
+ EXT_rescale_normal = true;
+ extensions.Remove("glEXT_rescale_normal");
+ }
+ if (extensions.Contains("gl_EXT_secondary_color"))
+ {
+ EXT_secondary_color = true;
+ extensions.Remove("glEXT_secondary_color");
+ }
+ if (extensions.Contains("gl_EXT_semaphore"))
+ {
+ EXT_semaphore = true;
+ extensions.Remove("glEXT_semaphore");
+ }
+ if (extensions.Contains("gl_EXT_semaphore_fd"))
+ {
+ EXT_semaphore_fd = true;
+ extensions.Remove("glEXT_semaphore_fd");
+ }
+ if (extensions.Contains("gl_EXT_semaphore_win32"))
+ {
+ EXT_semaphore_win32 = true;
+ extensions.Remove("glEXT_semaphore_win32");
+ }
+ if (extensions.Contains("gl_EXT_separate_shader_objects"))
+ {
+ EXT_separate_shader_objects = true;
+ extensions.Remove("glEXT_separate_shader_objects");
+ }
+ if (extensions.Contains("gl_EXT_separate_specular_color"))
+ {
+ EXT_separate_specular_color = true;
+ extensions.Remove("glEXT_separate_specular_color");
+ }
+ if (extensions.Contains("gl_EXT_shader_framebuffer_fetch"))
+ {
+ EXT_shader_framebuffer_fetch = true;
+ extensions.Remove("glEXT_shader_framebuffer_fetch");
+ }
+ if (extensions.Contains("gl_EXT_shader_framebuffer_fetch_non_coherent"))
+ {
+ EXT_shader_framebuffer_fetch_non_coherent = true;
+ extensions.Remove("glEXT_shader_framebuffer_fetch_non_coherent");
+ }
+ if (extensions.Contains("gl_EXT_shader_image_load_formatted"))
+ {
+ EXT_shader_image_load_formatted = true;
+ extensions.Remove("glEXT_shader_image_load_formatted");
+ }
+ if (extensions.Contains("gl_EXT_shader_image_load_store"))
+ {
+ EXT_shader_image_load_store = true;
+ extensions.Remove("glEXT_shader_image_load_store");
+ }
+ if (extensions.Contains("gl_EXT_shader_integer_mix"))
+ {
+ EXT_shader_integer_mix = true;
+ extensions.Remove("glEXT_shader_integer_mix");
+ }
+ if (extensions.Contains("gl_EXT_shader_samples_identical"))
+ {
+ EXT_shader_samples_identical = true;
+ extensions.Remove("glEXT_shader_samples_identical");
+ }
+ if (extensions.Contains("gl_EXT_shadow_funcs"))
+ {
+ EXT_shadow_funcs = true;
+ extensions.Remove("glEXT_shadow_funcs");
+ }
+ if (extensions.Contains("gl_EXT_shared_texture_palette"))
+ {
+ EXT_shared_texture_palette = true;
+ extensions.Remove("glEXT_shared_texture_palette");
+ }
+ if (extensions.Contains("gl_EXT_sparse_texture2"))
+ {
+ EXT_sparse_texture2 = true;
+ extensions.Remove("glEXT_sparse_texture2");
+ }
+ if (extensions.Contains("gl_EXT_stencil_clear_tag"))
+ {
+ EXT_stencil_clear_tag = true;
+ extensions.Remove("glEXT_stencil_clear_tag");
+ }
+ if (extensions.Contains("gl_EXT_stencil_two_side"))
+ {
+ EXT_stencil_two_side = true;
+ extensions.Remove("glEXT_stencil_two_side");
+ }
+ if (extensions.Contains("gl_EXT_stencil_wrap"))
+ {
+ EXT_stencil_wrap = true;
+ extensions.Remove("glEXT_stencil_wrap");
+ }
+ if (extensions.Contains("gl_EXT_subtexture"))
+ {
+ EXT_subtexture = true;
+ extensions.Remove("glEXT_subtexture");
+ }
+ if (extensions.Contains("gl_EXT_texture"))
+ {
+ EXT_texture = true;
+ extensions.Remove("glEXT_texture");
+ }
+ if (extensions.Contains("gl_EXT_texture3D"))
+ {
+ EXT_texture3D = true;
+ extensions.Remove("glEXT_texture3D");
+ }
+ if (extensions.Contains("gl_EXT_texture_array"))
+ {
+ EXT_texture_array = true;
+ extensions.Remove("glEXT_texture_array");
+ }
+ if (extensions.Contains("gl_EXT_texture_buffer_object"))
+ {
+ EXT_texture_buffer_object = true;
+ extensions.Remove("glEXT_texture_buffer_object");
+ }
+ if (extensions.Contains("gl_EXT_texture_compression_latc"))
+ {
+ EXT_texture_compression_latc = true;
+ extensions.Remove("glEXT_texture_compression_latc");
+ }
+ if (extensions.Contains("gl_EXT_texture_compression_rgtc"))
+ {
+ EXT_texture_compression_rgtc = true;
+ extensions.Remove("glEXT_texture_compression_rgtc");
+ }
+ if (extensions.Contains("gl_EXT_texture_compression_s3tc"))
+ {
+ EXT_texture_compression_s3tc = true;
+ extensions.Remove("glEXT_texture_compression_s3tc");
+ }
+ if (extensions.Contains("gl_EXT_texture_cube_map"))
+ {
+ EXT_texture_cube_map = true;
+ extensions.Remove("glEXT_texture_cube_map");
+ }
+ if (extensions.Contains("gl_EXT_texture_env_add"))
+ {
+ EXT_texture_env_add = true;
+ extensions.Remove("glEXT_texture_env_add");
+ }
+ if (extensions.Contains("gl_EXT_texture_env_combine"))
+ {
+ EXT_texture_env_combine = true;
+ extensions.Remove("glEXT_texture_env_combine");
+ }
+ if (extensions.Contains("gl_EXT_texture_env_dot3"))
+ {
+ EXT_texture_env_dot3 = true;
+ extensions.Remove("glEXT_texture_env_dot3");
+ }
+ if (extensions.Contains("gl_EXT_texture_filter_anisotropic"))
+ {
+ EXT_texture_filter_anisotropic = true;
+ extensions.Remove("glEXT_texture_filter_anisotropic");
+ }
+ if (extensions.Contains("gl_EXT_texture_filter_minmax"))
+ {
+ EXT_texture_filter_minmax = true;
+ extensions.Remove("glEXT_texture_filter_minmax");
+ }
+ if (extensions.Contains("gl_EXT_texture_integer"))
+ {
+ EXT_texture_integer = true;
+ extensions.Remove("glEXT_texture_integer");
+ }
+ if (extensions.Contains("gl_EXT_texture_lod_bias"))
+ {
+ EXT_texture_lod_bias = true;
+ extensions.Remove("glEXT_texture_lod_bias");
+ }
+ if (extensions.Contains("gl_EXT_texture_mirror_clamp"))
+ {
+ EXT_texture_mirror_clamp = true;
+ extensions.Remove("glEXT_texture_mirror_clamp");
+ }
+ if (extensions.Contains("gl_EXT_texture_object"))
+ {
+ EXT_texture_object = true;
+ extensions.Remove("glEXT_texture_object");
+ }
+ if (extensions.Contains("gl_EXT_texture_perturb_normal"))
+ {
+ EXT_texture_perturb_normal = true;
+ extensions.Remove("glEXT_texture_perturb_normal");
+ }
+ if (extensions.Contains("gl_EXT_texture_sRGB"))
+ {
+ EXT_texture_sRGB = true;
+ extensions.Remove("glEXT_texture_sRGB");
+ }
+ if (extensions.Contains("gl_EXT_texture_sRGB_R8"))
+ {
+ EXT_texture_sRGB_R8 = true;
+ extensions.Remove("glEXT_texture_sRGB_R8");
+ }
+ if (extensions.Contains("gl_EXT_texture_sRGB_RG8"))
+ {
+ EXT_texture_sRGB_RG8 = true;
+ extensions.Remove("glEXT_texture_sRGB_RG8");
+ }
+ if (extensions.Contains("gl_EXT_texture_sRGB_decode"))
+ {
+ EXT_texture_sRGB_decode = true;
+ extensions.Remove("glEXT_texture_sRGB_decode");
+ }
+ if (extensions.Contains("gl_EXT_texture_shadow_lod"))
+ {
+ EXT_texture_shadow_lod = true;
+ extensions.Remove("glEXT_texture_shadow_lod");
+ }
+ if (extensions.Contains("gl_EXT_texture_shared_exponent"))
+ {
+ EXT_texture_shared_exponent = true;
+ extensions.Remove("glEXT_texture_shared_exponent");
+ }
+ if (extensions.Contains("gl_EXT_texture_snorm"))
+ {
+ EXT_texture_snorm = true;
+ extensions.Remove("glEXT_texture_snorm");
+ }
+ if (extensions.Contains("gl_EXT_texture_storage"))
+ {
+ EXT_texture_storage = true;
+ extensions.Remove("glEXT_texture_storage");
+ }
+ if (extensions.Contains("gl_EXT_texture_swizzle"))
+ {
+ EXT_texture_swizzle = true;
+ extensions.Remove("glEXT_texture_swizzle");
+ }
+ if (extensions.Contains("gl_EXT_timer_query"))
+ {
+ EXT_timer_query = true;
+ extensions.Remove("glEXT_timer_query");
+ }
+ if (extensions.Contains("gl_EXT_transform_feedback"))
+ {
+ EXT_transform_feedback = true;
+ extensions.Remove("glEXT_transform_feedback");
+ }
+ if (extensions.Contains("gl_EXT_vertex_array"))
+ {
+ EXT_vertex_array = true;
+ extensions.Remove("glEXT_vertex_array");
+ }
+ if (extensions.Contains("gl_EXT_vertex_array_bgra"))
+ {
+ EXT_vertex_array_bgra = true;
+ extensions.Remove("glEXT_vertex_array_bgra");
+ }
+ if (extensions.Contains("gl_EXT_vertex_attrib_64bit"))
+ {
+ EXT_vertex_attrib_64bit = true;
+ extensions.Remove("glEXT_vertex_attrib_64bit");
+ }
+ if (extensions.Contains("gl_EXT_vertex_shader"))
+ {
+ EXT_vertex_shader = true;
+ extensions.Remove("glEXT_vertex_shader");
+ }
+ if (extensions.Contains("gl_EXT_vertex_weighting"))
+ {
+ EXT_vertex_weighting = true;
+ extensions.Remove("glEXT_vertex_weighting");
+ }
+ if (extensions.Contains("gl_EXT_win32_keyed_mutex"))
+ {
+ EXT_win32_keyed_mutex = true;
+ extensions.Remove("glEXT_win32_keyed_mutex");
+ }
+ if (extensions.Contains("gl_EXT_window_rectangles"))
+ {
+ EXT_window_rectangles = true;
+ extensions.Remove("glEXT_window_rectangles");
+ }
+ if (extensions.Contains("gl_EXT_x11_sync_object"))
+ {
+ EXT_x11_sync_object = true;
+ extensions.Remove("glEXT_x11_sync_object");
+ }
+ if (extensions.Contains("gl_GREMEDY_frame_terminator"))
+ {
+ GREMEDY_frame_terminator = true;
+ extensions.Remove("glGREMEDY_frame_terminator");
+ }
+ if (extensions.Contains("gl_GREMEDY_string_marker"))
+ {
+ GREMEDY_string_marker = true;
+ extensions.Remove("glGREMEDY_string_marker");
+ }
+ if (extensions.Contains("gl_HP_convolution_border_modes"))
+ {
+ HP_convolution_border_modes = true;
+ extensions.Remove("glHP_convolution_border_modes");
+ }
+ if (extensions.Contains("gl_HP_image_transform"))
+ {
+ HP_image_transform = true;
+ extensions.Remove("glHP_image_transform");
+ }
+ if (extensions.Contains("gl_HP_occlusion_test"))
+ {
+ HP_occlusion_test = true;
+ extensions.Remove("glHP_occlusion_test");
+ }
+ if (extensions.Contains("gl_HP_texture_lighting"))
+ {
+ HP_texture_lighting = true;
+ extensions.Remove("glHP_texture_lighting");
+ }
+ if (extensions.Contains("gl_IBM_cull_vertex"))
+ {
+ IBM_cull_vertex = true;
+ extensions.Remove("glIBM_cull_vertex");
+ }
+ if (extensions.Contains("gl_IBM_multimode_draw_arrays"))
+ {
+ IBM_multimode_draw_arrays = true;
+ extensions.Remove("glIBM_multimode_draw_arrays");
+ }
+ if (extensions.Contains("gl_IBM_rasterpos_clip"))
+ {
+ IBM_rasterpos_clip = true;
+ extensions.Remove("glIBM_rasterpos_clip");
+ }
+ if (extensions.Contains("gl_IBM_static_data"))
+ {
+ IBM_static_data = true;
+ extensions.Remove("glIBM_static_data");
+ }
+ if (extensions.Contains("gl_IBM_texture_mirrored_repeat"))
+ {
+ IBM_texture_mirrored_repeat = true;
+ extensions.Remove("glIBM_texture_mirrored_repeat");
+ }
+ if (extensions.Contains("gl_IBM_vertex_array_lists"))
+ {
+ IBM_vertex_array_lists = true;
+ extensions.Remove("glIBM_vertex_array_lists");
+ }
+ if (extensions.Contains("gl_INGR_blend_func_separate"))
+ {
+ INGR_blend_func_separate = true;
+ extensions.Remove("glINGR_blend_func_separate");
+ }
+ if (extensions.Contains("gl_INGR_color_clamp"))
+ {
+ INGR_color_clamp = true;
+ extensions.Remove("glINGR_color_clamp");
+ }
+ if (extensions.Contains("gl_INGR_interlace_read"))
+ {
+ INGR_interlace_read = true;
+ extensions.Remove("glINGR_interlace_read");
+ }
+ if (extensions.Contains("gl_INTEL_blackhole_render"))
+ {
+ INTEL_blackhole_render = true;
+ extensions.Remove("glINTEL_blackhole_render");
+ }
+ if (extensions.Contains("gl_INTEL_conservative_rasterization"))
+ {
+ INTEL_conservative_rasterization = true;
+ extensions.Remove("glINTEL_conservative_rasterization");
+ }
+ if (extensions.Contains("gl_INTEL_fragment_shader_ordering"))
+ {
+ INTEL_fragment_shader_ordering = true;
+ extensions.Remove("glINTEL_fragment_shader_ordering");
+ }
+ if (extensions.Contains("gl_INTEL_framebuffer_CMAA"))
+ {
+ INTEL_framebuffer_CMAA = true;
+ extensions.Remove("glINTEL_framebuffer_CMAA");
+ }
+ if (extensions.Contains("gl_INTEL_map_texture"))
+ {
+ INTEL_map_texture = true;
+ extensions.Remove("glINTEL_map_texture");
+ }
+ if (extensions.Contains("gl_INTEL_parallel_arrays"))
+ {
+ INTEL_parallel_arrays = true;
+ extensions.Remove("glINTEL_parallel_arrays");
+ }
+ if (extensions.Contains("gl_INTEL_performance_query"))
+ {
+ INTEL_performance_query = true;
+ extensions.Remove("glINTEL_performance_query");
+ }
+ if (extensions.Contains("gl_KHR_blend_equation_advanced"))
+ {
+ KHR_blend_equation_advanced = true;
+ extensions.Remove("glKHR_blend_equation_advanced");
+ }
+ if (extensions.Contains("gl_KHR_blend_equation_advanced_coherent"))
+ {
+ KHR_blend_equation_advanced_coherent = true;
+ extensions.Remove("glKHR_blend_equation_advanced_coherent");
+ }
+ if (extensions.Contains("gl_KHR_context_flush_control"))
+ {
+ KHR_context_flush_control = true;
+ extensions.Remove("glKHR_context_flush_control");
+ }
+ if (extensions.Contains("gl_KHR_debug"))
+ {
+ KHR_debug = true;
+ extensions.Remove("glKHR_debug");
+ }
+ if (extensions.Contains("gl_KHR_no_error"))
+ {
+ KHR_no_error = true;
+ extensions.Remove("glKHR_no_error");
+ }
+ if (extensions.Contains("gl_KHR_parallel_shader_compile"))
+ {
+ KHR_parallel_shader_compile = true;
+ extensions.Remove("glKHR_parallel_shader_compile");
+ }
+ if (extensions.Contains("gl_KHR_robust_buffer_access_behavior"))
+ {
+ KHR_robust_buffer_access_behavior = true;
+ extensions.Remove("glKHR_robust_buffer_access_behavior");
+ }
+ if (extensions.Contains("gl_KHR_robustness"))
+ {
+ KHR_robustness = true;
+ extensions.Remove("glKHR_robustness");
+ }
+ if (extensions.Contains("gl_KHR_shader_subgroup"))
+ {
+ KHR_shader_subgroup = true;
+ extensions.Remove("glKHR_shader_subgroup");
+ }
+ if (extensions.Contains("gl_KHR_texture_compression_astc_hdr"))
+ {
+ KHR_texture_compression_astc_hdr = true;
+ extensions.Remove("glKHR_texture_compression_astc_hdr");
+ }
+ if (extensions.Contains("gl_KHR_texture_compression_astc_ldr"))
+ {
+ KHR_texture_compression_astc_ldr = true;
+ extensions.Remove("glKHR_texture_compression_astc_ldr");
+ }
+ if (extensions.Contains("gl_KHR_texture_compression_astc_sliced_3d"))
+ {
+ KHR_texture_compression_astc_sliced_3d = true;
+ extensions.Remove("glKHR_texture_compression_astc_sliced_3d");
+ }
+ if (extensions.Contains("gl_MESAX_texture_stack"))
+ {
+ MESAX_texture_stack = true;
+ extensions.Remove("glMESAX_texture_stack");
+ }
+ if (extensions.Contains("gl_MESA_framebuffer_flip_x"))
+ {
+ MESA_framebuffer_flip_x = true;
+ extensions.Remove("glMESA_framebuffer_flip_x");
+ }
+ if (extensions.Contains("gl_MESA_framebuffer_flip_y"))
+ {
+ MESA_framebuffer_flip_y = true;
+ extensions.Remove("glMESA_framebuffer_flip_y");
+ }
+ if (extensions.Contains("gl_MESA_framebuffer_swap_xy"))
+ {
+ MESA_framebuffer_swap_xy = true;
+ extensions.Remove("glMESA_framebuffer_swap_xy");
+ }
+ if (extensions.Contains("gl_MESA_pack_invert"))
+ {
+ MESA_pack_invert = true;
+ extensions.Remove("glMESA_pack_invert");
+ }
+ if (extensions.Contains("gl_MESA_program_binary_formats"))
+ {
+ MESA_program_binary_formats = true;
+ extensions.Remove("glMESA_program_binary_formats");
+ }
+ if (extensions.Contains("gl_MESA_resize_buffers"))
+ {
+ MESA_resize_buffers = true;
+ extensions.Remove("glMESA_resize_buffers");
+ }
+ if (extensions.Contains("gl_MESA_shader_integer_functions"))
+ {
+ MESA_shader_integer_functions = true;
+ extensions.Remove("glMESA_shader_integer_functions");
+ }
+ if (extensions.Contains("gl_MESA_tile_raster_order"))
+ {
+ MESA_tile_raster_order = true;
+ extensions.Remove("glMESA_tile_raster_order");
+ }
+ if (extensions.Contains("gl_MESA_window_pos"))
+ {
+ MESA_window_pos = true;
+ extensions.Remove("glMESA_window_pos");
+ }
+ if (extensions.Contains("gl_MESA_ycbcr_texture"))
+ {
+ MESA_ycbcr_texture = true;
+ extensions.Remove("glMESA_ycbcr_texture");
+ }
+ if (extensions.Contains("gl_NVX_blend_equation_advanced_multi_draw_buffers"))
+ {
+ NVX_blend_equation_advanced_multi_draw_buffers = true;
+ extensions.Remove("glNVX_blend_equation_advanced_multi_draw_buffers");
+ }
+ if (extensions.Contains("gl_NVX_conditional_render"))
+ {
+ NVX_conditional_render = true;
+ extensions.Remove("glNVX_conditional_render");
+ }
+ if (extensions.Contains("gl_NVX_gpu_memory_info"))
+ {
+ NVX_gpu_memory_info = true;
+ extensions.Remove("glNVX_gpu_memory_info");
+ }
+ if (extensions.Contains("gl_NVX_gpu_multicast2"))
+ {
+ NVX_gpu_multicast2 = true;
+ extensions.Remove("glNVX_gpu_multicast2");
+ }
+ if (extensions.Contains("gl_NVX_linked_gpu_multicast"))
+ {
+ NVX_linked_gpu_multicast = true;
+ extensions.Remove("glNVX_linked_gpu_multicast");
+ }
+ if (extensions.Contains("gl_NVX_progress_fence"))
+ {
+ NVX_progress_fence = true;
+ extensions.Remove("glNVX_progress_fence");
+ }
+ if (extensions.Contains("gl_NV_alpha_to_coverage_dither_control"))
+ {
+ NV_alpha_to_coverage_dither_control = true;
+ extensions.Remove("glNV_alpha_to_coverage_dither_control");
+ }
+ if (extensions.Contains("gl_NV_bindless_multi_draw_indirect"))
+ {
+ NV_bindless_multi_draw_indirect = true;
+ extensions.Remove("glNV_bindless_multi_draw_indirect");
+ }
+ if (extensions.Contains("gl_NV_bindless_multi_draw_indirect_count"))
+ {
+ NV_bindless_multi_draw_indirect_count = true;
+ extensions.Remove("glNV_bindless_multi_draw_indirect_count");
+ }
+ if (extensions.Contains("gl_NV_bindless_texture"))
+ {
+ NV_bindless_texture = true;
+ extensions.Remove("glNV_bindless_texture");
+ }
+ if (extensions.Contains("gl_NV_blend_equation_advanced"))
+ {
+ NV_blend_equation_advanced = true;
+ extensions.Remove("glNV_blend_equation_advanced");
+ }
+ if (extensions.Contains("gl_NV_blend_equation_advanced_coherent"))
+ {
+ NV_blend_equation_advanced_coherent = true;
+ extensions.Remove("glNV_blend_equation_advanced_coherent");
+ }
+ if (extensions.Contains("gl_NV_blend_minmax_factor"))
+ {
+ NV_blend_minmax_factor = true;
+ extensions.Remove("glNV_blend_minmax_factor");
+ }
+ if (extensions.Contains("gl_NV_blend_square"))
+ {
+ NV_blend_square = true;
+ extensions.Remove("glNV_blend_square");
+ }
+ if (extensions.Contains("gl_NV_clip_space_w_scaling"))
+ {
+ NV_clip_space_w_scaling = true;
+ extensions.Remove("glNV_clip_space_w_scaling");
+ }
+ if (extensions.Contains("gl_NV_command_list"))
+ {
+ NV_command_list = true;
+ extensions.Remove("glNV_command_list");
+ }
+ if (extensions.Contains("gl_NV_compute_program5"))
+ {
+ NV_compute_program5 = true;
+ extensions.Remove("glNV_compute_program5");
+ }
+ if (extensions.Contains("gl_NV_compute_shader_derivatives"))
+ {
+ NV_compute_shader_derivatives = true;
+ extensions.Remove("glNV_compute_shader_derivatives");
+ }
+ if (extensions.Contains("gl_NV_conditional_render"))
+ {
+ NV_conditional_render = true;
+ extensions.Remove("glNV_conditional_render");
+ }
+ if (extensions.Contains("gl_NV_conservative_raster"))
+ {
+ NV_conservative_raster = true;
+ extensions.Remove("glNV_conservative_raster");
+ }
+ if (extensions.Contains("gl_NV_conservative_raster_dilate"))
+ {
+ NV_conservative_raster_dilate = true;
+ extensions.Remove("glNV_conservative_raster_dilate");
+ }
+ if (extensions.Contains("gl_NV_conservative_raster_pre_snap"))
+ {
+ NV_conservative_raster_pre_snap = true;
+ extensions.Remove("glNV_conservative_raster_pre_snap");
+ }
+ if (extensions.Contains("gl_NV_conservative_raster_pre_snap_triangles"))
+ {
+ NV_conservative_raster_pre_snap_triangles = true;
+ extensions.Remove("glNV_conservative_raster_pre_snap_triangles");
+ }
+ if (extensions.Contains("gl_NV_conservative_raster_underestimation"))
+ {
+ NV_conservative_raster_underestimation = true;
+ extensions.Remove("glNV_conservative_raster_underestimation");
+ }
+ if (extensions.Contains("gl_NV_copy_depth_to_color"))
+ {
+ NV_copy_depth_to_color = true;
+ extensions.Remove("glNV_copy_depth_to_color");
+ }
+ if (extensions.Contains("gl_NV_copy_image"))
+ {
+ NV_copy_image = true;
+ extensions.Remove("glNV_copy_image");
+ }
+ if (extensions.Contains("gl_NV_deep_texture3D"))
+ {
+ NV_deep_texture3D = true;
+ extensions.Remove("glNV_deep_texture3D");
+ }
+ if (extensions.Contains("gl_NV_depth_buffer_float"))
+ {
+ NV_depth_buffer_float = true;
+ extensions.Remove("glNV_depth_buffer_float");
+ }
+ if (extensions.Contains("gl_NV_depth_clamp"))
+ {
+ NV_depth_clamp = true;
+ extensions.Remove("glNV_depth_clamp");
+ }
+ if (extensions.Contains("gl_NV_draw_texture"))
+ {
+ NV_draw_texture = true;
+ extensions.Remove("glNV_draw_texture");
+ }
+ if (extensions.Contains("gl_NV_draw_vulkan_image"))
+ {
+ NV_draw_vulkan_image = true;
+ extensions.Remove("glNV_draw_vulkan_image");
+ }
+ if (extensions.Contains("gl_NV_evaluators"))
+ {
+ NV_evaluators = true;
+ extensions.Remove("glNV_evaluators");
+ }
+ if (extensions.Contains("gl_NV_explicit_multisample"))
+ {
+ NV_explicit_multisample = true;
+ extensions.Remove("glNV_explicit_multisample");
+ }
+ if (extensions.Contains("gl_NV_fence"))
+ {
+ NV_fence = true;
+ extensions.Remove("glNV_fence");
+ }
+ if (extensions.Contains("gl_NV_fill_rectangle"))
+ {
+ NV_fill_rectangle = true;
+ extensions.Remove("glNV_fill_rectangle");
+ }
+ if (extensions.Contains("gl_NV_float_buffer"))
+ {
+ NV_float_buffer = true;
+ extensions.Remove("glNV_float_buffer");
+ }
+ if (extensions.Contains("gl_NV_fog_distance"))
+ {
+ NV_fog_distance = true;
+ extensions.Remove("glNV_fog_distance");
+ }
+ if (extensions.Contains("gl_NV_fragment_coverage_to_color"))
+ {
+ NV_fragment_coverage_to_color = true;
+ extensions.Remove("glNV_fragment_coverage_to_color");
+ }
+ if (extensions.Contains("gl_NV_fragment_program"))
+ {
+ NV_fragment_program = true;
+ extensions.Remove("glNV_fragment_program");
+ }
+ if (extensions.Contains("gl_NV_fragment_program2"))
+ {
+ NV_fragment_program2 = true;
+ extensions.Remove("glNV_fragment_program2");
+ }
+ if (extensions.Contains("gl_NV_fragment_program4"))
+ {
+ NV_fragment_program4 = true;
+ extensions.Remove("glNV_fragment_program4");
+ }
+ if (extensions.Contains("gl_NV_fragment_program_option"))
+ {
+ NV_fragment_program_option = true;
+ extensions.Remove("glNV_fragment_program_option");
+ }
+ if (extensions.Contains("gl_NV_fragment_shader_barycentric"))
+ {
+ NV_fragment_shader_barycentric = true;
+ extensions.Remove("glNV_fragment_shader_barycentric");
+ }
+ if (extensions.Contains("gl_NV_fragment_shader_interlock"))
+ {
+ NV_fragment_shader_interlock = true;
+ extensions.Remove("glNV_fragment_shader_interlock");
+ }
+ if (extensions.Contains("gl_NV_framebuffer_mixed_samples"))
+ {
+ NV_framebuffer_mixed_samples = true;
+ extensions.Remove("glNV_framebuffer_mixed_samples");
+ }
+ if (extensions.Contains("gl_NV_framebuffer_multisample_coverage"))
+ {
+ NV_framebuffer_multisample_coverage = true;
+ extensions.Remove("glNV_framebuffer_multisample_coverage");
+ }
+ if (extensions.Contains("gl_NV_geometry_program4"))
+ {
+ NV_geometry_program4 = true;
+ extensions.Remove("glNV_geometry_program4");
+ }
+ if (extensions.Contains("gl_NV_geometry_shader4"))
+ {
+ NV_geometry_shader4 = true;
+ extensions.Remove("glNV_geometry_shader4");
+ }
+ if (extensions.Contains("gl_NV_geometry_shader_passthrough"))
+ {
+ NV_geometry_shader_passthrough = true;
+ extensions.Remove("glNV_geometry_shader_passthrough");
+ }
+ if (extensions.Contains("gl_NV_gpu_multicast"))
+ {
+ NV_gpu_multicast = true;
+ extensions.Remove("glNV_gpu_multicast");
+ }
+ if (extensions.Contains("gl_NV_gpu_program4"))
+ {
+ NV_gpu_program4 = true;
+ extensions.Remove("glNV_gpu_program4");
+ }
+ if (extensions.Contains("gl_NV_gpu_program5"))
+ {
+ NV_gpu_program5 = true;
+ extensions.Remove("glNV_gpu_program5");
+ }
+ if (extensions.Contains("gl_NV_gpu_program5_mem_extended"))
+ {
+ NV_gpu_program5_mem_extended = true;
+ extensions.Remove("glNV_gpu_program5_mem_extended");
+ }
+ if (extensions.Contains("gl_NV_gpu_shader5"))
+ {
+ NV_gpu_shader5 = true;
+ extensions.Remove("glNV_gpu_shader5");
+ }
+ if (extensions.Contains("gl_NV_half_float"))
+ {
+ NV_half_float = true;
+ extensions.Remove("glNV_half_float");
+ }
+ if (extensions.Contains("gl_NV_internalformat_sample_query"))
+ {
+ NV_internalformat_sample_query = true;
+ extensions.Remove("glNV_internalformat_sample_query");
+ }
+ if (extensions.Contains("gl_NV_light_max_exponent"))
+ {
+ NV_light_max_exponent = true;
+ extensions.Remove("glNV_light_max_exponent");
+ }
+ if (extensions.Contains("gl_NV_memory_attachment"))
+ {
+ NV_memory_attachment = true;
+ extensions.Remove("glNV_memory_attachment");
+ }
+ if (extensions.Contains("gl_NV_memory_object_sparse"))
+ {
+ NV_memory_object_sparse = true;
+ extensions.Remove("glNV_memory_object_sparse");
+ }
+ if (extensions.Contains("gl_NV_mesh_shader"))
+ {
+ NV_mesh_shader = true;
+ extensions.Remove("glNV_mesh_shader");
+ }
+ if (extensions.Contains("gl_NV_multisample_coverage"))
+ {
+ NV_multisample_coverage = true;
+ extensions.Remove("glNV_multisample_coverage");
+ }
+ if (extensions.Contains("gl_NV_multisample_filter_hint"))
+ {
+ NV_multisample_filter_hint = true;
+ extensions.Remove("glNV_multisample_filter_hint");
+ }
+ if (extensions.Contains("gl_NV_occlusion_query"))
+ {
+ NV_occlusion_query = true;
+ extensions.Remove("glNV_occlusion_query");
+ }
+ if (extensions.Contains("gl_NV_packed_depth_stencil"))
+ {
+ NV_packed_depth_stencil = true;
+ extensions.Remove("glNV_packed_depth_stencil");
+ }
+ if (extensions.Contains("gl_NV_parameter_buffer_object"))
+ {
+ NV_parameter_buffer_object = true;
+ extensions.Remove("glNV_parameter_buffer_object");
+ }
+ if (extensions.Contains("gl_NV_parameter_buffer_object2"))
+ {
+ NV_parameter_buffer_object2 = true;
+ extensions.Remove("glNV_parameter_buffer_object2");
+ }
+ if (extensions.Contains("gl_NV_path_rendering"))
+ {
+ NV_path_rendering = true;
+ extensions.Remove("glNV_path_rendering");
+ }
+ if (extensions.Contains("gl_NV_path_rendering_shared_edge"))
+ {
+ NV_path_rendering_shared_edge = true;
+ extensions.Remove("glNV_path_rendering_shared_edge");
+ }
+ if (extensions.Contains("gl_NV_pixel_data_range"))
+ {
+ NV_pixel_data_range = true;
+ extensions.Remove("glNV_pixel_data_range");
+ }
+ if (extensions.Contains("gl_NV_point_sprite"))
+ {
+ NV_point_sprite = true;
+ extensions.Remove("glNV_point_sprite");
+ }
+ if (extensions.Contains("gl_NV_present_video"))
+ {
+ NV_present_video = true;
+ extensions.Remove("glNV_present_video");
+ }
+ if (extensions.Contains("gl_NV_primitive_restart"))
+ {
+ NV_primitive_restart = true;
+ extensions.Remove("glNV_primitive_restart");
+ }
+ if (extensions.Contains("gl_NV_primitive_shading_rate"))
+ {
+ NV_primitive_shading_rate = true;
+ extensions.Remove("glNV_primitive_shading_rate");
+ }
+ if (extensions.Contains("gl_NV_query_resource"))
+ {
+ NV_query_resource = true;
+ extensions.Remove("glNV_query_resource");
+ }
+ if (extensions.Contains("gl_NV_query_resource_tag"))
+ {
+ NV_query_resource_tag = true;
+ extensions.Remove("glNV_query_resource_tag");
+ }
+ if (extensions.Contains("gl_NV_register_combiners"))
+ {
+ NV_register_combiners = true;
+ extensions.Remove("glNV_register_combiners");
+ }
+ if (extensions.Contains("gl_NV_register_combiners2"))
+ {
+ NV_register_combiners2 = true;
+ extensions.Remove("glNV_register_combiners2");
+ }
+ if (extensions.Contains("gl_NV_representative_fragment_test"))
+ {
+ NV_representative_fragment_test = true;
+ extensions.Remove("glNV_representative_fragment_test");
+ }
+ if (extensions.Contains("gl_NV_robustness_video_memory_purge"))
+ {
+ NV_robustness_video_memory_purge = true;
+ extensions.Remove("glNV_robustness_video_memory_purge");
+ }
+ if (extensions.Contains("gl_NV_sample_locations"))
+ {
+ NV_sample_locations = true;
+ extensions.Remove("glNV_sample_locations");
+ }
+ if (extensions.Contains("gl_NV_sample_mask_override_coverage"))
+ {
+ NV_sample_mask_override_coverage = true;
+ extensions.Remove("glNV_sample_mask_override_coverage");
+ }
+ if (extensions.Contains("gl_NV_scissor_exclusive"))
+ {
+ NV_scissor_exclusive = true;
+ extensions.Remove("glNV_scissor_exclusive");
+ }
+ if (extensions.Contains("gl_NV_shader_atomic_counters"))
+ {
+ NV_shader_atomic_counters = true;
+ extensions.Remove("glNV_shader_atomic_counters");
+ }
+ if (extensions.Contains("gl_NV_shader_atomic_float"))
+ {
+ NV_shader_atomic_float = true;
+ extensions.Remove("glNV_shader_atomic_float");
+ }
+ if (extensions.Contains("gl_NV_shader_atomic_float64"))
+ {
+ NV_shader_atomic_float64 = true;
+ extensions.Remove("glNV_shader_atomic_float64");
+ }
+ if (extensions.Contains("gl_NV_shader_atomic_fp16_vector"))
+ {
+ NV_shader_atomic_fp16_vector = true;
+ extensions.Remove("glNV_shader_atomic_fp16_vector");
+ }
+ if (extensions.Contains("gl_NV_shader_atomic_int64"))
+ {
+ NV_shader_atomic_int64 = true;
+ extensions.Remove("glNV_shader_atomic_int64");
+ }
+ if (extensions.Contains("gl_NV_shader_buffer_load"))
+ {
+ NV_shader_buffer_load = true;
+ extensions.Remove("glNV_shader_buffer_load");
+ }
+ if (extensions.Contains("gl_NV_shader_buffer_store"))
+ {
+ NV_shader_buffer_store = true;
+ extensions.Remove("glNV_shader_buffer_store");
+ }
+ if (extensions.Contains("gl_NV_shader_storage_buffer_object"))
+ {
+ NV_shader_storage_buffer_object = true;
+ extensions.Remove("glNV_shader_storage_buffer_object");
+ }
+ if (extensions.Contains("gl_NV_shader_subgroup_partitioned"))
+ {
+ NV_shader_subgroup_partitioned = true;
+ extensions.Remove("glNV_shader_subgroup_partitioned");
+ }
+ if (extensions.Contains("gl_NV_shader_texture_footprint"))
+ {
+ NV_shader_texture_footprint = true;
+ extensions.Remove("glNV_shader_texture_footprint");
+ }
+ if (extensions.Contains("gl_NV_shader_thread_group"))
+ {
+ NV_shader_thread_group = true;
+ extensions.Remove("glNV_shader_thread_group");
+ }
+ if (extensions.Contains("gl_NV_shader_thread_shuffle"))
+ {
+ NV_shader_thread_shuffle = true;
+ extensions.Remove("glNV_shader_thread_shuffle");
+ }
+ if (extensions.Contains("gl_NV_shading_rate_image"))
+ {
+ NV_shading_rate_image = true;
+ extensions.Remove("glNV_shading_rate_image");
+ }
+ if (extensions.Contains("gl_NV_stereo_view_rendering"))
+ {
+ NV_stereo_view_rendering = true;
+ extensions.Remove("glNV_stereo_view_rendering");
+ }
+ if (extensions.Contains("gl_NV_tessellation_program5"))
+ {
+ NV_tessellation_program5 = true;
+ extensions.Remove("glNV_tessellation_program5");
+ }
+ if (extensions.Contains("gl_NV_texgen_emboss"))
+ {
+ NV_texgen_emboss = true;
+ extensions.Remove("glNV_texgen_emboss");
+ }
+ if (extensions.Contains("gl_NV_texgen_reflection"))
+ {
+ NV_texgen_reflection = true;
+ extensions.Remove("glNV_texgen_reflection");
+ }
+ if (extensions.Contains("gl_NV_texture_barrier"))
+ {
+ NV_texture_barrier = true;
+ extensions.Remove("glNV_texture_barrier");
+ }
+ if (extensions.Contains("gl_NV_texture_compression_vtc"))
+ {
+ NV_texture_compression_vtc = true;
+ extensions.Remove("glNV_texture_compression_vtc");
+ }
+ if (extensions.Contains("gl_NV_texture_env_combine4"))
+ {
+ NV_texture_env_combine4 = true;
+ extensions.Remove("glNV_texture_env_combine4");
+ }
+ if (extensions.Contains("gl_NV_texture_expand_normal"))
+ {
+ NV_texture_expand_normal = true;
+ extensions.Remove("glNV_texture_expand_normal");
+ }
+ if (extensions.Contains("gl_NV_texture_multisample"))
+ {
+ NV_texture_multisample = true;
+ extensions.Remove("glNV_texture_multisample");
+ }
+ if (extensions.Contains("gl_NV_texture_rectangle"))
+ {
+ NV_texture_rectangle = true;
+ extensions.Remove("glNV_texture_rectangle");
+ }
+ if (extensions.Contains("gl_NV_texture_rectangle_compressed"))
+ {
+ NV_texture_rectangle_compressed = true;
+ extensions.Remove("glNV_texture_rectangle_compressed");
+ }
+ if (extensions.Contains("gl_NV_texture_shader"))
+ {
+ NV_texture_shader = true;
+ extensions.Remove("glNV_texture_shader");
+ }
+ if (extensions.Contains("gl_NV_texture_shader2"))
+ {
+ NV_texture_shader2 = true;
+ extensions.Remove("glNV_texture_shader2");
+ }
+ if (extensions.Contains("gl_NV_texture_shader3"))
+ {
+ NV_texture_shader3 = true;
+ extensions.Remove("glNV_texture_shader3");
+ }
+ if (extensions.Contains("gl_NV_timeline_semaphore"))
+ {
+ NV_timeline_semaphore = true;
+ extensions.Remove("glNV_timeline_semaphore");
+ }
+ if (extensions.Contains("gl_NV_transform_feedback"))
+ {
+ NV_transform_feedback = true;
+ extensions.Remove("glNV_transform_feedback");
+ }
+ if (extensions.Contains("gl_NV_transform_feedback2"))
+ {
+ NV_transform_feedback2 = true;
+ extensions.Remove("glNV_transform_feedback2");
+ }
+ if (extensions.Contains("gl_NV_uniform_buffer_std430_layout"))
+ {
+ NV_uniform_buffer_std430_layout = true;
+ extensions.Remove("glNV_uniform_buffer_std430_layout");
+ }
+ if (extensions.Contains("gl_NV_uniform_buffer_unified_memory"))
+ {
+ NV_uniform_buffer_unified_memory = true;
+ extensions.Remove("glNV_uniform_buffer_unified_memory");
+ }
+ if (extensions.Contains("gl_NV_vdpau_interop"))
+ {
+ NV_vdpau_interop = true;
+ extensions.Remove("glNV_vdpau_interop");
+ }
+ if (extensions.Contains("gl_NV_vdpau_interop2"))
+ {
+ NV_vdpau_interop2 = true;
+ extensions.Remove("glNV_vdpau_interop2");
+ }
+ if (extensions.Contains("gl_NV_vertex_array_range"))
+ {
+ NV_vertex_array_range = true;
+ extensions.Remove("glNV_vertex_array_range");
+ }
+ if (extensions.Contains("gl_NV_vertex_array_range2"))
+ {
+ NV_vertex_array_range2 = true;
+ extensions.Remove("glNV_vertex_array_range2");
+ }
+ if (extensions.Contains("gl_NV_vertex_attrib_integer_64bit"))
+ {
+ NV_vertex_attrib_integer_64bit = true;
+ extensions.Remove("glNV_vertex_attrib_integer_64bit");
+ }
+ if (extensions.Contains("gl_NV_vertex_buffer_unified_memory"))
+ {
+ NV_vertex_buffer_unified_memory = true;
+ extensions.Remove("glNV_vertex_buffer_unified_memory");
+ }
+ if (extensions.Contains("gl_NV_vertex_program"))
+ {
+ NV_vertex_program = true;
+ extensions.Remove("glNV_vertex_program");
+ }
+ if (extensions.Contains("gl_NV_vertex_program1_1"))
+ {
+ NV_vertex_program1_1 = true;
+ extensions.Remove("glNV_vertex_program1_1");
+ }
+ if (extensions.Contains("gl_NV_vertex_program2"))
+ {
+ NV_vertex_program2 = true;
+ extensions.Remove("glNV_vertex_program2");
+ }
+ if (extensions.Contains("gl_NV_vertex_program2_option"))
+ {
+ NV_vertex_program2_option = true;
+ extensions.Remove("glNV_vertex_program2_option");
+ }
+ if (extensions.Contains("gl_NV_vertex_program3"))
+ {
+ NV_vertex_program3 = true;
+ extensions.Remove("glNV_vertex_program3");
+ }
+ if (extensions.Contains("gl_NV_vertex_program4"))
+ {
+ NV_vertex_program4 = true;
+ extensions.Remove("glNV_vertex_program4");
+ }
+ if (extensions.Contains("gl_NV_video_capture"))
+ {
+ NV_video_capture = true;
+ extensions.Remove("glNV_video_capture");
+ }
+ if (extensions.Contains("gl_NV_viewport_array2"))
+ {
+ NV_viewport_array2 = true;
+ extensions.Remove("glNV_viewport_array2");
+ }
+ if (extensions.Contains("gl_NV_viewport_swizzle"))
+ {
+ NV_viewport_swizzle = true;
+ extensions.Remove("glNV_viewport_swizzle");
+ }
+ if (extensions.Contains("gl_OES_byte_coordinates"))
+ {
+ OES_byte_coordinates = true;
+ extensions.Remove("glOES_byte_coordinates");
+ }
+ if (extensions.Contains("gl_OES_compressed_paletted_texture"))
+ {
+ OES_compressed_paletted_texture = true;
+ extensions.Remove("glOES_compressed_paletted_texture");
+ }
+ if (extensions.Contains("gl_OES_fixed_point"))
+ {
+ OES_fixed_point = true;
+ extensions.Remove("glOES_fixed_point");
+ }
+ if (extensions.Contains("gl_OES_query_matrix"))
+ {
+ OES_query_matrix = true;
+ extensions.Remove("glOES_query_matrix");
+ }
+ if (extensions.Contains("gl_OES_read_format"))
+ {
+ OES_read_format = true;
+ extensions.Remove("glOES_read_format");
+ }
+ if (extensions.Contains("gl_OES_single_precision"))
+ {
+ OES_single_precision = true;
+ extensions.Remove("glOES_single_precision");
+ }
+ if (extensions.Contains("gl_OML_interlace"))
+ {
+ OML_interlace = true;
+ extensions.Remove("glOML_interlace");
+ }
+ if (extensions.Contains("gl_OML_resample"))
+ {
+ OML_resample = true;
+ extensions.Remove("glOML_resample");
+ }
+ if (extensions.Contains("gl_OML_subsample"))
+ {
+ OML_subsample = true;
+ extensions.Remove("glOML_subsample");
+ }
+ if (extensions.Contains("gl_OVR_multiview"))
+ {
+ OVR_multiview = true;
+ extensions.Remove("glOVR_multiview");
+ }
+ if (extensions.Contains("gl_OVR_multiview2"))
+ {
+ OVR_multiview2 = true;
+ extensions.Remove("glOVR_multiview2");
+ }
+ if (extensions.Contains("gl_PGI_misc_hints"))
+ {
+ PGI_misc_hints = true;
+ extensions.Remove("glPGI_misc_hints");
+ }
+ if (extensions.Contains("gl_PGI_vertex_hints"))
+ {
+ PGI_vertex_hints = true;
+ extensions.Remove("glPGI_vertex_hints");
+ }
+ if (extensions.Contains("gl_REND_screen_coordinates"))
+ {
+ REND_screen_coordinates = true;
+ extensions.Remove("glREND_screen_coordinates");
+ }
+ if (extensions.Contains("gl_S3_s3tc"))
+ {
+ S3_s3tc = true;
+ extensions.Remove("glS3_s3tc");
+ }
+ if (extensions.Contains("gl_SGIS_detail_texture"))
+ {
+ SGIS_detail_texture = true;
+ extensions.Remove("glSGIS_detail_texture");
+ }
+ if (extensions.Contains("gl_SGIS_fog_function"))
+ {
+ SGIS_fog_function = true;
+ extensions.Remove("glSGIS_fog_function");
+ }
+ if (extensions.Contains("gl_SGIS_generate_mipmap"))
+ {
+ SGIS_generate_mipmap = true;
+ extensions.Remove("glSGIS_generate_mipmap");
+ }
+ if (extensions.Contains("gl_SGIS_multisample"))
+ {
+ SGIS_multisample = true;
+ extensions.Remove("glSGIS_multisample");
+ }
+ if (extensions.Contains("gl_SGIS_pixel_texture"))
+ {
+ SGIS_pixel_texture = true;
+ extensions.Remove("glSGIS_pixel_texture");
+ }
+ if (extensions.Contains("gl_SGIS_point_line_texgen"))
+ {
+ SGIS_point_line_texgen = true;
+ extensions.Remove("glSGIS_point_line_texgen");
+ }
+ if (extensions.Contains("gl_SGIS_point_parameters"))
+ {
+ SGIS_point_parameters = true;
+ extensions.Remove("glSGIS_point_parameters");
+ }
+ if (extensions.Contains("gl_SGIS_sharpen_texture"))
+ {
+ SGIS_sharpen_texture = true;
+ extensions.Remove("glSGIS_sharpen_texture");
+ }
+ if (extensions.Contains("gl_SGIS_texture4D"))
+ {
+ SGIS_texture4D = true;
+ extensions.Remove("glSGIS_texture4D");
+ }
+ if (extensions.Contains("gl_SGIS_texture_border_clamp"))
+ {
+ SGIS_texture_border_clamp = true;
+ extensions.Remove("glSGIS_texture_border_clamp");
+ }
+ if (extensions.Contains("gl_SGIS_texture_color_mask"))
+ {
+ SGIS_texture_color_mask = true;
+ extensions.Remove("glSGIS_texture_color_mask");
+ }
+ if (extensions.Contains("gl_SGIS_texture_edge_clamp"))
+ {
+ SGIS_texture_edge_clamp = true;
+ extensions.Remove("glSGIS_texture_edge_clamp");
+ }
+ if (extensions.Contains("gl_SGIS_texture_filter4"))
+ {
+ SGIS_texture_filter4 = true;
+ extensions.Remove("glSGIS_texture_filter4");
+ }
+ if (extensions.Contains("gl_SGIS_texture_lod"))
+ {
+ SGIS_texture_lod = true;
+ extensions.Remove("glSGIS_texture_lod");
+ }
+ if (extensions.Contains("gl_SGIS_texture_select"))
+ {
+ SGIS_texture_select = true;
+ extensions.Remove("glSGIS_texture_select");
+ }
+ if (extensions.Contains("gl_SGIX_async"))
+ {
+ SGIX_async = true;
+ extensions.Remove("glSGIX_async");
+ }
+ if (extensions.Contains("gl_SGIX_async_histogram"))
+ {
+ SGIX_async_histogram = true;
+ extensions.Remove("glSGIX_async_histogram");
+ }
+ if (extensions.Contains("gl_SGIX_async_pixel"))
+ {
+ SGIX_async_pixel = true;
+ extensions.Remove("glSGIX_async_pixel");
+ }
+ if (extensions.Contains("gl_SGIX_blend_alpha_minmax"))
+ {
+ SGIX_blend_alpha_minmax = true;
+ extensions.Remove("glSGIX_blend_alpha_minmax");
+ }
+ if (extensions.Contains("gl_SGIX_calligraphic_fragment"))
+ {
+ SGIX_calligraphic_fragment = true;
+ extensions.Remove("glSGIX_calligraphic_fragment");
+ }
+ if (extensions.Contains("gl_SGIX_clipmap"))
+ {
+ SGIX_clipmap = true;
+ extensions.Remove("glSGIX_clipmap");
+ }
+ if (extensions.Contains("gl_SGIX_convolution_accuracy"))
+ {
+ SGIX_convolution_accuracy = true;
+ extensions.Remove("glSGIX_convolution_accuracy");
+ }
+ if (extensions.Contains("gl_SGIX_depth_pass_instrument"))
+ {
+ SGIX_depth_pass_instrument = true;
+ extensions.Remove("glSGIX_depth_pass_instrument");
+ }
+ if (extensions.Contains("gl_SGIX_depth_texture"))
+ {
+ SGIX_depth_texture = true;
+ extensions.Remove("glSGIX_depth_texture");
+ }
+ if (extensions.Contains("gl_SGIX_flush_raster"))
+ {
+ SGIX_flush_raster = true;
+ extensions.Remove("glSGIX_flush_raster");
+ }
+ if (extensions.Contains("gl_SGIX_fog_offset"))
+ {
+ SGIX_fog_offset = true;
+ extensions.Remove("glSGIX_fog_offset");
+ }
+ if (extensions.Contains("gl_SGIX_fragment_lighting"))
+ {
+ SGIX_fragment_lighting = true;
+ extensions.Remove("glSGIX_fragment_lighting");
+ }
+ if (extensions.Contains("gl_SGIX_framezoom"))
+ {
+ SGIX_framezoom = true;
+ extensions.Remove("glSGIX_framezoom");
+ }
+ if (extensions.Contains("gl_SGIX_igloo_interface"))
+ {
+ SGIX_igloo_interface = true;
+ extensions.Remove("glSGIX_igloo_interface");
+ }
+ if (extensions.Contains("gl_SGIX_instruments"))
+ {
+ SGIX_instruments = true;
+ extensions.Remove("glSGIX_instruments");
+ }
+ if (extensions.Contains("gl_SGIX_interlace"))
+ {
+ SGIX_interlace = true;
+ extensions.Remove("glSGIX_interlace");
+ }
+ if (extensions.Contains("gl_SGIX_ir_instrument1"))
+ {
+ SGIX_ir_instrument1 = true;
+ extensions.Remove("glSGIX_ir_instrument1");
+ }
+ if (extensions.Contains("gl_SGIX_list_priority"))
+ {
+ SGIX_list_priority = true;
+ extensions.Remove("glSGIX_list_priority");
+ }
+ if (extensions.Contains("gl_SGIX_pixel_texture"))
+ {
+ SGIX_pixel_texture = true;
+ extensions.Remove("glSGIX_pixel_texture");
+ }
+ if (extensions.Contains("gl_SGIX_pixel_tiles"))
+ {
+ SGIX_pixel_tiles = true;
+ extensions.Remove("glSGIX_pixel_tiles");
+ }
+ if (extensions.Contains("gl_SGIX_polynomial_ffd"))
+ {
+ SGIX_polynomial_ffd = true;
+ extensions.Remove("glSGIX_polynomial_ffd");
+ }
+ if (extensions.Contains("gl_SGIX_reference_plane"))
+ {
+ SGIX_reference_plane = true;
+ extensions.Remove("glSGIX_reference_plane");
+ }
+ if (extensions.Contains("gl_SGIX_resample"))
+ {
+ SGIX_resample = true;
+ extensions.Remove("glSGIX_resample");
+ }
+ if (extensions.Contains("gl_SGIX_scalebias_hint"))
+ {
+ SGIX_scalebias_hint = true;
+ extensions.Remove("glSGIX_scalebias_hint");
+ }
+ if (extensions.Contains("gl_SGIX_shadow"))
+ {
+ SGIX_shadow = true;
+ extensions.Remove("glSGIX_shadow");
+ }
+ if (extensions.Contains("gl_SGIX_shadow_ambient"))
+ {
+ SGIX_shadow_ambient = true;
+ extensions.Remove("glSGIX_shadow_ambient");
+ }
+ if (extensions.Contains("gl_SGIX_sprite"))
+ {
+ SGIX_sprite = true;
+ extensions.Remove("glSGIX_sprite");
+ }
+ if (extensions.Contains("gl_SGIX_subsample"))
+ {
+ SGIX_subsample = true;
+ extensions.Remove("glSGIX_subsample");
+ }
+ if (extensions.Contains("gl_SGIX_tag_sample_buffer"))
+ {
+ SGIX_tag_sample_buffer = true;
+ extensions.Remove("glSGIX_tag_sample_buffer");
+ }
+ if (extensions.Contains("gl_SGIX_texture_add_env"))
+ {
+ SGIX_texture_add_env = true;
+ extensions.Remove("glSGIX_texture_add_env");
+ }
+ if (extensions.Contains("gl_SGIX_texture_coordinate_clamp"))
+ {
+ SGIX_texture_coordinate_clamp = true;
+ extensions.Remove("glSGIX_texture_coordinate_clamp");
+ }
+ if (extensions.Contains("gl_SGIX_texture_lod_bias"))
+ {
+ SGIX_texture_lod_bias = true;
+ extensions.Remove("glSGIX_texture_lod_bias");
+ }
+ if (extensions.Contains("gl_SGIX_texture_multi_buffer"))
+ {
+ SGIX_texture_multi_buffer = true;
+ extensions.Remove("glSGIX_texture_multi_buffer");
+ }
+ if (extensions.Contains("gl_SGIX_texture_scale_bias"))
+ {
+ SGIX_texture_scale_bias = true;
+ extensions.Remove("glSGIX_texture_scale_bias");
+ }
+ if (extensions.Contains("gl_SGIX_vertex_preclip"))
+ {
+ SGIX_vertex_preclip = true;
+ extensions.Remove("glSGIX_vertex_preclip");
+ }
+ if (extensions.Contains("gl_SGIX_ycrcb"))
+ {
+ SGIX_ycrcb = true;
+ extensions.Remove("glSGIX_ycrcb");
+ }
+ if (extensions.Contains("gl_SGIX_ycrcb_subsample"))
+ {
+ SGIX_ycrcb_subsample = true;
+ extensions.Remove("glSGIX_ycrcb_subsample");
+ }
+ if (extensions.Contains("gl_SGIX_ycrcba"))
+ {
+ SGIX_ycrcba = true;
+ extensions.Remove("glSGIX_ycrcba");
+ }
+ if (extensions.Contains("gl_SGI_color_matrix"))
+ {
+ SGI_color_matrix = true;
+ extensions.Remove("glSGI_color_matrix");
+ }
+ if (extensions.Contains("gl_SGI_color_table"))
+ {
+ SGI_color_table = true;
+ extensions.Remove("glSGI_color_table");
+ }
+ if (extensions.Contains("gl_SGI_texture_color_table"))
+ {
+ SGI_texture_color_table = true;
+ extensions.Remove("glSGI_texture_color_table");
+ }
+ if (extensions.Contains("gl_SUNX_constant_data"))
+ {
+ SUNX_constant_data = true;
+ extensions.Remove("glSUNX_constant_data");
+ }
+ if (extensions.Contains("gl_SUN_convolution_border_modes"))
+ {
+ SUN_convolution_border_modes = true;
+ extensions.Remove("glSUN_convolution_border_modes");
+ }
+ if (extensions.Contains("gl_SUN_global_alpha"))
+ {
+ SUN_global_alpha = true;
+ extensions.Remove("glSUN_global_alpha");
+ }
+ if (extensions.Contains("gl_SUN_mesh_array"))
+ {
+ SUN_mesh_array = true;
+ extensions.Remove("glSUN_mesh_array");
+ }
+ if (extensions.Contains("gl_SUN_slice_accum"))
+ {
+ SUN_slice_accum = true;
+ extensions.Remove("glSUN_slice_accum");
+ }
+ if (extensions.Contains("gl_SUN_triangle_list"))
+ {
+ SUN_triangle_list = true;
+ extensions.Remove("glSUN_triangle_list");
+ }
+ if (extensions.Contains("gl_SUN_vertex"))
+ {
+ SUN_vertex = true;
+ extensions.Remove("glSUN_vertex");
+ }
+ if (extensions.Contains("gl_WIN_phong_shading"))
+ {
+ WIN_phong_shading = true;
+ extensions.Remove("glWIN_phong_shading");
+ }
+ if (extensions.Contains("gl_WIN_specular_fog"))
+ {
+ WIN_specular_fog = true;
+ extensions.Remove("glWIN_specular_fog");
+ }
+
+ #endregion checkGLextensions
+ }
+
+ internal static void CheckCoreVersion(int majorVersion, int minorVersion)
+ {
+ if (majorVersion < 3) {
+ throw new InvalidOperationException(
+ "StgSharp does not support OpenGL immediate mode.");
+ }
+
+ if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 0)))
+ {
+ core10 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 1)))
+ {
+ core11 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 2)))
+ {
+ core12 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 3)))
+ {
+ core13 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 4)))
+ {
+ core14 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 5)))
+ {
+ core15 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 2) || ((majorVersion == 2) && (minorVersion == 0)))
+ {
+ core20 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 2) || ((majorVersion == 2) && (minorVersion == 1)))
+ {
+ core21 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 3) || ((majorVersion == 3) && (minorVersion == 0)))
+ {
+ core30 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 3) || ((majorVersion == 3) && (minorVersion == 1)))
+ {
+ core31 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 3) || ((majorVersion == 3) && (minorVersion == 2)))
+ {
+ core32 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 3) || ((majorVersion == 3) && (minorVersion == 3)))
+ {
+ core33 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 0)))
+ {
+ core40 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 1)))
+ {
+ core41 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 2)))
+ {
+ core42 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 3)))
+ {
+ core43 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 4)))
+ {
+ core44 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 5)))
+ {
+ core45 = true;
+ } else
+ {
+ goto log;
+ }
+
+ if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 6)))
+ {
+ core46 = true;
+ } else
+ {
+ goto log;
+ }
+
+ log:
+ {
+ DefaultLog.InternalWriteLog("Find core OpenGL version.", LogType.Info);
+ return;
+ }
+ }
+
+ internal static unsafe string GetExtensions(this OpenglContext context)
+ {
+ if (context.glGetString == null) {
+ return string.Empty;
+ }
+ return Marshal.PtrToStringAnsi(context.glGetString(glExtension))!;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static T internalLoadAPI(IntPtr ptr) where T: Delegate
+ {
+ try
+ {
+ if (ptr == IntPtr.Zero) {
+ return null;
+ }
+ T func = Marshal.GetDelegateForFunctionPointer(ptr);
+ return func;
+ }
+ catch (Exception ex)
+ {
+ DefaultLog.InternalWriteLog(
+ $"{$"Failed to convert the api {typeof(T).Name}.\n"}{ex.Message}",
+ LogType.Warning);
+ return default;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/StgSharp.Common/Graphics/OpenGL/glConst.cs b/StgSharp.Common/Graphics/OpenGL/glConst.cs
new file mode 100644
index 00000000..d2719020
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/glConst.cs
@@ -0,0 +1,4563 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="glConst"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using System;
+using System.Drawing;
+
+namespace StgSharp.Graphics.OpenGL
+{
+ // rename types in style of glConst
+
+ public static unsafe class glConst
+ {
+
+ #region glad
+
+ public const int _1PASS_EXT = 0x80A1;
+ public const int _1PASS_SGIS = 0x80A1;
+ public const int _2PASS_0_EXT = 0x80A2;
+ public const int _2PASS_0_SGIS = 0x80A2;
+ public const int _2PASS_1_EXT = 0x80A3;
+ public const int _2PASS_1_SGIS = 0x80A3;
+ public const int _2X_BIT_ATI = 0x00000001;
+ public const int _422_AVERAGE_EXT = 0x80CE;
+ public const int _422_EXT = 0x80CC;
+ public const int _422_REV_AVERAGE_EXT = 0x80CF;
+ public const int _422_REV_EXT = 0x80CD;
+ public const int _4PASS_0_EXT = 0x80A4;
+ public const int _4PASS_0_SGIS = 0x80A4;
+ public const int _4PASS_1_EXT = 0x80A5;
+ public const int _4PASS_1_SGIS = 0x80A5;
+ public const int _4PASS_2_EXT = 0x80A6;
+ public const int _4PASS_2_SGIS = 0x80A6;
+ public const int _4PASS_3_EXT = 0x80A7;
+ public const int _4PASS_3_SGIS = 0x80A7;
+ public const int _4X_BIT_ATI = 0x00000002;
+ public const int _8X_BIT_ATI = 0x00000004;
+ public const int ABGR_EXT = 0x8000;
+ public const int ACCUM_ADJACENT_PAIRS_NV = 0x90AD;
+ public const int ACTIVE_ATOMIC_COUNTER_BUFFERS = 0x92D9;
+ public const int ACTIVE_ATTRIBUTES = 0x8B89;
+ public const int ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A;
+ public const int ACTIVE_PROGRAM = 0x8259;
+ public const int ACTIVE_PROGRAM_EXT = 0x8B8D;
+ public const int ACTIVE_RESOURCES = 0x92F5;
+ public const int ACTIVE_STENCIL_FACE_EXT = 0x8911;
+ public const int ACTIVE_SUBROUTINES = 0x8DE5;
+ public const int ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48;
+ public const int ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6;
+ public const int ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47;
+ public const int ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49;
+ public const int ACTIVE_TEXTURE = 0x84E0;
+ public const int ACTIVE_TEXTURE_ARB = 0x84E0;
+ public const int ACTIVE_UNIFORMS = 0x8B86;
+ public const int ACTIVE_UNIFORM_BLOCKS = 0x8A36;
+ public const int ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35;
+ public const int ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87;
+ public const int ACTIVE_VARIABLES = 0x9305;
+ public const int ACTIVE_VARYINGS_NV = 0x8C81;
+ public const int ACTIVE_VARYING_MAX_LENGTH_NV = 0x8C82;
+ public const int ACTIVE_VERTEX_UNITS_ARB = 0x86A5;
+ public const int ADD_ATI = 0x8963;
+ public const int ADD_SIGNED_ARB = 0x8574;
+ public const int ADD_SIGNED_EXT = 0x8574;
+ public const int ADJACENT_PAIRS_NV = 0x90AE;
+ public const int AFFINE_2D_NV = 0x9092;
+ public const int AFFINE_3D_NV = 0x9094;
+ public const int ALIASED_LINE_WIDTH_RANGE = 0x846E;
+ public const int ALLOW_DRAW_FRG_HINT_PGI = 0x1A210;
+ public const int ALLOW_DRAW_MEM_HINT_PGI = 0x1A211;
+ public const int ALLOW_DRAW_OBJ_HINT_PGI = 0x1A20E;
+ public const int ALLOW_DRAW_WIN_HINT_PGI = 0x1A20F;
+ public const uint ALL_BARRIER_BITS = 0xFFFFFFFF;
+ public const uint ALL_BARRIER_BITS_EXT = 0xFFFFFFFF;
+ public const int ALL_COMPLETED_NV = 0x84F2;
+ public const uint ALL_PIXELS_AMD = 0xFFFFFFFF;
+ public const uint ALL_SHADER_BITS = 0xFFFFFFFF;
+ public const int ALL_STATIC_DATA_IBM = 103060;
+ public const int ALPHA = 0x1906;
+ public const int ALPHA12_EXT = 0x803D;
+ public const int ALPHA16F_ARB = 0x881C;
+ public const int ALPHA16F_EXT = 0x881C;
+ public const int ALPHA16I_EXT = 0x8D8A;
+ public const int ALPHA16UI_EXT = 0x8D78;
+ public const int ALPHA16_EXT = 0x803E;
+ public const int ALPHA16_SNORM = 0x9018;
+ public const int ALPHA32F_ARB = 0x8816;
+ public const int ALPHA32F_EXT = 0x8816;
+ public const int ALPHA32I_EXT = 0x8D84;
+ public const int ALPHA32UI_EXT = 0x8D72;
+ public const int ALPHA4_EXT = 0x803B;
+ public const int ALPHA8I_EXT = 0x8D90;
+ public const int ALPHA8UI_EXT = 0x8D7E;
+ public const int ALPHA8_EXT = 0x803C;
+ public const int ALPHA8_SNORM = 0x9014;
+ public const int ALPHA_FLOAT16_APPLE = 0x881C;
+ public const int ALPHA_FLOAT16_ATI = 0x881C;
+ public const int ALPHA_FLOAT32_APPLE = 0x8816;
+ public const int ALPHA_FLOAT32_ATI = 0x8816;
+ public const int ALPHA_INTEGER_EXT = 0x8D97;
+ public const int ALPHA_MAX_CLAMP_INGR = 0x8567;
+ public const int ALPHA_MAX_SGIX = 0x8321;
+ public const int ALPHA_MIN_CLAMP_INGR = 0x8563;
+ public const int ALPHA_MIN_SGIX = 0x8320;
+ public const int ALPHA_REF_COMMAND_NV = 0x000F;
+ public const int ALPHA_SNORM = 0x9010;
+ public const int ALPHA_TO_COVERAGE_DITHER_DEFAULT_NV = 0x934D;
+ public const int ALPHA_TO_COVERAGE_DITHER_DISABLE_NV = 0x934F;
+ public const int ALPHA_TO_COVERAGE_DITHER_ENABLE_NV = 0x934E;
+ public const int ALPHA_TO_COVERAGE_DITHER_MODE_NV = 0x92BF;
+ public const int ALREADY_SIGNALED = 0x911A;
+ public const int ALWAYS = 0x0207;
+ public const int ALWAYS_FAST_HINT_PGI = 0x1A20C;
+ public const int ALWAYS_SOFT_HINT_PGI = 0x1A20D;
+ public const int AND = 0x1501;
+ public const int AND_INVERTED = 0x1504;
+ public const int AND_REVERSE = 0x1502;
+ public const int ANY_SAMPLES_PASSED = 0x8C2F;
+ public const int ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A;
+ public const int ARC_TO_NV = 0xFE;
+ public const int ARRAY_BUFFER = 0x8892;
+ public const int ARRAY_BUFFER_ARB = 0x8892;
+ public const int ARRAY_BUFFER_BINDING = 0x8894;
+ public const int ARRAY_BUFFER_BINDING_ARB = 0x8894;
+ public const int ARRAY_ELEMENT_LOCK_COUNT_EXT = 0x81A9;
+ public const int ARRAY_ELEMENT_LOCK_FIRST_EXT = 0x81A8;
+ public const int ARRAY_OBJECT_BUFFER_ATI = 0x8766;
+ public const int ARRAY_OBJECT_OFFSET_ATI = 0x8767;
+ public const int ARRAY_SIZE = 0x92FB;
+ public const int ARRAY_STRIDE = 0x92FE;
+ public const int ASYNC_DRAW_PIXELS_SGIX = 0x835D;
+ public const int ASYNC_HISTOGRAM_SGIX = 0x832C;
+ public const int ASYNC_MARKER_SGIX = 0x8329;
+ public const int ASYNC_READ_PIXELS_SGIX = 0x835E;
+ public const int ASYNC_TEX_IMAGE_SGIX = 0x835C;
+ public const int ATOMIC_COUNTER_BARRIER_BIT = 0x00001000;
+ public const int ATOMIC_COUNTER_BARRIER_BIT_EXT = 0x00001000;
+ public const int ATOMIC_COUNTER_BUFFER = 0x92C0;
+ public const int ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = 0x92C5;
+ public const int ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = 0x92C6;
+ public const int ATOMIC_COUNTER_BUFFER_BINDING = 0x92C1;
+ public const int ATOMIC_COUNTER_BUFFER_DATA_SIZE = 0x92C4;
+ public const int ATOMIC_COUNTER_BUFFER_INDEX = 0x9301;
+ public const int ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = 0x90ED;
+ public const int ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = 0x92CB;
+ public const int ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = 0x92CA;
+ public const int ATOMIC_COUNTER_BUFFER_REFERENCED_BY_MESH_SHADER_NV = 0x959E;
+ public const int ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TASK_SHADER_NV = 0x959F;
+ public const int ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = 0x92C8;
+ public const int ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x92C9;
+ public const int ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = 0x92C7;
+ public const int ATOMIC_COUNTER_BUFFER_SIZE = 0x92C3;
+ public const int ATOMIC_COUNTER_BUFFER_START = 0x92C2;
+ public const int ATTACHED_MEMORY_OBJECT_NV = 0x95A4;
+ public const int ATTACHED_MEMORY_OFFSET_NV = 0x95A5;
+ public const int ATTACHED_SHADERS = 0x8B85;
+ public const int ATTENUATION_EXT = 0x834D;
+ public const int ATTRIBUTE_ADDRESS_COMMAND_NV = 0x0009;
+ public const int ATTRIB_ARRAY_POINTER_NV = 0x8645;
+ public const int ATTRIB_ARRAY_SIZE_NV = 0x8623;
+ public const int ATTRIB_ARRAY_STRIDE_NV = 0x8624;
+ public const int ATTRIB_ARRAY_TYPE_NV = 0x8625;
+ public const int AUTO_GENERATE_MIPMAP = 0x8295;
+ public const int AUX_DEPTH_STENCIL_APPLE = 0x8A14;
+ public const int AVERAGE_EXT = 0x8335;
+ public const int AVERAGE_HP = 0x8160;
+ public const int BACK = 0x0405;
+ public const int BACK_LEFT = 0x0402;
+ public const int BACK_NORMALS_HINT_PGI = 0x1A223;
+ public const int BACK_PRIMARY_COLOR_NV = 0x8C77;
+ public const int BACK_RIGHT = 0x0403;
+ public const int BACK_SECONDARY_COLOR_NV = 0x8C78;
+ public const int BEVEL_NV = 0x90A6;
+ public const int BGR = 0x80E0;
+ public const int BGRA = 0x80E1;
+ public const int BGRA8_EXT = 0x93A1;
+ public const int BGRA_EXT = 0x80E1;
+ public const int BGRA_INTEGER = 0x8D9B;
+ public const int BGRA_INTEGER_EXT = 0x8D9B;
+ public const int BGR_EXT = 0x80E0;
+ public const int BGR_INTEGER = 0x8D9A;
+ public const int BGR_INTEGER_EXT = 0x8D9A;
+ public const int BIAS_BIT_ATI = 0x00000008;
+ public const int BIAS_BY_NEGATIVE_ONE_HALF_NV = 0x8541;
+ public const int BINORMAL_ARRAY_EXT = 0x843A;
+ public const int BINORMAL_ARRAY_POINTER_EXT = 0x8443;
+ public const int BINORMAL_ARRAY_STRIDE_EXT = 0x8441;
+ public const int BINORMAL_ARRAY_TYPE_EXT = 0x8440;
+ public const int BLACKHOLE_RENDER_INTEL = 0x83FC;
+ public const int BLEND = 0x0BE2;
+ public const int BLEND_ADVANCED_COHERENT_KHR = 0x9285;
+ public const int BLEND_ADVANCED_COHERENT_NV = 0x9285;
+ public const int BLEND_COLOR = 0x8005;
+ public const int BLEND_COLOR_COMMAND_NV = 0x000B;
+ public const int BLEND_COLOR_EXT = 0x8005;
+ public const int BLEND_DST = 0x0BE0;
+ public const int BLEND_DST_ALPHA = 0x80CA;
+ public const int BLEND_DST_ALPHA_EXT = 0x80CA;
+ public const int BLEND_DST_RGB = 0x80C8;
+ public const int BLEND_DST_RGB_EXT = 0x80C8;
+ public const int BLEND_EQUATION = 0x8009;
+ public const int BLEND_EQUATION_ALPHA = 0x883D;
+ public const int BLEND_EQUATION_ALPHA_EXT = 0x883D;
+ public const int BLEND_EQUATION_EXT = 0x8009;
+ public const int BLEND_EQUATION_RGB = 0x8009;
+ public const int BLEND_EQUATION_RGB_EXT = 0x8009;
+ public const int BLEND_OVERLAP_NV = 0x9281;
+ public const int BLEND_PREMULTIPLIED_SRC_NV = 0x9280;
+ public const int BLEND_SRC = 0x0BE1;
+ public const int BLEND_SRC_ALPHA = 0x80CB;
+ public const int BLEND_SRC_ALPHA_EXT = 0x80CB;
+ public const int BLEND_SRC_RGB = 0x80C9;
+ public const int BLEND_SRC_RGB_EXT = 0x80C9;
+ public const int BLOCK_INDEX = 0x92FD;
+ public const int BLUE = 0x1905;
+ public const int BLUE_BIT_ATI = 0x00000004;
+ public const int BLUE_INTEGER = 0x8D96;
+ public const int BLUE_INTEGER_EXT = 0x8D96;
+ public const int BLUE_MAX_CLAMP_INGR = 0x8566;
+ public const int BLUE_MIN_CLAMP_INGR = 0x8562;
+ public const int BLUE_NV = 0x1905;
+ public const int BOLD_BIT_NV = 0x01;
+ public const int BOOL = 0x8B56;
+ public const int BOOL_ARB = 0x8B56;
+ public const int BOOL_VEC2 = 0x8B57;
+ public const int BOOL_VEC2_ARB = 0x8B57;
+ public const int BOOL_VEC3 = 0x8B58;
+ public const int BOOL_VEC3_ARB = 0x8B58;
+ public const int BOOL_VEC4 = 0x8B59;
+ public const int BOOL_VEC4_ARB = 0x8B59;
+ public const int BOUNDING_BOX_NV = 0x908D;
+ public const int BOUNDING_BOX_OF_BOUNDING_BOXES_NV = 0x909C;
+ public const int BUFFER = 0x82E0;
+ public const int BUFFER_ACCESS = 0x88BB;
+ public const int BUFFER_ACCESS_ARB = 0x88BB;
+ public const int BUFFER_ACCESS_FLAGS = 0x911F;
+ public const int BUFFER_BINDING = 0x9302;
+ public const int BUFFER_DATA_SIZE = 0x9303;
+ public const int BUFFER_FLUSHING_UNMAP_APPLE = 0x8A13;
+ public const int BUFFER_GPU_ADDRESS_NV = 0x8F1D;
+ public const int BUFFER_IMMUTABLE_STORAGE = 0x821F;
+ public const int BUFFER_MAPPED = 0x88BC;
+ public const int BUFFER_MAPPED_ARB = 0x88BC;
+ public const int BUFFER_MAP_LENGTH = 0x9120;
+ public const int BUFFER_MAP_OFFSET = 0x9121;
+ public const int BUFFER_MAP_POINTER = 0x88BD;
+ public const int BUFFER_MAP_POINTER_ARB = 0x88BD;
+ public const int BUFFER_OBJECT_APPLE = 0x85B3;
+ public const int BUFFER_OBJECT_EXT = 0x9151;
+ public const int BUFFER_SERIALIZED_MODIFY_APPLE = 0x8A12;
+ public const int BUFFER_SIZE = 0x8764;
+ public const int BUFFER_SIZE_ARB = 0x8764;
+ public const int BUFFER_STORAGE_FLAGS = 0x8220;
+ public const int BUFFER_UPDATE_BARRIER_BIT = 0x00000200;
+ public const int BUFFER_UPDATE_BARRIER_BIT_EXT = 0x00000200;
+ public const int BUFFER_USAGE = 0x8765;
+ public const int BUFFER_USAGE_ARB = 0x8765;
+ public const int BUFFER_VARIABLE = 0x92E5;
+ public const int BUMP_ENVMAP_ATI = 0x877B;
+ public const int BUMP_NUM_TEX_UNITS_ATI = 0x8777;
+ public const int BUMP_ROT_MATRIX_ATI = 0x8775;
+ public const int BUMP_ROT_MATRIX_SIZE_ATI = 0x8776;
+ public const int BUMP_TARGET_ATI = 0x877C;
+ public const int BUMP_TEX_UNITS_ATI = 0x8778;
+ public const int BYTE = 0x1400;
+ public const int CALLIGRAPHIC_FRAGMENT_SGIX = 0x8183;
+ public const int CAVEAT_SUPPORT = 0x82B8;
+ public const int CCW = 0x0901;
+ public const int CIRCULAR_CCW_ARC_TO_NV = 0xF8;
+ public const int CIRCULAR_CW_ARC_TO_NV = 0xFA;
+ public const int CIRCULAR_TANGENT_ARC_TO_NV = 0xFC;
+ public const int CLAMP_FRAGMENT_COLOR_ARB = 0x891B;
+ public const int CLAMP_READ_COLOR = 0x891C;
+ public const int CLAMP_READ_COLOR_ARB = 0x891C;
+ public const int CLAMP_TO_BORDER = 0x812D;
+ public const int CLAMP_TO_BORDER_ARB = 0x812D;
+ public const int CLAMP_TO_BORDER_SGIS = 0x812D;
+ public const int CLAMP_TO_EDGE = 0x812F;
+ public const int CLAMP_TO_EDGE_SGIS = 0x812F;
+ public const int CLAMP_VERTEX_COLOR_ARB = 0x891A;
+ public const int CLEAR = 0x1500;
+ public const int CLEAR_BUFFER = 0x82B4;
+ public const int CLEAR_TEXTURE = 0x9365;
+ public const int CLIENT_ACTIVE_TEXTURE_ARB = 0x84E1;
+ public const int CLIENT_MAPPED_BUFFER_BARRIER_BIT = 0x00004000;
+ public const int CLIENT_STORAGE_BIT = 0x0200;
+ public const int CLIPPING_INPUT_PRIMITIVES = 0x82F6;
+ public const int CLIPPING_INPUT_PRIMITIVES_ARB = 0x82F6;
+ public const int CLIPPING_OUTPUT_PRIMITIVES = 0x82F7;
+ public const int CLIPPING_OUTPUT_PRIMITIVES_ARB = 0x82F7;
+ public const int CLIP_DEPTH_MODE = 0x935D;
+ public const int CLIP_DISTANCE0 = 0x3000;
+ public const int CLIP_DISTANCE1 = 0x3001;
+ public const int CLIP_DISTANCE2 = 0x3002;
+ public const int CLIP_DISTANCE3 = 0x3003;
+ public const int CLIP_DISTANCE4 = 0x3004;
+ public const int CLIP_DISTANCE5 = 0x3005;
+ public const int CLIP_DISTANCE6 = 0x3006;
+ public const int CLIP_DISTANCE7 = 0x3007;
+ public const int CLIP_DISTANCE_NV = 0x8C7A;
+ public const int CLIP_FAR_HINT_PGI = 0x1A221;
+ public const int CLIP_NEAR_HINT_PGI = 0x1A220;
+ public const int CLIP_ORIGIN = 0x935C;
+ public const int CLIP_VOLUME_CLIPPING_HINT_EXT = 0x80F0;
+ public const int CLOSE_PATH_NV = 0x00;
+ public const int CMYKA_EXT = 0x800D;
+ public const int CMYK_EXT = 0x800C;
+ public const int CND0_ATI = 0x896B;
+ public const int CND_ATI = 0x896A;
+ public const int COLOR = 0x1800;
+ public const int COLOR3_BIT_PGI = 0x00010000;
+ public const int COLOR4_BIT_PGI = 0x00020000;
+ public const int COLORBURN_KHR = 0x929A;
+ public const int COLORBURN_NV = 0x929A;
+ public const int COLORDODGE_KHR = 0x9299;
+ public const int COLORDODGE_NV = 0x9299;
+ public const int COLOR_ALPHA_PAIRING_ATI = 0x8975;
+ public const int COLOR_ARRAY_ADDRESS_NV = 0x8F23;
+ public const int COLOR_ARRAY_BUFFER_BINDING_ARB = 0x8898;
+ public const int COLOR_ARRAY_COUNT_EXT = 0x8084;
+ public const int COLOR_ARRAY_EXT = 0x8076;
+ public const int COLOR_ARRAY_LENGTH_NV = 0x8F2D;
+ public const int COLOR_ARRAY_LIST_IBM = 103072;
+ public const int COLOR_ARRAY_LIST_STRIDE_IBM = 103082;
+ public const int COLOR_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F7;
+ public const int COLOR_ARRAY_POINTER_EXT = 0x8090;
+ public const int COLOR_ARRAY_SIZE_EXT = 0x8081;
+ public const int COLOR_ARRAY_STRIDE_EXT = 0x8083;
+ public const int COLOR_ARRAY_TYPE_EXT = 0x8082;
+ public const int COLOR_ATTACHMENT0 = 0x8CE0;
+ public const int COLOR_ATTACHMENT0_EXT = 0x8CE0;
+ public const int COLOR_ATTACHMENT1 = 0x8CE1;
+ public const int COLOR_ATTACHMENT10 = 0x8CEA;
+ public const int COLOR_ATTACHMENT10_EXT = 0x8CEA;
+ public const int COLOR_ATTACHMENT11 = 0x8CEB;
+ public const int COLOR_ATTACHMENT11_EXT = 0x8CEB;
+ public const int COLOR_ATTACHMENT12 = 0x8CEC;
+ public const int COLOR_ATTACHMENT12_EXT = 0x8CEC;
+ public const int COLOR_ATTACHMENT13 = 0x8CED;
+ public const int COLOR_ATTACHMENT13_EXT = 0x8CED;
+ public const int COLOR_ATTACHMENT14 = 0x8CEE;
+ public const int COLOR_ATTACHMENT14_EXT = 0x8CEE;
+ public const int COLOR_ATTACHMENT15 = 0x8CEF;
+ public const int COLOR_ATTACHMENT15_EXT = 0x8CEF;
+ public const int COLOR_ATTACHMENT16 = 0x8CF0;
+ public const int COLOR_ATTACHMENT17 = 0x8CF1;
+ public const int COLOR_ATTACHMENT18 = 0x8CF2;
+ public const int COLOR_ATTACHMENT19 = 0x8CF3;
+ public const int COLOR_ATTACHMENT1_EXT = 0x8CE1;
+ public const int COLOR_ATTACHMENT2 = 0x8CE2;
+ public const int COLOR_ATTACHMENT20 = 0x8CF4;
+ public const int COLOR_ATTACHMENT21 = 0x8CF5;
+ public const int COLOR_ATTACHMENT22 = 0x8CF6;
+ public const int COLOR_ATTACHMENT23 = 0x8CF7;
+ public const int COLOR_ATTACHMENT24 = 0x8CF8;
+ public const int COLOR_ATTACHMENT25 = 0x8CF9;
+ public const int COLOR_ATTACHMENT26 = 0x8CFA;
+ public const int COLOR_ATTACHMENT27 = 0x8CFB;
+ public const int COLOR_ATTACHMENT28 = 0x8CFC;
+ public const int COLOR_ATTACHMENT29 = 0x8CFD;
+ public const int COLOR_ATTACHMENT2_EXT = 0x8CE2;
+ public const int COLOR_ATTACHMENT3 = 0x8CE3;
+ public const int COLOR_ATTACHMENT30 = 0x8CFE;
+ public const int COLOR_ATTACHMENT31 = 0x8CFF;
+ public const int COLOR_ATTACHMENT3_EXT = 0x8CE3;
+ public const int COLOR_ATTACHMENT4 = 0x8CE4;
+ public const int COLOR_ATTACHMENT4_EXT = 0x8CE4;
+ public const int COLOR_ATTACHMENT5 = 0x8CE5;
+ public const int COLOR_ATTACHMENT5_EXT = 0x8CE5;
+ public const int COLOR_ATTACHMENT6 = 0x8CE6;
+ public const int COLOR_ATTACHMENT6_EXT = 0x8CE6;
+ public const int COLOR_ATTACHMENT7 = 0x8CE7;
+ public const int COLOR_ATTACHMENT7_EXT = 0x8CE7;
+ public const int COLOR_ATTACHMENT8 = 0x8CE8;
+ public const int COLOR_ATTACHMENT8_EXT = 0x8CE8;
+ public const int COLOR_ATTACHMENT9 = 0x8CE9;
+ public const int COLOR_ATTACHMENT9_EXT = 0x8CE9;
+ public const int COLOR_BUFFER_BIT = 0x00004000;
+ public const int COLOR_CLEAR_UNCLAMPED_VALUE_ATI = 0x8835;
+ public const int COLOR_CLEAR_VALUE = 0x0C22;
+ public const int COLOR_COMPONENTS = 0x8283;
+ public const int COLOR_ENCODING = 0x8296;
+ public const int COLOR_FLOAT_APPLE = 0x8A0F;
+ public const int COLOR_INDEX12_EXT = 0x80E6;
+ public const int COLOR_INDEX16_EXT = 0x80E7;
+ public const int COLOR_INDEX1_EXT = 0x80E2;
+ public const int COLOR_INDEX2_EXT = 0x80E3;
+ public const int COLOR_INDEX4_EXT = 0x80E4;
+ public const int COLOR_INDEX8_EXT = 0x80E5;
+ public const int COLOR_LOGIC_OP = 0x0BF2;
+ public const int COLOR_MATRIX_SGI = 0x80B1;
+ public const int COLOR_MATRIX_STACK_DEPTH_SGI = 0x80B2;
+ public const int COLOR_RENDERABLE = 0x8286;
+ public const int COLOR_SAMPLES_NV = 0x8E20;
+ public const int COLOR_SUM_ARB = 0x8458;
+ public const int COLOR_SUM_CLAMP_NV = 0x854F;
+ public const int COLOR_SUM_EXT = 0x8458;
+ public const int COLOR_TABLE_ALPHA_SIZE_SGI = 0x80DD;
+ public const int COLOR_TABLE_BIAS_SGI = 0x80D7;
+ public const int COLOR_TABLE_BLUE_SIZE_SGI = 0x80DC;
+ public const int COLOR_TABLE_FORMAT_SGI = 0x80D8;
+ public const int COLOR_TABLE_GREEN_SIZE_SGI = 0x80DB;
+ public const int COLOR_TABLE_INTENSITY_SIZE_SGI = 0x80DF;
+ public const int COLOR_TABLE_LUMINANCE_SIZE_SGI = 0x80DE;
+ public const int COLOR_TABLE_RED_SIZE_SGI = 0x80DA;
+ public const int COLOR_TABLE_SCALE_SGI = 0x80D6;
+ public const int COLOR_TABLE_SGI = 0x80D0;
+ public const int COLOR_TABLE_WIDTH_SGI = 0x80D9;
+ public const int COLOR_WRITEMASK = 0x0C23;
+ public const int COMBINE4_NV = 0x8503;
+ public const int COMBINER0_NV = 0x8550;
+ public const int COMBINER1_NV = 0x8551;
+ public const int COMBINER2_NV = 0x8552;
+ public const int COMBINER3_NV = 0x8553;
+ public const int COMBINER4_NV = 0x8554;
+ public const int COMBINER5_NV = 0x8555;
+ public const int COMBINER6_NV = 0x8556;
+ public const int COMBINER7_NV = 0x8557;
+ public const int COMBINER_AB_DOT_PRODUCT_NV = 0x8545;
+ public const int COMBINER_AB_OUTPUT_NV = 0x854A;
+ public const int COMBINER_BIAS_NV = 0x8549;
+ public const int COMBINER_CD_DOT_PRODUCT_NV = 0x8546;
+ public const int COMBINER_CD_OUTPUT_NV = 0x854B;
+ public const int COMBINER_COMPONENT_USAGE_NV = 0x8544;
+ public const int COMBINER_INPUT_NV = 0x8542;
+ public const int COMBINER_MAPPING_NV = 0x8543;
+ public const int COMBINER_MUX_SUM_NV = 0x8547;
+ public const int COMBINER_SCALE_NV = 0x8548;
+ public const int COMBINER_SUM_OUTPUT_NV = 0x854C;
+ public const int COMBINE_ALPHA_ARB = 0x8572;
+ public const int COMBINE_ALPHA_EXT = 0x8572;
+ public const int COMBINE_ARB = 0x8570;
+ public const int COMBINE_EXT = 0x8570;
+ public const int COMBINE_RGB_ARB = 0x8571;
+ public const int COMBINE_RGB_EXT = 0x8571;
+ public const int COMMAND_BARRIER_BIT = 0x00000040;
+ public const int COMMAND_BARRIER_BIT_EXT = 0x00000040;
+ public const int COMPARE_REF_DEPTH_TO_TEXTURE_EXT = 0x884E;
+ public const int COMPARE_REF_TO_TEXTURE = 0x884E;
+ public const int COMPARE_R_TO_TEXTURE_ARB = 0x884E;
+ public const int COMPATIBLE_SUBROUTINES = 0x8E4B;
+ public const int COMPILE_STATUS = 0x8B81;
+ public const int COMPLETION_STATUS_ARB = 0x91B1;
+ public const int COMPLETION_STATUS_KHR = 0x91B1;
+ public const int COMPRESSED_ALPHA_ARB = 0x84E9;
+ public const int COMPRESSED_INTENSITY_ARB = 0x84EC;
+ public const int COMPRESSED_LUMINANCE_ALPHA_ARB = 0x84EB;
+ public const int COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C72;
+ public const int COMPRESSED_LUMINANCE_ARB = 0x84EA;
+ public const int COMPRESSED_LUMINANCE_LATC1_EXT = 0x8C70;
+ public const int COMPRESSED_R11_EAC = 0x9270;
+ public const int COMPRESSED_RED = 0x8225;
+ public const int COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD;
+ public const int COMPRESSED_RED_RGTC1 = 0x8DBB;
+ public const int COMPRESSED_RED_RGTC1_EXT = 0x8DBB;
+ public const int COMPRESSED_RG = 0x8226;
+ public const int COMPRESSED_RG11_EAC = 0x9272;
+ public const int COMPRESSED_RGB = 0x84ED;
+ public const int COMPRESSED_RGB8_ETC2 = 0x9274;
+ public const int COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276;
+ public const int COMPRESSED_RGBA = 0x84EE;
+ public const int COMPRESSED_RGBA8_ETC2_EAC = 0x9278;
+ public const int COMPRESSED_RGBA_ARB = 0x84EE;
+ public const int COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB;
+ public const int COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8;
+ public const int COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9;
+ public const int COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA;
+ public const int COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC;
+ public const int COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD;
+ public const int COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0;
+ public const int COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1;
+ public const int COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2;
+ public const int COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3;
+ public const int COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4;
+ public const int COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5;
+ public const int COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6;
+ public const int COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7;
+ public const int COMPRESSED_RGBA_BPTC_UNORM = 0x8E8C;
+ public const int COMPRESSED_RGBA_BPTC_UNORM_ARB = 0x8E8C;
+ public const int COMPRESSED_RGBA_FXT1_3DFX = 0x86B1;
+ public const int COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
+ public const int COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2;
+ public const int COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3;
+ public const int COMPRESSED_RGB_ARB = 0x84ED;
+ public const int COMPRESSED_RGB_BPTC_SIGNED_FLOAT = 0x8E8E;
+ public const int COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB = 0x8E8E;
+ public const int COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT = 0x8E8F;
+ public const int COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB = 0x8E8F;
+ public const int COMPRESSED_RGB_FXT1_3DFX = 0x86B0;
+ public const int COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
+ public const int COMPRESSED_RG_RGTC2 = 0x8DBD;
+ public const int COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C73;
+ public const int COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT = 0x8C71;
+ public const int COMPRESSED_SIGNED_R11_EAC = 0x9271;
+ public const int COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE;
+ public const int COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC;
+ public const int COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC;
+ public const int COMPRESSED_SIGNED_RG11_EAC = 0x9273;
+ public const int COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE;
+ public const int COMPRESSED_SLUMINANCE_ALPHA_EXT = 0x8C4B;
+ public const int COMPRESSED_SLUMINANCE_EXT = 0x8C4A;
+ public const int COMPRESSED_SRGB = 0x8C48;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6;
+ public const int COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7;
+ public const int COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279;
+ public const int COMPRESSED_SRGB8_ETC2 = 0x9275;
+ public const int COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277;
+ public const int COMPRESSED_SRGB_ALPHA = 0x8C49;
+ public const int COMPRESSED_SRGB_ALPHA_BPTC_UNORM = 0x8E8D;
+ public const int COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB = 0x8E8D;
+ public const int COMPRESSED_SRGB_ALPHA_EXT = 0x8C49;
+ public const int COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D;
+ public const int COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E;
+ public const int COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F;
+ public const int COMPRESSED_SRGB_EXT = 0x8C48;
+ public const int COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C;
+ public const int COMPRESSED_TEXTURE_FORMATS = 0x86A3;
+ public const int COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A3;
+ public const int COMPUTE_PROGRAM_NV = 0x90FB;
+ public const int COMPUTE_PROGRAM_PARAMETER_BUFFER_NV = 0x90FC;
+ public const int COMPUTE_SHADER = 0x91B9;
+ public const int COMPUTE_SHADER_BIT = 0x00000020;
+ public const int COMPUTE_SHADER_INVOCATIONS = 0x82F5;
+ public const int COMPUTE_SHADER_INVOCATIONS_ARB = 0x82F5;
+ public const int COMPUTE_SUBROUTINE = 0x92ED;
+ public const int COMPUTE_SUBROUTINE_UNIFORM = 0x92F3;
+ public const int COMPUTE_TEXTURE = 0x82A0;
+ public const int COMPUTE_WORK_GROUP_SIZE = 0x8267;
+ public const int COMP_BIT_ATI = 0x00000002;
+ public const int CONDITION_SATISFIED = 0x911C;
+ public const int CONFORMANT_NV = 0x9374;
+ public const int CONIC_CURVE_TO_NV = 0x1A;
+ public const int CONJOINT_NV = 0x9284;
+ public const int CONSERVATIVE_RASTERIZATION_INTEL = 0x83FE;
+ public const int CONSERVATIVE_RASTERIZATION_NV = 0x9346;
+ public const int CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV = 0x937B;
+ public const int CONSERVATIVE_RASTER_DILATE_NV = 0x9379;
+ public const int CONSERVATIVE_RASTER_DILATE_RANGE_NV = 0x937A;
+ public const int CONSERVATIVE_RASTER_MODE_NV = 0x954D;
+ public const int CONSERVATIVE_RASTER_MODE_POST_SNAP_NV = 0x954E;
+ public const int CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV = 0x9550;
+ public const int CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV = 0x954F;
+ public const int CONSERVE_MEMORY_HINT_PGI = 0x1A1FD;
+ public const int CONSTANT_ALPHA = 0x8003;
+ public const int CONSTANT_ALPHA_EXT = 0x8003;
+ public const int CONSTANT_ARB = 0x8576;
+ public const int CONSTANT_BORDER_HP = 0x8151;
+ public const int CONSTANT_COLOR = 0x8001;
+ public const int CONSTANT_COLOR0_NV = 0x852A;
+ public const int CONSTANT_COLOR1_NV = 0x852B;
+ public const int CONSTANT_COLOR_EXT = 0x8001;
+ public const int CONSTANT_EXT = 0x8576;
+ public const int CONST_EYE_NV = 0x86E5;
+ public const int CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x00000002;
+ public const int CONTEXT_CORE_PROFILE_BIT = 0x00000001;
+ public const int CONTEXT_FLAGS = 0x821E;
+ public const int CONTEXT_FLAG_DEBUG_BIT = 0x00000002;
+ public const int CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x00000001;
+ public const int CONTEXT_FLAG_NO_ERROR_BIT = 0x00000008;
+ public const int CONTEXT_FLAG_NO_ERROR_BIT_KHR = 0x00000008;
+ public const int CONTEXT_FLAG_ROBUST_ACCESS_BIT = 0x00000004;
+ public const int CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB = 0x00000004;
+ public const int CONTEXT_LOST = 0x0507;
+ public const int CONTEXT_PROFILE_MASK = 0x9126;
+ public const int CONTEXT_RELEASE_BEHAVIOR = 0x82FB;
+ public const int CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x82FC;
+ public const int CONTEXT_ROBUST_ACCESS = 0x90F3;
+ public const int CONTINUOUS_AMD = 0x9007;
+ public const int CONTRAST_NV = 0x92A1;
+ public const int CONVEX_HULL_NV = 0x908B;
+ public const int CONVOLUTION_1D_EXT = 0x8010;
+ public const int CONVOLUTION_2D_EXT = 0x8011;
+ public const int CONVOLUTION_BORDER_COLOR_HP = 0x8154;
+ public const int CONVOLUTION_BORDER_MODE_EXT = 0x8013;
+ public const int CONVOLUTION_FILTER_BIAS_EXT = 0x8015;
+ public const int CONVOLUTION_FILTER_SCALE_EXT = 0x8014;
+ public const int CONVOLUTION_FORMAT_EXT = 0x8017;
+ public const int CONVOLUTION_HEIGHT_EXT = 0x8019;
+ public const int CONVOLUTION_HINT_SGIX = 0x8316;
+ public const int CONVOLUTION_WIDTH_EXT = 0x8018;
+ public const int CON_0_ATI = 0x8941;
+ public const int CON_10_ATI = 0x894B;
+ public const int CON_11_ATI = 0x894C;
+ public const int CON_12_ATI = 0x894D;
+ public const int CON_13_ATI = 0x894E;
+ public const int CON_14_ATI = 0x894F;
+ public const int CON_15_ATI = 0x8950;
+ public const int CON_16_ATI = 0x8951;
+ public const int CON_17_ATI = 0x8952;
+ public const int CON_18_ATI = 0x8953;
+ public const int CON_19_ATI = 0x8954;
+ public const int CON_1_ATI = 0x8942;
+ public const int CON_20_ATI = 0x8955;
+ public const int CON_21_ATI = 0x8956;
+ public const int CON_22_ATI = 0x8957;
+ public const int CON_23_ATI = 0x8958;
+ public const int CON_24_ATI = 0x8959;
+ public const int CON_25_ATI = 0x895A;
+ public const int CON_26_ATI = 0x895B;
+ public const int CON_27_ATI = 0x895C;
+ public const int CON_28_ATI = 0x895D;
+ public const int CON_29_ATI = 0x895E;
+ public const int CON_2_ATI = 0x8943;
+ public const int CON_30_ATI = 0x895F;
+ public const int CON_31_ATI = 0x8960;
+ public const int CON_3_ATI = 0x8944;
+ public const int CON_4_ATI = 0x8945;
+ public const int CON_5_ATI = 0x8946;
+ public const int CON_6_ATI = 0x8947;
+ public const int CON_7_ATI = 0x8948;
+ public const int CON_8_ATI = 0x8949;
+ public const int CON_9_ATI = 0x894A;
+ public const int COORD_REPLACE_ARB = 0x8862;
+ public const int COORD_REPLACE_NV = 0x8862;
+ public const int COPY = 0x1503;
+ public const int COPY_INVERTED = 0x150C;
+ public const int COPY_READ_BUFFER = 0x8F36;
+ public const int COPY_READ_BUFFER_BINDING = 0x8F36;
+ public const int COPY_WRITE_BUFFER = 0x8F37;
+ public const int COPY_WRITE_BUFFER_BINDING = 0x8F37;
+ public const int COUNTER_RANGE_AMD = 0x8BC1;
+ public const int COUNTER_TYPE_AMD = 0x8BC0;
+ public const int COUNT_DOWN_NV = 0x9089;
+ public const int COUNT_UP_NV = 0x9088;
+ public const int COVERAGE_MODULATION_NV = 0x9332;
+ public const int COVERAGE_MODULATION_TABLE_NV = 0x9331;
+ public const int COVERAGE_MODULATION_TABLE_SIZE_NV = 0x9333;
+ public const int CUBIC_CURVE_TO_NV = 0x0C;
+ public const int CUBIC_EXT = 0x8334;
+ public const int CUBIC_HP = 0x815F;
+ public const int CULL_FACE = 0x0B44;
+ public const int CULL_FACE_MODE = 0x0B45;
+ public const int CULL_FRAGMENT_NV = 0x86E7;
+ public const int CULL_MODES_NV = 0x86E0;
+ public const int CULL_VERTEX_EXT = 0x81AA;
+ public const int CULL_VERTEX_EYE_POSITION_EXT = 0x81AB;
+ public const int CULL_VERTEX_IBM = 103050;
+ public const int CULL_VERTEX_OBJECT_POSITION_EXT = 0x81AC;
+ public const int CURRENT_ATTRIB_NV = 0x8626;
+ public const int CURRENT_BINORMAL_EXT = 0x843C;
+ public const int CURRENT_FOG_COORDINATE_EXT = 0x8453;
+ public const int CURRENT_MATRIX_ARB = 0x8641;
+ public const int CURRENT_MATRIX_INDEX_ARB = 0x8845;
+ public const int CURRENT_MATRIX_NV = 0x8641;
+ public const int CURRENT_MATRIX_STACK_DEPTH_ARB = 0x8640;
+ public const int CURRENT_MATRIX_STACK_DEPTH_NV = 0x8640;
+ public const int CURRENT_OCCLUSION_QUERY_ID_NV = 0x8865;
+ public const int CURRENT_PALETTE_MATRIX_ARB = 0x8843;
+ public const int CURRENT_PROGRAM = 0x8B8D;
+ public const int CURRENT_QUERY = 0x8865;
+ public const int CURRENT_QUERY_ARB = 0x8865;
+ public const int CURRENT_RASTER_NORMAL_SGIX = 0x8406;
+ public const int CURRENT_SECONDARY_COLOR_EXT = 0x8459;
+ public const int CURRENT_TANGENT_EXT = 0x843B;
+ public const int CURRENT_TIME_NV = 0x8E28;
+ public const int CURRENT_VERTEX_ATTRIB = 0x8626;
+ public const int CURRENT_VERTEX_ATTRIB_ARB = 0x8626;
+ public const int CURRENT_VERTEX_EXT = 0x87E2;
+ public const int CURRENT_VERTEX_WEIGHT_EXT = 0x850B;
+ public const int CURRENT_WEIGHT_ARB = 0x86A8;
+ public const int CW = 0x0900;
+ public const int D3D12_FENCE_VALUE_EXT = 0x9595;
+ public const int DARKEN_KHR = 0x9297;
+ public const int DARKEN_NV = 0x9297;
+ public const int DATA_BUFFER_AMD = 0x9151;
+ public const int DEBUG_CALLBACK_FUNCTION = 0x8244;
+ public const int DEBUG_CALLBACK_FUNCTION_ARB = 0x8244;
+ public const int DEBUG_CALLBACK_USER_PARAM = 0x8245;
+ public const int DEBUG_CALLBACK_USER_PARAM_ARB = 0x8245;
+ public const int DEBUG_CATEGORY_API_ERROR_AMD = 0x9149;
+ public const int DEBUG_CATEGORY_APPLICATION_AMD = 0x914F;
+ public const int DEBUG_CATEGORY_DEPRECATION_AMD = 0x914B;
+ public const int DEBUG_CATEGORY_OTHER_AMD = 0x9150;
+ public const int DEBUG_CATEGORY_PERFORMANCE_AMD = 0x914D;
+ public const int DEBUG_CATEGORY_SHADER_COMPILER_AMD = 0x914E;
+ public const int DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD = 0x914C;
+ public const int DEBUG_CATEGORY_WINDOW_SYSTEM_AMD = 0x914A;
+ public const int DEBUG_GROUP_STACK_DEPTH = 0x826D;
+ public const int DEBUG_LOGGED_MESSAGES = 0x9145;
+ public const int DEBUG_LOGGED_MESSAGES_AMD = 0x9145;
+ public const int DEBUG_LOGGED_MESSAGES_ARB = 0x9145;
+ public const int DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243;
+ public const int DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB = 0x8243;
+ public const int DEBUG_OUTPUT = 0x92E0;
+ public const int DEBUG_OUTPUT_SYNCHRONOUS = 0x8242;
+ public const int DEBUG_OUTPUT_SYNCHRONOUS_ARB = 0x8242;
+ public const int DEBUG_SEVERITY_HIGH = 0x9146;
+ public const int DEBUG_SEVERITY_HIGH_AMD = 0x9146;
+ public const int DEBUG_SEVERITY_HIGH_ARB = 0x9146;
+ public const int DEBUG_SEVERITY_LOW = 0x9148;
+ public const int DEBUG_SEVERITY_LOW_AMD = 0x9148;
+ public const int DEBUG_SEVERITY_LOW_ARB = 0x9148;
+ public const int DEBUG_SEVERITY_MEDIUM = 0x9147;
+ public const int DEBUG_SEVERITY_MEDIUM_AMD = 0x9147;
+ public const int DEBUG_SEVERITY_MEDIUM_ARB = 0x9147;
+ public const int DEBUG_SEVERITY_NOTIFICATION = 0x826B;
+ public const int DEBUG_SOURCE_API = 0x8246;
+ public const int DEBUG_SOURCE_API_ARB = 0x8246;
+ public const int DEBUG_SOURCE_APPLICATION = 0x824A;
+ public const int DEBUG_SOURCE_APPLICATION_ARB = 0x824A;
+ public const int DEBUG_SOURCE_OTHER = 0x824B;
+ public const int DEBUG_SOURCE_OTHER_ARB = 0x824B;
+ public const int DEBUG_SOURCE_SHADER_COMPILER = 0x8248;
+ public const int DEBUG_SOURCE_SHADER_COMPILER_ARB = 0x8248;
+ public const int DEBUG_SOURCE_THIRD_PARTY = 0x8249;
+ public const int DEBUG_SOURCE_THIRD_PARTY_ARB = 0x8249;
+ public const int DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247;
+ public const int DEBUG_SOURCE_WINDOW_SYSTEM_ARB = 0x8247;
+ public const int DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D;
+ public const int DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB = 0x824D;
+ public const int DEBUG_TYPE_ERROR = 0x824C;
+ public const int DEBUG_TYPE_ERROR_ARB = 0x824C;
+ public const int DEBUG_TYPE_MARKER = 0x8268;
+ public const int DEBUG_TYPE_OTHER = 0x8251;
+ public const int DEBUG_TYPE_OTHER_ARB = 0x8251;
+ public const int DEBUG_TYPE_PERFORMANCE = 0x8250;
+ public const int DEBUG_TYPE_PERFORMANCE_ARB = 0x8250;
+ public const int DEBUG_TYPE_POP_GROUP = 0x826A;
+ public const int DEBUG_TYPE_PORTABILITY = 0x824F;
+ public const int DEBUG_TYPE_PORTABILITY_ARB = 0x824F;
+ public const int DEBUG_TYPE_PUSH_GROUP = 0x8269;
+ public const int DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E;
+ public const int DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB = 0x824E;
+ public const int DECODE_EXT = 0x8A49;
+ public const int DECR = 0x1E03;
+ public const int DECR_WRAP = 0x8508;
+ public const int DECR_WRAP_EXT = 0x8508;
+ public const int DEDICATED_MEMORY_OBJECT_EXT = 0x9581;
+ public const int DEFORMATIONS_MASK_SGIX = 0x8196;
+ public const int DELETE_STATUS = 0x8B80;
+ public const int DEPENDENT_AR_TEXTURE_2D_NV = 0x86E9;
+ public const int DEPENDENT_GB_TEXTURE_2D_NV = 0x86EA;
+ public const int DEPENDENT_HILO_TEXTURE_2D_NV = 0x8858;
+ public const int DEPENDENT_RGB_TEXTURE_3D_NV = 0x8859;
+ public const int DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV = 0x885A;
+ public const int DEPTH = 0x1801;
+ public const int DEPTH24_STENCIL8 = 0x88F0;
+ public const int DEPTH24_STENCIL8_EXT = 0x88F0;
+ public const int DEPTH32F_STENCIL8 = 0x8CAD;
+ public const int DEPTH32F_STENCIL8_NV = 0x8DAC;
+ public const int DEPTH_ATTACHMENT = 0x8D00;
+ public const int DEPTH_ATTACHMENT_EXT = 0x8D00;
+ public const int DEPTH_BOUNDS_EXT = 0x8891;
+ public const int DEPTH_BOUNDS_TEST_EXT = 0x8890;
+ public const int DEPTH_BUFFER_BIT = 0x00000100;
+ public const int DEPTH_BUFFER_FLOAT_MODE_NV = 0x8DAF;
+ public const int DEPTH_CLAMP = 0x864F;
+ public const int DEPTH_CLAMP_FAR_AMD = 0x901F;
+ public const int DEPTH_CLAMP_NEAR_AMD = 0x901E;
+ public const int DEPTH_CLAMP_NV = 0x864F;
+ public const int DEPTH_CLEAR_VALUE = 0x0B73;
+ public const int DEPTH_COMPONENT = 0x1902;
+ public const int DEPTH_COMPONENT16 = 0x81A5;
+ public const int DEPTH_COMPONENT16_ARB = 0x81A5;
+ public const int DEPTH_COMPONENT16_SGIX = 0x81A5;
+ public const int DEPTH_COMPONENT24 = 0x81A6;
+ public const int DEPTH_COMPONENT24_ARB = 0x81A6;
+ public const int DEPTH_COMPONENT24_SGIX = 0x81A6;
+ public const int DEPTH_COMPONENT32 = 0x81A7;
+ public const int DEPTH_COMPONENT32F = 0x8CAC;
+ public const int DEPTH_COMPONENT32F_NV = 0x8DAB;
+ public const int DEPTH_COMPONENT32_ARB = 0x81A7;
+ public const int DEPTH_COMPONENT32_SGIX = 0x81A7;
+ public const int DEPTH_COMPONENTS = 0x8284;
+ public const int DEPTH_FUNC = 0x0B74;
+ public const int DEPTH_RANGE = 0x0B70;
+ public const int DEPTH_RENDERABLE = 0x8287;
+ public const int DEPTH_SAMPLES_NV = 0x932D;
+ public const int DEPTH_STENCIL = 0x84F9;
+ public const int DEPTH_STENCIL_ATTACHMENT = 0x821A;
+ public const int DEPTH_STENCIL_EXT = 0x84F9;
+ public const int DEPTH_STENCIL_NV = 0x84F9;
+ public const int DEPTH_STENCIL_TEXTURE_MODE = 0x90EA;
+ public const int DEPTH_STENCIL_TO_BGRA_NV = 0x886F;
+ public const int DEPTH_STENCIL_TO_RGBA_NV = 0x886E;
+ public const int DEPTH_TEST = 0x0B71;
+ public const int DEPTH_TEXTURE_MODE_ARB = 0x884B;
+ public const int DEPTH_WRITEMASK = 0x0B72;
+ public const int DETACHED_BUFFERS_NV = 0x95AB;
+ public const int DETACHED_MEMORY_INCARNATION_NV = 0x95A9;
+ public const int DETACHED_TEXTURES_NV = 0x95AA;
+ public const int DETAIL_TEXTURE_2D_BINDING_SGIS = 0x8096;
+ public const int DETAIL_TEXTURE_2D_SGIS = 0x8095;
+ public const int DETAIL_TEXTURE_FUNC_POINTS_SGIS = 0x809C;
+ public const int DETAIL_TEXTURE_LEVEL_SGIS = 0x809A;
+ public const int DETAIL_TEXTURE_MODE_SGIS = 0x809B;
+ public const int DEVICE_LUID_EXT = 0x9599;
+ public const int DEVICE_NODE_MASK_EXT = 0x959A;
+ public const int DEVICE_UUID_EXT = 0x9597;
+ public const int DIFFERENCE_KHR = 0x929E;
+ public const int DIFFERENCE_NV = 0x929E;
+ public const int DISCARD_ATI = 0x8763;
+ public const int DISCARD_NV = 0x8530;
+ public const int DISCRETE_AMD = 0x9006;
+ public const int DISJOINT_NV = 0x9283;
+ public const int DISPATCH_INDIRECT_BUFFER = 0x90EE;
+ public const int DISPATCH_INDIRECT_BUFFER_BINDING = 0x90EF;
+ public const int DISTANCE_ATTENUATION_EXT = 0x8129;
+ public const int DISTANCE_ATTENUATION_SGIS = 0x8129;
+ public const int DITHER = 0x0BD0;
+ public const int DONT_CARE = 0x1100;
+ public const int DOT2_ADD_ATI = 0x896C;
+ public const int DOT3_ATI = 0x8966;
+ public const int DOT3_RGBA_ARB = 0x86AF;
+ public const int DOT3_RGBA_EXT = 0x8741;
+ public const int DOT3_RGB_ARB = 0x86AE;
+ public const int DOT3_RGB_EXT = 0x8740;
+ public const int DOT4_ATI = 0x8967;
+ public const int DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV = 0x885D;
+ public const int DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV = 0x86F3;
+ public const int DOT_PRODUCT_DEPTH_REPLACE_NV = 0x86ED;
+ public const int DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV = 0x86F1;
+ public const int DOT_PRODUCT_NV = 0x86EC;
+ public const int DOT_PRODUCT_PASS_THROUGH_NV = 0x885B;
+ public const int DOT_PRODUCT_REFLECT_CUBE_MAP_NV = 0x86F2;
+ public const int DOT_PRODUCT_TEXTURE_1D_NV = 0x885C;
+ public const int DOT_PRODUCT_TEXTURE_2D_NV = 0x86EE;
+ public const int DOT_PRODUCT_TEXTURE_3D_NV = 0x86EF;
+ public const int DOT_PRODUCT_TEXTURE_CUBE_MAP_NV = 0x86F0;
+ public const int DOT_PRODUCT_TEXTURE_RECTANGLE_NV = 0x864E;
+ public const int DOUBLE = 0x140A;
+ public const int DOUBLEBUFFER = 0x0C32;
+ public const int DOUBLE_MAT2 = 0x8F46;
+ public const int DOUBLE_MAT2_EXT = 0x8F46;
+ public const int DOUBLE_MAT2x3 = 0x8F49;
+ public const int DOUBLE_MAT2x3_EXT = 0x8F49;
+ public const int DOUBLE_MAT2x4 = 0x8F4A;
+ public const int DOUBLE_MAT2x4_EXT = 0x8F4A;
+ public const int DOUBLE_MAT3 = 0x8F47;
+ public const int DOUBLE_MAT3_EXT = 0x8F47;
+ public const int DOUBLE_MAT3x2 = 0x8F4B;
+ public const int DOUBLE_MAT3x2_EXT = 0x8F4B;
+ public const int DOUBLE_MAT3x4 = 0x8F4C;
+ public const int DOUBLE_MAT3x4_EXT = 0x8F4C;
+ public const int DOUBLE_MAT4 = 0x8F48;
+ public const int DOUBLE_MAT4_EXT = 0x8F48;
+ public const int DOUBLE_MAT4x2 = 0x8F4D;
+ public const int DOUBLE_MAT4x2_EXT = 0x8F4D;
+ public const int DOUBLE_MAT4x3 = 0x8F4E;
+ public const int DOUBLE_MAT4x3_EXT = 0x8F4E;
+ public const int DOUBLE_VEC2 = 0x8FFC;
+ public const int DOUBLE_VEC2_EXT = 0x8FFC;
+ public const int DOUBLE_VEC3 = 0x8FFD;
+ public const int DOUBLE_VEC3_EXT = 0x8FFD;
+ public const int DOUBLE_VEC4 = 0x8FFE;
+ public const int DOUBLE_VEC4_EXT = 0x8FFE;
+ public const int DRAW_ARRAYS_COMMAND_NV = 0x0003;
+ public const int DRAW_ARRAYS_INSTANCED_COMMAND_NV = 0x0007;
+ public const int DRAW_ARRAYS_STRIP_COMMAND_NV = 0x0005;
+ public const int DRAW_BUFFER = 0x0C01;
+ public const int DRAW_BUFFER0 = 0x8825;
+ public const int DRAW_BUFFER0_ARB = 0x8825;
+ public const int DRAW_BUFFER0_ATI = 0x8825;
+ public const int DRAW_BUFFER1 = 0x8826;
+ public const int DRAW_BUFFER10 = 0x882F;
+ public const int DRAW_BUFFER10_ARB = 0x882F;
+ public const int DRAW_BUFFER10_ATI = 0x882F;
+ public const int DRAW_BUFFER11 = 0x8830;
+ public const int DRAW_BUFFER11_ARB = 0x8830;
+ public const int DRAW_BUFFER11_ATI = 0x8830;
+ public const int DRAW_BUFFER12 = 0x8831;
+ public const int DRAW_BUFFER12_ARB = 0x8831;
+ public const int DRAW_BUFFER12_ATI = 0x8831;
+ public const int DRAW_BUFFER13 = 0x8832;
+ public const int DRAW_BUFFER13_ARB = 0x8832;
+ public const int DRAW_BUFFER13_ATI = 0x8832;
+ public const int DRAW_BUFFER14 = 0x8833;
+ public const int DRAW_BUFFER14_ARB = 0x8833;
+ public const int DRAW_BUFFER14_ATI = 0x8833;
+ public const int DRAW_BUFFER15 = 0x8834;
+ public const int DRAW_BUFFER15_ARB = 0x8834;
+ public const int DRAW_BUFFER15_ATI = 0x8834;
+ public const int DRAW_BUFFER1_ARB = 0x8826;
+ public const int DRAW_BUFFER1_ATI = 0x8826;
+ public const int DRAW_BUFFER2 = 0x8827;
+ public const int DRAW_BUFFER2_ARB = 0x8827;
+ public const int DRAW_BUFFER2_ATI = 0x8827;
+ public const int DRAW_BUFFER3 = 0x8828;
+ public const int DRAW_BUFFER3_ARB = 0x8828;
+ public const int DRAW_BUFFER3_ATI = 0x8828;
+ public const int DRAW_BUFFER4 = 0x8829;
+ public const int DRAW_BUFFER4_ARB = 0x8829;
+ public const int DRAW_BUFFER4_ATI = 0x8829;
+ public const int DRAW_BUFFER5 = 0x882A;
+ public const int DRAW_BUFFER5_ARB = 0x882A;
+ public const int DRAW_BUFFER5_ATI = 0x882A;
+ public const int DRAW_BUFFER6 = 0x882B;
+ public const int DRAW_BUFFER6_ARB = 0x882B;
+ public const int DRAW_BUFFER6_ATI = 0x882B;
+ public const int DRAW_BUFFER7 = 0x882C;
+ public const int DRAW_BUFFER7_ARB = 0x882C;
+ public const int DRAW_BUFFER7_ATI = 0x882C;
+ public const int DRAW_BUFFER8 = 0x882D;
+ public const int DRAW_BUFFER8_ARB = 0x882D;
+ public const int DRAW_BUFFER8_ATI = 0x882D;
+ public const int DRAW_BUFFER9 = 0x882E;
+ public const int DRAW_BUFFER9_ARB = 0x882E;
+ public const int DRAW_BUFFER9_ATI = 0x882E;
+ public const int DRAW_ELEMENTS_COMMAND_NV = 0x0002;
+ public const int DRAW_ELEMENTS_INSTANCED_COMMAND_NV = 0x0006;
+ public const int DRAW_ELEMENTS_STRIP_COMMAND_NV = 0x0004;
+ public const int DRAW_FRAMEBUFFER = 0x8CA9;
+ public const int DRAW_FRAMEBUFFER_BINDING = 0x8CA6;
+ public const int DRAW_FRAMEBUFFER_BINDING_EXT = 0x8CA6;
+ public const int DRAW_FRAMEBUFFER_EXT = 0x8CA9;
+ public const int DRAW_INDIRECT_ADDRESS_NV = 0x8F41;
+ public const int DRAW_INDIRECT_BUFFER = 0x8F3F;
+ public const int DRAW_INDIRECT_BUFFER_BINDING = 0x8F43;
+ public const int DRAW_INDIRECT_LENGTH_NV = 0x8F42;
+ public const int DRAW_INDIRECT_UNIFIED_NV = 0x8F40;
+ public const int DRAW_PIXELS_APPLE = 0x8A0A;
+ public const int DRIVER_UUID_EXT = 0x9598;
+ public const int DSDT8_MAG8_INTENSITY8_NV = 0x870B;
+ public const int DSDT8_MAG8_NV = 0x870A;
+ public const int DSDT8_NV = 0x8709;
+ public const int DSDT_MAG_INTENSITY_NV = 0x86DC;
+ public const int DSDT_MAG_NV = 0x86F6;
+ public const int DSDT_MAG_VIB_NV = 0x86F7;
+ public const int DSDT_NV = 0x86F5;
+ public const int DST_ALPHA = 0x0304;
+ public const int DST_ATOP_NV = 0x928F;
+ public const int DST_COLOR = 0x0306;
+ public const int DST_IN_NV = 0x928B;
+ public const int DST_NV = 0x9287;
+ public const int DST_OUT_NV = 0x928D;
+ public const int DST_OVER_NV = 0x9289;
+ public const int DS_BIAS_NV = 0x8716;
+ public const int DS_SCALE_NV = 0x8710;
+ public const int DT_BIAS_NV = 0x8717;
+ public const int DT_SCALE_NV = 0x8711;
+ public const int DU8DV8_ATI = 0x877A;
+ public const int DUAL_ALPHA12_SGIS = 0x8112;
+ public const int DUAL_ALPHA16_SGIS = 0x8113;
+ public const int DUAL_ALPHA4_SGIS = 0x8110;
+ public const int DUAL_ALPHA8_SGIS = 0x8111;
+ public const int DUAL_INTENSITY12_SGIS = 0x811A;
+ public const int DUAL_INTENSITY16_SGIS = 0x811B;
+ public const int DUAL_INTENSITY4_SGIS = 0x8118;
+ public const int DUAL_INTENSITY8_SGIS = 0x8119;
+ public const int DUAL_LUMINANCE12_SGIS = 0x8116;
+ public const int DUAL_LUMINANCE16_SGIS = 0x8117;
+ public const int DUAL_LUMINANCE4_SGIS = 0x8114;
+ public const int DUAL_LUMINANCE8_SGIS = 0x8115;
+ public const int DUAL_LUMINANCE_ALPHA4_SGIS = 0x811C;
+ public const int DUAL_LUMINANCE_ALPHA8_SGIS = 0x811D;
+ public const int DUAL_TEXTURE_SELECT_SGIS = 0x8124;
+ public const int DUDV_ATI = 0x8779;
+ public const int DUP_FIRST_CUBIC_CURVE_TO_NV = 0xF2;
+ public const int DUP_LAST_CUBIC_CURVE_TO_NV = 0xF4;
+ public const int DYNAMIC_ATI = 0x8761;
+ public const int DYNAMIC_COPY = 0x88EA;
+ public const int DYNAMIC_COPY_ARB = 0x88EA;
+ public const int DYNAMIC_DRAW = 0x88E8;
+ public const int DYNAMIC_DRAW_ARB = 0x88E8;
+ public const int DYNAMIC_READ = 0x88E9;
+ public const int DYNAMIC_READ_ARB = 0x88E9;
+ public const int DYNAMIC_STORAGE_BIT = 0x0100;
+ public const int EDGEFLAG_BIT_PGI = 0x00040000;
+ public const int EDGE_FLAG_ARRAY_ADDRESS_NV = 0x8F26;
+ public const int EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB = 0x889B;
+ public const int EDGE_FLAG_ARRAY_COUNT_EXT = 0x808D;
+ public const int EDGE_FLAG_ARRAY_EXT = 0x8079;
+ public const int EDGE_FLAG_ARRAY_LENGTH_NV = 0x8F30;
+ public const int EDGE_FLAG_ARRAY_LIST_IBM = 103075;
+ public const int EDGE_FLAG_ARRAY_LIST_STRIDE_IBM = 103085;
+ public const int EDGE_FLAG_ARRAY_POINTER_EXT = 0x8093;
+ public const int EDGE_FLAG_ARRAY_STRIDE_EXT = 0x808C;
+ public const int EFFECTIVE_RASTER_SAMPLES_EXT = 0x932C;
+ public const int EIGHTH_BIT_ATI = 0x00000020;
+ public const int ELEMENT_ADDRESS_COMMAND_NV = 0x0008;
+ public const int ELEMENT_ARRAY_ADDRESS_NV = 0x8F29;
+ public const int ELEMENT_ARRAY_APPLE = 0x8A0C;
+ public const int ELEMENT_ARRAY_ATI = 0x8768;
+ public const int ELEMENT_ARRAY_BARRIER_BIT = 0x00000002;
+ public const int ELEMENT_ARRAY_BARRIER_BIT_EXT = 0x00000002;
+ public const int ELEMENT_ARRAY_BUFFER = 0x8893;
+ public const int ELEMENT_ARRAY_BUFFER_ARB = 0x8893;
+ public const int ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
+ public const int ELEMENT_ARRAY_BUFFER_BINDING_ARB = 0x8895;
+ public const int ELEMENT_ARRAY_LENGTH_NV = 0x8F33;
+ public const int ELEMENT_ARRAY_POINTER_APPLE = 0x8A0E;
+ public const int ELEMENT_ARRAY_POINTER_ATI = 0x876A;
+ public const int ELEMENT_ARRAY_TYPE_APPLE = 0x8A0D;
+ public const int ELEMENT_ARRAY_TYPE_ATI = 0x8769;
+ public const int ELEMENT_ARRAY_UNIFIED_NV = 0x8F1F;
+ public const int EMBOSS_CONSTANT_NV = 0x855E;
+ public const int EMBOSS_LIGHT_NV = 0x855D;
+ public const int EMBOSS_MAP_NV = 0x855F;
+ public const int EQUAL = 0x0202;
+ public const int EQUIV = 0x1509;
+ public const int EVAL_2D_NV = 0x86C0;
+ public const int EVAL_FRACTIONAL_TESSELLATION_NV = 0x86C5;
+ public const int EVAL_TRIANGULAR_2D_NV = 0x86C1;
+ public const int EVAL_VERTEX_ATTRIB0_NV = 0x86C6;
+ public const int EVAL_VERTEX_ATTRIB10_NV = 0x86D0;
+ public const int EVAL_VERTEX_ATTRIB11_NV = 0x86D1;
+ public const int EVAL_VERTEX_ATTRIB12_NV = 0x86D2;
+ public const int EVAL_VERTEX_ATTRIB13_NV = 0x86D3;
+ public const int EVAL_VERTEX_ATTRIB14_NV = 0x86D4;
+ public const int EVAL_VERTEX_ATTRIB15_NV = 0x86D5;
+ public const int EVAL_VERTEX_ATTRIB1_NV = 0x86C7;
+ public const int EVAL_VERTEX_ATTRIB2_NV = 0x86C8;
+ public const int EVAL_VERTEX_ATTRIB3_NV = 0x86C9;
+ public const int EVAL_VERTEX_ATTRIB4_NV = 0x86CA;
+ public const int EVAL_VERTEX_ATTRIB5_NV = 0x86CB;
+ public const int EVAL_VERTEX_ATTRIB6_NV = 0x86CC;
+ public const int EVAL_VERTEX_ATTRIB7_NV = 0x86CD;
+ public const int EVAL_VERTEX_ATTRIB8_NV = 0x86CE;
+ public const int EVAL_VERTEX_ATTRIB9_NV = 0x86CF;
+ public const int EXCLUSION_KHR = 0x92A0;
+ public const int EXCLUSION_NV = 0x92A0;
+ public const int EXCLUSIVE_EXT = 0x8F11;
+ public const int EXPAND_NEGATE_NV = 0x8539;
+ public const int EXPAND_NORMAL_NV = 0x8538;
+ public const int EXTENSIONS = 0x1F03;
+ public const int EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD = 0x9160;
+ public const int EYE_DISTANCE_TO_LINE_SGIS = 0x81F2;
+ public const int EYE_DISTANCE_TO_POINT_SGIS = 0x81F0;
+ public const int EYE_LINE_SGIS = 0x81F6;
+ public const int EYE_PLANE = 0x2502;
+ public const int EYE_PLANE_ABSOLUTE_NV = 0x855C;
+ public const int EYE_POINT_SGIS = 0x81F4;
+ public const int EYE_RADIAL_NV = 0x855B;
+ public const int E_TIMES_F_NV = 0x8531;
+ public const int FACTOR_MAX_AMD = 0x901D;
+ public const int FACTOR_MIN_AMD = 0x901C;
+ public const int FAILURE_NV = 0x9030;
+ public const int FALSE = 0;
+ public const int FASTEST = 0x1101;
+ public const int FENCE_APPLE = 0x8A0B;
+ public const int FENCE_CONDITION_NV = 0x84F4;
+ public const int FENCE_STATUS_NV = 0x84F3;
+ public const int FIELDS_NV = 0x8E27;
+ public const int FIELD_LOWER_NV = 0x9023;
+ public const int FIELD_UPPER_NV = 0x9022;
+ public const int FILE_NAME_NV = 0x9074;
+ public const int FILL = 0x1B02;
+ public const int FILL_RECTANGLE_NV = 0x933C;
+ public const int FILTER = 0x829A;
+ public const int FILTER4_SGIS = 0x8146;
+ public const int FIRST_TO_REST_NV = 0x90AF;
+ public const int FIRST_VERTEX_CONVENTION = 0x8E4D;
+ public const int FIRST_VERTEX_CONVENTION_EXT = 0x8E4D;
+ public const int FIXED = 0x140C;
+ public const int FIXED_OES = 0x140C;
+ public const int FIXED_ONLY = 0x891D;
+ public const int FIXED_ONLY_ARB = 0x891D;
+ public const int FLOAT = 0x1406;
+ public const int FLOAT16_MAT2_AMD = 0x91C5;
+ public const int FLOAT16_MAT2x3_AMD = 0x91C8;
+ public const int FLOAT16_MAT2x4_AMD = 0x91C9;
+ public const int FLOAT16_MAT3_AMD = 0x91C6;
+ public const int FLOAT16_MAT3x2_AMD = 0x91CA;
+ public const int FLOAT16_MAT3x4_AMD = 0x91CB;
+ public const int FLOAT16_MAT4_AMD = 0x91C7;
+ public const int FLOAT16_MAT4x2_AMD = 0x91CC;
+ public const int FLOAT16_MAT4x3_AMD = 0x91CD;
+ public const int FLOAT16_NV = 0x8FF8;
+ public const int FLOAT16_VEC2_NV = 0x8FF9;
+ public const int FLOAT16_VEC3_NV = 0x8FFA;
+ public const int FLOAT16_VEC4_NV = 0x8FFB;
+ public const int FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD;
+ public const int FLOAT_32_UNSIGNED_INT_24_8_REV_NV = 0x8DAD;
+ public const int FLOAT_CLEAR_COLOR_VALUE_NV = 0x888D;
+ public const int FLOAT_MAT2 = 0x8B5A;
+ public const int FLOAT_MAT2_ARB = 0x8B5A;
+ public const int FLOAT_MAT2x3 = 0x8B65;
+ public const int FLOAT_MAT2x4 = 0x8B66;
+ public const int FLOAT_MAT3 = 0x8B5B;
+ public const int FLOAT_MAT3_ARB = 0x8B5B;
+ public const int FLOAT_MAT3x2 = 0x8B67;
+ public const int FLOAT_MAT3x4 = 0x8B68;
+ public const int FLOAT_MAT4 = 0x8B5C;
+ public const int FLOAT_MAT4_ARB = 0x8B5C;
+ public const int FLOAT_MAT4x2 = 0x8B69;
+ public const int FLOAT_MAT4x3 = 0x8B6A;
+ public const int FLOAT_R16_NV = 0x8884;
+ public const int FLOAT_R32_NV = 0x8885;
+ public const int FLOAT_RG16_NV = 0x8886;
+ public const int FLOAT_RG32_NV = 0x8887;
+ public const int FLOAT_RGB16_NV = 0x8888;
+ public const int FLOAT_RGB32_NV = 0x8889;
+ public const int FLOAT_RGBA16_NV = 0x888A;
+ public const int FLOAT_RGBA32_NV = 0x888B;
+ public const int FLOAT_RGBA_MODE_NV = 0x888E;
+ public const int FLOAT_RGBA_NV = 0x8883;
+ public const int FLOAT_RGB_NV = 0x8882;
+ public const int FLOAT_RG_NV = 0x8881;
+ public const int FLOAT_R_NV = 0x8880;
+ public const int FLOAT_VEC2 = 0x8B50;
+ public const int FLOAT_VEC2_ARB = 0x8B50;
+ public const int FLOAT_VEC3 = 0x8B51;
+ public const int FLOAT_VEC3_ARB = 0x8B51;
+ public const int FLOAT_VEC4 = 0x8B52;
+ public const int FLOAT_VEC4_ARB = 0x8B52;
+ public const int FOG = 0x0B60;
+ public const int FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = 0x889D;
+ public const int FOG_COORDINATE_ARRAY_EXT = 0x8457;
+ public const int FOG_COORDINATE_ARRAY_LIST_IBM = 103076;
+ public const int FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM = 103086;
+ public const int FOG_COORDINATE_ARRAY_POINTER_EXT = 0x8456;
+ public const int FOG_COORDINATE_ARRAY_STRIDE_EXT = 0x8455;
+ public const int FOG_COORDINATE_ARRAY_TYPE_EXT = 0x8454;
+ public const int FOG_COORDINATE_EXT = 0x8451;
+ public const int FOG_COORDINATE_SOURCE_EXT = 0x8450;
+ public const int FOG_COORD_ARRAY_ADDRESS_NV = 0x8F28;
+ public const int FOG_COORD_ARRAY_LENGTH_NV = 0x8F32;
+ public const int FOG_DISTANCE_MODE_NV = 0x855A;
+ public const int FOG_FUNC_POINTS_SGIS = 0x812B;
+ public const int FOG_FUNC_SGIS = 0x812A;
+ public const int FOG_OFFSET_SGIX = 0x8198;
+ public const int FOG_OFFSET_VALUE_SGIX = 0x8199;
+ public const int FOG_SPECULAR_TEXTURE_WIN = 0x80EC;
+ public const int FONT_ASCENDER_BIT_NV = 0x00200000;
+ public const int FONT_DESCENDER_BIT_NV = 0x00400000;
+ public const int FONT_GLYPHS_AVAILABLE_NV = 0x9368;
+ public const int FONT_HAS_KERNING_BIT_NV = 0x10000000;
+ public const int FONT_HEIGHT_BIT_NV = 0x00800000;
+ public const int FONT_MAX_ADVANCE_HEIGHT_BIT_NV = 0x02000000;
+ public const int FONT_MAX_ADVANCE_WIDTH_BIT_NV = 0x01000000;
+ public const int FONT_NUM_GLYPH_INDICES_BIT_NV = 0x20000000;
+ public const int FONT_TARGET_UNAVAILABLE_NV = 0x9369;
+ public const int FONT_UNAVAILABLE_NV = 0x936A;
+ public const int FONT_UNDERLINE_POSITION_BIT_NV = 0x04000000;
+ public const int FONT_UNDERLINE_THICKNESS_BIT_NV = 0x08000000;
+ public const int FONT_UNINTELLIGIBLE_NV = 0x936B;
+ public const int FONT_UNITS_PER_EM_BIT_NV = 0x00100000;
+ public const int FONT_X_MAX_BOUNDS_BIT_NV = 0x00040000;
+ public const int FONT_X_MIN_BOUNDS_BIT_NV = 0x00010000;
+ public const int FONT_Y_MAX_BOUNDS_BIT_NV = 0x00080000;
+ public const int FONT_Y_MIN_BOUNDS_BIT_NV = 0x00020000;
+ public const int FORCE_BLUE_TO_ONE_NV = 0x8860;
+ public const int FORMAT_SUBSAMPLE_244_244_OML = 0x8983;
+ public const int FORMAT_SUBSAMPLE_24_24_OML = 0x8982;
+ public const int FRACTIONAL_EVEN = 0x8E7C;
+ public const int FRACTIONAL_ODD = 0x8E7B;
+ public const int FRAGMENT_COLOR_EXT = 0x834C;
+ public const int FRAGMENT_COLOR_MATERIAL_FACE_SGIX = 0x8402;
+ public const int FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX = 0x8403;
+ public const int FRAGMENT_COLOR_MATERIAL_SGIX = 0x8401;
+ public const int FRAGMENT_COVERAGE_COLOR_NV = 0x92DE;
+ public const int FRAGMENT_COVERAGE_TO_COLOR_NV = 0x92DD;
+ public const int FRAGMENT_DEPTH_EXT = 0x8452;
+ public const int FRAGMENT_INPUT_NV = 0x936D;
+ public const int FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D;
+ public const int FRAGMENT_LIGHT0_SGIX = 0x840C;
+ public const int FRAGMENT_LIGHT1_SGIX = 0x840D;
+ public const int FRAGMENT_LIGHT2_SGIX = 0x840E;
+ public const int FRAGMENT_LIGHT3_SGIX = 0x840F;
+ public const int FRAGMENT_LIGHT4_SGIX = 0x8410;
+ public const int FRAGMENT_LIGHT5_SGIX = 0x8411;
+ public const int FRAGMENT_LIGHT6_SGIX = 0x8412;
+ public const int FRAGMENT_LIGHT7_SGIX = 0x8413;
+ public const int FRAGMENT_LIGHTING_SGIX = 0x8400;
+ public const int FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX = 0x840A;
+ public const int FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX = 0x8408;
+ public const int FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX = 0x840B;
+ public const int FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX = 0x8409;
+ public const int FRAGMENT_MATERIAL_EXT = 0x8349;
+ public const int FRAGMENT_NORMAL_EXT = 0x834A;
+ public const int FRAGMENT_PROGRAM_ARB = 0x8804;
+ public const int FRAGMENT_PROGRAM_BINDING_NV = 0x8873;
+ public const int FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV = 0x8E5D;
+ public const int FRAGMENT_PROGRAM_NV = 0x8870;
+ public const int FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA4;
+ public const int FRAGMENT_SHADER = 0x8B30;
+ public const int FRAGMENT_SHADER_ARB = 0x8B30;
+ public const int FRAGMENT_SHADER_ATI = 0x8920;
+ public const int FRAGMENT_SHADER_BIT = 0x00000002;
+ public const int FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B;
+ public const int FRAGMENT_SHADER_DERIVATIVE_HINT_ARB = 0x8B8B;
+ public const int FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT = 0x8A52;
+ public const int FRAGMENT_SHADER_INVOCATIONS = 0x82F4;
+ public const int FRAGMENT_SHADER_INVOCATIONS_ARB = 0x82F4;
+ public const int FRAGMENT_SUBROUTINE = 0x92EC;
+ public const int FRAGMENT_SUBROUTINE_UNIFORM = 0x92F2;
+ public const int FRAGMENT_TEXTURE = 0x829F;
+ public const int FRAMEBUFFER = 0x8D40;
+ public const int FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215;
+ public const int FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214;
+ public const int FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210;
+ public const int FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211;
+ public const int FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216;
+ public const int FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213;
+ public const int FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7;
+ public const int FRAMEBUFFER_ATTACHMENT_LAYERED_ARB = 0x8DA7;
+ public const int FRAMEBUFFER_ATTACHMENT_LAYERED_EXT = 0x8DA7;
+ public const int FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
+ public const int FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT = 0x8CD1;
+ public const int FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
+ public const int FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT = 0x8CD0;
+ public const int FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212;
+ public const int FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217;
+ public const int FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT = 0x8CD4;
+ public const int FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR = 0x9632;
+ public const int FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
+ public const int FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT = 0x8CD3;
+ public const int FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4;
+ public const int FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = 0x8CD4;
+ public const int FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
+ public const int FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT = 0x8CD2;
+ public const int FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR = 0x9630;
+ public const int FRAMEBUFFER_BARRIER_BIT = 0x00000400;
+ public const int FRAMEBUFFER_BARRIER_BIT_EXT = 0x00000400;
+ public const int FRAMEBUFFER_BINDING = 0x8CA6;
+ public const int FRAMEBUFFER_BINDING_EXT = 0x8CA6;
+ public const int FRAMEBUFFER_BLEND = 0x828B;
+ public const int FRAMEBUFFER_COMPLETE = 0x8CD5;
+ public const int FRAMEBUFFER_COMPLETE_EXT = 0x8CD5;
+ public const int FRAMEBUFFER_DEFAULT = 0x8218;
+ public const int FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314;
+ public const int FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311;
+ public const int FRAMEBUFFER_DEFAULT_LAYERS = 0x9312;
+ public const int FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313;
+ public const int FRAMEBUFFER_DEFAULT_WIDTH = 0x9310;
+ public const int FRAMEBUFFER_EXT = 0x8D40;
+ public const int FRAMEBUFFER_FLIP_X_MESA = 0x8BBC;
+ public const int FRAMEBUFFER_FLIP_Y_MESA = 0x8BBB;
+ public const int FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
+ public const int FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT = 0x8CD6;
+ public const int FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT = 0x8CD9;
+ public const int FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB;
+ public const int FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT = 0x8CDB;
+ public const int FRAMEBUFFER_INCOMPLETE_FORMATS_EXT = 0x8CDA;
+ public const int FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB = 0x8DA9;
+ public const int FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT = 0x8DA9;
+ public const int FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8;
+ public const int FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB = 0x8DA8;
+ public const int FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT = 0x8DA8;
+ public const int FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
+ public const int FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT = 0x8CD7;
+ public const int FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56;
+ public const int FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x8D56;
+ public const int FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC;
+ public const int FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT = 0x8CDC;
+ public const int FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR = 0x9633;
+ public const int FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB = 0x9342;
+ public const int FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV = 0x9342;
+ public const int FRAMEBUFFER_RENDERABLE = 0x8289;
+ public const int FRAMEBUFFER_RENDERABLE_LAYERED = 0x828A;
+ public const int FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB = 0x9343;
+ public const int FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV = 0x9343;
+ public const int FRAMEBUFFER_SRGB = 0x8DB9;
+ public const int FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x8DBA;
+ public const int FRAMEBUFFER_SRGB_EXT = 0x8DB9;
+ public const int FRAMEBUFFER_SWAP_XY_MESA = 0x8BBD;
+ public const int FRAMEBUFFER_UNDEFINED = 0x8219;
+ public const int FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
+ public const int FRAMEBUFFER_UNSUPPORTED_EXT = 0x8CDD;
+ public const int FRAMEZOOM_FACTOR_SGIX = 0x818C;
+ public const int FRAMEZOOM_SGIX = 0x818B;
+ public const int FRAME_NV = 0x8E26;
+ public const int FRONT = 0x0404;
+ public const int FRONT_AND_BACK = 0x0408;
+ public const int FRONT_FACE = 0x0B46;
+ public const int FRONT_FACE_COMMAND_NV = 0x0012;
+ public const int FRONT_LEFT = 0x0400;
+ public const int FRONT_RIGHT = 0x0401;
+ public const int FULL_RANGE_EXT = 0x87E1;
+ public const int FULL_STIPPLE_HINT_PGI = 0x1A219;
+ public const int FULL_SUPPORT = 0x82B7;
+ public const int FUNC_ADD = 0x8006;
+ public const int FUNC_ADD_EXT = 0x8006;
+ public const int FUNC_REVERSE_SUBTRACT = 0x800B;
+ public const int FUNC_REVERSE_SUBTRACT_EXT = 0x800B;
+ public const int FUNC_SUBTRACT = 0x800A;
+ public const int FUNC_SUBTRACT_EXT = 0x800A;
+ public const int GENERATE_MIPMAP_HINT_SGIS = 0x8192;
+ public const int GENERATE_MIPMAP_SGIS = 0x8191;
+ public const int GENERIC_ATTRIB_NV = 0x8C7D;
+ public const int GEOMETRY_DEFORMATION_BIT_SGIX = 0x00000002;
+ public const int GEOMETRY_DEFORMATION_SGIX = 0x8194;
+ public const int GEOMETRY_INPUT_TYPE = 0x8917;
+ public const int GEOMETRY_INPUT_TYPE_ARB = 0x8DDB;
+ public const int GEOMETRY_INPUT_TYPE_EXT = 0x8DDB;
+ public const int GEOMETRY_OUTPUT_TYPE = 0x8918;
+ public const int GEOMETRY_OUTPUT_TYPE_ARB = 0x8DDC;
+ public const int GEOMETRY_OUTPUT_TYPE_EXT = 0x8DDC;
+ public const int GEOMETRY_PROGRAM_NV = 0x8C26;
+ public const int GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA3;
+ public const int GEOMETRY_SHADER = 0x8DD9;
+ public const int GEOMETRY_SHADER_ARB = 0x8DD9;
+ public const int GEOMETRY_SHADER_BIT = 0x00000004;
+ public const int GEOMETRY_SHADER_EXT = 0x8DD9;
+ public const int GEOMETRY_SHADER_INVOCATIONS = 0x887F;
+ public const int GEOMETRY_SHADER_PRIMITIVES_EMITTED = 0x82F3;
+ public const int GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB = 0x82F3;
+ public const int GEOMETRY_SUBROUTINE = 0x92EB;
+ public const int GEOMETRY_SUBROUTINE_UNIFORM = 0x92F1;
+ public const int GEOMETRY_TEXTURE = 0x829E;
+ public const int GEOMETRY_VERTICES_OUT = 0x8916;
+ public const int GEOMETRY_VERTICES_OUT_ARB = 0x8DDA;
+ public const int GEOMETRY_VERTICES_OUT_EXT = 0x8DDA;
+ public const int GEQUAL = 0x0206;
+ public const int GET_TEXTURE_IMAGE_FORMAT = 0x8291;
+ public const int GET_TEXTURE_IMAGE_TYPE = 0x8292;
+ public const int GLOBAL_ALPHA_FACTOR_SUN = 0x81DA;
+ public const int GLOBAL_ALPHA_SUN = 0x81D9;
+ public const int GLYPH_HAS_KERNING_BIT_NV = 0x100;
+ public const int GLYPH_HEIGHT_BIT_NV = 0x02;
+ public const int GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV = 0x10;
+ public const int GLYPH_HORIZONTAL_BEARING_X_BIT_NV = 0x04;
+ public const int GLYPH_HORIZONTAL_BEARING_Y_BIT_NV = 0x08;
+ public const int GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV = 0x80;
+ public const int GLYPH_VERTICAL_BEARING_X_BIT_NV = 0x20;
+ public const int GLYPH_VERTICAL_BEARING_Y_BIT_NV = 0x40;
+ public const int GLYPH_WIDTH_BIT_NV = 0x01;
+ public const int GPU_ADDRESS_NV = 0x8F34;
+ public const int GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX = 0x9049;
+ public const int GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX = 0x9047;
+ public const int GPU_MEMORY_INFO_EVICTED_MEMORY_NVX = 0x904B;
+ public const int GPU_MEMORY_INFO_EVICTION_COUNT_NVX = 0x904A;
+ public const int GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX = 0x9048;
+ public const int GREATER = 0x0204;
+ public const int GREEN = 0x1904;
+ public const int GREEN_BIT_ATI = 0x00000002;
+ public const int GREEN_INTEGER = 0x8D95;
+ public const int GREEN_INTEGER_EXT = 0x8D95;
+ public const int GREEN_MAX_CLAMP_INGR = 0x8565;
+ public const int GREEN_MIN_CLAMP_INGR = 0x8561;
+ public const int GREEN_NV = 0x1904;
+ public const int GUILTY_CONTEXT_RESET = 0x8253;
+ public const int GUILTY_CONTEXT_RESET_ARB = 0x8253;
+ public const int HALF_APPLE = 0x140B;
+ public const int HALF_BIAS_NEGATE_NV = 0x853B;
+ public const int HALF_BIAS_NORMAL_NV = 0x853A;
+ public const int HALF_BIT_ATI = 0x00000008;
+ public const int HALF_FLOAT = 0x140B;
+ public const int HALF_FLOAT_ARB = 0x140B;
+ public const int HALF_FLOAT_NV = 0x140B;
+ public const int HANDLE_TYPE_D3D11_IMAGE_EXT = 0x958B;
+ public const int HANDLE_TYPE_D3D11_IMAGE_KMT_EXT = 0x958C;
+ public const int HANDLE_TYPE_D3D12_FENCE_EXT = 0x9594;
+ public const int HANDLE_TYPE_D3D12_RESOURCE_EXT = 0x958A;
+ public const int HANDLE_TYPE_D3D12_TILEPOOL_EXT = 0x9589;
+ public const int HANDLE_TYPE_OPAQUE_FD_EXT = 0x9586;
+ public const int HANDLE_TYPE_OPAQUE_WIN32_EXT = 0x9587;
+ public const int HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT = 0x9588;
+ public const int HARDLIGHT_KHR = 0x929B;
+ public const int HARDLIGHT_NV = 0x929B;
+ public const int HARDMIX_NV = 0x92A9;
+ public const int HIGH_FLOAT = 0x8DF2;
+ public const int HIGH_INT = 0x8DF5;
+ public const int HILO16_NV = 0x86F8;
+ public const int HILO8_NV = 0x885E;
+ public const int HILO_NV = 0x86F4;
+ public const int HISTOGRAM_ALPHA_SIZE_EXT = 0x802B;
+ public const int HISTOGRAM_BLUE_SIZE_EXT = 0x802A;
+ public const int HISTOGRAM_EXT = 0x8024;
+ public const int HISTOGRAM_FORMAT_EXT = 0x8027;
+ public const int HISTOGRAM_GREEN_SIZE_EXT = 0x8029;
+ public const int HISTOGRAM_LUMINANCE_SIZE_EXT = 0x802C;
+ public const int HISTOGRAM_RED_SIZE_EXT = 0x8028;
+ public const int HISTOGRAM_SINK_EXT = 0x802D;
+ public const int HISTOGRAM_WIDTH_EXT = 0x8026;
+ public const int HI_BIAS_NV = 0x8714;
+ public const int HI_SCALE_NV = 0x870E;
+ public const int HORIZONTAL_LINE_TO_NV = 0x06;
+ public const int HSL_COLOR_KHR = 0x92AF;
+ public const int HSL_COLOR_NV = 0x92AF;
+ public const int HSL_HUE_KHR = 0x92AD;
+ public const int HSL_HUE_NV = 0x92AD;
+ public const int HSL_LUMINOSITY_KHR = 0x92B0;
+ public const int HSL_LUMINOSITY_NV = 0x92B0;
+ public const int HSL_SATURATION_KHR = 0x92AE;
+ public const int HSL_SATURATION_NV = 0x92AE;
+ public const int IDENTITY_NV = 0x862A;
+ public const int IGNORE_BORDER_HP = 0x8150;
+ public const int IMAGE_1D = 0x904C;
+ public const int IMAGE_1D_ARRAY = 0x9052;
+ public const int IMAGE_1D_ARRAY_EXT = 0x9052;
+ public const int IMAGE_1D_EXT = 0x904C;
+ public const int IMAGE_2D = 0x904D;
+ public const int IMAGE_2D_ARRAY = 0x9053;
+ public const int IMAGE_2D_ARRAY_EXT = 0x9053;
+ public const int IMAGE_2D_EXT = 0x904D;
+ public const int IMAGE_2D_MULTISAMPLE = 0x9055;
+ public const int IMAGE_2D_MULTISAMPLE_ARRAY = 0x9056;
+ public const int IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x9056;
+ public const int IMAGE_2D_MULTISAMPLE_EXT = 0x9055;
+ public const int IMAGE_2D_RECT = 0x904F;
+ public const int IMAGE_2D_RECT_EXT = 0x904F;
+ public const int IMAGE_3D = 0x904E;
+ public const int IMAGE_3D_EXT = 0x904E;
+ public const int IMAGE_BINDING_ACCESS = 0x8F3E;
+ public const int IMAGE_BINDING_ACCESS_EXT = 0x8F3E;
+ public const int IMAGE_BINDING_FORMAT = 0x906E;
+ public const int IMAGE_BINDING_FORMAT_EXT = 0x906E;
+ public const int IMAGE_BINDING_LAYER = 0x8F3D;
+ public const int IMAGE_BINDING_LAYERED = 0x8F3C;
+ public const int IMAGE_BINDING_LAYERED_EXT = 0x8F3C;
+ public const int IMAGE_BINDING_LAYER_EXT = 0x8F3D;
+ public const int IMAGE_BINDING_LEVEL = 0x8F3B;
+ public const int IMAGE_BINDING_LEVEL_EXT = 0x8F3B;
+ public const int IMAGE_BINDING_NAME = 0x8F3A;
+ public const int IMAGE_BINDING_NAME_EXT = 0x8F3A;
+ public const int IMAGE_BUFFER = 0x9051;
+ public const int IMAGE_BUFFER_EXT = 0x9051;
+ public const int IMAGE_CLASS_10_10_10_2 = 0x82C3;
+ public const int IMAGE_CLASS_11_11_10 = 0x82C2;
+ public const int IMAGE_CLASS_1_X_16 = 0x82BE;
+ public const int IMAGE_CLASS_1_X_32 = 0x82BB;
+ public const int IMAGE_CLASS_1_X_8 = 0x82C1;
+ public const int IMAGE_CLASS_2_X_16 = 0x82BD;
+ public const int IMAGE_CLASS_2_X_32 = 0x82BA;
+ public const int IMAGE_CLASS_2_X_8 = 0x82C0;
+ public const int IMAGE_CLASS_4_X_16 = 0x82BC;
+ public const int IMAGE_CLASS_4_X_32 = 0x82B9;
+ public const int IMAGE_CLASS_4_X_8 = 0x82BF;
+ public const int IMAGE_COMPATIBILITY_CLASS = 0x82A8;
+ public const int IMAGE_CUBE = 0x9050;
+ public const int IMAGE_CUBE_EXT = 0x9050;
+ public const int IMAGE_CUBE_MAP_ARRAY = 0x9054;
+ public const int IMAGE_CUBE_MAP_ARRAY_EXT = 0x9054;
+ public const int IMAGE_CUBIC_WEIGHT_HP = 0x815E;
+ public const int IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = 0x90C9;
+ public const int IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = 0x90C8;
+ public const int IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7;
+ public const int IMAGE_MAG_FILTER_HP = 0x815C;
+ public const int IMAGE_MIN_FILTER_HP = 0x815D;
+ public const int IMAGE_PIXEL_FORMAT = 0x82A9;
+ public const int IMAGE_PIXEL_TYPE = 0x82AA;
+ public const int IMAGE_ROTATE_ANGLE_HP = 0x8159;
+ public const int IMAGE_ROTATE_ORIGIN_X_HP = 0x815A;
+ public const int IMAGE_ROTATE_ORIGIN_Y_HP = 0x815B;
+ public const int IMAGE_SCALE_X_HP = 0x8155;
+ public const int IMAGE_SCALE_Y_HP = 0x8156;
+ public const int IMAGE_TEXEL_SIZE = 0x82A7;
+ public const int IMAGE_TRANSFORM_2D_HP = 0x8161;
+ public const int IMAGE_TRANSLATE_X_HP = 0x8157;
+ public const int IMAGE_TRANSLATE_Y_HP = 0x8158;
+ public const int IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;
+ public const int IMPLEMENTATION_COLOR_READ_FORMAT_OES = 0x8B9B;
+ public const int IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;
+ public const int IMPLEMENTATION_COLOR_READ_TYPE_OES = 0x8B9A;
+ public const int INCLUSIVE_EXT = 0x8F10;
+ public const int INCR = 0x1E02;
+ public const int INCR_WRAP = 0x8507;
+ public const int INCR_WRAP_EXT = 0x8507;
+ public const int INDEX_ARRAY_ADDRESS_NV = 0x8F24;
+ public const int INDEX_ARRAY_BUFFER_BINDING_ARB = 0x8899;
+ public const int INDEX_ARRAY_COUNT_EXT = 0x8087;
+ public const int INDEX_ARRAY_EXT = 0x8077;
+ public const int INDEX_ARRAY_LENGTH_NV = 0x8F2E;
+ public const int INDEX_ARRAY_LIST_IBM = 103073;
+ public const int INDEX_ARRAY_LIST_STRIDE_IBM = 103083;
+ public const int INDEX_ARRAY_POINTER_EXT = 0x8091;
+ public const int INDEX_ARRAY_STRIDE_EXT = 0x8086;
+ public const int INDEX_ARRAY_TYPE_EXT = 0x8085;
+ public const int INDEX_BIT_PGI = 0x00080000;
+ public const int INDEX_MATERIAL_EXT = 0x81B8;
+ public const int INDEX_MATERIAL_FACE_EXT = 0x81BA;
+ public const int INDEX_MATERIAL_PARAMETER_EXT = 0x81B9;
+ public const int INDEX_TEST_EXT = 0x81B5;
+ public const int INDEX_TEST_FUNC_EXT = 0x81B6;
+ public const int INDEX_TEST_REF_EXT = 0x81B7;
+ public const int INFO_LOG_LENGTH = 0x8B84;
+ public const int INNOCENT_CONTEXT_RESET = 0x8254;
+ public const int INNOCENT_CONTEXT_RESET_ARB = 0x8254;
+ public const int INSTRUMENT_BUFFER_POINTER_SGIX = 0x8180;
+ public const int INSTRUMENT_MEASUREMENTS_SGIX = 0x8181;
+ public const int INT = 0x1404;
+ public const int INT16_NV = 0x8FE4;
+ public const int INT16_VEC2_NV = 0x8FE5;
+ public const int INT16_VEC3_NV = 0x8FE6;
+ public const int INT16_VEC4_NV = 0x8FE7;
+ public const int INT64_ARB = 0x140E;
+ public const int INT64_NV = 0x140E;
+ public const int INT64_VEC2_ARB = 0x8FE9;
+ public const int INT64_VEC2_NV = 0x8FE9;
+ public const int INT64_VEC3_ARB = 0x8FEA;
+ public const int INT64_VEC3_NV = 0x8FEA;
+ public const int INT64_VEC4_ARB = 0x8FEB;
+ public const int INT64_VEC4_NV = 0x8FEB;
+ public const int INT8_NV = 0x8FE0;
+ public const int INT8_VEC2_NV = 0x8FE1;
+ public const int INT8_VEC3_NV = 0x8FE2;
+ public const int INT8_VEC4_NV = 0x8FE3;
+ public const int INTENSITY12_EXT = 0x804C;
+ public const int INTENSITY16F_ARB = 0x881D;
+ public const int INTENSITY16I_EXT = 0x8D8B;
+ public const int INTENSITY16UI_EXT = 0x8D79;
+ public const int INTENSITY16_EXT = 0x804D;
+ public const int INTENSITY16_SNORM = 0x901B;
+ public const int INTENSITY32F_ARB = 0x8817;
+ public const int INTENSITY32I_EXT = 0x8D85;
+ public const int INTENSITY32UI_EXT = 0x8D73;
+ public const int INTENSITY4_EXT = 0x804A;
+ public const int INTENSITY8I_EXT = 0x8D91;
+ public const int INTENSITY8UI_EXT = 0x8D7F;
+ public const int INTENSITY8_EXT = 0x804B;
+ public const int INTENSITY8_SNORM = 0x9017;
+ public const int INTENSITY_EXT = 0x8049;
+ public const int INTENSITY_FLOAT16_APPLE = 0x881D;
+ public const int INTENSITY_FLOAT16_ATI = 0x881D;
+ public const int INTENSITY_FLOAT32_APPLE = 0x8817;
+ public const int INTENSITY_FLOAT32_ATI = 0x8817;
+ public const int INTENSITY_SNORM = 0x9013;
+ public const int INTERLACE_OML = 0x8980;
+ public const int INTERLACE_READ_INGR = 0x8568;
+ public const int INTERLACE_READ_OML = 0x8981;
+ public const int INTERLACE_SGIX = 0x8094;
+ public const int INTERLEAVED_ATTRIBS = 0x8C8C;
+ public const int INTERLEAVED_ATTRIBS_EXT = 0x8C8C;
+ public const int INTERLEAVED_ATTRIBS_NV = 0x8C8C;
+ public const int INTERNALFORMAT_ALPHA_SIZE = 0x8274;
+ public const int INTERNALFORMAT_ALPHA_TYPE = 0x827B;
+ public const int INTERNALFORMAT_BLUE_SIZE = 0x8273;
+ public const int INTERNALFORMAT_BLUE_TYPE = 0x827A;
+ public const int INTERNALFORMAT_DEPTH_SIZE = 0x8275;
+ public const int INTERNALFORMAT_DEPTH_TYPE = 0x827C;
+ public const int INTERNALFORMAT_GREEN_SIZE = 0x8272;
+ public const int INTERNALFORMAT_GREEN_TYPE = 0x8279;
+ public const int INTERNALFORMAT_PREFERRED = 0x8270;
+ public const int INTERNALFORMAT_RED_SIZE = 0x8271;
+ public const int INTERNALFORMAT_RED_TYPE = 0x8278;
+ public const int INTERNALFORMAT_SHARED_SIZE = 0x8277;
+ public const int INTERNALFORMAT_STENCIL_SIZE = 0x8276;
+ public const int INTERNALFORMAT_STENCIL_TYPE = 0x827D;
+ public const int INTERNALFORMAT_SUPPORTED = 0x826F;
+ public const int INTERPOLATE_ARB = 0x8575;
+ public const int INTERPOLATE_EXT = 0x8575;
+ public const int INT_2_10_10_10_REV = 0x8D9F;
+ public const int INT_IMAGE_1D = 0x9057;
+ public const int INT_IMAGE_1D_ARRAY = 0x905D;
+ public const int INT_IMAGE_1D_ARRAY_EXT = 0x905D;
+ public const int INT_IMAGE_1D_EXT = 0x9057;
+ public const int INT_IMAGE_2D = 0x9058;
+ public const int INT_IMAGE_2D_ARRAY = 0x905E;
+ public const int INT_IMAGE_2D_ARRAY_EXT = 0x905E;
+ public const int INT_IMAGE_2D_EXT = 0x9058;
+ public const int INT_IMAGE_2D_MULTISAMPLE = 0x9060;
+ public const int INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9061;
+ public const int INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x9061;
+ public const int INT_IMAGE_2D_MULTISAMPLE_EXT = 0x9060;
+ public const int INT_IMAGE_2D_RECT = 0x905A;
+ public const int INT_IMAGE_2D_RECT_EXT = 0x905A;
+ public const int INT_IMAGE_3D = 0x9059;
+ public const int INT_IMAGE_3D_EXT = 0x9059;
+ public const int INT_IMAGE_BUFFER = 0x905C;
+ public const int INT_IMAGE_BUFFER_EXT = 0x905C;
+ public const int INT_IMAGE_CUBE = 0x905B;
+ public const int INT_IMAGE_CUBE_EXT = 0x905B;
+ public const int INT_IMAGE_CUBE_MAP_ARRAY = 0x905F;
+ public const int INT_IMAGE_CUBE_MAP_ARRAY_EXT = 0x905F;
+ public const int INT_SAMPLER_1D = 0x8DC9;
+ public const int INT_SAMPLER_1D_ARRAY = 0x8DCE;
+ public const int INT_SAMPLER_1D_ARRAY_EXT = 0x8DCE;
+ public const int INT_SAMPLER_1D_EXT = 0x8DC9;
+ public const int INT_SAMPLER_2D = 0x8DCA;
+ public const int INT_SAMPLER_2D_ARRAY = 0x8DCF;
+ public const int INT_SAMPLER_2D_ARRAY_EXT = 0x8DCF;
+ public const int INT_SAMPLER_2D_EXT = 0x8DCA;
+ public const int INT_SAMPLER_2D_MULTISAMPLE = 0x9109;
+ public const int INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C;
+ public const int INT_SAMPLER_2D_RECT = 0x8DCD;
+ public const int INT_SAMPLER_2D_RECT_EXT = 0x8DCD;
+ public const int INT_SAMPLER_3D = 0x8DCB;
+ public const int INT_SAMPLER_3D_EXT = 0x8DCB;
+ public const int INT_SAMPLER_BUFFER = 0x8DD0;
+ public const int INT_SAMPLER_BUFFER_AMD = 0x9002;
+ public const int INT_SAMPLER_BUFFER_EXT = 0x8DD0;
+ public const int INT_SAMPLER_CUBE = 0x8DCC;
+ public const int INT_SAMPLER_CUBE_EXT = 0x8DCC;
+ public const int INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E;
+ public const int INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900E;
+ public const int INT_SAMPLER_RENDERBUFFER_NV = 0x8E57;
+ public const int INT_VEC2 = 0x8B53;
+ public const int INT_VEC2_ARB = 0x8B53;
+ public const int INT_VEC3 = 0x8B54;
+ public const int INT_VEC3_ARB = 0x8B54;
+ public const int INT_VEC4 = 0x8B55;
+ public const int INT_VEC4_ARB = 0x8B55;
+ public const int INVALID_ENUM = 0x0500;
+ public const int INVALID_FRAMEBUFFER_OPERATION = 0x0506;
+ public const int INVALID_FRAMEBUFFER_OPERATION_EXT = 0x0506;
+ public const uint INVALID_INDEX = 0xFFFFFFFF;
+ public const int INVALID_OPERATION = 0x0502;
+ public const int INVALID_VALUE = 0x0501;
+ public const int INVARIANT_DATATYPE_EXT = 0x87EB;
+ public const int INVARIANT_EXT = 0x87C2;
+ public const int INVARIANT_VALUE_EXT = 0x87EA;
+ public const int INVERSE_NV = 0x862B;
+ public const int INVERSE_TRANSPOSE_NV = 0x862D;
+ public const int INVERT = 0x150A;
+ public const int INVERTED_SCREEN_W_REND = 0x8491;
+ public const int INVERT_OVG_NV = 0x92B4;
+ public const int INVERT_RGB_NV = 0x92A3;
+ public const int IR_INSTRUMENT1_SGIX = 0x817F;
+ public const int ISOLINES = 0x8E7A;
+ public const int IS_PER_PATCH = 0x92E7;
+ public const int IS_ROW_MAJOR = 0x9300;
+ public const int ITALIC_BIT_NV = 0x02;
+ public const int IUI_N3F_V2F_EXT = 0x81AF;
+ public const int IUI_N3F_V3F_EXT = 0x81B0;
+ public const int IUI_V2F_EXT = 0x81AD;
+ public const int IUI_V3F_EXT = 0x81AE;
+ public const int KEEP = 0x1E00;
+ public const int LARGE_CCW_ARC_TO_NV = 0x16;
+ public const int LARGE_CW_ARC_TO_NV = 0x18;
+ public const int LAST_VERTEX_CONVENTION = 0x8E4E;
+ public const int LAST_VERTEX_CONVENTION_EXT = 0x8E4E;
+ public const int LAST_VIDEO_CAPTURE_STATUS_NV = 0x9027;
+ public const int LAYER_NV = 0x8DAA;
+ public const int LAYER_PROVOKING_VERTEX = 0x825E;
+ public const int LAYOUT_COLOR_ATTACHMENT_EXT = 0x958E;
+ public const int LAYOUT_DEFAULT_INTEL = 0;
+ public const int LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT = 0x9531;
+ public const int LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT = 0x9530;
+ public const int LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT = 0x958F;
+ public const int LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT = 0x9590;
+ public const int LAYOUT_GENERAL_EXT = 0x958D;
+ public const int LAYOUT_LINEAR_CPU_CACHED_INTEL = 2;
+ public const int LAYOUT_LINEAR_INTEL = 1;
+ public const int LAYOUT_SHADER_READ_ONLY_EXT = 0x9591;
+ public const int LAYOUT_TRANSFER_DST_EXT = 0x9593;
+ public const int LAYOUT_TRANSFER_SRC_EXT = 0x9592;
+ public const int LEFT = 0x0406;
+ public const int LEQUAL = 0x0203;
+ public const int LERP_ATI = 0x8969;
+ public const int LESS = 0x0201;
+ public const int LGPU_SEPARATE_STORAGE_BIT_NVX = 0x0800;
+ public const int LIGHTEN_KHR = 0x9298;
+ public const int LIGHTEN_NV = 0x9298;
+ public const int LIGHT_ENV_MODE_SGIX = 0x8407;
+ public const int LIGHT_MODEL_COLOR_CONTROL_EXT = 0x81F8;
+ public const int LIGHT_MODEL_SPECULAR_VECTOR_APPLE = 0x85B0;
+ public const int LINE = 0x1B01;
+ public const int LINEAR = 0x2601;
+ public const int LINEARBURN_NV = 0x92A5;
+ public const int LINEARDODGE_NV = 0x92A4;
+ public const int LINEARLIGHT_NV = 0x92A7;
+ public const int LINEAR_CLIPMAP_LINEAR_SGIX = 0x8170;
+ public const int LINEAR_CLIPMAP_NEAREST_SGIX = 0x844F;
+ public const int LINEAR_DETAIL_ALPHA_SGIS = 0x8098;
+ public const int LINEAR_DETAIL_COLOR_SGIS = 0x8099;
+ public const int LINEAR_DETAIL_SGIS = 0x8097;
+ public const int LINEAR_MIPMAP_LINEAR = 0x2703;
+ public const int LINEAR_MIPMAP_NEAREST = 0x2701;
+ public const int LINEAR_SHARPEN_ALPHA_SGIS = 0x80AE;
+ public const int LINEAR_SHARPEN_COLOR_SGIS = 0x80AF;
+ public const int LINEAR_SHARPEN_SGIS = 0x80AD;
+ public const int LINEAR_TILING_EXT = 0x9585;
+ public const int LINES = 0x0001;
+ public const int LINES_ADJACENCY = 0x000A;
+ public const int LINES_ADJACENCY_ARB = 0x000A;
+ public const int LINES_ADJACENCY_EXT = 0x000A;
+ public const int LINE_LOOP = 0x0002;
+ public const int LINE_SMOOTH = 0x0B20;
+ public const int LINE_SMOOTH_HINT = 0x0C52;
+ public const int LINE_STRIP = 0x0003;
+ public const int LINE_STRIP_ADJACENCY = 0x000B;
+ public const int LINE_STRIP_ADJACENCY_ARB = 0x000B;
+ public const int LINE_STRIP_ADJACENCY_EXT = 0x000B;
+ public const int LINE_TO_NV = 0x04;
+ public const int LINE_WIDTH = 0x0B21;
+ public const int LINE_WIDTH_COMMAND_NV = 0x000D;
+ public const int LINE_WIDTH_GRANULARITY = 0x0B23;
+ public const int LINE_WIDTH_RANGE = 0x0B22;
+ public const int LINK_STATUS = 0x8B82;
+ public const int LIST_PRIORITY_SGIX = 0x8182;
+ public const int LOCAL_CONSTANT_DATATYPE_EXT = 0x87ED;
+ public const int LOCAL_CONSTANT_EXT = 0x87C3;
+ public const int LOCAL_CONSTANT_VALUE_EXT = 0x87EC;
+ public const int LOCAL_EXT = 0x87C4;
+ public const int LOCATION = 0x930E;
+ public const int LOCATION_COMPONENT = 0x934A;
+ public const int LOCATION_INDEX = 0x930F;
+ public const int LOGIC_OP_MODE = 0x0BF0;
+ public const int LOSE_CONTEXT_ON_RESET = 0x8252;
+ public const int LOSE_CONTEXT_ON_RESET_ARB = 0x8252;
+ public const int LOWER_LEFT = 0x8CA1;
+ public const int LOW_FLOAT = 0x8DF0;
+ public const int LOW_INT = 0x8DF3;
+ public const int LO_BIAS_NV = 0x8715;
+ public const int LO_SCALE_NV = 0x870F;
+ public const int LUID_SIZE_EXT = 8;
+ public const int LUMINANCE12_ALPHA12_EXT = 0x8047;
+ public const int LUMINANCE12_ALPHA4_EXT = 0x8046;
+ public const int LUMINANCE12_EXT = 0x8041;
+ public const int LUMINANCE16F_ARB = 0x881E;
+ public const int LUMINANCE16F_EXT = 0x881E;
+ public const int LUMINANCE16I_EXT = 0x8D8C;
+ public const int LUMINANCE16UI_EXT = 0x8D7A;
+ public const int LUMINANCE16_ALPHA16_EXT = 0x8048;
+ public const int LUMINANCE16_ALPHA16_SNORM = 0x901A;
+ public const int LUMINANCE16_EXT = 0x8042;
+ public const int LUMINANCE16_SNORM = 0x9019;
+ public const int LUMINANCE32F_ARB = 0x8818;
+ public const int LUMINANCE32F_EXT = 0x8818;
+ public const int LUMINANCE32I_EXT = 0x8D86;
+ public const int LUMINANCE32UI_EXT = 0x8D74;
+ public const int LUMINANCE4_ALPHA4_EXT = 0x8043;
+ public const int LUMINANCE4_EXT = 0x803F;
+ public const int LUMINANCE6_ALPHA2_EXT = 0x8044;
+ public const int LUMINANCE8I_EXT = 0x8D92;
+ public const int LUMINANCE8UI_EXT = 0x8D80;
+ public const int LUMINANCE8_ALPHA8_EXT = 0x8045;
+ public const int LUMINANCE8_ALPHA8_SNORM = 0x9016;
+ public const int LUMINANCE8_EXT = 0x8040;
+ public const int LUMINANCE8_SNORM = 0x9015;
+ public const int LUMINANCE_ALPHA16F_ARB = 0x881F;
+ public const int LUMINANCE_ALPHA16F_EXT = 0x881F;
+ public const int LUMINANCE_ALPHA16I_EXT = 0x8D8D;
+ public const int LUMINANCE_ALPHA16UI_EXT = 0x8D7B;
+ public const int LUMINANCE_ALPHA32F_ARB = 0x8819;
+ public const int LUMINANCE_ALPHA32F_EXT = 0x8819;
+ public const int LUMINANCE_ALPHA32I_EXT = 0x8D87;
+ public const int LUMINANCE_ALPHA32UI_EXT = 0x8D75;
+ public const int LUMINANCE_ALPHA8I_EXT = 0x8D93;
+ public const int LUMINANCE_ALPHA8UI_EXT = 0x8D81;
+ public const int LUMINANCE_ALPHA_FLOAT16_APPLE = 0x881F;
+ public const int LUMINANCE_ALPHA_FLOAT16_ATI = 0x881F;
+ public const int LUMINANCE_ALPHA_FLOAT32_APPLE = 0x8819;
+ public const int LUMINANCE_ALPHA_FLOAT32_ATI = 0x8819;
+ public const int LUMINANCE_ALPHA_INTEGER_EXT = 0x8D9D;
+ public const int LUMINANCE_ALPHA_SNORM = 0x9012;
+ public const int LUMINANCE_FLOAT16_APPLE = 0x881E;
+ public const int LUMINANCE_FLOAT16_ATI = 0x881E;
+ public const int LUMINANCE_FLOAT32_APPLE = 0x8818;
+ public const int LUMINANCE_FLOAT32_ATI = 0x8818;
+ public const int LUMINANCE_INTEGER_EXT = 0x8D9C;
+ public const int LUMINANCE_SNORM = 0x9011;
+ public const int MAD_ATI = 0x8968;
+ public const int MAGNITUDE_BIAS_NV = 0x8718;
+ public const int MAGNITUDE_SCALE_NV = 0x8712;
+ public const int MAJOR_VERSION = 0x821B;
+ public const int MANUAL_GENERATE_MIPMAP = 0x8294;
+ public const int MAP1_BINORMAL_EXT = 0x8446;
+ public const int MAP1_TANGENT_EXT = 0x8444;
+ public const int MAP1_VERTEX_ATTRIB0_4_NV = 0x8660;
+ public const int MAP1_VERTEX_ATTRIB10_4_NV = 0x866A;
+ public const int MAP1_VERTEX_ATTRIB11_4_NV = 0x866B;
+ public const int MAP1_VERTEX_ATTRIB12_4_NV = 0x866C;
+ public const int MAP1_VERTEX_ATTRIB13_4_NV = 0x866D;
+ public const int MAP1_VERTEX_ATTRIB14_4_NV = 0x866E;
+ public const int MAP1_VERTEX_ATTRIB15_4_NV = 0x866F;
+ public const int MAP1_VERTEX_ATTRIB1_4_NV = 0x8661;
+ public const int MAP1_VERTEX_ATTRIB2_4_NV = 0x8662;
+ public const int MAP1_VERTEX_ATTRIB3_4_NV = 0x8663;
+ public const int MAP1_VERTEX_ATTRIB4_4_NV = 0x8664;
+ public const int MAP1_VERTEX_ATTRIB5_4_NV = 0x8665;
+ public const int MAP1_VERTEX_ATTRIB6_4_NV = 0x8666;
+ public const int MAP1_VERTEX_ATTRIB7_4_NV = 0x8667;
+ public const int MAP1_VERTEX_ATTRIB8_4_NV = 0x8668;
+ public const int MAP1_VERTEX_ATTRIB9_4_NV = 0x8669;
+ public const int MAP2_BINORMAL_EXT = 0x8447;
+ public const int MAP2_TANGENT_EXT = 0x8445;
+ public const int MAP2_VERTEX_ATTRIB0_4_NV = 0x8670;
+ public const int MAP2_VERTEX_ATTRIB10_4_NV = 0x867A;
+ public const int MAP2_VERTEX_ATTRIB11_4_NV = 0x867B;
+ public const int MAP2_VERTEX_ATTRIB12_4_NV = 0x867C;
+ public const int MAP2_VERTEX_ATTRIB13_4_NV = 0x867D;
+ public const int MAP2_VERTEX_ATTRIB14_4_NV = 0x867E;
+ public const int MAP2_VERTEX_ATTRIB15_4_NV = 0x867F;
+ public const int MAP2_VERTEX_ATTRIB1_4_NV = 0x8671;
+ public const int MAP2_VERTEX_ATTRIB2_4_NV = 0x8672;
+ public const int MAP2_VERTEX_ATTRIB3_4_NV = 0x8673;
+ public const int MAP2_VERTEX_ATTRIB4_4_NV = 0x8674;
+ public const int MAP2_VERTEX_ATTRIB5_4_NV = 0x8675;
+ public const int MAP2_VERTEX_ATTRIB6_4_NV = 0x8676;
+ public const int MAP2_VERTEX_ATTRIB7_4_NV = 0x8677;
+ public const int MAP2_VERTEX_ATTRIB8_4_NV = 0x8678;
+ public const int MAP2_VERTEX_ATTRIB9_4_NV = 0x8679;
+ public const int MAP_ATTRIB_U_ORDER_NV = 0x86C3;
+ public const int MAP_ATTRIB_V_ORDER_NV = 0x86C4;
+ public const int MAP_COHERENT_BIT = 0x0080;
+ public const int MAP_FLUSH_EXPLICIT_BIT = 0x0010;
+ public const int MAP_INVALIDATE_BUFFER_BIT = 0x0008;
+ public const int MAP_INVALIDATE_RANGE_BIT = 0x0004;
+ public const int MAP_PERSISTENT_BIT = 0x0040;
+ public const int MAP_READ_BIT = 0x0001;
+ public const int MAP_TESSELLATION_NV = 0x86C2;
+ public const int MAP_UNSYNCHRONIZED_BIT = 0x0020;
+ public const int MAP_WRITE_BIT = 0x0002;
+ public const int MATERIAL_SIDE_HINT_PGI = 0x1A22C;
+ public const int MATRIX0_ARB = 0x88C0;
+ public const int MATRIX0_NV = 0x8630;
+ public const int MATRIX10_ARB = 0x88CA;
+ public const int MATRIX11_ARB = 0x88CB;
+ public const int MATRIX12_ARB = 0x88CC;
+ public const int MATRIX13_ARB = 0x88CD;
+ public const int MATRIX14_ARB = 0x88CE;
+ public const int MATRIX15_ARB = 0x88CF;
+ public const int MATRIX16_ARB = 0x88D0;
+ public const int MATRIX17_ARB = 0x88D1;
+ public const int MATRIX18_ARB = 0x88D2;
+ public const int MATRIX19_ARB = 0x88D3;
+ public const int MATRIX1_ARB = 0x88C1;
+ public const int MATRIX1_NV = 0x8631;
+ public const int MATRIX20_ARB = 0x88D4;
+ public const int MATRIX21_ARB = 0x88D5;
+ public const int MATRIX22_ARB = 0x88D6;
+ public const int MATRIX23_ARB = 0x88D7;
+ public const int MATRIX24_ARB = 0x88D8;
+ public const int MATRIX25_ARB = 0x88D9;
+ public const int MATRIX26_ARB = 0x88DA;
+ public const int MATRIX27_ARB = 0x88DB;
+ public const int MATRIX28_ARB = 0x88DC;
+ public const int MATRIX29_ARB = 0x88DD;
+ public const int MATRIX2_ARB = 0x88C2;
+ public const int MATRIX2_NV = 0x8632;
+ public const int MATRIX30_ARB = 0x88DE;
+ public const int MATRIX31_ARB = 0x88DF;
+ public const int MATRIX3_ARB = 0x88C3;
+ public const int MATRIX3_NV = 0x8633;
+ public const int MATRIX4_ARB = 0x88C4;
+ public const int MATRIX4_NV = 0x8634;
+ public const int MATRIX5_ARB = 0x88C5;
+ public const int MATRIX5_NV = 0x8635;
+ public const int MATRIX6_ARB = 0x88C6;
+ public const int MATRIX6_NV = 0x8636;
+ public const int MATRIX7_ARB = 0x88C7;
+ public const int MATRIX7_NV = 0x8637;
+ public const int MATRIX8_ARB = 0x88C8;
+ public const int MATRIX9_ARB = 0x88C9;
+ public const int MATRIX_EXT = 0x87C0;
+ public const int MATRIX_INDEX_ARRAY_ARB = 0x8844;
+ public const int MATRIX_INDEX_ARRAY_POINTER_ARB = 0x8849;
+ public const int MATRIX_INDEX_ARRAY_SIZE_ARB = 0x8846;
+ public const int MATRIX_INDEX_ARRAY_STRIDE_ARB = 0x8848;
+ public const int MATRIX_INDEX_ARRAY_TYPE_ARB = 0x8847;
+ public const int MATRIX_PALETTE_ARB = 0x8840;
+ public const int MATRIX_STRIDE = 0x92FF;
+ public const int MAT_AMBIENT_AND_DIFFUSE_BIT_PGI = 0x00200000;
+ public const int MAT_AMBIENT_BIT_PGI = 0x00100000;
+ public const int MAT_COLOR_INDEXES_BIT_PGI = 0x01000000;
+ public const int MAT_DIFFUSE_BIT_PGI = 0x00400000;
+ public const int MAT_EMISSION_BIT_PGI = 0x00800000;
+ public const int MAT_SHININESS_BIT_PGI = 0x02000000;
+ public const int MAT_SPECULAR_BIT_PGI = 0x04000000;
+ public const int MAX = 0x8008;
+ public const int MAX_3D_TEXTURE_SIZE = 0x8073;
+ public const int MAX_3D_TEXTURE_SIZE_EXT = 0x8073;
+ public const int MAX_4D_TEXTURE_SIZE_SGIS = 0x8138;
+ public const int MAX_ACTIVE_LIGHTS_SGIX = 0x8405;
+ public const int MAX_ARRAY_TEXTURE_LAYERS = 0x88FF;
+ public const int MAX_ARRAY_TEXTURE_LAYERS_EXT = 0x88FF;
+ public const int MAX_ASYNC_DRAW_PIXELS_SGIX = 0x8360;
+ public const int MAX_ASYNC_HISTOGRAM_SGIX = 0x832D;
+ public const int MAX_ASYNC_READ_PIXELS_SGIX = 0x8361;
+ public const int MAX_ASYNC_TEX_IMAGE_SGIX = 0x835F;
+ public const int MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = 0x92DC;
+ public const int MAX_ATOMIC_COUNTER_BUFFER_SIZE = 0x92D8;
+ public const int MAX_BINDABLE_UNIFORM_SIZE_EXT = 0x8DED;
+ public const int MAX_CLIPMAP_DEPTH_SGIX = 0x8177;
+ public const int MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX = 0x8178;
+ public const int MAX_CLIP_DISTANCES = 0x0D32;
+ public const int MAX_COARSE_FRAGMENT_SAMPLES_NV = 0x955F;
+ public const int MAX_COLOR_ATTACHMENTS = 0x8CDF;
+ public const int MAX_COLOR_ATTACHMENTS_EXT = 0x8CDF;
+ public const int MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD = 0x91B3;
+ public const int MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD = 0x91B4;
+ public const int MAX_COLOR_MATRIX_STACK_DEPTH_SGI = 0x80B3;
+ public const int MAX_COLOR_TEXTURE_SAMPLES = 0x910E;
+ public const int MAX_COMBINED_ATOMIC_COUNTERS = 0x92D7;
+ public const int MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = 0x92D1;
+ public const int MAX_COMBINED_CLIP_AND_CULL_DISTANCES = 0x82FA;
+ public const int MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266;
+ public const int MAX_COMBINED_DIMENSIONS = 0x8282;
+ public const int MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33;
+ public const int MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32;
+ public const int MAX_COMBINED_IMAGE_UNIFORMS = 0x90CF;
+ public const int MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = 0x8F39;
+ public const int MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT = 0x8F39;
+ public const int MAX_COMBINED_MESH_UNIFORM_COMPONENTS_NV = 0x8E67;
+ public const int MAX_COMBINED_SHADER_OUTPUT_RESOURCES = 0x8F39;
+ public const int MAX_COMBINED_SHADER_STORAGE_BLOCKS = 0x90DC;
+ public const int MAX_COMBINED_TASK_UNIFORM_COMPONENTS_NV = 0x8E6F;
+ public const int MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E;
+ public const int MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F;
+ public const int MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
+ public const int MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = 0x8B4D;
+ public const int MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E;
+ public const int MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31;
+ public const int MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265;
+ public const int MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264;
+ public const int MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB = 0x90EB;
+ public const int MAX_COMPUTE_FIXED_GROUP_SIZE_ARB = 0x91BF;
+ public const int MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD;
+ public const int MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 0x90DB;
+ public const int MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262;
+ public const int MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC;
+ public const int MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB;
+ public const int MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263;
+ public const int MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB = 0x9344;
+ public const int MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB = 0x9345;
+ public const int MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE;
+ public const int MAX_COMPUTE_WORK_GROUP_INVOCATIONS = 0x90EB;
+ public const int MAX_COMPUTE_WORK_GROUP_SIZE = 0x91BF;
+ public const int MAX_CONVOLUTION_HEIGHT_EXT = 0x801B;
+ public const int MAX_CONVOLUTION_WIDTH_EXT = 0x801A;
+ public const int MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
+ public const int MAX_CUBE_MAP_TEXTURE_SIZE_ARB = 0x851C;
+ public const int MAX_CUBE_MAP_TEXTURE_SIZE_EXT = 0x851C;
+ public const int MAX_CULL_DISTANCES = 0x82F9;
+ public const int MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C;
+ public const int MAX_DEBUG_LOGGED_MESSAGES = 0x9144;
+ public const int MAX_DEBUG_LOGGED_MESSAGES_AMD = 0x9144;
+ public const int MAX_DEBUG_LOGGED_MESSAGES_ARB = 0x9144;
+ public const int MAX_DEBUG_MESSAGE_LENGTH = 0x9143;
+ public const int MAX_DEBUG_MESSAGE_LENGTH_AMD = 0x9143;
+ public const int MAX_DEBUG_MESSAGE_LENGTH_ARB = 0x9143;
+ public const int MAX_DEEP_3D_TEXTURE_DEPTH_NV = 0x90D1;
+ public const int MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV = 0x90D0;
+ public const int MAX_DEFORMATION_ORDER_SGIX = 0x8197;
+ public const int MAX_DEPTH = 0x8280;
+ public const int MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD = 0x91B5;
+ public const int MAX_DEPTH_TEXTURE_SAMPLES = 0x910F;
+ public const int MAX_DETACHED_BUFFERS_NV = 0x95AD;
+ public const int MAX_DETACHED_TEXTURES_NV = 0x95AC;
+ public const int MAX_DRAW_BUFFERS = 0x8824;
+ public const int MAX_DRAW_BUFFERS_ARB = 0x8824;
+ public const int MAX_DRAW_BUFFERS_ATI = 0x8824;
+ public const int MAX_DRAW_MESH_TASKS_COUNT_NV = 0x953D;
+ public const int MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC;
+ public const int MAX_ELEMENTS_INDICES = 0x80E9;
+ public const int MAX_ELEMENTS_INDICES_EXT = 0x80E9;
+ public const int MAX_ELEMENTS_VERTICES = 0x80E8;
+ public const int MAX_ELEMENTS_VERTICES_EXT = 0x80E8;
+ public const int MAX_ELEMENT_INDEX = 0x8D6B;
+ public const int MAX_EXT = 0x8008;
+ public const int MAX_FOG_FUNC_POINTS_SGIS = 0x812C;
+ public const int MAX_FRAGMENT_ATOMIC_COUNTERS = 0x92D6;
+ public const int MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = 0x92D0;
+ public const int MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT = 0x8DE3;
+ public const int MAX_FRAGMENT_IMAGE_UNIFORMS = 0x90CE;
+ public const int MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125;
+ public const int MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C;
+ public const int MAX_FRAGMENT_INTERPOLATION_OFFSET_NV = 0x8E5C;
+ public const int MAX_FRAGMENT_LIGHTS_SGIX = 0x8404;
+ public const int MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = 0x8868;
+ public const int MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 0x90DA;
+ public const int MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D;
+ public const int MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49;
+ public const int MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB = 0x8B49;
+ public const int MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
+ public const int MAX_FRAMEBUFFER_HEIGHT = 0x9316;
+ public const int MAX_FRAMEBUFFER_LAYERS = 0x9317;
+ public const int MAX_FRAMEBUFFER_SAMPLES = 0x9318;
+ public const int MAX_FRAMEBUFFER_WIDTH = 0x9315;
+ public const int MAX_FRAMEZOOM_FACTOR_SGIX = 0x818D;
+ public const int MAX_GENERAL_COMBINERS_NV = 0x854D;
+ public const int MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5;
+ public const int MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 0x92CF;
+ public const int MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT = 0x8DE4;
+ public const int MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD;
+ public const int MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123;
+ public const int MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124;
+ public const int MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0;
+ public const int MAX_GEOMETRY_OUTPUT_VERTICES_ARB = 0x8DE0;
+ public const int MAX_GEOMETRY_OUTPUT_VERTICES_EXT = 0x8DE0;
+ public const int MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV = 0x8E5A;
+ public const int MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A;
+ public const int MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7;
+ public const int MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29;
+ public const int MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB = 0x8C29;
+ public const int MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT = 0x8C29;
+ public const int MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1;
+ public const int MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB = 0x8DE1;
+ public const int MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT = 0x8DE1;
+ public const int MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C;
+ public const int MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF;
+ public const int MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB = 0x8DDF;
+ public const int MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT = 0x8DDF;
+ public const int MAX_GEOMETRY_VARYING_COMPONENTS_ARB = 0x8DDD;
+ public const int MAX_GEOMETRY_VARYING_COMPONENTS_EXT = 0x8DDD;
+ public const int MAX_HEIGHT = 0x827F;
+ public const int MAX_IMAGE_SAMPLES = 0x906D;
+ public const int MAX_IMAGE_SAMPLES_EXT = 0x906D;
+ public const int MAX_IMAGE_UNITS = 0x8F38;
+ public const int MAX_IMAGE_UNITS_EXT = 0x8F38;
+ public const int MAX_INTEGER_SAMPLES = 0x9110;
+ public const int MAX_LABEL_LENGTH = 0x82E8;
+ public const int MAX_LAYERS = 0x8281;
+ public const int MAX_LGPU_GPUS_NVX = 0x92BA;
+ public const int MAX_MAP_TESSELLATION_NV = 0x86D6;
+ public const int MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = 0x8841;
+ public const int MAX_MESH_ATOMIC_COUNTERS_NV = 0x8E65;
+ public const int MAX_MESH_ATOMIC_COUNTER_BUFFERS_NV = 0x8E64;
+ public const int MAX_MESH_IMAGE_UNIFORMS_NV = 0x8E62;
+ public const int MAX_MESH_OUTPUT_PRIMITIVES_NV = 0x9539;
+ public const int MAX_MESH_OUTPUT_VERTICES_NV = 0x9538;
+ public const int MAX_MESH_SHADER_STORAGE_BLOCKS_NV = 0x8E66;
+ public const int MAX_MESH_TEXTURE_IMAGE_UNITS_NV = 0x8E61;
+ public const int MAX_MESH_TOTAL_MEMORY_SIZE_NV = 0x9536;
+ public const int MAX_MESH_UNIFORM_BLOCKS_NV = 0x8E60;
+ public const int MAX_MESH_UNIFORM_COMPONENTS_NV = 0x8E63;
+ public const int MAX_MESH_VIEWS_NV = 0x9557;
+ public const int MAX_MESH_WORK_GROUP_INVOCATIONS_NV = 0x95A2;
+ public const int MAX_MESH_WORK_GROUP_SIZE_NV = 0x953B;
+ public const int MAX_MULTISAMPLE_COVERAGE_MODES_NV = 0x8E11;
+ public const int MAX_NAME_LENGTH = 0x92F6;
+ public const int MAX_NUM_ACTIVE_VARIABLES = 0x92F7;
+ public const int MAX_NUM_COMPATIBLE_SUBROUTINES = 0x92F8;
+ public const int MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CA;
+ public const int MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT = 0x87CD;
+ public const int MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT = 0x87CE;
+ public const int MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87CC;
+ public const int MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT = 0x87CB;
+ public const int MAX_PALETTE_MATRICES_ARB = 0x8842;
+ public const int MAX_PATCH_VERTICES = 0x8E7D;
+ public const int MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT = 0x8337;
+ public const int MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F1;
+ public const int MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1;
+ public const int MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x880B;
+ public const int MAX_PROGRAM_ATTRIBS_ARB = 0x88AD;
+ public const int MAX_PROGRAM_ATTRIB_COMPONENTS_NV = 0x8908;
+ public const int MAX_PROGRAM_CALL_DEPTH_NV = 0x88F5;
+ public const int MAX_PROGRAM_ENV_PARAMETERS_ARB = 0x88B5;
+ public const int MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = 0x88F4;
+ public const int MAX_PROGRAM_GENERIC_ATTRIBS_NV = 0x8DA5;
+ public const int MAX_PROGRAM_GENERIC_RESULTS_NV = 0x8DA6;
+ public const int MAX_PROGRAM_IF_DEPTH_NV = 0x88F6;
+ public const int MAX_PROGRAM_INSTRUCTIONS_ARB = 0x88A1;
+ public const int MAX_PROGRAM_LOCAL_PARAMETERS_ARB = 0x88B4;
+ public const int MAX_PROGRAM_LOOP_COUNT_NV = 0x88F8;
+ public const int MAX_PROGRAM_LOOP_DEPTH_NV = 0x88F7;
+ public const int MAX_PROGRAM_MATRICES_ARB = 0x862F;
+ public const int MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = 0x862E;
+ public const int MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B3;
+ public const int MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x880E;
+ public const int MAX_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AF;
+ public const int MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A3;
+ public const int MAX_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AB;
+ public const int MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A7;
+ public const int MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x8810;
+ public const int MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x880F;
+ public const int MAX_PROGRAM_OUTPUT_VERTICES_NV = 0x8C27;
+ public const int MAX_PROGRAM_PARAMETERS_ARB = 0x88A9;
+ public const int MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV = 0x8DA0;
+ public const int MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV = 0x8DA1;
+ public const int MAX_PROGRAM_PATCH_ATTRIBS_NV = 0x86D8;
+ public const int MAX_PROGRAM_RESULT_COMPONENTS_NV = 0x8909;
+ public const int MAX_PROGRAM_SUBROUTINE_NUM_NV = 0x8F45;
+ public const int MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV = 0x8F44;
+ public const int MAX_PROGRAM_TEMPORARIES_ARB = 0x88A5;
+ public const int MAX_PROGRAM_TEXEL_OFFSET = 0x8905;
+ public const int MAX_PROGRAM_TEXEL_OFFSET_EXT = 0x8905;
+ public const int MAX_PROGRAM_TEXEL_OFFSET_NV = 0x8905;
+ public const int MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB = 0x8F9F;
+ public const int MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5F;
+ public const int MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5F;
+ public const int MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV = 0x8E5F;
+ public const int MAX_PROGRAM_TEX_INDIRECTIONS_ARB = 0x880D;
+ public const int MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x880C;
+ public const int MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV = 0x8C28;
+ public const int MAX_RASTER_SAMPLES_EXT = 0x9329;
+ public const int MAX_RATIONAL_EVAL_ORDER_NV = 0x86D7;
+ public const int MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8;
+ public const int MAX_RECTANGLE_TEXTURE_SIZE_ARB = 0x84F8;
+ public const int MAX_RECTANGLE_TEXTURE_SIZE_NV = 0x84F8;
+ public const int MAX_RENDERBUFFER_SIZE = 0x84E8;
+ public const int MAX_RENDERBUFFER_SIZE_EXT = 0x84E8;
+ public const int MAX_SAMPLES = 0x8D57;
+ public const int MAX_SAMPLES_EXT = 0x8D57;
+ public const int MAX_SAMPLE_MASK_WORDS = 0x8E59;
+ public const int MAX_SAMPLE_MASK_WORDS_NV = 0x8E59;
+ public const int MAX_SERVER_WAIT_TIMEOUT = 0x9111;
+ public const int MAX_SHADER_BUFFER_ADDRESS_NV = 0x8F35;
+ public const int MAX_SHADER_COMPILER_THREADS_ARB = 0x91B0;
+ public const int MAX_SHADER_COMPILER_THREADS_KHR = 0x91B0;
+ public const int MAX_SHADER_STORAGE_BLOCK_SIZE = 0x90DE;
+ public const int MAX_SHADER_STORAGE_BUFFER_BINDINGS = 0x90DD;
+ public const int MAX_SHININESS_NV = 0x8504;
+ public const int MAX_SPARSE_3D_TEXTURE_SIZE_AMD = 0x9199;
+ public const int MAX_SPARSE_3D_TEXTURE_SIZE_ARB = 0x9199;
+ public const int MAX_SPARSE_ARRAY_TEXTURE_LAYERS = 0x919A;
+ public const int MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB = 0x919A;
+ public const int MAX_SPARSE_TEXTURE_SIZE_AMD = 0x9198;
+ public const int MAX_SPARSE_TEXTURE_SIZE_ARB = 0x9198;
+ public const int MAX_SPOT_EXPONENT_NV = 0x8505;
+ public const int MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV = 0x9349;
+ public const int MAX_SUBROUTINES = 0x8DE7;
+ public const int MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8;
+ public const int MAX_TASK_ATOMIC_COUNTERS_NV = 0x8E6D;
+ public const int MAX_TASK_ATOMIC_COUNTER_BUFFERS_NV = 0x8E6C;
+ public const int MAX_TASK_IMAGE_UNIFORMS_NV = 0x8E6A;
+ public const int MAX_TASK_OUTPUT_COUNT_NV = 0x953A;
+ public const int MAX_TASK_SHADER_STORAGE_BLOCKS_NV = 0x8E6E;
+ public const int MAX_TASK_TEXTURE_IMAGE_UNITS_NV = 0x8E69;
+ public const int MAX_TASK_TOTAL_MEMORY_SIZE_NV = 0x9537;
+ public const int MAX_TASK_UNIFORM_BLOCKS_NV = 0x8E68;
+ public const int MAX_TASK_UNIFORM_COMPONENTS_NV = 0x8E6B;
+ public const int MAX_TASK_WORK_GROUP_INVOCATIONS_NV = 0x95A3;
+ public const int MAX_TASK_WORK_GROUP_SIZE_NV = 0x953C;
+ public const int MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3;
+ public const int MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 0x92CD;
+ public const int MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB;
+ public const int MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C;
+ public const int MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83;
+ public const int MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8;
+ public const int MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81;
+ public const int MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85;
+ public const int MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89;
+ public const int MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F;
+ public const int MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4;
+ public const int MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 0x92CE;
+ public const int MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC;
+ public const int MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D;
+ public const int MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86;
+ public const int MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9;
+ public const int MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82;
+ public const int MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A;
+ public const int MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80;
+ public const int MAX_TESS_GEN_LEVEL = 0x8E7E;
+ public const int MAX_TESS_PATCH_COMPONENTS = 0x8E84;
+ public const int MAX_TEXTURE_BUFFER_SIZE = 0x8C2B;
+ public const int MAX_TEXTURE_BUFFER_SIZE_ARB = 0x8C2B;
+ public const int MAX_TEXTURE_BUFFER_SIZE_EXT = 0x8C2B;
+ public const int MAX_TEXTURE_COORDS_ARB = 0x8871;
+ public const int MAX_TEXTURE_COORDS_NV = 0x8871;
+ public const int MAX_TEXTURE_IMAGE_UNITS = 0x8872;
+ public const int MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872;
+ public const int MAX_TEXTURE_IMAGE_UNITS_NV = 0x8872;
+ public const int MAX_TEXTURE_LOD_BIAS = 0x84FD;
+ public const int MAX_TEXTURE_LOD_BIAS_EXT = 0x84FD;
+ public const int MAX_TEXTURE_MAX_ANISOTROPY = 0x84FF;
+ public const int MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
+ public const int MAX_TEXTURE_SIZE = 0x0D33;
+ public const int MAX_TEXTURE_UNITS_ARB = 0x84E2;
+ public const int MAX_TIMELINE_SEMAPHORE_VALUE_DIFFERENCE_NV = 0x95B6;
+ public const int MAX_TRACK_MATRICES_NV = 0x862F;
+ public const int MAX_TRACK_MATRIX_STACK_DEPTH_NV = 0x862E;
+ public const int MAX_TRANSFORM_FEEDBACK_BUFFERS = 0x8E70;
+ public const int MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A;
+ public const int MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT = 0x8C8A;
+ public const int MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV = 0x8C8A;
+ public const int MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B;
+ public const int MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT = 0x8C8B;
+ public const int MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV = 0x8C8B;
+ public const int MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80;
+ public const int MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT = 0x8C80;
+ public const int MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV = 0x8C80;
+ public const int MAX_UNIFORM_BLOCK_SIZE = 0x8A30;
+ public const int MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F;
+ public const int MAX_UNIFORM_LOCATIONS = 0x826E;
+ public const int MAX_VARYING_COMPONENTS = 0x8B4B;
+ public const int MAX_VARYING_COMPONENTS_EXT = 0x8B4B;
+ public const int MAX_VARYING_FLOATS = 0x8B4B;
+ public const int MAX_VARYING_FLOATS_ARB = 0x8B4B;
+ public const int MAX_VARYING_VECTORS = 0x8DFC;
+ public const int MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = 0x8520;
+ public const int MAX_VERTEX_ATOMIC_COUNTERS = 0x92D2;
+ public const int MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = 0x92CC;
+ public const int MAX_VERTEX_ATTRIBS = 0x8869;
+ public const int MAX_VERTEX_ATTRIBS_ARB = 0x8869;
+ public const int MAX_VERTEX_ATTRIB_BINDINGS = 0x82DA;
+ public const int MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D9;
+ public const int MAX_VERTEX_ATTRIB_STRIDE = 0x82E5;
+ public const int MAX_VERTEX_BINDABLE_UNIFORMS_EXT = 0x8DE2;
+ public const int MAX_VERTEX_HINT_PGI = 0x1A22D;
+ public const int MAX_VERTEX_IMAGE_UNIFORMS = 0x90CA;
+ public const int MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122;
+ public const int MAX_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87C5;
+ public const int MAX_VERTEX_SHADER_INVARIANTS_EXT = 0x87C7;
+ public const int MAX_VERTEX_SHADER_LOCALS_EXT = 0x87C9;
+ public const int MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87C8;
+ public const int MAX_VERTEX_SHADER_STORAGE_BLOCKS = 0x90D6;
+ public const int MAX_VERTEX_SHADER_VARIANTS_EXT = 0x87C6;
+ public const int MAX_VERTEX_STREAMS = 0x8E71;
+ public const int MAX_VERTEX_STREAMS_ATI = 0x876B;
+ public const int MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
+ public const int MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = 0x8B4C;
+ public const int MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B;
+ public const int MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A;
+ public const int MAX_VERTEX_UNIFORM_COMPONENTS_ARB = 0x8B4A;
+ public const int MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
+ public const int MAX_VERTEX_UNITS_ARB = 0x86A4;
+ public const int MAX_VERTEX_VARYING_COMPONENTS_ARB = 0x8DDE;
+ public const int MAX_VERTEX_VARYING_COMPONENTS_EXT = 0x8DDE;
+ public const int MAX_VIEWPORTS = 0x825B;
+ public const int MAX_VIEWPORT_DIMS = 0x0D3A;
+ public const int MAX_VIEWS_OVR = 0x9631;
+ public const int MAX_WIDTH = 0x827E;
+ public const int MAX_WINDOW_RECTANGLES_EXT = 0x8F14;
+ public const int MEDIUM_FLOAT = 0x8DF1;
+ public const int MEDIUM_INT = 0x8DF4;
+ public const int MEMORY_ATTACHABLE_ALIGNMENT_NV = 0x95A6;
+ public const int MEMORY_ATTACHABLE_NV = 0x95A8;
+ public const int MEMORY_ATTACHABLE_SIZE_NV = 0x95A7;
+ public const int MESH_OUTPUT_PER_PRIMITIVE_GRANULARITY_NV = 0x9543;
+ public const int MESH_OUTPUT_PER_VERTEX_GRANULARITY_NV = 0x92DF;
+ public const int MESH_OUTPUT_TYPE_NV = 0x957B;
+ public const int MESH_PRIMITIVES_OUT_NV = 0x957A;
+ public const int MESH_SHADER_BIT_NV = 0x00000040;
+ public const int MESH_SHADER_NV = 0x9559;
+ public const int MESH_SUBROUTINE_NV = 0x957C;
+ public const int MESH_SUBROUTINE_UNIFORM_NV = 0x957E;
+ public const int MESH_VERTICES_OUT_NV = 0x9579;
+ public const int MESH_WORK_GROUP_SIZE_NV = 0x953E;
+ public const int MIN = 0x8007;
+ public const int MINMAX_EXT = 0x802E;
+ public const int MINMAX_FORMAT_EXT = 0x802F;
+ public const int MINMAX_SINK_EXT = 0x8030;
+ public const int MINOR_VERSION = 0x821C;
+ public const int MINUS_CLAMPED_NV = 0x92B3;
+ public const int MINUS_NV = 0x929F;
+ public const int MIN_EXT = 0x8007;
+ public const int MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B;
+ public const int MIN_FRAGMENT_INTERPOLATION_OFFSET_NV = 0x8E5B;
+ public const int MIN_LOD_WARNING_AMD = 0x919C;
+ public const int MIN_MAP_BUFFER_ALIGNMENT = 0x90BC;
+ public const int MIN_PROGRAM_TEXEL_OFFSET = 0x8904;
+ public const int MIN_PROGRAM_TEXEL_OFFSET_EXT = 0x8904;
+ public const int MIN_PROGRAM_TEXEL_OFFSET_NV = 0x8904;
+ public const int MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5E;
+ public const int MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5E;
+ public const int MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV = 0x8E5E;
+ public const int MIN_SAMPLE_SHADING_VALUE = 0x8C37;
+ public const int MIN_SAMPLE_SHADING_VALUE_ARB = 0x8C37;
+ public const int MIN_SPARSE_LEVEL_AMD = 0x919B;
+ public const int MIPMAP = 0x8293;
+ public const int MIRRORED_REPEAT = 0x8370;
+ public const int MIRRORED_REPEAT_ARB = 0x8370;
+ public const int MIRRORED_REPEAT_IBM = 0x8370;
+ public const int MIRROR_CLAMP_ATI = 0x8742;
+ public const int MIRROR_CLAMP_EXT = 0x8742;
+ public const int MIRROR_CLAMP_TO_BORDER_EXT = 0x8912;
+ public const int MIRROR_CLAMP_TO_EDGE = 0x8743;
+ public const int MIRROR_CLAMP_TO_EDGE_ATI = 0x8743;
+ public const int MIRROR_CLAMP_TO_EDGE_EXT = 0x8743;
+ public const int MITER_REVERT_NV = 0x90A7;
+ public const int MITER_TRUNCATE_NV = 0x90A8;
+ public const int MIXED_DEPTH_SAMPLES_SUPPORTED_NV = 0x932F;
+ public const int MIXED_STENCIL_SAMPLES_SUPPORTED_NV = 0x9330;
+ public const int MODELVIEW0_ARB = 0x1700;
+ public const int MODELVIEW0_EXT = 0x1700;
+ public const int MODELVIEW0_MATRIX_EXT = 0x0BA6;
+ public const int MODELVIEW0_STACK_DEPTH_EXT = 0x0BA3;
+ public const int MODELVIEW10_ARB = 0x872A;
+ public const int MODELVIEW11_ARB = 0x872B;
+ public const int MODELVIEW12_ARB = 0x872C;
+ public const int MODELVIEW13_ARB = 0x872D;
+ public const int MODELVIEW14_ARB = 0x872E;
+ public const int MODELVIEW15_ARB = 0x872F;
+ public const int MODELVIEW16_ARB = 0x8730;
+ public const int MODELVIEW17_ARB = 0x8731;
+ public const int MODELVIEW18_ARB = 0x8732;
+ public const int MODELVIEW19_ARB = 0x8733;
+ public const int MODELVIEW1_ARB = 0x850A;
+ public const int MODELVIEW1_EXT = 0x850A;
+ public const int MODELVIEW1_MATRIX_EXT = 0x8506;
+ public const int MODELVIEW1_STACK_DEPTH_EXT = 0x8502;
+ public const int MODELVIEW20_ARB = 0x8734;
+ public const int MODELVIEW21_ARB = 0x8735;
+ public const int MODELVIEW22_ARB = 0x8736;
+ public const int MODELVIEW23_ARB = 0x8737;
+ public const int MODELVIEW24_ARB = 0x8738;
+ public const int MODELVIEW25_ARB = 0x8739;
+ public const int MODELVIEW26_ARB = 0x873A;
+ public const int MODELVIEW27_ARB = 0x873B;
+ public const int MODELVIEW28_ARB = 0x873C;
+ public const int MODELVIEW29_ARB = 0x873D;
+ public const int MODELVIEW2_ARB = 0x8722;
+ public const int MODELVIEW30_ARB = 0x873E;
+ public const int MODELVIEW31_ARB = 0x873F;
+ public const int MODELVIEW3_ARB = 0x8723;
+ public const int MODELVIEW4_ARB = 0x8724;
+ public const int MODELVIEW5_ARB = 0x8725;
+ public const int MODELVIEW6_ARB = 0x8726;
+ public const int MODELVIEW7_ARB = 0x8727;
+ public const int MODELVIEW8_ARB = 0x8728;
+ public const int MODELVIEW9_ARB = 0x8729;
+ public const int MODELVIEW_PROJECTION_NV = 0x8629;
+ public const int MODULATE_ADD_ATI = 0x8744;
+ public const int MODULATE_SIGNED_ADD_ATI = 0x8745;
+ public const int MODULATE_SUBTRACT_ATI = 0x8746;
+ public const int MOVE_TO_CONTINUES_NV = 0x90B6;
+ public const int MOVE_TO_NV = 0x02;
+ public const int MOVE_TO_RESETS_NV = 0x90B5;
+ public const int MOV_ATI = 0x8961;
+ public const int MULTICAST_GPUS_NV = 0x92BA;
+ public const int MULTICAST_PROGRAMMABLE_SAMPLE_LOCATION_NV = 0x9549;
+ public const int MULTIPLY_KHR = 0x9294;
+ public const int MULTIPLY_NV = 0x9294;
+ public const int MULTISAMPLE = 0x809D;
+ public const int MULTISAMPLES_NV = 0x9371;
+ public const int MULTISAMPLE_3DFX = 0x86B2;
+ public const int MULTISAMPLE_ARB = 0x809D;
+ public const int MULTISAMPLE_BIT_3DFX = 0x20000000;
+ public const int MULTISAMPLE_BIT_ARB = 0x20000000;
+ public const int MULTISAMPLE_BIT_EXT = 0x20000000;
+ public const int MULTISAMPLE_COVERAGE_MODES_NV = 0x8E12;
+ public const int MULTISAMPLE_EXT = 0x809D;
+ public const int MULTISAMPLE_FILTER_HINT_NV = 0x8534;
+ public const int MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB = 0x9382;
+ public const int MULTISAMPLE_LINE_WIDTH_RANGE_ARB = 0x9381;
+ public const int MULTISAMPLE_RASTERIZATION_ALLOWED_EXT = 0x932B;
+ public const int MULTISAMPLE_SGIS = 0x809D;
+ public const int MUL_ATI = 0x8964;
+ public const int MVP_MATRIX_EXT = 0x87E3;
+ public const int NAMED_STRING_LENGTH_ARB = 0x8DE9;
+ public const int NAMED_STRING_TYPE_ARB = 0x8DEA;
+ public const int NAME_LENGTH = 0x92F9;
+ public const int NAND = 0x150E;
+ public const int NATIVE_GRAPHICS_BEGIN_HINT_PGI = 0x1A203;
+ public const int NATIVE_GRAPHICS_END_HINT_PGI = 0x1A204;
+ public const int NATIVE_GRAPHICS_HANDLE_PGI = 0x1A202;
+ public const int NEAREST = 0x2600;
+ public const int NEAREST_CLIPMAP_LINEAR_SGIX = 0x844E;
+ public const int NEAREST_CLIPMAP_NEAREST_SGIX = 0x844D;
+ public const int NEAREST_MIPMAP_LINEAR = 0x2702;
+ public const int NEAREST_MIPMAP_NEAREST = 0x2700;
+ public const int NEGATE_BIT_ATI = 0x00000004;
+ public const int NEGATIVE_ONE_EXT = 0x87DF;
+ public const int NEGATIVE_ONE_TO_ONE = 0x935E;
+ public const int NEGATIVE_W_EXT = 0x87DC;
+ public const int NEGATIVE_X_EXT = 0x87D9;
+ public const int NEGATIVE_Y_EXT = 0x87DA;
+ public const int NEGATIVE_Z_EXT = 0x87DB;
+ public const int NEVER = 0x0200;
+ public const int NEXT_BUFFER_NV = -2;
+ public const int NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV = 0x9025;
+ public const int NICEST = 0x1102;
+ public const int NONE = 0;
+ public const int NOOP = 0x1505;
+ public const int NOP_COMMAND_NV = 0x0001;
+ public const int NOR = 0x1508;
+ public const int NORMALIZED_RANGE_EXT = 0x87E0;
+ public const int NORMAL_ARRAY_ADDRESS_NV = 0x8F22;
+ public const int NORMAL_ARRAY_BUFFER_BINDING_ARB = 0x8897;
+ public const int NORMAL_ARRAY_COUNT_EXT = 0x8080;
+ public const int NORMAL_ARRAY_EXT = 0x8075;
+ public const int NORMAL_ARRAY_LENGTH_NV = 0x8F2C;
+ public const int NORMAL_ARRAY_LIST_IBM = 103071;
+ public const int NORMAL_ARRAY_LIST_STRIDE_IBM = 103081;
+ public const int NORMAL_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F6;
+ public const int NORMAL_ARRAY_POINTER_EXT = 0x808F;
+ public const int NORMAL_ARRAY_STRIDE_EXT = 0x807F;
+ public const int NORMAL_ARRAY_TYPE_EXT = 0x807E;
+ public const int NORMAL_BIT_PGI = 0x08000000;
+ public const int NORMAL_MAP_ARB = 0x8511;
+ public const int NORMAL_MAP_EXT = 0x8511;
+ public const int NORMAL_MAP_NV = 0x8511;
+ public const int NOTEQUAL = 0x0205;
+ public const int NO_ERROR = 0;
+ public const int NO_RESET_NOTIFICATION = 0x8261;
+ public const int NO_RESET_NOTIFICATION_ARB = 0x8261;
+ public const int NUM_ACTIVE_VARIABLES = 0x9304;
+ public const int NUM_COMPATIBLE_SUBROUTINES = 0x8E4A;
+ public const int NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2;
+ public const int NUM_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A2;
+ public const int NUM_DEVICE_UUIDS_EXT = 0x9596;
+ public const int NUM_EXTENSIONS = 0x821D;
+ public const int NUM_FILL_STREAMS_NV = 0x8E29;
+ public const int NUM_FRAGMENT_CONSTANTS_ATI = 0x896F;
+ public const int NUM_FRAGMENT_REGISTERS_ATI = 0x896E;
+ public const int NUM_GENERAL_COMBINERS_NV = 0x854E;
+ public const int NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI = 0x8973;
+ public const int NUM_INSTRUCTIONS_PER_PASS_ATI = 0x8971;
+ public const int NUM_INSTRUCTIONS_TOTAL_ATI = 0x8972;
+ public const int NUM_LOOPBACK_COMPONENTS_ATI = 0x8974;
+ public const int NUM_PASSES_ATI = 0x8970;
+ public const int NUM_PROGRAM_BINARY_FORMATS = 0x87FE;
+ public const int NUM_SAMPLE_COUNTS = 0x9380;
+ public const int NUM_SHADER_BINARY_FORMATS = 0x8DF9;
+ public const int NUM_SHADING_LANGUAGE_VERSIONS = 0x82E9;
+ public const int NUM_SPARSE_LEVELS_ARB = 0x91AA;
+ public const int NUM_SPIR_V_EXTENSIONS = 0x9554;
+ public const int NUM_SUPPORTED_MULTISAMPLE_MODES_AMD = 0x91B6;
+ public const int NUM_TILING_TYPES_EXT = 0x9582;
+ public const int NUM_VIDEO_CAPTURE_STREAMS_NV = 0x9024;
+ public const int NUM_VIRTUAL_PAGE_SIZES_ARB = 0x91A8;
+ public const int NUM_WINDOW_RECTANGLES_EXT = 0x8F15;
+ public const int OBJECT_ACTIVE_ATTRIBUTES_ARB = 0x8B89;
+ public const int OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = 0x8B8A;
+ public const int OBJECT_ACTIVE_UNIFORMS_ARB = 0x8B86;
+ public const int OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB = 0x8B87;
+ public const int OBJECT_ATTACHED_OBJECTS_ARB = 0x8B85;
+ public const int OBJECT_BUFFER_SIZE_ATI = 0x8764;
+ public const int OBJECT_BUFFER_USAGE_ATI = 0x8765;
+ public const int OBJECT_COMPILE_STATUS_ARB = 0x8B81;
+ public const int OBJECT_DELETE_STATUS_ARB = 0x8B80;
+ public const int OBJECT_DISTANCE_TO_LINE_SGIS = 0x81F3;
+ public const int OBJECT_DISTANCE_TO_POINT_SGIS = 0x81F1;
+ public const int OBJECT_INFO_LOG_LENGTH_ARB = 0x8B84;
+ public const int OBJECT_LINE_SGIS = 0x81F7;
+ public const int OBJECT_LINK_STATUS_ARB = 0x8B82;
+ public const int OBJECT_POINT_SGIS = 0x81F5;
+ public const int OBJECT_SHADER_SOURCE_LENGTH_ARB = 0x8B88;
+ public const int OBJECT_SUBTYPE_ARB = 0x8B4F;
+ public const int OBJECT_TYPE = 0x9112;
+ public const int OBJECT_TYPE_ARB = 0x8B4E;
+ public const int OBJECT_VALIDATE_STATUS_ARB = 0x8B83;
+ public const int OCCLUSION_QUERY_EVENT_MASK_AMD = 0x874F;
+ public const int OCCLUSION_TEST_HP = 0x8165;
+ public const int OCCLUSION_TEST_RESULT_HP = 0x8166;
+ public const int OFFSET = 0x92FC;
+ public const int OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV = 0x8856;
+ public const int OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8857;
+ public const int OFFSET_HILO_TEXTURE_2D_NV = 0x8854;
+ public const int OFFSET_HILO_TEXTURE_RECTANGLE_NV = 0x8855;
+ public const int OFFSET_PROJECTIVE_TEXTURE_2D_NV = 0x8850;
+ public const int OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = 0x8851;
+ public const int OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8852;
+ public const int OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV = 0x8853;
+ public const int OFFSET_TEXTURE_2D_BIAS_NV = 0x86E3;
+ public const int OFFSET_TEXTURE_2D_MATRIX_NV = 0x86E1;
+ public const int OFFSET_TEXTURE_2D_NV = 0x86E8;
+ public const int OFFSET_TEXTURE_2D_SCALE_NV = 0x86E2;
+ public const int OFFSET_TEXTURE_BIAS_NV = 0x86E3;
+ public const int OFFSET_TEXTURE_MATRIX_NV = 0x86E1;
+ public const int OFFSET_TEXTURE_RECTANGLE_NV = 0x864C;
+ public const int OFFSET_TEXTURE_RECTANGLE_SCALE_NV = 0x864D;
+ public const int OFFSET_TEXTURE_SCALE_NV = 0x86E2;
+ public const int ONE = 1;
+ public const int ONE_EXT = 0x87DE;
+ public const int ONE_MINUS_CONSTANT_ALPHA = 0x8004;
+ public const int ONE_MINUS_CONSTANT_ALPHA_EXT = 0x8004;
+ public const int ONE_MINUS_CONSTANT_COLOR = 0x8002;
+ public const int ONE_MINUS_CONSTANT_COLOR_EXT = 0x8002;
+ public const int ONE_MINUS_DST_ALPHA = 0x0305;
+ public const int ONE_MINUS_DST_COLOR = 0x0307;
+ public const int ONE_MINUS_SRC1_ALPHA = 0x88FB;
+ public const int ONE_MINUS_SRC1_COLOR = 0x88FA;
+ public const int ONE_MINUS_SRC_ALPHA = 0x0303;
+ public const int ONE_MINUS_SRC_COLOR = 0x0301;
+ public const int OPERAND0_ALPHA_ARB = 0x8598;
+ public const int OPERAND0_ALPHA_EXT = 0x8598;
+ public const int OPERAND0_RGB_ARB = 0x8590;
+ public const int OPERAND0_RGB_EXT = 0x8590;
+ public const int OPERAND1_ALPHA_ARB = 0x8599;
+ public const int OPERAND1_ALPHA_EXT = 0x8599;
+ public const int OPERAND1_RGB_ARB = 0x8591;
+ public const int OPERAND1_RGB_EXT = 0x8591;
+ public const int OPERAND2_ALPHA_ARB = 0x859A;
+ public const int OPERAND2_ALPHA_EXT = 0x859A;
+ public const int OPERAND2_RGB_ARB = 0x8592;
+ public const int OPERAND2_RGB_EXT = 0x8592;
+ public const int OPERAND3_ALPHA_NV = 0x859B;
+ public const int OPERAND3_RGB_NV = 0x8593;
+ public const int OPTIMAL_TILING_EXT = 0x9584;
+ public const int OP_ADD_EXT = 0x8787;
+ public const int OP_CLAMP_EXT = 0x878E;
+ public const int OP_CROSS_PRODUCT_EXT = 0x8797;
+ public const int OP_DOT3_EXT = 0x8784;
+ public const int OP_DOT4_EXT = 0x8785;
+ public const int OP_EXP_BASE_2_EXT = 0x8791;
+ public const int OP_FLOOR_EXT = 0x878F;
+ public const int OP_FRAC_EXT = 0x8789;
+ public const int OP_INDEX_EXT = 0x8782;
+ public const int OP_LOG_BASE_2_EXT = 0x8792;
+ public const int OP_MADD_EXT = 0x8788;
+ public const int OP_MAX_EXT = 0x878A;
+ public const int OP_MIN_EXT = 0x878B;
+ public const int OP_MOV_EXT = 0x8799;
+ public const int OP_MULTIPLY_MATRIX_EXT = 0x8798;
+ public const int OP_MUL_EXT = 0x8786;
+ public const int OP_NEGATE_EXT = 0x8783;
+ public const int OP_POWER_EXT = 0x8793;
+ public const int OP_RECIP_EXT = 0x8794;
+ public const int OP_RECIP_SQRT_EXT = 0x8795;
+ public const int OP_ROUND_EXT = 0x8790;
+ public const int OP_SET_GE_EXT = 0x878C;
+ public const int OP_SET_LT_EXT = 0x878D;
+ public const int OP_SUB_EXT = 0x8796;
+ public const int OR = 0x1507;
+ public const int OR_INVERTED = 0x150D;
+ public const int OR_REVERSE = 0x150B;
+ public const int OUTPUT_COLOR0_EXT = 0x879B;
+ public const int OUTPUT_COLOR1_EXT = 0x879C;
+ public const int OUTPUT_FOG_EXT = 0x87BD;
+ public const int OUTPUT_TEXTURE_COORD0_EXT = 0x879D;
+ public const int OUTPUT_TEXTURE_COORD10_EXT = 0x87A7;
+ public const int OUTPUT_TEXTURE_COORD11_EXT = 0x87A8;
+ public const int OUTPUT_TEXTURE_COORD12_EXT = 0x87A9;
+ public const int OUTPUT_TEXTURE_COORD13_EXT = 0x87AA;
+ public const int OUTPUT_TEXTURE_COORD14_EXT = 0x87AB;
+ public const int OUTPUT_TEXTURE_COORD15_EXT = 0x87AC;
+ public const int OUTPUT_TEXTURE_COORD16_EXT = 0x87AD;
+ public const int OUTPUT_TEXTURE_COORD17_EXT = 0x87AE;
+ public const int OUTPUT_TEXTURE_COORD18_EXT = 0x87AF;
+ public const int OUTPUT_TEXTURE_COORD19_EXT = 0x87B0;
+ public const int OUTPUT_TEXTURE_COORD1_EXT = 0x879E;
+ public const int OUTPUT_TEXTURE_COORD20_EXT = 0x87B1;
+ public const int OUTPUT_TEXTURE_COORD21_EXT = 0x87B2;
+ public const int OUTPUT_TEXTURE_COORD22_EXT = 0x87B3;
+ public const int OUTPUT_TEXTURE_COORD23_EXT = 0x87B4;
+ public const int OUTPUT_TEXTURE_COORD24_EXT = 0x87B5;
+ public const int OUTPUT_TEXTURE_COORD25_EXT = 0x87B6;
+ public const int OUTPUT_TEXTURE_COORD26_EXT = 0x87B7;
+ public const int OUTPUT_TEXTURE_COORD27_EXT = 0x87B8;
+ public const int OUTPUT_TEXTURE_COORD28_EXT = 0x87B9;
+ public const int OUTPUT_TEXTURE_COORD29_EXT = 0x87BA;
+ public const int OUTPUT_TEXTURE_COORD2_EXT = 0x879F;
+ public const int OUTPUT_TEXTURE_COORD30_EXT = 0x87BB;
+ public const int OUTPUT_TEXTURE_COORD31_EXT = 0x87BC;
+ public const int OUTPUT_TEXTURE_COORD3_EXT = 0x87A0;
+ public const int OUTPUT_TEXTURE_COORD4_EXT = 0x87A1;
+ public const int OUTPUT_TEXTURE_COORD5_EXT = 0x87A2;
+ public const int OUTPUT_TEXTURE_COORD6_EXT = 0x87A3;
+ public const int OUTPUT_TEXTURE_COORD7_EXT = 0x87A4;
+ public const int OUTPUT_TEXTURE_COORD8_EXT = 0x87A5;
+ public const int OUTPUT_TEXTURE_COORD9_EXT = 0x87A6;
+ public const int OUTPUT_VERTEX_EXT = 0x879A;
+ public const int OUT_OF_MEMORY = 0x0505;
+ public const int OVERLAY_KHR = 0x9296;
+ public const int OVERLAY_NV = 0x9296;
+ public const int PACK_ALIGNMENT = 0x0D05;
+ public const int PACK_CMYK_HINT_EXT = 0x800E;
+ public const int PACK_COMPRESSED_BLOCK_DEPTH = 0x912D;
+ public const int PACK_COMPRESSED_BLOCK_HEIGHT = 0x912C;
+ public const int PACK_COMPRESSED_BLOCK_SIZE = 0x912E;
+ public const int PACK_COMPRESSED_BLOCK_WIDTH = 0x912B;
+ public const int PACK_IMAGE_DEPTH_SGIS = 0x8131;
+ public const int PACK_IMAGE_HEIGHT = 0x806C;
+ public const int PACK_IMAGE_HEIGHT_EXT = 0x806C;
+ public const int PACK_INVERT_MESA = 0x8758;
+ public const int PACK_LSB_FIRST = 0x0D01;
+ public const int PACK_RESAMPLE_OML = 0x8984;
+ public const int PACK_RESAMPLE_SGIX = 0x842E;
+ public const int PACK_ROW_BYTES_APPLE = 0x8A15;
+ public const int PACK_ROW_LENGTH = 0x0D02;
+ public const int PACK_SKIP_IMAGES = 0x806B;
+ public const int PACK_SKIP_IMAGES_EXT = 0x806B;
+ public const int PACK_SKIP_PIXELS = 0x0D04;
+ public const int PACK_SKIP_ROWS = 0x0D03;
+ public const int PACK_SKIP_VOLUMES_SGIS = 0x8130;
+ public const int PACK_SUBSAMPLE_RATE_SGIX = 0x85A0;
+ public const int PACK_SWAP_BYTES = 0x0D00;
+ public const int PALETTE4_R5_G6_B5_OES = 0x8B92;
+ public const int PALETTE4_RGB5_A1_OES = 0x8B94;
+ public const int PALETTE4_RGB8_OES = 0x8B90;
+ public const int PALETTE4_RGBA4_OES = 0x8B93;
+ public const int PALETTE4_RGBA8_OES = 0x8B91;
+ public const int PALETTE8_R5_G6_B5_OES = 0x8B97;
+ public const int PALETTE8_RGB5_A1_OES = 0x8B99;
+ public const int PALETTE8_RGB8_OES = 0x8B95;
+ public const int PALETTE8_RGBA4_OES = 0x8B98;
+ public const int PALETTE8_RGBA8_OES = 0x8B96;
+ public const int PARALLEL_ARRAYS_INTEL = 0x83F4;
+ public const int PARAMETER_BUFFER = 0x80EE;
+ public const int PARAMETER_BUFFER_ARB = 0x80EE;
+ public const int PARAMETER_BUFFER_BINDING = 0x80EF;
+ public const int PARAMETER_BUFFER_BINDING_ARB = 0x80EF;
+ public const int PARTIAL_SUCCESS_NV = 0x902E;
+ public const int PASS_THROUGH_NV = 0x86E6;
+ public const int PATCHES = 0x000E;
+ public const int PATCH_DEFAULT_INNER_LEVEL = 0x8E73;
+ public const int PATCH_DEFAULT_OUTER_LEVEL = 0x8E74;
+ public const int PATCH_VERTICES = 0x8E72;
+ public const int PATH_CLIENT_LENGTH_NV = 0x907F;
+ public const int PATH_COMMAND_COUNT_NV = 0x909D;
+ public const int PATH_COMPUTED_LENGTH_NV = 0x90A0;
+ public const int PATH_COORD_COUNT_NV = 0x909E;
+ public const int PATH_COVER_DEPTH_FUNC_NV = 0x90BF;
+ public const int PATH_DASH_ARRAY_COUNT_NV = 0x909F;
+ public const int PATH_DASH_CAPS_NV = 0x907B;
+ public const int PATH_DASH_OFFSET_NV = 0x907E;
+ public const int PATH_DASH_OFFSET_RESET_NV = 0x90B4;
+ public const int PATH_END_CAPS_NV = 0x9076;
+ public const int PATH_ERROR_POSITION_NV = 0x90AB;
+ public const int PATH_FILL_BOUNDING_BOX_NV = 0x90A1;
+ public const int PATH_FILL_COVER_MODE_NV = 0x9082;
+ public const int PATH_FILL_MASK_NV = 0x9081;
+ public const int PATH_FILL_MODE_NV = 0x9080;
+ public const int PATH_FORMAT_PS_NV = 0x9071;
+ public const int PATH_FORMAT_SVG_NV = 0x9070;
+ public const int PATH_GEN_COEFF_NV = 0x90B1;
+ public const int PATH_GEN_COMPONENTS_NV = 0x90B3;
+ public const int PATH_GEN_MODE_NV = 0x90B0;
+ public const int PATH_INITIAL_DASH_CAP_NV = 0x907C;
+ public const int PATH_INITIAL_END_CAP_NV = 0x9077;
+ public const int PATH_JOIN_STYLE_NV = 0x9079;
+ public const int PATH_MAX_MODELVIEW_STACK_DEPTH_NV = 0x0D36;
+ public const int PATH_MAX_PROJECTION_STACK_DEPTH_NV = 0x0D38;
+ public const int PATH_MITER_LIMIT_NV = 0x907A;
+ public const int PATH_MODELVIEW_MATRIX_NV = 0x0BA6;
+ public const int PATH_MODELVIEW_NV = 0x1700;
+ public const int PATH_MODELVIEW_STACK_DEPTH_NV = 0x0BA3;
+ public const int PATH_OBJECT_BOUNDING_BOX_NV = 0x908A;
+ public const int PATH_PROJECTION_MATRIX_NV = 0x0BA7;
+ public const int PATH_PROJECTION_NV = 0x1701;
+ public const int PATH_PROJECTION_STACK_DEPTH_NV = 0x0BA4;
+ public const int PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV = 0x90BD;
+ public const int PATH_STENCIL_DEPTH_OFFSET_UNITS_NV = 0x90BE;
+ public const int PATH_STENCIL_FUNC_NV = 0x90B7;
+ public const int PATH_STENCIL_REF_NV = 0x90B8;
+ public const int PATH_STENCIL_VALUE_MASK_NV = 0x90B9;
+ public const int PATH_STROKE_BOUNDING_BOX_NV = 0x90A2;
+ public const int PATH_STROKE_COVER_MODE_NV = 0x9083;
+ public const int PATH_STROKE_MASK_NV = 0x9084;
+ public const int PATH_STROKE_WIDTH_NV = 0x9075;
+ public const int PATH_TERMINAL_DASH_CAP_NV = 0x907D;
+ public const int PATH_TERMINAL_END_CAP_NV = 0x9078;
+ public const int PATH_TRANSPOSE_MODELVIEW_MATRIX_NV = 0x84E3;
+ public const int PATH_TRANSPOSE_PROJECTION_MATRIX_NV = 0x84E4;
+ public const int PERCENTAGE_AMD = 0x8BC3;
+ public const int PERFMON_RESULT_AMD = 0x8BC6;
+ public const int PERFMON_RESULT_AVAILABLE_AMD = 0x8BC4;
+ public const int PERFMON_RESULT_SIZE_AMD = 0x8BC5;
+ public const int PERFORMANCE_MONITOR_AMD = 0x9152;
+ public const int PERFQUERY_COUNTER_DATA_BOOL32_INTEL = 0x94FC;
+ public const int PERFQUERY_COUNTER_DATA_DOUBLE_INTEL = 0x94FB;
+ public const int PERFQUERY_COUNTER_DATA_FLOAT_INTEL = 0x94FA;
+ public const int PERFQUERY_COUNTER_DATA_UINT32_INTEL = 0x94F8;
+ public const int PERFQUERY_COUNTER_DATA_UINT64_INTEL = 0x94F9;
+ public const int PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL = 0x94FF;
+ public const int PERFQUERY_COUNTER_DURATION_NORM_INTEL = 0x94F1;
+ public const int PERFQUERY_COUNTER_DURATION_RAW_INTEL = 0x94F2;
+ public const int PERFQUERY_COUNTER_EVENT_INTEL = 0x94F0;
+ public const int PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL = 0x94FE;
+ public const int PERFQUERY_COUNTER_RAW_INTEL = 0x94F4;
+ public const int PERFQUERY_COUNTER_THROUGHPUT_INTEL = 0x94F3;
+ public const int PERFQUERY_COUNTER_TIMESTAMP_INTEL = 0x94F5;
+ public const int PERFQUERY_DONOT_FLUSH_INTEL = 0x83F9;
+ public const int PERFQUERY_FLUSH_INTEL = 0x83FA;
+ public const int PERFQUERY_GLOBAL_CONTEXT_INTEL = 0x00000001;
+ public const int PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL = 0x9500;
+ public const int PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL = 0x94FD;
+ public const int PERFQUERY_SINGLE_CONTEXT_INTEL = 0x00000000;
+ public const int PERFQUERY_WAIT_INTEL = 0x83FB;
+ public const int PERTURB_EXT = 0x85AE;
+ public const int PER_GPU_STORAGE_BIT_NV = 0x0800;
+ public const int PER_GPU_STORAGE_NV = 0x9548;
+ public const int PER_STAGE_CONSTANTS_NV = 0x8535;
+ public const int PHONG_HINT_WIN = 0x80EB;
+ public const int PHONG_WIN = 0x80EA;
+ public const int PINLIGHT_NV = 0x92A8;
+ public const int PIXELS_PER_SAMPLE_PATTERN_X_AMD = 0x91AE;
+ public const int PIXELS_PER_SAMPLE_PATTERN_Y_AMD = 0x91AF;
+ public const int PIXEL_BUFFER_BARRIER_BIT = 0x00000080;
+ public const int PIXEL_BUFFER_BARRIER_BIT_EXT = 0x00000080;
+ public const int PIXEL_COUNTER_BITS_NV = 0x8864;
+ public const int PIXEL_COUNT_AVAILABLE_NV = 0x8867;
+ public const int PIXEL_COUNT_NV = 0x8866;
+ public const int PIXEL_CUBIC_WEIGHT_EXT = 0x8333;
+ public const int PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS = 0x8355;
+ public const int PIXEL_FRAGMENT_RGB_SOURCE_SGIS = 0x8354;
+ public const int PIXEL_GROUP_COLOR_SGIS = 0x8356;
+ public const int PIXEL_MAG_FILTER_EXT = 0x8331;
+ public const int PIXEL_MIN_FILTER_EXT = 0x8332;
+ public const int PIXEL_PACK_BUFFER = 0x88EB;
+ public const int PIXEL_PACK_BUFFER_ARB = 0x88EB;
+ public const int PIXEL_PACK_BUFFER_BINDING = 0x88ED;
+ public const int PIXEL_PACK_BUFFER_BINDING_ARB = 0x88ED;
+ public const int PIXEL_PACK_BUFFER_BINDING_EXT = 0x88ED;
+ public const int PIXEL_PACK_BUFFER_EXT = 0x88EB;
+ public const int PIXEL_SUBSAMPLE_2424_SGIX = 0x85A3;
+ public const int PIXEL_SUBSAMPLE_4242_SGIX = 0x85A4;
+ public const int PIXEL_SUBSAMPLE_4444_SGIX = 0x85A2;
+ public const int PIXEL_TEXTURE_SGIS = 0x8353;
+ public const int PIXEL_TEX_GEN_MODE_SGIX = 0x832B;
+ public const int PIXEL_TEX_GEN_SGIX = 0x8139;
+ public const int PIXEL_TILE_BEST_ALIGNMENT_SGIX = 0x813E;
+ public const int PIXEL_TILE_CACHE_INCREMENT_SGIX = 0x813F;
+ public const int PIXEL_TILE_CACHE_SIZE_SGIX = 0x8145;
+ public const int PIXEL_TILE_GRID_DEPTH_SGIX = 0x8144;
+ public const int PIXEL_TILE_GRID_HEIGHT_SGIX = 0x8143;
+ public const int PIXEL_TILE_GRID_WIDTH_SGIX = 0x8142;
+ public const int PIXEL_TILE_HEIGHT_SGIX = 0x8141;
+ public const int PIXEL_TILE_WIDTH_SGIX = 0x8140;
+ public const int PIXEL_TRANSFORM_2D_EXT = 0x8330;
+ public const int PIXEL_TRANSFORM_2D_MATRIX_EXT = 0x8338;
+ public const int PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT = 0x8336;
+ public const int PIXEL_UNPACK_BUFFER = 0x88EC;
+ public const int PIXEL_UNPACK_BUFFER_ARB = 0x88EC;
+ public const int PIXEL_UNPACK_BUFFER_BINDING = 0x88EF;
+ public const int PIXEL_UNPACK_BUFFER_BINDING_ARB = 0x88EF;
+ public const int PIXEL_UNPACK_BUFFER_BINDING_EXT = 0x88EF;
+ public const int PIXEL_UNPACK_BUFFER_EXT = 0x88EC;
+ public const int PLUS_CLAMPED_ALPHA_NV = 0x92B2;
+ public const int PLUS_CLAMPED_NV = 0x92B1;
+ public const int PLUS_DARKER_NV = 0x9292;
+ public const int PLUS_NV = 0x9291;
+ public const int PN_TRIANGLES_ATI = 0x87F0;
+ public const int PN_TRIANGLES_NORMAL_MODE_ATI = 0x87F3;
+ public const int PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI = 0x87F7;
+ public const int PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI = 0x87F8;
+ public const int PN_TRIANGLES_POINT_MODE_ATI = 0x87F2;
+ public const int PN_TRIANGLES_POINT_MODE_CUBIC_ATI = 0x87F6;
+ public const int PN_TRIANGLES_POINT_MODE_LINEAR_ATI = 0x87F5;
+ public const int PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F4;
+ public const int POINT = 0x1B00;
+ public const int POINTS = 0x0000;
+ public const int POINT_DISTANCE_ATTENUATION_ARB = 0x8129;
+ public const int POINT_FADE_THRESHOLD_SIZE = 0x8128;
+ public const int POINT_FADE_THRESHOLD_SIZE_ARB = 0x8128;
+ public const int POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128;
+ public const int POINT_FADE_THRESHOLD_SIZE_SGIS = 0x8128;
+ public const int POINT_SIZE = 0x0B11;
+ public const int POINT_SIZE_GRANULARITY = 0x0B13;
+ public const int POINT_SIZE_MAX_ARB = 0x8127;
+ public const int POINT_SIZE_MAX_EXT = 0x8127;
+ public const int POINT_SIZE_MAX_SGIS = 0x8127;
+ public const int POINT_SIZE_MIN_ARB = 0x8126;
+ public const int POINT_SIZE_MIN_EXT = 0x8126;
+ public const int POINT_SIZE_MIN_SGIS = 0x8126;
+ public const int POINT_SIZE_RANGE = 0x0B12;
+ public const int POINT_SPRITE_ARB = 0x8861;
+ public const int POINT_SPRITE_COORD_ORIGIN = 0x8CA0;
+ public const int POINT_SPRITE_NV = 0x8861;
+ public const int POINT_SPRITE_R_MODE_NV = 0x8863;
+ public const int POLYGON_MODE = 0x0B40;
+ public const int POLYGON_OFFSET_BIAS_EXT = 0x8039;
+ public const int POLYGON_OFFSET_CLAMP = 0x8E1B;
+ public const int POLYGON_OFFSET_CLAMP_EXT = 0x8E1B;
+ public const int POLYGON_OFFSET_COMMAND_NV = 0x000E;
+ public const int POLYGON_OFFSET_EXT = 0x8037;
+ public const int POLYGON_OFFSET_FACTOR = 0x8038;
+ public const int POLYGON_OFFSET_FACTOR_EXT = 0x8038;
+ public const int POLYGON_OFFSET_FILL = 0x8037;
+ public const int POLYGON_OFFSET_LINE = 0x2A02;
+ public const int POLYGON_OFFSET_POINT = 0x2A01;
+ public const int POLYGON_OFFSET_UNITS = 0x2A00;
+ public const int POLYGON_SMOOTH = 0x0B41;
+ public const int POLYGON_SMOOTH_HINT = 0x0C53;
+ public const int POST_COLOR_MATRIX_ALPHA_BIAS_SGI = 0x80BB;
+ public const int POST_COLOR_MATRIX_ALPHA_SCALE_SGI = 0x80B7;
+ public const int POST_COLOR_MATRIX_BLUE_BIAS_SGI = 0x80BA;
+ public const int POST_COLOR_MATRIX_BLUE_SCALE_SGI = 0x80B6;
+ public const int POST_COLOR_MATRIX_COLOR_TABLE_SGI = 0x80D2;
+ public const int POST_COLOR_MATRIX_GREEN_BIAS_SGI = 0x80B9;
+ public const int POST_COLOR_MATRIX_GREEN_SCALE_SGI = 0x80B5;
+ public const int POST_COLOR_MATRIX_RED_BIAS_SGI = 0x80B8;
+ public const int POST_COLOR_MATRIX_RED_SCALE_SGI = 0x80B4;
+ public const int POST_CONVOLUTION_ALPHA_BIAS_EXT = 0x8023;
+ public const int POST_CONVOLUTION_ALPHA_SCALE_EXT = 0x801F;
+ public const int POST_CONVOLUTION_BLUE_BIAS_EXT = 0x8022;
+ public const int POST_CONVOLUTION_BLUE_SCALE_EXT = 0x801E;
+ public const int POST_CONVOLUTION_COLOR_TABLE_SGI = 0x80D1;
+ public const int POST_CONVOLUTION_GREEN_BIAS_EXT = 0x8021;
+ public const int POST_CONVOLUTION_GREEN_SCALE_EXT = 0x801D;
+ public const int POST_CONVOLUTION_RED_BIAS_EXT = 0x8020;
+ public const int POST_CONVOLUTION_RED_SCALE_EXT = 0x801C;
+ public const int POST_IMAGE_TRANSFORM_COLOR_TABLE_HP = 0x8162;
+ public const int POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B;
+ public const int POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179;
+ public const int POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C;
+ public const int POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A;
+ public const int PREFER_DOUBLEBUFFER_HINT_PGI = 0x1A1F8;
+ public const int PRESENT_DURATION_NV = 0x8E2B;
+ public const int PRESENT_TIME_NV = 0x8E2A;
+ public const int PRESERVE_ATI = 0x8762;
+ public const int PREVIOUS_ARB = 0x8578;
+ public const int PREVIOUS_EXT = 0x8578;
+ public const int PREVIOUS_TEXTURE_INPUT_NV = 0x86E4;
+ public const int PRIMARY_COLOR_ARB = 0x8577;
+ public const int PRIMARY_COLOR_EXT = 0x8577;
+ public const int PRIMARY_COLOR_NV = 0x852C;
+ public const int PRIMITIVES_GENERATED = 0x8C87;
+ public const int PRIMITIVES_GENERATED_EXT = 0x8C87;
+ public const int PRIMITIVES_GENERATED_NV = 0x8C87;
+ public const int PRIMITIVES_SUBMITTED = 0x82EF;
+ public const int PRIMITIVES_SUBMITTED_ARB = 0x82EF;
+ public const int PRIMITIVE_BOUNDING_BOX_ARB = 0x92BE;
+ public const int PRIMITIVE_ID_NV = 0x8C7C;
+ public const int PRIMITIVE_RESTART = 0x8F9D;
+ public const int PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69;
+ public const int PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED = 0x8221;
+ public const int PRIMITIVE_RESTART_INDEX = 0x8F9E;
+ public const int PRIMITIVE_RESTART_INDEX_NV = 0x8559;
+ public const int PRIMITIVE_RESTART_NV = 0x8558;
+ public const int PROGRAM = 0x82E2;
+ public const int PROGRAMMABLE_SAMPLE_LOCATION_ARB = 0x9341;
+ public const int PROGRAMMABLE_SAMPLE_LOCATION_NV = 0x9341;
+ public const int PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB = 0x9340;
+ public const int PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV = 0x9340;
+ public const int PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B0;
+ public const int PROGRAM_ALU_INSTRUCTIONS_ARB = 0x8805;
+ public const int PROGRAM_ATTRIBS_ARB = 0x88AC;
+ public const int PROGRAM_ATTRIB_COMPONENTS_NV = 0x8906;
+ public const int PROGRAM_BINARY_FORMATS = 0x87FF;
+ public const int PROGRAM_BINARY_FORMAT_MESA = 0x875F;
+ public const int PROGRAM_BINARY_LENGTH = 0x8741;
+ public const int PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257;
+ public const int PROGRAM_BINDING_ARB = 0x8677;
+ public const int PROGRAM_ERROR_POSITION_ARB = 0x864B;
+ public const int PROGRAM_ERROR_POSITION_NV = 0x864B;
+ public const int PROGRAM_ERROR_STRING_ARB = 0x8874;
+ public const int PROGRAM_ERROR_STRING_NV = 0x8874;
+ public const int PROGRAM_FORMAT_ARB = 0x8876;
+ public const int PROGRAM_FORMAT_ASCII_ARB = 0x8875;
+ public const int PROGRAM_INPUT = 0x92E3;
+ public const int PROGRAM_INSTRUCTIONS_ARB = 0x88A0;
+ public const int PROGRAM_LENGTH_ARB = 0x8627;
+ public const int PROGRAM_LENGTH_NV = 0x8627;
+ public const int PROGRAM_MATRIX_EXT = 0x8E2D;
+ public const int PROGRAM_MATRIX_STACK_DEPTH_EXT = 0x8E2F;
+ public const int PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2;
+ public const int PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x8808;
+ public const int PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AE;
+ public const int PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A2;
+ public const int PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AA;
+ public const int PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A6;
+ public const int PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x880A;
+ public const int PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x8809;
+ public const int PROGRAM_OBJECT_ARB = 0x8B40;
+ public const int PROGRAM_OBJECT_EXT = 0x8B40;
+ public const int PROGRAM_OUTPUT = 0x92E4;
+ public const int PROGRAM_PARAMETERS_ARB = 0x88A8;
+ public const int PROGRAM_PARAMETER_NV = 0x8644;
+ public const int PROGRAM_PIPELINE = 0x82E4;
+ public const int PROGRAM_PIPELINE_BINDING = 0x825A;
+ public const int PROGRAM_PIPELINE_OBJECT_EXT = 0x8A4F;
+ public const int PROGRAM_POINT_SIZE = 0x8642;
+ public const int PROGRAM_POINT_SIZE_ARB = 0x8642;
+ public const int PROGRAM_POINT_SIZE_EXT = 0x8642;
+ public const int PROGRAM_RESIDENT_NV = 0x8647;
+ public const int PROGRAM_RESULT_COMPONENTS_NV = 0x8907;
+ public const int PROGRAM_SEPARABLE = 0x8258;
+ public const int PROGRAM_STRING_ARB = 0x8628;
+ public const int PROGRAM_STRING_NV = 0x8628;
+ public const int PROGRAM_TARGET_NV = 0x8646;
+ public const int PROGRAM_TEMPORARIES_ARB = 0x88A4;
+ public const int PROGRAM_TEX_INDIRECTIONS_ARB = 0x8807;
+ public const int PROGRAM_TEX_INSTRUCTIONS_ARB = 0x8806;
+ public const int PROGRAM_UNDER_NATIVE_LIMITS_ARB = 0x88B6;
+ public const int PROTECTED_MEMORY_OBJECT_EXT = 0x959B;
+ public const int PROVOKING_VERTEX = 0x8E4F;
+ public const int PROVOKING_VERTEX_EXT = 0x8E4F;
+ public const int PROXY_COLOR_TABLE_SGI = 0x80D3;
+ public const int PROXY_HISTOGRAM_EXT = 0x8025;
+ public const int PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI = 0x80D5;
+ public const int PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI = 0x80D4;
+ public const int PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP = 0x8163;
+ public const int PROXY_TEXTURE_1D = 0x8063;
+ public const int PROXY_TEXTURE_1D_ARRAY = 0x8C19;
+ public const int PROXY_TEXTURE_1D_ARRAY_EXT = 0x8C19;
+ public const int PROXY_TEXTURE_1D_EXT = 0x8063;
+ public const int PROXY_TEXTURE_1D_STACK_MESAX = 0x875B;
+ public const int PROXY_TEXTURE_2D = 0x8064;
+ public const int PROXY_TEXTURE_2D_ARRAY = 0x8C1B;
+ public const int PROXY_TEXTURE_2D_ARRAY_EXT = 0x8C1B;
+ public const int PROXY_TEXTURE_2D_EXT = 0x8064;
+ public const int PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101;
+ public const int PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103;
+ public const int PROXY_TEXTURE_2D_STACK_MESAX = 0x875C;
+ public const int PROXY_TEXTURE_3D = 0x8070;
+ public const int PROXY_TEXTURE_3D_EXT = 0x8070;
+ public const int PROXY_TEXTURE_4D_SGIS = 0x8135;
+ public const int PROXY_TEXTURE_COLOR_TABLE_SGI = 0x80BD;
+ public const int PROXY_TEXTURE_CUBE_MAP = 0x851B;
+ public const int PROXY_TEXTURE_CUBE_MAP_ARB = 0x851B;
+ public const int PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B;
+ public const int PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x900B;
+ public const int PROXY_TEXTURE_CUBE_MAP_EXT = 0x851B;
+ public const int PROXY_TEXTURE_RECTANGLE = 0x84F7;
+ public const int PROXY_TEXTURE_RECTANGLE_ARB = 0x84F7;
+ public const int PROXY_TEXTURE_RECTANGLE_NV = 0x84F7;
+ public const int PURGEABLE_APPLE = 0x8A1D;
+ public const int PURGED_CONTEXT_RESET_NV = 0x92BB;
+ public const int QUADRATIC_CURVE_TO_NV = 0x0A;
+ public const int QUADS = 0x0007;
+ public const int QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C;
+ public const int QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT = 0x8E4C;
+ public const int QUAD_ALPHA4_SGIS = 0x811E;
+ public const int QUAD_ALPHA8_SGIS = 0x811F;
+ public const int QUAD_INTENSITY4_SGIS = 0x8122;
+ public const int QUAD_INTENSITY8_SGIS = 0x8123;
+ public const int QUAD_LUMINANCE4_SGIS = 0x8120;
+ public const int QUAD_LUMINANCE8_SGIS = 0x8121;
+ public const int QUAD_MESH_SUN = 0x8614;
+ public const int QUAD_TEXTURE_SELECT_SGIS = 0x8125;
+ public const int QUARTER_BIT_ATI = 0x00000010;
+ public const int QUERY = 0x82E3;
+ public const uint QUERY_ALL_EVENT_BITS_AMD = 0xFFFFFFFF;
+ public const int QUERY_BUFFER = 0x9192;
+ public const int QUERY_BUFFER_AMD = 0x9192;
+ public const int QUERY_BUFFER_BARRIER_BIT = 0x00008000;
+ public const int QUERY_BUFFER_BINDING = 0x9193;
+ public const int QUERY_BUFFER_BINDING_AMD = 0x9193;
+ public const int QUERY_BY_REGION_NO_WAIT = 0x8E16;
+ public const int QUERY_BY_REGION_NO_WAIT_INVERTED = 0x8E1A;
+ public const int QUERY_BY_REGION_NO_WAIT_NV = 0x8E16;
+ public const int QUERY_BY_REGION_WAIT = 0x8E15;
+ public const int QUERY_BY_REGION_WAIT_INVERTED = 0x8E19;
+ public const int QUERY_BY_REGION_WAIT_NV = 0x8E15;
+ public const int QUERY_COUNTER_BITS = 0x8864;
+ public const int QUERY_COUNTER_BITS_ARB = 0x8864;
+ public const int QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD = 0x00000008;
+ public const int QUERY_DEPTH_FAIL_EVENT_BIT_AMD = 0x00000002;
+ public const int QUERY_DEPTH_PASS_EVENT_BIT_AMD = 0x00000001;
+ public const int QUERY_NO_WAIT = 0x8E14;
+ public const int QUERY_NO_WAIT_INVERTED = 0x8E18;
+ public const int QUERY_NO_WAIT_NV = 0x8E14;
+ public const int QUERY_OBJECT_AMD = 0x9153;
+ public const int QUERY_OBJECT_EXT = 0x9153;
+ public const int QUERY_RESOURCE_BUFFEROBJECT_NV = 0x9547;
+ public const int QUERY_RESOURCE_MEMTYPE_VIDMEM_NV = 0x9542;
+ public const int QUERY_RESOURCE_RENDERBUFFER_NV = 0x9546;
+ public const int QUERY_RESOURCE_SYS_RESERVED_NV = 0x9544;
+ public const int QUERY_RESOURCE_TEXTURE_NV = 0x9545;
+ public const int QUERY_RESOURCE_TYPE_VIDMEM_ALLOC_NV = 0x9540;
+ public const int QUERY_RESULT = 0x8866;
+ public const int QUERY_RESULT_ARB = 0x8866;
+ public const int QUERY_RESULT_AVAILABLE = 0x8867;
+ public const int QUERY_RESULT_AVAILABLE_ARB = 0x8867;
+ public const int QUERY_RESULT_NO_WAIT = 0x9194;
+ public const int QUERY_RESULT_NO_WAIT_AMD = 0x9194;
+ public const int QUERY_STENCIL_FAIL_EVENT_BIT_AMD = 0x00000004;
+ public const int QUERY_TARGET = 0x82EA;
+ public const int QUERY_WAIT = 0x8E13;
+ public const int QUERY_WAIT_INVERTED = 0x8E17;
+ public const int QUERY_WAIT_NV = 0x8E13;
+ public const int R11F_G11F_B10F = 0x8C3A;
+ public const int R11F_G11F_B10F_EXT = 0x8C3A;
+ public const int R16 = 0x822A;
+ public const int R16F = 0x822D;
+ public const int R16F_EXT = 0x822D;
+ public const int R16I = 0x8233;
+ public const int R16UI = 0x8234;
+ public const int R16_SNORM = 0x8F98;
+ public const int R1UI_C3F_V3F_SUN = 0x85C6;
+ public const int R1UI_C4F_N3F_V3F_SUN = 0x85C8;
+ public const int R1UI_C4UB_V3F_SUN = 0x85C5;
+ public const int R1UI_N3F_V3F_SUN = 0x85C7;
+ public const int R1UI_T2F_C4F_N3F_V3F_SUN = 0x85CB;
+ public const int R1UI_T2F_N3F_V3F_SUN = 0x85CA;
+ public const int R1UI_T2F_V3F_SUN = 0x85C9;
+ public const int R1UI_V3F_SUN = 0x85C4;
+ public const int R32F = 0x822E;
+ public const int R32F_EXT = 0x822E;
+ public const int R32I = 0x8235;
+ public const int R32UI = 0x8236;
+ public const int R3_G3_B2 = 0x2A10;
+ public const int R8 = 0x8229;
+ public const int R8I = 0x8231;
+ public const int R8UI = 0x8232;
+ public const int R8_EXT = 0x8229;
+ public const int R8_SNORM = 0x8F94;
+ public const int RASTERIZER_DISCARD = 0x8C89;
+ public const int RASTERIZER_DISCARD_EXT = 0x8C89;
+ public const int RASTERIZER_DISCARD_NV = 0x8C89;
+ public const int RASTER_FIXED_SAMPLE_LOCATIONS_EXT = 0x932A;
+ public const int RASTER_MULTISAMPLE_EXT = 0x9327;
+ public const int RASTER_POSITION_UNCLIPPED_IBM = 0x19262;
+ public const int RASTER_SAMPLES_EXT = 0x9328;
+ public const int READ_BUFFER = 0x0C02;
+ public const int READ_FRAMEBUFFER = 0x8CA8;
+ public const int READ_FRAMEBUFFER_BINDING = 0x8CAA;
+ public const int READ_FRAMEBUFFER_BINDING_EXT = 0x8CAA;
+ public const int READ_FRAMEBUFFER_EXT = 0x8CA8;
+ public const int READ_ONLY = 0x88B8;
+ public const int READ_ONLY_ARB = 0x88B8;
+ public const int READ_PIXELS = 0x828C;
+ public const int READ_PIXELS_FORMAT = 0x828D;
+ public const int READ_PIXELS_TYPE = 0x828E;
+ public const int READ_PIXEL_DATA_RANGE_LENGTH_NV = 0x887B;
+ public const int READ_PIXEL_DATA_RANGE_NV = 0x8879;
+ public const int READ_PIXEL_DATA_RANGE_POINTER_NV = 0x887D;
+ public const int READ_WRITE = 0x88BA;
+ public const int READ_WRITE_ARB = 0x88BA;
+ public const int RECLAIM_MEMORY_HINT_PGI = 0x1A1FE;
+ public const int RECT_NV = 0xF6;
+ public const int RED = 0x1903;
+ public const int REDUCE_EXT = 0x8016;
+ public const int RED_BIT_ATI = 0x00000001;
+ public const int RED_INTEGER = 0x8D94;
+ public const int RED_INTEGER_EXT = 0x8D94;
+ public const int RED_MAX_CLAMP_INGR = 0x8564;
+ public const int RED_MIN_CLAMP_INGR = 0x8560;
+ public const int RED_NV = 0x1903;
+ public const int RED_SNORM = 0x8F90;
+ public const int REFERENCED_BY_COMPUTE_SHADER = 0x930B;
+ public const int REFERENCED_BY_FRAGMENT_SHADER = 0x930A;
+ public const int REFERENCED_BY_GEOMETRY_SHADER = 0x9309;
+ public const int REFERENCED_BY_MESH_SHADER_NV = 0x95A0;
+ public const int REFERENCED_BY_TASK_SHADER_NV = 0x95A1;
+ public const int REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307;
+ public const int REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308;
+ public const int REFERENCED_BY_VERTEX_SHADER = 0x9306;
+ public const int REFERENCE_PLANE_EQUATION_SGIX = 0x817E;
+ public const int REFERENCE_PLANE_SGIX = 0x817D;
+ public const int REFLECTION_MAP_ARB = 0x8512;
+ public const int REFLECTION_MAP_EXT = 0x8512;
+ public const int REFLECTION_MAP_NV = 0x8512;
+ public const int REGISTER_COMBINERS_NV = 0x8522;
+ public const int REG_0_ATI = 0x8921;
+ public const int REG_10_ATI = 0x892B;
+ public const int REG_11_ATI = 0x892C;
+ public const int REG_12_ATI = 0x892D;
+ public const int REG_13_ATI = 0x892E;
+ public const int REG_14_ATI = 0x892F;
+ public const int REG_15_ATI = 0x8930;
+ public const int REG_16_ATI = 0x8931;
+ public const int REG_17_ATI = 0x8932;
+ public const int REG_18_ATI = 0x8933;
+ public const int REG_19_ATI = 0x8934;
+ public const int REG_1_ATI = 0x8922;
+ public const int REG_20_ATI = 0x8935;
+ public const int REG_21_ATI = 0x8936;
+ public const int REG_22_ATI = 0x8937;
+ public const int REG_23_ATI = 0x8938;
+ public const int REG_24_ATI = 0x8939;
+ public const int REG_25_ATI = 0x893A;
+ public const int REG_26_ATI = 0x893B;
+ public const int REG_27_ATI = 0x893C;
+ public const int REG_28_ATI = 0x893D;
+ public const int REG_29_ATI = 0x893E;
+ public const int REG_2_ATI = 0x8923;
+ public const int REG_30_ATI = 0x893F;
+ public const int REG_31_ATI = 0x8940;
+ public const int REG_3_ATI = 0x8924;
+ public const int REG_4_ATI = 0x8925;
+ public const int REG_5_ATI = 0x8926;
+ public const int REG_6_ATI = 0x8927;
+ public const int REG_7_ATI = 0x8928;
+ public const int REG_8_ATI = 0x8929;
+ public const int REG_9_ATI = 0x892A;
+ public const int RELATIVE_ARC_TO_NV = 0xFF;
+ public const int RELATIVE_CONIC_CURVE_TO_NV = 0x1B;
+ public const int RELATIVE_CUBIC_CURVE_TO_NV = 0x0D;
+ public const int RELATIVE_HORIZONTAL_LINE_TO_NV = 0x07;
+ public const int RELATIVE_LARGE_CCW_ARC_TO_NV = 0x17;
+ public const int RELATIVE_LARGE_CW_ARC_TO_NV = 0x19;
+ public const int RELATIVE_LINE_TO_NV = 0x05;
+ public const int RELATIVE_MOVE_TO_NV = 0x03;
+ public const int RELATIVE_QUADRATIC_CURVE_TO_NV = 0x0B;
+ public const int RELATIVE_RECT_NV = 0xF7;
+ public const int RELATIVE_ROUNDED_RECT2_NV = 0xEB;
+ public const int RELATIVE_ROUNDED_RECT4_NV = 0xED;
+ public const int RELATIVE_ROUNDED_RECT8_NV = 0xEF;
+ public const int RELATIVE_ROUNDED_RECT_NV = 0xE9;
+ public const int RELATIVE_SMALL_CCW_ARC_TO_NV = 0x13;
+ public const int RELATIVE_SMALL_CW_ARC_TO_NV = 0x15;
+ public const int RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV = 0x11;
+ public const int RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV = 0x0F;
+ public const int RELATIVE_VERTICAL_LINE_TO_NV = 0x09;
+ public const int RELEASED_APPLE = 0x8A19;
+ public const int RENDERBUFFER = 0x8D41;
+ public const int RENDERBUFFER_ALPHA_SIZE = 0x8D53;
+ public const int RENDERBUFFER_ALPHA_SIZE_EXT = 0x8D53;
+ public const int RENDERBUFFER_BINDING = 0x8CA7;
+ public const int RENDERBUFFER_BINDING_EXT = 0x8CA7;
+ public const int RENDERBUFFER_BLUE_SIZE = 0x8D52;
+ public const int RENDERBUFFER_BLUE_SIZE_EXT = 0x8D52;
+ public const int RENDERBUFFER_COLOR_SAMPLES_NV = 0x8E10;
+ public const int RENDERBUFFER_COVERAGE_SAMPLES_NV = 0x8CAB;
+ public const int RENDERBUFFER_DEPTH_SIZE = 0x8D54;
+ public const int RENDERBUFFER_DEPTH_SIZE_EXT = 0x8D54;
+ public const int RENDERBUFFER_EXT = 0x8D41;
+ public const int RENDERBUFFER_FREE_MEMORY_ATI = 0x87FD;
+ public const int RENDERBUFFER_GREEN_SIZE = 0x8D51;
+ public const int RENDERBUFFER_GREEN_SIZE_EXT = 0x8D51;
+ public const int RENDERBUFFER_HEIGHT = 0x8D43;
+ public const int RENDERBUFFER_HEIGHT_EXT = 0x8D43;
+ public const int RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
+ public const int RENDERBUFFER_INTERNAL_FORMAT_EXT = 0x8D44;
+ public const int RENDERBUFFER_RED_SIZE = 0x8D50;
+ public const int RENDERBUFFER_RED_SIZE_EXT = 0x8D50;
+ public const int RENDERBUFFER_SAMPLES = 0x8CAB;
+ public const int RENDERBUFFER_SAMPLES_EXT = 0x8CAB;
+ public const int RENDERBUFFER_STENCIL_SIZE = 0x8D55;
+ public const int RENDERBUFFER_STENCIL_SIZE_EXT = 0x8D55;
+ public const int RENDERBUFFER_STORAGE_SAMPLES_AMD = 0x91B2;
+ public const int RENDERBUFFER_WIDTH = 0x8D42;
+ public const int RENDERBUFFER_WIDTH_EXT = 0x8D42;
+ public const int RENDERER = 0x1F01;
+ public const int RENDER_GPU_MASK_NV = 0x9558;
+ public const int REPEAT = 0x2901;
+ public const int REPLACE = 0x1E01;
+ public const int REPLACEMENT_CODE_ARRAY_POINTER_SUN = 0x85C3;
+ public const int REPLACEMENT_CODE_ARRAY_STRIDE_SUN = 0x85C2;
+ public const int REPLACEMENT_CODE_ARRAY_SUN = 0x85C0;
+ public const int REPLACEMENT_CODE_ARRAY_TYPE_SUN = 0x85C1;
+ public const int REPLACEMENT_CODE_SUN = 0x81D8;
+ public const int REPLACE_EXT = 0x8062;
+ public const int REPLACE_MIDDLE_SUN = 0x0002;
+ public const int REPLACE_OLDEST_SUN = 0x0003;
+ public const int REPLACE_VALUE_AMD = 0x874B;
+ public const int REPLICATE_BORDER_HP = 0x8153;
+ public const int REPRESENTATIVE_FRAGMENT_TEST_NV = 0x937F;
+ public const int RESAMPLE_AVERAGE_OML = 0x8988;
+ public const int RESAMPLE_DECIMATE_OML = 0x8989;
+ public const int RESAMPLE_DECIMATE_SGIX = 0x8430;
+ public const int RESAMPLE_REPLICATE_OML = 0x8986;
+ public const int RESAMPLE_REPLICATE_SGIX = 0x8433;
+ public const int RESAMPLE_ZERO_FILL_OML = 0x8987;
+ public const int RESAMPLE_ZERO_FILL_SGIX = 0x8434;
+ public const int RESCALE_NORMAL_EXT = 0x803A;
+ public const int RESET_NOTIFICATION_STRATEGY = 0x8256;
+ public const int RESET_NOTIFICATION_STRATEGY_ARB = 0x8256;
+ public const int RESTART_PATH_NV = 0xF0;
+ public const int RESTART_SUN = 0x0001;
+ public const int RETAINED_APPLE = 0x8A1B;
+ public const int RG = 0x8227;
+ public const int RG16 = 0x822C;
+ public const int RG16F = 0x822F;
+ public const int RG16F_EXT = 0x822F;
+ public const int RG16I = 0x8239;
+ public const int RG16UI = 0x823A;
+ public const int RG16_SNORM = 0x8F99;
+ public const int RG32F = 0x8230;
+ public const int RG32F_EXT = 0x8230;
+ public const int RG32I = 0x823B;
+ public const int RG32UI = 0x823C;
+ public const int RG8 = 0x822B;
+ public const int RG8I = 0x8237;
+ public const int RG8UI = 0x8238;
+ public const int RG8_EXT = 0x822B;
+ public const int RG8_SNORM = 0x8F95;
+ public const int RGB = 0x1907;
+ public const int RGB10 = 0x8052;
+ public const int RGB10_A2 = 0x8059;
+ public const int RGB10_A2UI = 0x906F;
+ public const int RGB10_A2_EXT = 0x8059;
+ public const int RGB10_EXT = 0x8052;
+ public const int RGB12 = 0x8053;
+ public const int RGB12_EXT = 0x8053;
+ public const int RGB16 = 0x8054;
+ public const int RGB16F = 0x881B;
+ public const int RGB16F_ARB = 0x881B;
+ public const int RGB16F_EXT = 0x881B;
+ public const int RGB16I = 0x8D89;
+ public const int RGB16I_EXT = 0x8D89;
+ public const int RGB16UI = 0x8D77;
+ public const int RGB16UI_EXT = 0x8D77;
+ public const int RGB16_EXT = 0x8054;
+ public const int RGB16_SNORM = 0x8F9A;
+ public const int RGB2_EXT = 0x804E;
+ public const int RGB32F = 0x8815;
+ public const int RGB32F_ARB = 0x8815;
+ public const int RGB32F_EXT = 0x8815;
+ public const int RGB32I = 0x8D83;
+ public const int RGB32I_EXT = 0x8D83;
+ public const int RGB32UI = 0x8D71;
+ public const int RGB32UI_EXT = 0x8D71;
+ public const int RGB4 = 0x804F;
+ public const int RGB4_EXT = 0x804F;
+ public const int RGB4_S3TC = 0x83A1;
+ public const int RGB5 = 0x8050;
+ public const int RGB565 = 0x8D62;
+ public const int RGB5_A1 = 0x8057;
+ public const int RGB5_A1_EXT = 0x8057;
+ public const int RGB5_EXT = 0x8050;
+ public const int RGB8 = 0x8051;
+ public const int RGB8I = 0x8D8F;
+ public const int RGB8I_EXT = 0x8D8F;
+ public const int RGB8UI = 0x8D7D;
+ public const int RGB8UI_EXT = 0x8D7D;
+ public const int RGB8_EXT = 0x8051;
+ public const int RGB8_SNORM = 0x8F96;
+ public const int RGB9_E5 = 0x8C3D;
+ public const int RGB9_E5_EXT = 0x8C3D;
+ public const int RGBA = 0x1908;
+ public const int RGBA12 = 0x805A;
+ public const int RGBA12_EXT = 0x805A;
+ public const int RGBA16 = 0x805B;
+ public const int RGBA16F = 0x881A;
+ public const int RGBA16F_ARB = 0x881A;
+ public const int RGBA16F_EXT = 0x881A;
+ public const int RGBA16I = 0x8D88;
+ public const int RGBA16I_EXT = 0x8D88;
+ public const int RGBA16UI = 0x8D76;
+ public const int RGBA16UI_EXT = 0x8D76;
+ public const int RGBA16_EXT = 0x805B;
+ public const int RGBA16_SNORM = 0x8F9B;
+ public const int RGBA2 = 0x8055;
+ public const int RGBA2_EXT = 0x8055;
+ public const int RGBA32F = 0x8814;
+ public const int RGBA32F_ARB = 0x8814;
+ public const int RGBA32F_EXT = 0x8814;
+ public const int RGBA32I = 0x8D82;
+ public const int RGBA32I_EXT = 0x8D82;
+ public const int RGBA32UI = 0x8D70;
+ public const int RGBA32UI_EXT = 0x8D70;
+ public const int RGBA4 = 0x8056;
+ public const int RGBA4_DXT5_S3TC = 0x83A5;
+ public const int RGBA4_EXT = 0x8056;
+ public const int RGBA4_S3TC = 0x83A3;
+ public const int RGBA8 = 0x8058;
+ public const int RGBA8I = 0x8D8E;
+ public const int RGBA8I_EXT = 0x8D8E;
+ public const int RGBA8UI = 0x8D7C;
+ public const int RGBA8UI_EXT = 0x8D7C;
+ public const int RGBA8_EXT = 0x8058;
+ public const int RGBA8_SNORM = 0x8F97;
+ public const int RGBA_DXT5_S3TC = 0x83A4;
+ public const int RGBA_FLOAT16_APPLE = 0x881A;
+ public const int RGBA_FLOAT16_ATI = 0x881A;
+ public const int RGBA_FLOAT32_APPLE = 0x8814;
+ public const int RGBA_FLOAT32_ATI = 0x8814;
+ public const int RGBA_FLOAT_MODE_ARB = 0x8820;
+ public const int RGBA_FLOAT_MODE_ATI = 0x8820;
+ public const int RGBA_INTEGER = 0x8D99;
+ public const int RGBA_INTEGER_EXT = 0x8D99;
+ public const int RGBA_INTEGER_MODE_EXT = 0x8D9E;
+ public const int RGBA_S3TC = 0x83A2;
+ public const int RGBA_SIGNED_COMPONENTS_EXT = 0x8C3C;
+ public const int RGBA_SNORM = 0x8F93;
+ public const int RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = 0x86D9;
+ public const int RGB_422_APPLE = 0x8A1F;
+ public const int RGB_FLOAT16_APPLE = 0x881B;
+ public const int RGB_FLOAT16_ATI = 0x881B;
+ public const int RGB_FLOAT32_APPLE = 0x8815;
+ public const int RGB_FLOAT32_ATI = 0x8815;
+ public const int RGB_INTEGER = 0x8D98;
+ public const int RGB_INTEGER_EXT = 0x8D98;
+ public const int RGB_RAW_422_APPLE = 0x8A51;
+ public const int RGB_S3TC = 0x83A0;
+ public const int RGB_SCALE_ARB = 0x8573;
+ public const int RGB_SCALE_EXT = 0x8573;
+ public const int RGB_SNORM = 0x8F92;
+ public const int RG_INTEGER = 0x8228;
+ public const int RG_SNORM = 0x8F91;
+ public const int RIGHT = 0x0407;
+ public const int ROUNDED_RECT2_NV = 0xEA;
+ public const int ROUNDED_RECT4_NV = 0xEC;
+ public const int ROUNDED_RECT8_NV = 0xEE;
+ public const int ROUNDED_RECT_NV = 0xE8;
+ public const int ROUND_NV = 0x90A4;
+ public const int SAMPLER = 0x82E6;
+ public const int SAMPLER_1D = 0x8B5D;
+ public const int SAMPLER_1D_ARB = 0x8B5D;
+ public const int SAMPLER_1D_ARRAY = 0x8DC0;
+ public const int SAMPLER_1D_ARRAY_EXT = 0x8DC0;
+ public const int SAMPLER_1D_ARRAY_SHADOW = 0x8DC3;
+ public const int SAMPLER_1D_ARRAY_SHADOW_EXT = 0x8DC3;
+ public const int SAMPLER_1D_SHADOW = 0x8B61;
+ public const int SAMPLER_1D_SHADOW_ARB = 0x8B61;
+ public const int SAMPLER_2D = 0x8B5E;
+ public const int SAMPLER_2D_ARB = 0x8B5E;
+ public const int SAMPLER_2D_ARRAY = 0x8DC1;
+ public const int SAMPLER_2D_ARRAY_EXT = 0x8DC1;
+ public const int SAMPLER_2D_ARRAY_SHADOW = 0x8DC4;
+ public const int SAMPLER_2D_ARRAY_SHADOW_EXT = 0x8DC4;
+ public const int SAMPLER_2D_MULTISAMPLE = 0x9108;
+ public const int SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B;
+ public const int SAMPLER_2D_RECT = 0x8B63;
+ public const int SAMPLER_2D_RECT_ARB = 0x8B63;
+ public const int SAMPLER_2D_RECT_SHADOW = 0x8B64;
+ public const int SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64;
+ public const int SAMPLER_2D_SHADOW = 0x8B62;
+ public const int SAMPLER_2D_SHADOW_ARB = 0x8B62;
+ public const int SAMPLER_3D = 0x8B5F;
+ public const int SAMPLER_3D_ARB = 0x8B5F;
+ public const int SAMPLER_BINDING = 0x8919;
+ public const int SAMPLER_BUFFER = 0x8DC2;
+ public const int SAMPLER_BUFFER_AMD = 0x9001;
+ public const int SAMPLER_BUFFER_EXT = 0x8DC2;
+ public const int SAMPLER_CUBE = 0x8B60;
+ public const int SAMPLER_CUBE_ARB = 0x8B60;
+ public const int SAMPLER_CUBE_MAP_ARRAY = 0x900C;
+ public const int SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900C;
+ public const int SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D;
+ public const int SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB = 0x900D;
+ public const int SAMPLER_CUBE_SHADOW = 0x8DC5;
+ public const int SAMPLER_CUBE_SHADOW_EXT = 0x8DC5;
+ public const int SAMPLER_OBJECT_AMD = 0x9155;
+ public const int SAMPLER_RENDERBUFFER_NV = 0x8E56;
+ public const int SAMPLES = 0x80A9;
+ public const int SAMPLES_3DFX = 0x86B4;
+ public const int SAMPLES_ARB = 0x80A9;
+ public const int SAMPLES_EXT = 0x80A9;
+ public const int SAMPLES_PASSED = 0x8914;
+ public const int SAMPLES_PASSED_ARB = 0x8914;
+ public const int SAMPLES_SGIS = 0x80A9;
+ public const int SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
+ public const int SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E;
+ public const int SAMPLE_ALPHA_TO_MASK_EXT = 0x809E;
+ public const int SAMPLE_ALPHA_TO_MASK_SGIS = 0x809E;
+ public const int SAMPLE_ALPHA_TO_ONE = 0x809F;
+ public const int SAMPLE_ALPHA_TO_ONE_ARB = 0x809F;
+ public const int SAMPLE_ALPHA_TO_ONE_EXT = 0x809F;
+ public const int SAMPLE_ALPHA_TO_ONE_SGIS = 0x809F;
+ public const int SAMPLE_BUFFERS = 0x80A8;
+ public const int SAMPLE_BUFFERS_3DFX = 0x86B3;
+ public const int SAMPLE_BUFFERS_ARB = 0x80A8;
+ public const int SAMPLE_BUFFERS_EXT = 0x80A8;
+ public const int SAMPLE_BUFFERS_SGIS = 0x80A8;
+ public const int SAMPLE_COVERAGE = 0x80A0;
+ public const int SAMPLE_COVERAGE_ARB = 0x80A0;
+ public const int SAMPLE_COVERAGE_INVERT = 0x80AB;
+ public const int SAMPLE_COVERAGE_INVERT_ARB = 0x80AB;
+ public const int SAMPLE_COVERAGE_VALUE = 0x80AA;
+ public const int SAMPLE_COVERAGE_VALUE_ARB = 0x80AA;
+ public const int SAMPLE_LOCATION_ARB = 0x8E50;
+ public const int SAMPLE_LOCATION_NV = 0x8E50;
+ public const int SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB = 0x933F;
+ public const int SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV = 0x933F;
+ public const int SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB = 0x933E;
+ public const int SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV = 0x933E;
+ public const int SAMPLE_LOCATION_SUBPIXEL_BITS_ARB = 0x933D;
+ public const int SAMPLE_LOCATION_SUBPIXEL_BITS_NV = 0x933D;
+ public const int SAMPLE_MASK = 0x8E51;
+ public const int SAMPLE_MASK_EXT = 0x80A0;
+ public const int SAMPLE_MASK_INVERT_EXT = 0x80AB;
+ public const int SAMPLE_MASK_INVERT_SGIS = 0x80AB;
+ public const int SAMPLE_MASK_NV = 0x8E51;
+ public const int SAMPLE_MASK_SGIS = 0x80A0;
+ public const int SAMPLE_MASK_VALUE = 0x8E52;
+ public const int SAMPLE_MASK_VALUE_EXT = 0x80AA;
+ public const int SAMPLE_MASK_VALUE_NV = 0x8E52;
+ public const int SAMPLE_MASK_VALUE_SGIS = 0x80AA;
+ public const int SAMPLE_PATTERN_EXT = 0x80AC;
+ public const int SAMPLE_PATTERN_SGIS = 0x80AC;
+ public const int SAMPLE_POSITION = 0x8E50;
+ public const int SAMPLE_POSITION_NV = 0x8E50;
+ public const int SAMPLE_SHADING = 0x8C36;
+ public const int SAMPLE_SHADING_ARB = 0x8C36;
+ public const int SATURATE_BIT_ATI = 0x00000040;
+ public const int SCALAR_EXT = 0x87BE;
+ public const int SCALEBIAS_HINT_SGIX = 0x8322;
+ public const int SCALED_RESOLVE_FASTEST_EXT = 0x90BA;
+ public const int SCALED_RESOLVE_NICEST_EXT = 0x90BB;
+ public const int SCALE_BY_FOUR_NV = 0x853F;
+ public const int SCALE_BY_ONE_HALF_NV = 0x8540;
+ public const int SCALE_BY_TWO_NV = 0x853E;
+ public const int SCISSOR_BOX = 0x0C10;
+ public const int SCISSOR_BOX_EXCLUSIVE_NV = 0x9556;
+ public const int SCISSOR_COMMAND_NV = 0x0011;
+ public const int SCISSOR_TEST = 0x0C11;
+ public const int SCISSOR_TEST_EXCLUSIVE_NV = 0x9555;
+ public const int SCREEN_COORDINATES_REND = 0x8490;
+ public const int SCREEN_KHR = 0x9295;
+ public const int SCREEN_NV = 0x9295;
+ public const int SECONDARY_COLOR_ARRAY_ADDRESS_NV = 0x8F27;
+ public const int SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x889C;
+ public const int SECONDARY_COLOR_ARRAY_EXT = 0x845E;
+ public const int SECONDARY_COLOR_ARRAY_LENGTH_NV = 0x8F31;
+ public const int SECONDARY_COLOR_ARRAY_LIST_IBM = 103077;
+ public const int SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM = 103087;
+ public const int SECONDARY_COLOR_ARRAY_POINTER_EXT = 0x845D;
+ public const int SECONDARY_COLOR_ARRAY_SIZE_EXT = 0x845A;
+ public const int SECONDARY_COLOR_ARRAY_STRIDE_EXT = 0x845C;
+ public const int SECONDARY_COLOR_ARRAY_TYPE_EXT = 0x845B;
+ public const int SECONDARY_COLOR_NV = 0x852D;
+ public const int SECONDARY_INTERPOLATOR_ATI = 0x896D;
+ public const int SEMAPHORE_TYPE_BINARY_NV = 0x95B4;
+ public const int SEMAPHORE_TYPE_NV = 0x95B3;
+ public const int SEMAPHORE_TYPE_TIMELINE_NV = 0x95B5;
+ public const int SEPARABLE_2D_EXT = 0x8012;
+ public const int SEPARATE_ATTRIBS = 0x8C8D;
+ public const int SEPARATE_ATTRIBS_EXT = 0x8C8D;
+ public const int SEPARATE_ATTRIBS_NV = 0x8C8D;
+ public const int SEPARATE_SPECULAR_COLOR_EXT = 0x81FA;
+ public const int SET = 0x150F;
+ public const int SET_AMD = 0x874A;
+ public const int SHADER = 0x82E1;
+ public const int SHADER_BINARY_FORMATS = 0x8DF8;
+ public const int SHADER_BINARY_FORMAT_SPIR_V = 0x9551;
+ public const int SHADER_BINARY_FORMAT_SPIR_V_ARB = 0x9551;
+ public const int SHADER_COMPILER = 0x8DFA;
+ public const int SHADER_CONSISTENT_NV = 0x86DD;
+ public const int SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV = 0x00000010;
+ public const int SHADER_IMAGE_ACCESS_BARRIER_BIT = 0x00000020;
+ public const int SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT = 0x00000020;
+ public const int SHADER_IMAGE_ATOMIC = 0x82A6;
+ public const int SHADER_IMAGE_LOAD = 0x82A4;
+ public const int SHADER_IMAGE_STORE = 0x82A5;
+ public const int SHADER_INCLUDE_ARB = 0x8DAE;
+ public const int SHADER_OBJECT_ARB = 0x8B48;
+ public const int SHADER_OBJECT_EXT = 0x8B48;
+ public const int SHADER_OPERATION_NV = 0x86DF;
+ public const int SHADER_SOURCE_LENGTH = 0x8B88;
+ public const int SHADER_STORAGE_BARRIER_BIT = 0x00002000;
+ public const int SHADER_STORAGE_BLOCK = 0x92E6;
+ public const int SHADER_STORAGE_BUFFER = 0x90D2;
+ public const int SHADER_STORAGE_BUFFER_BINDING = 0x90D3;
+ public const int SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = 0x90DF;
+ public const int SHADER_STORAGE_BUFFER_SIZE = 0x90D5;
+ public const int SHADER_STORAGE_BUFFER_START = 0x90D4;
+ public const int SHADER_TYPE = 0x8B4F;
+ public const int SHADING_LANGUAGE_VERSION = 0x8B8C;
+ public const int SHADING_LANGUAGE_VERSION_ARB = 0x8B8C;
+ public const int SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV = 0x956F;
+ public const int SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV = 0x9566;
+ public const int SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV = 0x9567;
+ public const int SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV = 0x9568;
+ public const int SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV = 0x9569;
+ public const int SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV = 0x956A;
+ public const int SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV = 0x956B;
+ public const int SHADING_RATE_1_INVOCATION_PER_PIXEL_NV = 0x9565;
+ public const int SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV = 0x956C;
+ public const int SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV = 0x956D;
+ public const int SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV = 0x956E;
+ public const int SHADING_RATE_IMAGE_BINDING_NV = 0x955B;
+ public const int SHADING_RATE_IMAGE_NV = 0x9563;
+ public const int SHADING_RATE_IMAGE_PALETTE_COUNT_NV = 0x95B2;
+ public const int SHADING_RATE_IMAGE_PALETTE_SIZE_NV = 0x955E;
+ public const int SHADING_RATE_IMAGE_PER_PRIMITIVE_NV = 0x95B1;
+ public const int SHADING_RATE_IMAGE_TEXEL_HEIGHT_NV = 0x955D;
+ public const int SHADING_RATE_IMAGE_TEXEL_WIDTH_NV = 0x955C;
+ public const int SHADING_RATE_NO_INVOCATIONS_NV = 0x9564;
+ public const int SHADING_RATE_SAMPLE_ORDER_DEFAULT_NV = 0x95AE;
+ public const int SHADING_RATE_SAMPLE_ORDER_PIXEL_MAJOR_NV = 0x95AF;
+ public const int SHADING_RATE_SAMPLE_ORDER_SAMPLE_MAJOR_NV = 0x95B0;
+ public const int SHADOW_AMBIENT_SGIX = 0x80BF;
+ public const int SHADOW_ATTENUATION_EXT = 0x834E;
+ public const int SHARED_EDGE_NV = 0xC0;
+ public const int SHARED_TEXTURE_PALETTE_EXT = 0x81FB;
+ public const int SHARPEN_TEXTURE_FUNC_POINTS_SGIS = 0x80B0;
+ public const int SHORT = 0x1402;
+ public const int SIGNALED = 0x9119;
+ public const int SIGNED_ALPHA8_NV = 0x8706;
+ public const int SIGNED_ALPHA_NV = 0x8705;
+ public const int SIGNED_HILO16_NV = 0x86FA;
+ public const int SIGNED_HILO8_NV = 0x885F;
+ public const int SIGNED_HILO_NV = 0x86F9;
+ public const int SIGNED_IDENTITY_NV = 0x853C;
+ public const int SIGNED_INTENSITY8_NV = 0x8708;
+ public const int SIGNED_INTENSITY_NV = 0x8707;
+ public const int SIGNED_LUMINANCE8_ALPHA8_NV = 0x8704;
+ public const int SIGNED_LUMINANCE8_NV = 0x8702;
+ public const int SIGNED_LUMINANCE_ALPHA_NV = 0x8703;
+ public const int SIGNED_LUMINANCE_NV = 0x8701;
+ public const int SIGNED_NEGATE_NV = 0x853D;
+ public const int SIGNED_NORMALIZED = 0x8F9C;
+ public const int SIGNED_RGB8_NV = 0x86FF;
+ public const int SIGNED_RGB8_UNSIGNED_ALPHA8_NV = 0x870D;
+ public const int SIGNED_RGBA8_NV = 0x86FC;
+ public const int SIGNED_RGBA_NV = 0x86FB;
+ public const int SIGNED_RGB_NV = 0x86FE;
+ public const int SIGNED_RGB_UNSIGNED_ALPHA_NV = 0x870C;
+ public const int SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = 0x82AC;
+ public const int SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = 0x82AE;
+ public const int SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = 0x82AD;
+ public const int SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = 0x82AF;
+ public const int SINGLE_COLOR_EXT = 0x81F9;
+ public const int SKIP_COMPONENTS1_NV = -6;
+ public const int SKIP_COMPONENTS2_NV = -5;
+ public const int SKIP_COMPONENTS3_NV = -4;
+ public const int SKIP_COMPONENTS4_NV = -3;
+ public const int SKIP_DECODE_EXT = 0x8A4A;
+ public const int SKIP_MISSING_GLYPH_NV = 0x90A9;
+ public const int SLICE_ACCUM_SUN = 0x85CC;
+ public const int SLUMINANCE8_ALPHA8_EXT = 0x8C45;
+ public const int SLUMINANCE8_EXT = 0x8C47;
+ public const int SLUMINANCE_ALPHA_EXT = 0x8C44;
+ public const int SLUMINANCE_EXT = 0x8C46;
+ public const int SMALL_CCW_ARC_TO_NV = 0x12;
+ public const int SMALL_CW_ARC_TO_NV = 0x14;
+ public const int SMOOTH_CUBIC_CURVE_TO_NV = 0x10;
+ public const int SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23;
+ public const int SMOOTH_LINE_WIDTH_RANGE = 0x0B22;
+ public const int SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13;
+ public const int SMOOTH_POINT_SIZE_RANGE = 0x0B12;
+ public const int SMOOTH_QUADRATIC_CURVE_TO_NV = 0x0E;
+ public const int SM_COUNT_NV = 0x933B;
+ public const int SOFTLIGHT_KHR = 0x929C;
+ public const int SOFTLIGHT_NV = 0x929C;
+ public const int SOURCE0_ALPHA_ARB = 0x8588;
+ public const int SOURCE0_ALPHA_EXT = 0x8588;
+ public const int SOURCE0_RGB_ARB = 0x8580;
+ public const int SOURCE0_RGB_EXT = 0x8580;
+ public const int SOURCE1_ALPHA = 0x8589;
+ public const int SOURCE1_ALPHA_ARB = 0x8589;
+ public const int SOURCE1_ALPHA_EXT = 0x8589;
+ public const int SOURCE1_RGB_ARB = 0x8581;
+ public const int SOURCE1_RGB_EXT = 0x8581;
+ public const int SOURCE2_ALPHA_ARB = 0x858A;
+ public const int SOURCE2_ALPHA_EXT = 0x858A;
+ public const int SOURCE2_RGB_ARB = 0x8582;
+ public const int SOURCE2_RGB_EXT = 0x8582;
+ public const int SOURCE3_ALPHA_NV = 0x858B;
+ public const int SOURCE3_RGB_NV = 0x8583;
+ public const int SPARE0_NV = 0x852E;
+ public const int SPARE0_PLUS_SECONDARY_COLOR_NV = 0x8532;
+ public const int SPARE1_NV = 0x852F;
+ public const int SPARSE_BUFFER_PAGE_SIZE_ARB = 0x82F8;
+ public const int SPARSE_STORAGE_BIT_ARB = 0x0400;
+ public const int SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB = 0x91A9;
+ public const int SPIR_V_BINARY = 0x9552;
+ public const int SPIR_V_BINARY_ARB = 0x9552;
+ public const int SPIR_V_EXTENSIONS = 0x9553;
+ public const int SPRITE_AXIAL_SGIX = 0x814C;
+ public const int SPRITE_AXIS_SGIX = 0x814A;
+ public const int SPRITE_EYE_ALIGNED_SGIX = 0x814E;
+ public const int SPRITE_MODE_SGIX = 0x8149;
+ public const int SPRITE_OBJECT_ALIGNED_SGIX = 0x814D;
+ public const int SPRITE_SGIX = 0x8148;
+ public const int SPRITE_TRANSLATION_SGIX = 0x814B;
+ public const int SQUARE_NV = 0x90A3;
+ public const int SR8_EXT = 0x8FBD;
+ public const int SRC1_ALPHA = 0x8589;
+ public const int SRC1_COLOR = 0x88F9;
+ public const int SRC_ALPHA = 0x0302;
+ public const int SRC_ALPHA_SATURATE = 0x0308;
+ public const int SRC_ATOP_NV = 0x928E;
+ public const int SRC_COLOR = 0x0300;
+ public const int SRC_IN_NV = 0x928A;
+ public const int SRC_NV = 0x9286;
+ public const int SRC_OUT_NV = 0x928C;
+ public const int SRC_OVER_NV = 0x9288;
+ public const int SRG8_EXT = 0x8FBE;
+ public const int SRGB = 0x8C40;
+ public const int SRGB8 = 0x8C41;
+ public const int SRGB8_ALPHA8 = 0x8C43;
+ public const int SRGB8_ALPHA8_EXT = 0x8C43;
+ public const int SRGB8_EXT = 0x8C41;
+ public const int SRGB_ALPHA = 0x8C42;
+ public const int SRGB_ALPHA_EXT = 0x8C42;
+ public const int SRGB_DECODE_ARB = 0x8299;
+ public const int SRGB_EXT = 0x8C40;
+ public const int SRGB_READ = 0x8297;
+ public const int SRGB_WRITE = 0x8298;
+ public const int STACK_OVERFLOW = 0x0503;
+ public const int STACK_UNDERFLOW = 0x0504;
+ public const int STANDARD_FONT_FORMAT_NV = 0x936C;
+ public const int STANDARD_FONT_NAME_NV = 0x9072;
+ public const int STATIC_ATI = 0x8760;
+ public const int STATIC_COPY = 0x88E6;
+ public const int STATIC_COPY_ARB = 0x88E6;
+ public const int STATIC_DRAW = 0x88E4;
+ public const int STATIC_DRAW_ARB = 0x88E4;
+ public const int STATIC_READ = 0x88E5;
+ public const int STATIC_READ_ARB = 0x88E5;
+ public const int STATIC_VERTEX_ARRAY_IBM = 103061;
+ public const int STENCIL = 0x1802;
+ public const int STENCIL_ATTACHMENT = 0x8D20;
+ public const int STENCIL_ATTACHMENT_EXT = 0x8D20;
+ public const int STENCIL_BACK_FAIL = 0x8801;
+ public const int STENCIL_BACK_FAIL_ATI = 0x8801;
+ public const int STENCIL_BACK_FUNC = 0x8800;
+ public const int STENCIL_BACK_FUNC_ATI = 0x8800;
+ public const int STENCIL_BACK_OP_VALUE_AMD = 0x874D;
+ public const int STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
+ public const int STENCIL_BACK_PASS_DEPTH_FAIL_ATI = 0x8802;
+ public const int STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
+ public const int STENCIL_BACK_PASS_DEPTH_PASS_ATI = 0x8803;
+ public const int STENCIL_BACK_REF = 0x8CA3;
+ public const int STENCIL_BACK_VALUE_MASK = 0x8CA4;
+ public const int STENCIL_BACK_WRITEMASK = 0x8CA5;
+ public const int STENCIL_BUFFER_BIT = 0x00000400;
+ public const int STENCIL_CLEAR_TAG_VALUE_EXT = 0x88F3;
+ public const int STENCIL_CLEAR_VALUE = 0x0B91;
+ public const int STENCIL_COMPONENTS = 0x8285;
+ public const int STENCIL_FAIL = 0x0B94;
+ public const int STENCIL_FUNC = 0x0B92;
+ public const int STENCIL_INDEX = 0x1901;
+ public const int STENCIL_INDEX1 = 0x8D46;
+ public const int STENCIL_INDEX16 = 0x8D49;
+ public const int STENCIL_INDEX16_EXT = 0x8D49;
+ public const int STENCIL_INDEX1_EXT = 0x8D46;
+ public const int STENCIL_INDEX4 = 0x8D47;
+ public const int STENCIL_INDEX4_EXT = 0x8D47;
+ public const int STENCIL_INDEX8 = 0x8D48;
+ public const int STENCIL_INDEX8_EXT = 0x8D48;
+ public const int STENCIL_OP_VALUE_AMD = 0x874C;
+ public const int STENCIL_PASS_DEPTH_FAIL = 0x0B95;
+ public const int STENCIL_PASS_DEPTH_PASS = 0x0B96;
+ public const int STENCIL_REF = 0x0B97;
+ public const int STENCIL_REF_COMMAND_NV = 0x000C;
+ public const int STENCIL_RENDERABLE = 0x8288;
+ public const int STENCIL_SAMPLES_NV = 0x932E;
+ public const int STENCIL_TAG_BITS_EXT = 0x88F2;
+ public const int STENCIL_TEST = 0x0B90;
+ public const int STENCIL_TEST_TWO_SIDE_EXT = 0x8910;
+ public const int STENCIL_VALUE_MASK = 0x0B93;
+ public const int STENCIL_WRITEMASK = 0x0B98;
+ public const int STEREO = 0x0C33;
+ public const int STORAGE_CACHED_APPLE = 0x85BE;
+ public const int STORAGE_CLIENT_APPLE = 0x85B4;
+ public const int STORAGE_PRIVATE_APPLE = 0x85BD;
+ public const int STORAGE_SHARED_APPLE = 0x85BF;
+ public const int STREAM_COPY = 0x88E2;
+ public const int STREAM_COPY_ARB = 0x88E2;
+ public const int STREAM_DRAW = 0x88E0;
+ public const int STREAM_DRAW_ARB = 0x88E0;
+ public const int STREAM_RASTERIZATION_AMD = 0x91A0;
+ public const int STREAM_READ = 0x88E1;
+ public const int STREAM_READ_ARB = 0x88E1;
+ public const int STRICT_DEPTHFUNC_HINT_PGI = 0x1A216;
+ public const int STRICT_LIGHTING_HINT_PGI = 0x1A217;
+ public const int STRICT_SCISSOR_HINT_PGI = 0x1A218;
+ public const int SUBGROUP_FEATURE_ARITHMETIC_BIT_KHR = 0x00000004;
+ public const int SUBGROUP_FEATURE_BALLOT_BIT_KHR = 0x00000008;
+ public const int SUBGROUP_FEATURE_BASIC_BIT_KHR = 0x00000001;
+ public const int SUBGROUP_FEATURE_CLUSTERED_BIT_KHR = 0x00000040;
+ public const int SUBGROUP_FEATURE_PARTITIONED_BIT_NV = 0x00000100;
+ public const int SUBGROUP_FEATURE_QUAD_BIT_KHR = 0x00000080;
+ public const int SUBGROUP_FEATURE_SHUFFLE_BIT_KHR = 0x00000010;
+ public const int SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT_KHR = 0x00000020;
+ public const int SUBGROUP_FEATURE_VOTE_BIT_KHR = 0x00000002;
+ public const int SUBGROUP_QUAD_ALL_STAGES_KHR = 0x9535;
+ public const int SUBGROUP_SIZE_KHR = 0x9532;
+ public const int SUBGROUP_SUPPORTED_FEATURES_KHR = 0x9534;
+ public const int SUBGROUP_SUPPORTED_STAGES_KHR = 0x9533;
+ public const int SUBPIXEL_BITS = 0x0D50;
+ public const int SUBPIXEL_PRECISION_BIAS_X_BITS_NV = 0x9347;
+ public const int SUBPIXEL_PRECISION_BIAS_Y_BITS_NV = 0x9348;
+ public const int SUBSAMPLE_DISTANCE_AMD = 0x883F;
+ public const int SUBTRACT_ARB = 0x84E7;
+ public const int SUB_ATI = 0x8965;
+ public const int SUCCESS_NV = 0x902F;
+ public const int SUPERSAMPLE_SCALE_X_NV = 0x9372;
+ public const int SUPERSAMPLE_SCALE_Y_NV = 0x9373;
+ public const int SUPPORTED_MULTISAMPLE_MODES_AMD = 0x91B7;
+ public const int SURFACE_MAPPED_NV = 0x8700;
+ public const int SURFACE_REGISTERED_NV = 0x86FD;
+ public const int SURFACE_STATE_NV = 0x86EB;
+ public const int SWIZZLE_STQ_ATI = 0x8977;
+ public const int SWIZZLE_STQ_DQ_ATI = 0x8979;
+ public const int SWIZZLE_STRQ_ATI = 0x897A;
+ public const int SWIZZLE_STRQ_DQ_ATI = 0x897B;
+ public const int SWIZZLE_STR_ATI = 0x8976;
+ public const int SWIZZLE_STR_DR_ATI = 0x8978;
+ public const int SYNC_CL_EVENT_ARB = 0x8240;
+ public const int SYNC_CL_EVENT_COMPLETE_ARB = 0x8241;
+ public const int SYNC_CONDITION = 0x9113;
+ public const int SYNC_FENCE = 0x9116;
+ public const int SYNC_FLAGS = 0x9115;
+ public const int SYNC_FLUSH_COMMANDS_BIT = 0x00000001;
+ public const int SYNC_GPU_COMMANDS_COMPLETE = 0x9117;
+ public const int SYNC_STATUS = 0x9114;
+ public const int SYNC_X11_FENCE_EXT = 0x90E1;
+ public const int SYSTEM_FONT_NAME_NV = 0x9073;
+ public const int T2F_IUI_N3F_V2F_EXT = 0x81B3;
+ public const int T2F_IUI_N3F_V3F_EXT = 0x81B4;
+ public const int T2F_IUI_V2F_EXT = 0x81B1;
+ public const int T2F_IUI_V3F_EXT = 0x81B2;
+ public const int TABLE_TOO_LARGE_EXT = 0x8031;
+ public const int TANGENT_ARRAY_EXT = 0x8439;
+ public const int TANGENT_ARRAY_POINTER_EXT = 0x8442;
+ public const int TANGENT_ARRAY_STRIDE_EXT = 0x843F;
+ public const int TANGENT_ARRAY_TYPE_EXT = 0x843E;
+ public const int TASK_SHADER_BIT_NV = 0x00000080;
+ public const int TASK_SHADER_NV = 0x955A;
+ public const int TASK_SUBROUTINE_NV = 0x957D;
+ public const int TASK_SUBROUTINE_UNIFORM_NV = 0x957F;
+ public const int TASK_WORK_GROUP_SIZE_NV = 0x953F;
+ public const int TERMINATE_SEQUENCE_COMMAND_NV = 0x0000;
+ public const int TESSELLATION_FACTOR_AMD = 0x9005;
+ public const int TESSELLATION_MODE_AMD = 0x9004;
+ public const int TESS_CONTROL_OUTPUT_VERTICES = 0x8E75;
+ public const int TESS_CONTROL_PROGRAM_NV = 0x891E;
+ public const int TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV = 0x8C74;
+ public const int TESS_CONTROL_SHADER = 0x8E88;
+ public const int TESS_CONTROL_SHADER_BIT = 0x00000008;
+ public const int TESS_CONTROL_SHADER_PATCHES = 0x82F1;
+ public const int TESS_CONTROL_SHADER_PATCHES_ARB = 0x82F1;
+ public const int TESS_CONTROL_SUBROUTINE = 0x92E9;
+ public const int TESS_CONTROL_SUBROUTINE_UNIFORM = 0x92EF;
+ public const int TESS_CONTROL_TEXTURE = 0x829C;
+ public const int TESS_EVALUATION_PROGRAM_NV = 0x891F;
+ public const int TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV = 0x8C75;
+ public const int TESS_EVALUATION_SHADER = 0x8E87;
+ public const int TESS_EVALUATION_SHADER_BIT = 0x00000010;
+ public const int TESS_EVALUATION_SHADER_INVOCATIONS = 0x82F2;
+ public const int TESS_EVALUATION_SHADER_INVOCATIONS_ARB = 0x82F2;
+ public const int TESS_EVALUATION_SUBROUTINE = 0x92EA;
+ public const int TESS_EVALUATION_SUBROUTINE_UNIFORM = 0x92F0;
+ public const int TESS_EVALUATION_TEXTURE = 0x829D;
+ public const int TESS_GEN_MODE = 0x8E76;
+ public const int TESS_GEN_POINT_MODE = 0x8E79;
+ public const int TESS_GEN_SPACING = 0x8E77;
+ public const int TESS_GEN_VERTEX_ORDER = 0x8E78;
+ public const int TEXCOORD1_BIT_PGI = 0x10000000;
+ public const int TEXCOORD2_BIT_PGI = 0x20000000;
+ public const int TEXCOORD3_BIT_PGI = 0x40000000;
+ public const uint TEXCOORD4_BIT_PGI = 0x80000000;
+ public const int TEXTURE = 0x1702;
+ public const int TEXTURE0 = 0x84C0;
+ public const int TEXTURE0_ARB = 0x84C0;
+ public const int TEXTURE1 = 0x84C1;
+ public const int TEXTURE10 = 0x84CA;
+ public const int TEXTURE10_ARB = 0x84CA;
+ public const int TEXTURE11 = 0x84CB;
+ public const int TEXTURE11_ARB = 0x84CB;
+ public const int TEXTURE12 = 0x84CC;
+ public const int TEXTURE12_ARB = 0x84CC;
+ public const int TEXTURE13 = 0x84CD;
+ public const int TEXTURE13_ARB = 0x84CD;
+ public const int TEXTURE14 = 0x84CE;
+ public const int TEXTURE14_ARB = 0x84CE;
+ public const int TEXTURE15 = 0x84CF;
+ public const int TEXTURE15_ARB = 0x84CF;
+ public const int TEXTURE16 = 0x84D0;
+ public const int TEXTURE16_ARB = 0x84D0;
+ public const int TEXTURE17 = 0x84D1;
+ public const int TEXTURE17_ARB = 0x84D1;
+ public const int TEXTURE18 = 0x84D2;
+ public const int TEXTURE18_ARB = 0x84D2;
+ public const int TEXTURE19 = 0x84D3;
+ public const int TEXTURE19_ARB = 0x84D3;
+ public const int TEXTURE1_ARB = 0x84C1;
+ public const int TEXTURE2 = 0x84C2;
+ public const int TEXTURE20 = 0x84D4;
+ public const int TEXTURE20_ARB = 0x84D4;
+ public const int TEXTURE21 = 0x84D5;
+ public const int TEXTURE21_ARB = 0x84D5;
+ public const int TEXTURE22 = 0x84D6;
+ public const int TEXTURE22_ARB = 0x84D6;
+ public const int TEXTURE23 = 0x84D7;
+ public const int TEXTURE23_ARB = 0x84D7;
+ public const int TEXTURE24 = 0x84D8;
+ public const int TEXTURE24_ARB = 0x84D8;
+ public const int TEXTURE25 = 0x84D9;
+ public const int TEXTURE25_ARB = 0x84D9;
+ public const int TEXTURE26 = 0x84DA;
+ public const int TEXTURE26_ARB = 0x84DA;
+ public const int TEXTURE27 = 0x84DB;
+ public const int TEXTURE27_ARB = 0x84DB;
+ public const int TEXTURE28 = 0x84DC;
+ public const int TEXTURE28_ARB = 0x84DC;
+ public const int TEXTURE29 = 0x84DD;
+ public const int TEXTURE29_ARB = 0x84DD;
+ public const int TEXTURE2_ARB = 0x84C2;
+ public const int TEXTURE3 = 0x84C3;
+ public const int TEXTURE30 = 0x84DE;
+ public const int TEXTURE30_ARB = 0x84DE;
+ public const int TEXTURE31 = 0x84DF;
+ public const int TEXTURE31_ARB = 0x84DF;
+ public const int TEXTURE3_ARB = 0x84C3;
+ public const int TEXTURE4 = 0x84C4;
+ public const int TEXTURE4_ARB = 0x84C4;
+ public const int TEXTURE5 = 0x84C5;
+ public const int TEXTURE5_ARB = 0x84C5;
+ public const int TEXTURE6 = 0x84C6;
+ public const int TEXTURE6_ARB = 0x84C6;
+ public const int TEXTURE7 = 0x84C7;
+ public const int TEXTURE7_ARB = 0x84C7;
+ public const int TEXTURE8 = 0x84C8;
+ public const int TEXTURE8_ARB = 0x84C8;
+ public const int TEXTURE9 = 0x84C9;
+ public const int TEXTURE9_ARB = 0x84C9;
+ public const int TEXTURE_1D = 0x0DE0;
+ public const int TEXTURE_1D_ARRAY = 0x8C18;
+ public const int TEXTURE_1D_ARRAY_EXT = 0x8C18;
+ public const int TEXTURE_1D_BINDING_EXT = 0x8068;
+ public const int TEXTURE_1D_STACK_BINDING_MESAX = 0x875D;
+ public const int TEXTURE_1D_STACK_MESAX = 0x8759;
+ public const int TEXTURE_2D = 0x0DE1;
+ public const int TEXTURE_2D_ARRAY = 0x8C1A;
+ public const int TEXTURE_2D_ARRAY_EXT = 0x8C1A;
+ public const int TEXTURE_2D_BINDING_EXT = 0x8069;
+ public const int TEXTURE_2D_MULTISAMPLE = 0x9100;
+ public const int TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102;
+ public const int TEXTURE_2D_STACK_BINDING_MESAX = 0x875E;
+ public const int TEXTURE_2D_STACK_MESAX = 0x875A;
+ public const int TEXTURE_3D = 0x806F;
+ public const int TEXTURE_3D_BINDING_EXT = 0x806A;
+ public const int TEXTURE_3D_EXT = 0x806F;
+ public const int TEXTURE_4DSIZE_SGIS = 0x8136;
+ public const int TEXTURE_4D_BINDING_SGIS = 0x814F;
+ public const int TEXTURE_4D_SGIS = 0x8134;
+ public const int TEXTURE_ALPHA_SIZE = 0x805F;
+ public const int TEXTURE_ALPHA_SIZE_EXT = 0x805F;
+ public const int TEXTURE_ALPHA_TYPE = 0x8C13;
+ public const int TEXTURE_ALPHA_TYPE_ARB = 0x8C13;
+ public const int TEXTURE_APPLICATION_MODE_EXT = 0x834F;
+ public const int TEXTURE_BASE_LEVEL = 0x813C;
+ public const int TEXTURE_BASE_LEVEL_SGIS = 0x813C;
+ public const int TEXTURE_BINDING_1D = 0x8068;
+ public const int TEXTURE_BINDING_1D_ARRAY = 0x8C1C;
+ public const int TEXTURE_BINDING_1D_ARRAY_EXT = 0x8C1C;
+ public const int TEXTURE_BINDING_2D = 0x8069;
+ public const int TEXTURE_BINDING_2D_ARRAY = 0x8C1D;
+ public const int TEXTURE_BINDING_2D_ARRAY_EXT = 0x8C1D;
+ public const int TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104;
+ public const int TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105;
+ public const int TEXTURE_BINDING_3D = 0x806A;
+ public const int TEXTURE_BINDING_BUFFER = 0x8C2C;
+ public const int TEXTURE_BINDING_BUFFER_ARB = 0x8C2C;
+ public const int TEXTURE_BINDING_BUFFER_EXT = 0x8C2C;
+ public const int TEXTURE_BINDING_CUBE_MAP = 0x8514;
+ public const int TEXTURE_BINDING_CUBE_MAP_ARB = 0x8514;
+ public const int TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A;
+ public const int TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB = 0x900A;
+ public const int TEXTURE_BINDING_CUBE_MAP_EXT = 0x8514;
+ public const int TEXTURE_BINDING_RECTANGLE = 0x84F6;
+ public const int TEXTURE_BINDING_RECTANGLE_ARB = 0x84F6;
+ public const int TEXTURE_BINDING_RECTANGLE_NV = 0x84F6;
+ public const int TEXTURE_BINDING_RENDERBUFFER_NV = 0x8E53;
+ public const int TEXTURE_BLUE_SIZE = 0x805E;
+ public const int TEXTURE_BLUE_SIZE_EXT = 0x805E;
+ public const int TEXTURE_BLUE_TYPE = 0x8C12;
+ public const int TEXTURE_BLUE_TYPE_ARB = 0x8C12;
+ public const int TEXTURE_BORDER_COLOR = 0x1004;
+ public const int TEXTURE_BORDER_VALUES_NV = 0x871A;
+ public const int TEXTURE_BUFFER = 0x8C2A;
+ public const int TEXTURE_BUFFER_ARB = 0x8C2A;
+ public const int TEXTURE_BUFFER_BINDING = 0x8C2A;
+ public const int TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D;
+ public const int TEXTURE_BUFFER_DATA_STORE_BINDING_ARB = 0x8C2D;
+ public const int TEXTURE_BUFFER_DATA_STORE_BINDING_EXT = 0x8C2D;
+ public const int TEXTURE_BUFFER_EXT = 0x8C2A;
+ public const int TEXTURE_BUFFER_FORMAT_ARB = 0x8C2E;
+ public const int TEXTURE_BUFFER_FORMAT_EXT = 0x8C2E;
+ public const int TEXTURE_BUFFER_OFFSET = 0x919D;
+ public const int TEXTURE_BUFFER_OFFSET_ALIGNMENT = 0x919F;
+ public const int TEXTURE_BUFFER_SIZE = 0x919E;
+ public const int TEXTURE_CLIPMAP_CENTER_SGIX = 0x8171;
+ public const int TEXTURE_CLIPMAP_DEPTH_SGIX = 0x8176;
+ public const int TEXTURE_CLIPMAP_FRAME_SGIX = 0x8172;
+ public const int TEXTURE_CLIPMAP_LOD_OFFSET_SGIX = 0x8175;
+ public const int TEXTURE_CLIPMAP_OFFSET_SGIX = 0x8173;
+ public const int TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX = 0x8174;
+ public const int TEXTURE_COLOR_SAMPLES_NV = 0x9046;
+ public const int TEXTURE_COLOR_TABLE_SGI = 0x80BC;
+ public const int TEXTURE_COLOR_WRITEMASK_SGIS = 0x81EF;
+ public const int TEXTURE_COMPARE_FAIL_VALUE_ARB = 0x80BF;
+ public const int TEXTURE_COMPARE_FUNC = 0x884D;
+ public const int TEXTURE_COMPARE_FUNC_ARB = 0x884D;
+ public const int TEXTURE_COMPARE_MODE = 0x884C;
+ public const int TEXTURE_COMPARE_MODE_ARB = 0x884C;
+ public const int TEXTURE_COMPARE_OPERATOR_SGIX = 0x819B;
+ public const int TEXTURE_COMPARE_SGIX = 0x819A;
+ public const int TEXTURE_COMPRESSED = 0x86A1;
+ public const int TEXTURE_COMPRESSED_ARB = 0x86A1;
+ public const int TEXTURE_COMPRESSED_BLOCK_HEIGHT = 0x82B2;
+ public const int TEXTURE_COMPRESSED_BLOCK_SIZE = 0x82B3;
+ public const int TEXTURE_COMPRESSED_BLOCK_WIDTH = 0x82B1;
+ public const int TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0;
+ public const int TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = 0x86A0;
+ public const int TEXTURE_COMPRESSION_HINT = 0x84EF;
+ public const int TEXTURE_COMPRESSION_HINT_ARB = 0x84EF;
+ public const int TEXTURE_CONSTANT_DATA_SUNX = 0x81D6;
+ public const int TEXTURE_COORD_ARRAY_ADDRESS_NV = 0x8F25;
+ public const int TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB = 0x889A;
+ public const int TEXTURE_COORD_ARRAY_COUNT_EXT = 0x808B;
+ public const int TEXTURE_COORD_ARRAY_EXT = 0x8078;
+ public const int TEXTURE_COORD_ARRAY_LENGTH_NV = 0x8F2F;
+ public const int TEXTURE_COORD_ARRAY_LIST_IBM = 103074;
+ public const int TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM = 103084;
+ public const int TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F8;
+ public const int TEXTURE_COORD_ARRAY_POINTER_EXT = 0x8092;
+ public const int TEXTURE_COORD_ARRAY_SIZE_EXT = 0x8088;
+ public const int TEXTURE_COORD_ARRAY_STRIDE_EXT = 0x808A;
+ public const int TEXTURE_COORD_ARRAY_TYPE_EXT = 0x8089;
+ public const int TEXTURE_COORD_NV = 0x8C79;
+ public const int TEXTURE_COVERAGE_SAMPLES_NV = 0x9045;
+ public const int TEXTURE_CUBE_MAP = 0x8513;
+ public const int TEXTURE_CUBE_MAP_ARB = 0x8513;
+ public const int TEXTURE_CUBE_MAP_ARRAY = 0x9009;
+ public const int TEXTURE_CUBE_MAP_ARRAY_ARB = 0x9009;
+ public const int TEXTURE_CUBE_MAP_EXT = 0x8513;
+ public const int TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
+ public const int TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x8516;
+ public const int TEXTURE_CUBE_MAP_NEGATIVE_X_EXT = 0x8516;
+ public const int TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
+ public const int TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x8518;
+ public const int TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT = 0x8518;
+ public const int TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
+ public const int TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x851A;
+ public const int TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT = 0x851A;
+ public const int TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
+ public const int TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x8515;
+ public const int TEXTURE_CUBE_MAP_POSITIVE_X_EXT = 0x8515;
+ public const int TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
+ public const int TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x8517;
+ public const int TEXTURE_CUBE_MAP_POSITIVE_Y_EXT = 0x8517;
+ public const int TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
+ public const int TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x8519;
+ public const int TEXTURE_CUBE_MAP_POSITIVE_Z_EXT = 0x8519;
+ public const int TEXTURE_CUBE_MAP_SEAMLESS = 0x884F;
+ public const int TEXTURE_DEFORMATION_BIT_SGIX = 0x00000001;
+ public const int TEXTURE_DEFORMATION_SGIX = 0x8195;
+ public const int TEXTURE_DEPTH = 0x8071;
+ public const int TEXTURE_DEPTH_EXT = 0x8071;
+ public const int TEXTURE_DEPTH_SIZE = 0x884A;
+ public const int TEXTURE_DEPTH_SIZE_ARB = 0x884A;
+ public const int TEXTURE_DEPTH_TYPE = 0x8C16;
+ public const int TEXTURE_DEPTH_TYPE_ARB = 0x8C16;
+ public const int TEXTURE_DS_SIZE_NV = 0x871D;
+ public const int TEXTURE_DT_SIZE_NV = 0x871E;
+ public const int TEXTURE_ENV_BIAS_SGIX = 0x80BE;
+ public const int TEXTURE_FETCH_BARRIER_BIT = 0x00000008;
+ public const int TEXTURE_FETCH_BARRIER_BIT_EXT = 0x00000008;
+ public const int TEXTURE_FILTER4_SIZE_SGIS = 0x8147;
+ public const int TEXTURE_FILTER_CONTROL_EXT = 0x8500;
+ public const int TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107;
+ public const int TEXTURE_FLOAT_COMPONENTS_NV = 0x888C;
+ public const int TEXTURE_FREE_MEMORY_ATI = 0x87FC;
+ public const int TEXTURE_GATHER = 0x82A2;
+ public const int TEXTURE_GATHER_SHADOW = 0x82A3;
+ public const int TEXTURE_GEQUAL_R_SGIX = 0x819D;
+ public const int TEXTURE_GREEN_SIZE = 0x805D;
+ public const int TEXTURE_GREEN_SIZE_EXT = 0x805D;
+ public const int TEXTURE_GREEN_TYPE = 0x8C11;
+ public const int TEXTURE_GREEN_TYPE_ARB = 0x8C11;
+ public const int TEXTURE_HEIGHT = 0x1001;
+ public const int TEXTURE_HI_SIZE_NV = 0x871B;
+ public const int TEXTURE_IMAGE_FORMAT = 0x828F;
+ public const int TEXTURE_IMAGE_TYPE = 0x8290;
+ public const int TEXTURE_IMMUTABLE_FORMAT = 0x912F;
+ public const int TEXTURE_IMMUTABLE_FORMAT_EXT = 0x912F;
+ public const int TEXTURE_IMMUTABLE_LEVELS = 0x82DF;
+ public const int TEXTURE_INDEX_SIZE_EXT = 0x80ED;
+ public const int TEXTURE_INTENSITY_SIZE_EXT = 0x8061;
+ public const int TEXTURE_INTENSITY_TYPE_ARB = 0x8C15;
+ public const int TEXTURE_INTERNAL_FORMAT = 0x1003;
+ public const int TEXTURE_LEQUAL_R_SGIX = 0x819C;
+ public const int TEXTURE_LIGHTING_MODE_HP = 0x8167;
+ public const int TEXTURE_LIGHT_EXT = 0x8350;
+ public const int TEXTURE_LOD_BIAS = 0x8501;
+ public const int TEXTURE_LOD_BIAS_EXT = 0x8501;
+ public const int TEXTURE_LOD_BIAS_R_SGIX = 0x8190;
+ public const int TEXTURE_LOD_BIAS_S_SGIX = 0x818E;
+ public const int TEXTURE_LOD_BIAS_T_SGIX = 0x818F;
+ public const int TEXTURE_LO_SIZE_NV = 0x871C;
+ public const int TEXTURE_LUMINANCE_SIZE_EXT = 0x8060;
+ public const int TEXTURE_LUMINANCE_TYPE_ARB = 0x8C14;
+ public const int TEXTURE_MAG_FILTER = 0x2800;
+ public const int TEXTURE_MAG_SIZE_NV = 0x871F;
+ public const int TEXTURE_MATERIAL_FACE_EXT = 0x8351;
+ public const int TEXTURE_MATERIAL_PARAMETER_EXT = 0x8352;
+ public const int TEXTURE_MAX_ANISOTROPY = 0x84FE;
+ public const int TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
+ public const int TEXTURE_MAX_CLAMP_R_SGIX = 0x836B;
+ public const int TEXTURE_MAX_CLAMP_S_SGIX = 0x8369;
+ public const int TEXTURE_MAX_CLAMP_T_SGIX = 0x836A;
+ public const int TEXTURE_MAX_LEVEL = 0x813D;
+ public const int TEXTURE_MAX_LEVEL_SGIS = 0x813D;
+ public const int TEXTURE_MAX_LOD = 0x813B;
+ public const int TEXTURE_MAX_LOD_SGIS = 0x813B;
+ public const int TEXTURE_MEMORY_LAYOUT_INTEL = 0x83FF;
+ public const int TEXTURE_MIN_FILTER = 0x2801;
+ public const int TEXTURE_MIN_LOD = 0x813A;
+ public const int TEXTURE_MIN_LOD_SGIS = 0x813A;
+ public const int TEXTURE_MULTI_BUFFER_HINT_SGIX = 0x812E;
+ public const int TEXTURE_NORMAL_EXT = 0x85AF;
+ public const int TEXTURE_POST_SPECULAR_HP = 0x8168;
+ public const int TEXTURE_PRE_SPECULAR_HP = 0x8169;
+ public const int TEXTURE_PRIORITY_EXT = 0x8066;
+ public const int TEXTURE_RANGE_LENGTH_APPLE = 0x85B7;
+ public const int TEXTURE_RANGE_POINTER_APPLE = 0x85B8;
+ public const int TEXTURE_RECTANGLE = 0x84F5;
+ public const int TEXTURE_RECTANGLE_ARB = 0x84F5;
+ public const int TEXTURE_RECTANGLE_NV = 0x84F5;
+ public const int TEXTURE_REDUCTION_MODE_ARB = 0x9366;
+ public const int TEXTURE_REDUCTION_MODE_EXT = 0x9366;
+ public const int TEXTURE_RED_SIZE = 0x805C;
+ public const int TEXTURE_RED_SIZE_EXT = 0x805C;
+ public const int TEXTURE_RED_TYPE = 0x8C10;
+ public const int TEXTURE_RED_TYPE_ARB = 0x8C10;
+ public const int TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV = 0x8E54;
+ public const int TEXTURE_RENDERBUFFER_NV = 0x8E55;
+ public const int TEXTURE_RESIDENT_EXT = 0x8067;
+ public const int TEXTURE_SAMPLES = 0x9106;
+ public const int TEXTURE_SHADER_NV = 0x86DE;
+ public const int TEXTURE_SHADOW = 0x82A1;
+ public const int TEXTURE_SHARED_SIZE = 0x8C3F;
+ public const int TEXTURE_SHARED_SIZE_EXT = 0x8C3F;
+ public const int TEXTURE_SPARSE_ARB = 0x91A6;
+ public const int TEXTURE_SRGB_DECODE_EXT = 0x8A48;
+ public const int TEXTURE_STENCIL_SIZE = 0x88F1;
+ public const int TEXTURE_STENCIL_SIZE_EXT = 0x88F1;
+ public const int TEXTURE_STORAGE_HINT_APPLE = 0x85BC;
+ public const int TEXTURE_STORAGE_SPARSE_BIT_AMD = 0x00000001;
+ public const int TEXTURE_SWIZZLE_A = 0x8E45;
+ public const int TEXTURE_SWIZZLE_A_EXT = 0x8E45;
+ public const int TEXTURE_SWIZZLE_B = 0x8E44;
+ public const int TEXTURE_SWIZZLE_B_EXT = 0x8E44;
+ public const int TEXTURE_SWIZZLE_G = 0x8E43;
+ public const int TEXTURE_SWIZZLE_G_EXT = 0x8E43;
+ public const int TEXTURE_SWIZZLE_R = 0x8E42;
+ public const int TEXTURE_SWIZZLE_RGBA = 0x8E46;
+ public const int TEXTURE_SWIZZLE_RGBA_EXT = 0x8E46;
+ public const int TEXTURE_SWIZZLE_R_EXT = 0x8E42;
+ public const int TEXTURE_TARGET = 0x1006;
+ public const int TEXTURE_TILING_EXT = 0x9580;
+ public const int TEXTURE_TOO_LARGE_EXT = 0x8065;
+ public const int TEXTURE_UNSIGNED_REMAP_MODE_NV = 0x888F;
+ public const int TEXTURE_UPDATE_BARRIER_BIT = 0x00000100;
+ public const int TEXTURE_UPDATE_BARRIER_BIT_EXT = 0x00000100;
+ public const int TEXTURE_VIEW = 0x82B5;
+ public const int TEXTURE_VIEW_MIN_LAYER = 0x82DD;
+ public const int TEXTURE_VIEW_MIN_LEVEL = 0x82DB;
+ public const int TEXTURE_VIEW_NUM_LAYERS = 0x82DE;
+ public const int TEXTURE_VIEW_NUM_LEVELS = 0x82DC;
+ public const int TEXTURE_WIDTH = 0x1000;
+ public const int TEXTURE_WRAP_Q_SGIS = 0x8137;
+ public const int TEXTURE_WRAP_R = 0x8072;
+ public const int TEXTURE_WRAP_R_EXT = 0x8072;
+ public const int TEXTURE_WRAP_S = 0x2802;
+ public const int TEXTURE_WRAP_T = 0x2803;
+ public const int TEXT_FRAGMENT_SHADER_ATI = 0x8200;
+ public const int TILE_RASTER_ORDER_FIXED_MESA = 0x8BB8;
+ public const int TILE_RASTER_ORDER_INCREASING_X_MESA = 0x8BB9;
+ public const int TILE_RASTER_ORDER_INCREASING_Y_MESA = 0x8BBA;
+ public const int TILING_TYPES_EXT = 0x9583;
+ public const int TIMELINE_SEMAPHORE_VALUE_NV = 0x9595;
+ public const int TIMEOUT_EXPIRED = 0x911B;
+ public const ulong TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFF;
+ public const int TIMESTAMP = 0x8E28;
+ public const int TIME_ELAPSED = 0x88BF;
+ public const int TIME_ELAPSED_EXT = 0x88BF;
+ public const int TOP_LEVEL_ARRAY_SIZE = 0x930C;
+ public const int TOP_LEVEL_ARRAY_STRIDE = 0x930D;
+ public const int TRACK_MATRIX_NV = 0x8648;
+ public const int TRACK_MATRIX_TRANSFORM_NV = 0x8649;
+ public const int TRANSFORM_FEEDBACK = 0x8E22;
+ public const int TRANSFORM_FEEDBACK_ACTIVE = 0x8E24;
+ public const int TRANSFORM_FEEDBACK_ATTRIBS_NV = 0x8C7E;
+ public const int TRANSFORM_FEEDBACK_BARRIER_BIT = 0x00000800;
+ public const int TRANSFORM_FEEDBACK_BARRIER_BIT_EXT = 0x00000800;
+ public const int TRANSFORM_FEEDBACK_BINDING = 0x8E25;
+ public const int TRANSFORM_FEEDBACK_BINDING_NV = 0x8E25;
+ public const int TRANSFORM_FEEDBACK_BUFFER = 0x8C8E;
+ public const int TRANSFORM_FEEDBACK_BUFFER_ACTIVE = 0x8E24;
+ public const int TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV = 0x8E24;
+ public const int TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F;
+ public const int TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT = 0x8C8F;
+ public const int TRANSFORM_FEEDBACK_BUFFER_BINDING_NV = 0x8C8F;
+ public const int TRANSFORM_FEEDBACK_BUFFER_EXT = 0x8C8E;
+ public const int TRANSFORM_FEEDBACK_BUFFER_INDEX = 0x934B;
+ public const int TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F;
+ public const int TRANSFORM_FEEDBACK_BUFFER_MODE_EXT = 0x8C7F;
+ public const int TRANSFORM_FEEDBACK_BUFFER_MODE_NV = 0x8C7F;
+ public const int TRANSFORM_FEEDBACK_BUFFER_NV = 0x8C8E;
+ public const int TRANSFORM_FEEDBACK_BUFFER_PAUSED = 0x8E23;
+ public const int TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV = 0x8E23;
+ public const int TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85;
+ public const int TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT = 0x8C85;
+ public const int TRANSFORM_FEEDBACK_BUFFER_SIZE_NV = 0x8C85;
+ public const int TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84;
+ public const int TRANSFORM_FEEDBACK_BUFFER_START_EXT = 0x8C84;
+ public const int TRANSFORM_FEEDBACK_BUFFER_START_NV = 0x8C84;
+ public const int TRANSFORM_FEEDBACK_BUFFER_STRIDE = 0x934C;
+ public const int TRANSFORM_FEEDBACK_NV = 0x8E22;
+ public const int TRANSFORM_FEEDBACK_OVERFLOW = 0x82EC;
+ public const int TRANSFORM_FEEDBACK_OVERFLOW_ARB = 0x82EC;
+ public const int TRANSFORM_FEEDBACK_PAUSED = 0x8E23;
+ public const int TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88;
+ public const int TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT = 0x8C88;
+ public const int TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV = 0x8C88;
+ public const int TRANSFORM_FEEDBACK_RECORD_NV = 0x8C86;
+ public const int TRANSFORM_FEEDBACK_STREAM_OVERFLOW = 0x82ED;
+ public const int TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB = 0x82ED;
+ public const int TRANSFORM_FEEDBACK_VARYING = 0x92F4;
+ public const int TRANSFORM_FEEDBACK_VARYINGS = 0x8C83;
+ public const int TRANSFORM_FEEDBACK_VARYINGS_EXT = 0x8C83;
+ public const int TRANSFORM_FEEDBACK_VARYINGS_NV = 0x8C83;
+ public const int TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76;
+ public const int TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT = 0x8C76;
+ public const int TRANSFORM_HINT_APPLE = 0x85B1;
+ public const int TRANSLATE_2D_NV = 0x9090;
+ public const int TRANSLATE_3D_NV = 0x9091;
+ public const int TRANSLATE_X_NV = 0x908E;
+ public const int TRANSLATE_Y_NV = 0x908F;
+ public const int TRANSPOSE_AFFINE_2D_NV = 0x9096;
+ public const int TRANSPOSE_AFFINE_3D_NV = 0x9098;
+ public const int TRANSPOSE_COLOR_MATRIX_ARB = 0x84E6;
+ public const int TRANSPOSE_CURRENT_MATRIX_ARB = 0x88B7;
+ public const int TRANSPOSE_MODELVIEW_MATRIX_ARB = 0x84E3;
+ public const int TRANSPOSE_NV = 0x862C;
+ public const int TRANSPOSE_PROGRAM_MATRIX_EXT = 0x8E2E;
+ public const int TRANSPOSE_PROJECTION_MATRIX_ARB = 0x84E4;
+ public const int TRANSPOSE_TEXTURE_MATRIX_ARB = 0x84E5;
+ public const int TRIANGLES = 0x0004;
+ public const int TRIANGLES_ADJACENCY = 0x000C;
+ public const int TRIANGLES_ADJACENCY_ARB = 0x000C;
+ public const int TRIANGLES_ADJACENCY_EXT = 0x000C;
+ public const int TRIANGLE_FAN = 0x0006;
+ public const int TRIANGLE_LIST_SUN = 0x81D7;
+ public const int TRIANGLE_MESH_SUN = 0x8615;
+ public const int TRIANGLE_STRIP = 0x0005;
+ public const int TRIANGLE_STRIP_ADJACENCY = 0x000D;
+ public const int TRIANGLE_STRIP_ADJACENCY_ARB = 0x000D;
+ public const int TRIANGLE_STRIP_ADJACENCY_EXT = 0x000D;
+ public const int TRIANGULAR_NV = 0x90A5;
+ public const int TRUE = 1;
+ public const int TYPE = 0x92FA;
+ public const int UNCORRELATED_NV = 0x9282;
+ public const int UNDEFINED_APPLE = 0x8A1C;
+ public const int UNDEFINED_VERTEX = 0x8260;
+ public const int UNIFORM = 0x92E1;
+ public const int UNIFORM_ADDRESS_COMMAND_NV = 0x000A;
+ public const int UNIFORM_ARRAY_STRIDE = 0x8A3C;
+ public const int UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = 0x92DA;
+ public const int UNIFORM_BARRIER_BIT = 0x00000004;
+ public const int UNIFORM_BARRIER_BIT_EXT = 0x00000004;
+ public const int UNIFORM_BLOCK = 0x92E2;
+ public const int UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42;
+ public const int UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43;
+ public const int UNIFORM_BLOCK_BINDING = 0x8A3F;
+ public const int UNIFORM_BLOCK_DATA_SIZE = 0x8A40;
+ public const int UNIFORM_BLOCK_INDEX = 0x8A3A;
+ public const int UNIFORM_BLOCK_NAME_LENGTH = 0x8A41;
+ public const int UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = 0x90EC;
+ public const int UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46;
+ public const int UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45;
+ public const int UNIFORM_BLOCK_REFERENCED_BY_MESH_SHADER_NV = 0x959C;
+ public const int UNIFORM_BLOCK_REFERENCED_BY_TASK_SHADER_NV = 0x959D;
+ public const int UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = 0x84F0;
+ public const int UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1;
+ public const int UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44;
+ public const int UNIFORM_BUFFER = 0x8A11;
+ public const int UNIFORM_BUFFER_ADDRESS_NV = 0x936F;
+ public const int UNIFORM_BUFFER_BINDING = 0x8A28;
+ public const int UNIFORM_BUFFER_BINDING_EXT = 0x8DEF;
+ public const int UNIFORM_BUFFER_EXT = 0x8DEE;
+ public const int UNIFORM_BUFFER_LENGTH_NV = 0x9370;
+ public const int UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34;
+ public const int UNIFORM_BUFFER_SIZE = 0x8A2A;
+ public const int UNIFORM_BUFFER_START = 0x8A29;
+ public const int UNIFORM_BUFFER_UNIFIED_NV = 0x936E;
+ public const int UNIFORM_IS_ROW_MAJOR = 0x8A3E;
+ public const int UNIFORM_MATRIX_STRIDE = 0x8A3D;
+ public const int UNIFORM_NAME_LENGTH = 0x8A39;
+ public const int UNIFORM_OFFSET = 0x8A3B;
+ public const int UNIFORM_SIZE = 0x8A38;
+ public const int UNIFORM_TYPE = 0x8A37;
+ public const int UNKNOWN_CONTEXT_RESET = 0x8255;
+ public const int UNKNOWN_CONTEXT_RESET_ARB = 0x8255;
+ public const int UNPACK_ALIGNMENT = 0x0CF5;
+ public const int UNPACK_CLIENT_STORAGE_APPLE = 0x85B2;
+ public const int UNPACK_CMYK_HINT_EXT = 0x800F;
+ public const int UNPACK_COMPRESSED_BLOCK_DEPTH = 0x9129;
+ public const int UNPACK_COMPRESSED_BLOCK_HEIGHT = 0x9128;
+ public const int UNPACK_COMPRESSED_BLOCK_SIZE = 0x912A;
+ public const int UNPACK_COMPRESSED_BLOCK_WIDTH = 0x9127;
+ public const int UNPACK_CONSTANT_DATA_SUNX = 0x81D5;
+ public const int UNPACK_IMAGE_DEPTH_SGIS = 0x8133;
+ public const int UNPACK_IMAGE_HEIGHT = 0x806E;
+ public const int UNPACK_IMAGE_HEIGHT_EXT = 0x806E;
+ public const int UNPACK_LSB_FIRST = 0x0CF1;
+ public const int UNPACK_RESAMPLE_OML = 0x8985;
+ public const int UNPACK_RESAMPLE_SGIX = 0x842F;
+ public const int UNPACK_ROW_BYTES_APPLE = 0x8A16;
+ public const int UNPACK_ROW_LENGTH = 0x0CF2;
+ public const int UNPACK_SKIP_IMAGES = 0x806D;
+ public const int UNPACK_SKIP_IMAGES_EXT = 0x806D;
+ public const int UNPACK_SKIP_PIXELS = 0x0CF4;
+ public const int UNPACK_SKIP_ROWS = 0x0CF3;
+ public const int UNPACK_SKIP_VOLUMES_SGIS = 0x8132;
+ public const int UNPACK_SUBSAMPLE_RATE_SGIX = 0x85A1;
+ public const int UNPACK_SWAP_BYTES = 0x0CF0;
+ public const int UNSIGNALED = 0x9118;
+ public const int UNSIGNED_BYTE = 0x1401;
+ public const int UNSIGNED_BYTE_2_3_3_REV = 0x8362;
+ public const int UNSIGNED_BYTE_3_3_2 = 0x8032;
+ public const int UNSIGNED_BYTE_3_3_2_EXT = 0x8032;
+ public const int UNSIGNED_IDENTITY_NV = 0x8536;
+ public const int UNSIGNED_INT = 0x1405;
+ public const int UNSIGNED_INT16_NV = 0x8FF0;
+ public const int UNSIGNED_INT16_VEC2_NV = 0x8FF1;
+ public const int UNSIGNED_INT16_VEC3_NV = 0x8FF2;
+ public const int UNSIGNED_INT16_VEC4_NV = 0x8FF3;
+ public const int UNSIGNED_INT64_AMD = 0x8BC2;
+ public const int UNSIGNED_INT64_ARB = 0x140F;
+ public const int UNSIGNED_INT64_NV = 0x140F;
+ public const int UNSIGNED_INT64_VEC2_ARB = 0x8FF5;
+ public const int UNSIGNED_INT64_VEC2_NV = 0x8FF5;
+ public const int UNSIGNED_INT64_VEC3_ARB = 0x8FF6;
+ public const int UNSIGNED_INT64_VEC3_NV = 0x8FF6;
+ public const int UNSIGNED_INT64_VEC4_ARB = 0x8FF7;
+ public const int UNSIGNED_INT64_VEC4_NV = 0x8FF7;
+ public const int UNSIGNED_INT8_NV = 0x8FEC;
+ public const int UNSIGNED_INT8_VEC2_NV = 0x8FED;
+ public const int UNSIGNED_INT8_VEC3_NV = 0x8FEE;
+ public const int UNSIGNED_INT8_VEC4_NV = 0x8FEF;
+ public const int UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B;
+ public const int UNSIGNED_INT_10F_11F_11F_REV_EXT = 0x8C3B;
+ public const int UNSIGNED_INT_10_10_10_2 = 0x8036;
+ public const int UNSIGNED_INT_10_10_10_2_EXT = 0x8036;
+ public const int UNSIGNED_INT_24_8 = 0x84FA;
+ public const int UNSIGNED_INT_24_8_EXT = 0x84FA;
+ public const int UNSIGNED_INT_24_8_NV = 0x84FA;
+ public const int UNSIGNED_INT_2_10_10_10_REV = 0x8368;
+ public const int UNSIGNED_INT_5_9_9_9_REV = 0x8C3E;
+ public const int UNSIGNED_INT_5_9_9_9_REV_EXT = 0x8C3E;
+ public const int UNSIGNED_INT_8_8_8_8 = 0x8035;
+ public const int UNSIGNED_INT_8_8_8_8_EXT = 0x8035;
+ public const int UNSIGNED_INT_8_8_8_8_REV = 0x8367;
+ public const int UNSIGNED_INT_8_8_S8_S8_REV_NV = 0x86DB;
+ public const int UNSIGNED_INT_ATOMIC_COUNTER = 0x92DB;
+ public const int UNSIGNED_INT_IMAGE_1D = 0x9062;
+ public const int UNSIGNED_INT_IMAGE_1D_ARRAY = 0x9068;
+ public const int UNSIGNED_INT_IMAGE_1D_ARRAY_EXT = 0x9068;
+ public const int UNSIGNED_INT_IMAGE_1D_EXT = 0x9062;
+ public const int UNSIGNED_INT_IMAGE_2D = 0x9063;
+ public const int UNSIGNED_INT_IMAGE_2D_ARRAY = 0x9069;
+ public const int UNSIGNED_INT_IMAGE_2D_ARRAY_EXT = 0x9069;
+ public const int UNSIGNED_INT_IMAGE_2D_EXT = 0x9063;
+ public const int UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = 0x906B;
+ public const int UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x906C;
+ public const int UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x906C;
+ public const int UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT = 0x906B;
+ public const int UNSIGNED_INT_IMAGE_2D_RECT = 0x9065;
+ public const int UNSIGNED_INT_IMAGE_2D_RECT_EXT = 0x9065;
+ public const int UNSIGNED_INT_IMAGE_3D = 0x9064;
+ public const int UNSIGNED_INT_IMAGE_3D_EXT = 0x9064;
+ public const int UNSIGNED_INT_IMAGE_BUFFER = 0x9067;
+ public const int UNSIGNED_INT_IMAGE_BUFFER_EXT = 0x9067;
+ public const int UNSIGNED_INT_IMAGE_CUBE = 0x9066;
+ public const int UNSIGNED_INT_IMAGE_CUBE_EXT = 0x9066;
+ public const int UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 0x906A;
+ public const int UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT = 0x906A;
+ public const int UNSIGNED_INT_S8_S8_8_8_NV = 0x86DA;
+ public const int UNSIGNED_INT_SAMPLER_1D = 0x8DD1;
+ public const int UNSIGNED_INT_SAMPLER_1D_ARRAY = 0x8DD6;
+ public const int UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT = 0x8DD6;
+ public const int UNSIGNED_INT_SAMPLER_1D_EXT = 0x8DD1;
+ public const int UNSIGNED_INT_SAMPLER_2D = 0x8DD2;
+ public const int UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7;
+ public const int UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT = 0x8DD7;
+ public const int UNSIGNED_INT_SAMPLER_2D_EXT = 0x8DD2;
+ public const int UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A;
+ public const int UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D;
+ public const int UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5;
+ public const int UNSIGNED_INT_SAMPLER_2D_RECT_EXT = 0x8DD5;
+ public const int UNSIGNED_INT_SAMPLER_3D = 0x8DD3;
+ public const int UNSIGNED_INT_SAMPLER_3D_EXT = 0x8DD3;
+ public const int UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8;
+ public const int UNSIGNED_INT_SAMPLER_BUFFER_AMD = 0x9003;
+ public const int UNSIGNED_INT_SAMPLER_BUFFER_EXT = 0x8DD8;
+ public const int UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4;
+ public const int UNSIGNED_INT_SAMPLER_CUBE_EXT = 0x8DD4;
+ public const int UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F;
+ public const int UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900F;
+ public const int UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV = 0x8E58;
+ public const int UNSIGNED_INT_VEC2 = 0x8DC6;
+ public const int UNSIGNED_INT_VEC2_EXT = 0x8DC6;
+ public const int UNSIGNED_INT_VEC3 = 0x8DC7;
+ public const int UNSIGNED_INT_VEC3_EXT = 0x8DC7;
+ public const int UNSIGNED_INT_VEC4 = 0x8DC8;
+ public const int UNSIGNED_INT_VEC4_EXT = 0x8DC8;
+ public const int UNSIGNED_INVERT_NV = 0x8537;
+ public const int UNSIGNED_NORMALIZED = 0x8C17;
+ public const int UNSIGNED_NORMALIZED_ARB = 0x8C17;
+ public const int UNSIGNED_SHORT = 0x1403;
+ public const int UNSIGNED_SHORT_1_5_5_5_REV = 0x8366;
+ public const int UNSIGNED_SHORT_4_4_4_4 = 0x8033;
+ public const int UNSIGNED_SHORT_4_4_4_4_EXT = 0x8033;
+ public const int UNSIGNED_SHORT_4_4_4_4_REV = 0x8365;
+ public const int UNSIGNED_SHORT_5_5_5_1 = 0x8034;
+ public const int UNSIGNED_SHORT_5_5_5_1_EXT = 0x8034;
+ public const int UNSIGNED_SHORT_5_6_5 = 0x8363;
+ public const int UNSIGNED_SHORT_5_6_5_REV = 0x8364;
+ public const int UNSIGNED_SHORT_8_8_APPLE = 0x85BA;
+ public const int UNSIGNED_SHORT_8_8_MESA = 0x85BA;
+ public const int UNSIGNED_SHORT_8_8_REV_APPLE = 0x85BB;
+ public const int UNSIGNED_SHORT_8_8_REV_MESA = 0x85BB;
+ public const int UPLOAD_GPU_MASK_NVX = 0x954A;
+ public const int UPPER_LEFT = 0x8CA2;
+ public const int USE_MISSING_GLYPH_NV = 0x90AA;
+ public const int UTF16_NV = 0x909B;
+ public const int UTF8_NV = 0x909A;
+ public const int UUID_SIZE_EXT = 16;
+ public const int VALIDATE_STATUS = 0x8B83;
+ public const int VARIABLE_A_NV = 0x8523;
+ public const int VARIABLE_B_NV = 0x8524;
+ public const int VARIABLE_C_NV = 0x8525;
+ public const int VARIABLE_D_NV = 0x8526;
+ public const int VARIABLE_E_NV = 0x8527;
+ public const int VARIABLE_F_NV = 0x8528;
+ public const int VARIABLE_G_NV = 0x8529;
+ public const int VARIANT_ARRAY_EXT = 0x87E8;
+ public const int VARIANT_ARRAY_POINTER_EXT = 0x87E9;
+ public const int VARIANT_ARRAY_STRIDE_EXT = 0x87E6;
+ public const int VARIANT_ARRAY_TYPE_EXT = 0x87E7;
+ public const int VARIANT_DATATYPE_EXT = 0x87E5;
+ public const int VARIANT_EXT = 0x87C1;
+ public const int VARIANT_VALUE_EXT = 0x87E4;
+ public const int VBO_FREE_MEMORY_ATI = 0x87FB;
+ public const int VECTOR_EXT = 0x87BF;
+ public const int VENDOR = 0x1F00;
+ public const int VERSION = 0x1F02;
+ public const int VERTEX23_BIT_PGI = 0x00000004;
+ public const int VERTEX4_BIT_PGI = 0x00000008;
+ public const int VERTEX_ARRAY = 0x8074;
+ public const int VERTEX_ARRAY_ADDRESS_NV = 0x8F21;
+ public const int VERTEX_ARRAY_BINDING = 0x85B5;
+ public const int VERTEX_ARRAY_BINDING_APPLE = 0x85B5;
+ public const int VERTEX_ARRAY_BUFFER_BINDING_ARB = 0x8896;
+ public const int VERTEX_ARRAY_COUNT_EXT = 0x807D;
+ public const int VERTEX_ARRAY_EXT = 0x8074;
+ public const int VERTEX_ARRAY_LENGTH_NV = 0x8F2B;
+ public const int VERTEX_ARRAY_LIST_IBM = 103070;
+ public const int VERTEX_ARRAY_LIST_STRIDE_IBM = 103080;
+ public const int VERTEX_ARRAY_OBJECT_AMD = 0x9154;
+ public const int VERTEX_ARRAY_OBJECT_EXT = 0x9154;
+ public const int VERTEX_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F5;
+ public const int VERTEX_ARRAY_POINTER_EXT = 0x808E;
+ public const int VERTEX_ARRAY_RANGE_APPLE = 0x851D;
+ public const int VERTEX_ARRAY_RANGE_LENGTH_APPLE = 0x851E;
+ public const int VERTEX_ARRAY_RANGE_LENGTH_NV = 0x851E;
+ public const int VERTEX_ARRAY_RANGE_NV = 0x851D;
+ public const int VERTEX_ARRAY_RANGE_POINTER_APPLE = 0x8521;
+ public const int VERTEX_ARRAY_RANGE_POINTER_NV = 0x8521;
+ public const int VERTEX_ARRAY_RANGE_VALID_NV = 0x851F;
+ public const int VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = 0x8533;
+ public const int VERTEX_ARRAY_SIZE_EXT = 0x807A;
+ public const int VERTEX_ARRAY_STORAGE_HINT_APPLE = 0x851F;
+ public const int VERTEX_ARRAY_STRIDE_EXT = 0x807C;
+ public const int VERTEX_ARRAY_TYPE_EXT = 0x807B;
+ public const int VERTEX_ATTRIB_ARRAY0_NV = 0x8650;
+ public const int VERTEX_ATTRIB_ARRAY10_NV = 0x865A;
+ public const int VERTEX_ATTRIB_ARRAY11_NV = 0x865B;
+ public const int VERTEX_ATTRIB_ARRAY12_NV = 0x865C;
+ public const int VERTEX_ATTRIB_ARRAY13_NV = 0x865D;
+ public const int VERTEX_ATTRIB_ARRAY14_NV = 0x865E;
+ public const int VERTEX_ATTRIB_ARRAY15_NV = 0x865F;
+ public const int VERTEX_ATTRIB_ARRAY1_NV = 0x8651;
+ public const int VERTEX_ATTRIB_ARRAY2_NV = 0x8652;
+ public const int VERTEX_ATTRIB_ARRAY3_NV = 0x8653;
+ public const int VERTEX_ATTRIB_ARRAY4_NV = 0x8654;
+ public const int VERTEX_ATTRIB_ARRAY5_NV = 0x8655;
+ public const int VERTEX_ATTRIB_ARRAY6_NV = 0x8656;
+ public const int VERTEX_ATTRIB_ARRAY7_NV = 0x8657;
+ public const int VERTEX_ATTRIB_ARRAY8_NV = 0x8658;
+ public const int VERTEX_ATTRIB_ARRAY9_NV = 0x8659;
+ public const int VERTEX_ATTRIB_ARRAY_ADDRESS_NV = 0x8F20;
+ public const int VERTEX_ATTRIB_ARRAY_BARRIER_BIT = 0x00000001;
+ public const int VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT = 0x00000001;
+ public const int VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
+ public const int VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = 0x889F;
+ public const int VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE;
+ public const int VERTEX_ATTRIB_ARRAY_DIVISOR_ARB = 0x88FE;
+ public const int VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
+ public const int VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622;
+ public const int VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD;
+ public const int VERTEX_ATTRIB_ARRAY_INTEGER_EXT = 0x88FD;
+ public const int VERTEX_ATTRIB_ARRAY_INTEGER_NV = 0x88FD;
+ public const int VERTEX_ATTRIB_ARRAY_LENGTH_NV = 0x8F2A;
+ public const int VERTEX_ATTRIB_ARRAY_LONG = 0x874E;
+ public const int VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
+ public const int VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A;
+ public const int VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
+ public const int VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645;
+ public const int VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
+ public const int VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623;
+ public const int VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
+ public const int VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624;
+ public const int VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
+ public const int VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625;
+ public const int VERTEX_ATTRIB_ARRAY_UNIFIED_NV = 0x8F1E;
+ public const int VERTEX_ATTRIB_BINDING = 0x82D4;
+ public const int VERTEX_ATTRIB_MAP1_APPLE = 0x8A00;
+ public const int VERTEX_ATTRIB_MAP1_COEFF_APPLE = 0x8A03;
+ public const int VERTEX_ATTRIB_MAP1_DOMAIN_APPLE = 0x8A05;
+ public const int VERTEX_ATTRIB_MAP1_ORDER_APPLE = 0x8A04;
+ public const int VERTEX_ATTRIB_MAP1_SIZE_APPLE = 0x8A02;
+ public const int VERTEX_ATTRIB_MAP2_APPLE = 0x8A01;
+ public const int VERTEX_ATTRIB_MAP2_COEFF_APPLE = 0x8A07;
+ public const int VERTEX_ATTRIB_MAP2_DOMAIN_APPLE = 0x8A09;
+ public const int VERTEX_ATTRIB_MAP2_ORDER_APPLE = 0x8A08;
+ public const int VERTEX_ATTRIB_MAP2_SIZE_APPLE = 0x8A06;
+ public const int VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D5;
+ public const int VERTEX_BINDING_BUFFER = 0x8F4F;
+ public const int VERTEX_BINDING_DIVISOR = 0x82D6;
+ public const int VERTEX_BINDING_OFFSET = 0x82D7;
+ public const int VERTEX_BINDING_STRIDE = 0x82D8;
+ public const int VERTEX_BLEND_ARB = 0x86A7;
+ public const int VERTEX_CONSISTENT_HINT_PGI = 0x1A22B;
+ public const int VERTEX_DATA_HINT_PGI = 0x1A22A;
+ public const int VERTEX_ELEMENT_SWIZZLE_AMD = 0x91A4;
+ public const int VERTEX_ID_NV = 0x8C7B;
+ public const int VERTEX_ID_SWIZZLE_AMD = 0x91A5;
+ public const int VERTEX_PRECLIP_HINT_SGIX = 0x83EF;
+ public const int VERTEX_PRECLIP_SGIX = 0x83EE;
+ public const int VERTEX_PROGRAM_ARB = 0x8620;
+ public const int VERTEX_PROGRAM_BINDING_NV = 0x864A;
+ public const int VERTEX_PROGRAM_NV = 0x8620;
+ public const int VERTEX_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA2;
+ public const int VERTEX_PROGRAM_POINT_SIZE = 0x8642;
+ public const int VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642;
+ public const int VERTEX_PROGRAM_POINT_SIZE_NV = 0x8642;
+ public const int VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643;
+ public const int VERTEX_PROGRAM_TWO_SIDE_NV = 0x8643;
+ public const int VERTEX_SHADER = 0x8B31;
+ public const int VERTEX_SHADER_ARB = 0x8B31;
+ public const int VERTEX_SHADER_BINDING_EXT = 0x8781;
+ public const int VERTEX_SHADER_BIT = 0x00000001;
+ public const int VERTEX_SHADER_EXT = 0x8780;
+ public const int VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CF;
+ public const int VERTEX_SHADER_INVARIANTS_EXT = 0x87D1;
+ public const int VERTEX_SHADER_INVOCATIONS = 0x82F0;
+ public const int VERTEX_SHADER_INVOCATIONS_ARB = 0x82F0;
+ public const int VERTEX_SHADER_LOCALS_EXT = 0x87D3;
+ public const int VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87D2;
+ public const int VERTEX_SHADER_OPTIMIZED_EXT = 0x87D4;
+ public const int VERTEX_SHADER_VARIANTS_EXT = 0x87D0;
+ public const int VERTEX_SOURCE_ATI = 0x8774;
+ public const int VERTEX_STATE_PROGRAM_NV = 0x8621;
+ public const int VERTEX_STREAM0_ATI = 0x876C;
+ public const int VERTEX_STREAM1_ATI = 0x876D;
+ public const int VERTEX_STREAM2_ATI = 0x876E;
+ public const int VERTEX_STREAM3_ATI = 0x876F;
+ public const int VERTEX_STREAM4_ATI = 0x8770;
+ public const int VERTEX_STREAM5_ATI = 0x8771;
+ public const int VERTEX_STREAM6_ATI = 0x8772;
+ public const int VERTEX_STREAM7_ATI = 0x8773;
+ public const int VERTEX_SUBROUTINE = 0x92E8;
+ public const int VERTEX_SUBROUTINE_UNIFORM = 0x92EE;
+ public const int VERTEX_TEXTURE = 0x829B;
+ public const int VERTEX_WEIGHTING_EXT = 0x8509;
+ public const int VERTEX_WEIGHT_ARRAY_EXT = 0x850C;
+ public const int VERTEX_WEIGHT_ARRAY_POINTER_EXT = 0x8510;
+ public const int VERTEX_WEIGHT_ARRAY_SIZE_EXT = 0x850D;
+ public const int VERTEX_WEIGHT_ARRAY_STRIDE_EXT = 0x850F;
+ public const int VERTEX_WEIGHT_ARRAY_TYPE_EXT = 0x850E;
+ public const int VERTICAL_LINE_TO_NV = 0x08;
+ public const int VERTICES_SUBMITTED = 0x82EE;
+ public const int VERTICES_SUBMITTED_ARB = 0x82EE;
+ public const int VIBRANCE_BIAS_NV = 0x8719;
+ public const int VIBRANCE_SCALE_NV = 0x8713;
+ public const int VIDEO_BUFFER_BINDING_NV = 0x9021;
+ public const int VIDEO_BUFFER_INTERNAL_FORMAT_NV = 0x902D;
+ public const int VIDEO_BUFFER_NV = 0x9020;
+ public const int VIDEO_BUFFER_PITCH_NV = 0x9028;
+ public const int VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV = 0x903B;
+ public const int VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV = 0x903A;
+ public const int VIDEO_CAPTURE_FRAME_HEIGHT_NV = 0x9039;
+ public const int VIDEO_CAPTURE_FRAME_WIDTH_NV = 0x9038;
+ public const int VIDEO_CAPTURE_SURFACE_ORIGIN_NV = 0x903C;
+ public const int VIDEO_CAPTURE_TO_422_SUPPORTED_NV = 0x9026;
+ public const int VIDEO_COLOR_CONVERSION_MATRIX_NV = 0x9029;
+ public const int VIDEO_COLOR_CONVERSION_MAX_NV = 0x902A;
+ public const int VIDEO_COLOR_CONVERSION_MIN_NV = 0x902B;
+ public const int VIDEO_COLOR_CONVERSION_OFFSET_NV = 0x902C;
+ public const int VIEWPORT = 0x0BA2;
+ public const int VIEWPORT_BOUNDS_RANGE = 0x825D;
+ public const int VIEWPORT_COMMAND_NV = 0x0010;
+ public const int VIEWPORT_INDEX_PROVOKING_VERTEX = 0x825F;
+ public const int VIEWPORT_POSITION_W_SCALE_NV = 0x937C;
+ public const int VIEWPORT_POSITION_W_SCALE_X_COEFF_NV = 0x937D;
+ public const int VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV = 0x937E;
+ public const int VIEWPORT_SUBPIXEL_BITS = 0x825C;
+ public const int VIEWPORT_SWIZZLE_NEGATIVE_W_NV = 0x9357;
+ public const int VIEWPORT_SWIZZLE_NEGATIVE_X_NV = 0x9351;
+ public const int VIEWPORT_SWIZZLE_NEGATIVE_Y_NV = 0x9353;
+ public const int VIEWPORT_SWIZZLE_NEGATIVE_Z_NV = 0x9355;
+ public const int VIEWPORT_SWIZZLE_POSITIVE_W_NV = 0x9356;
+ public const int VIEWPORT_SWIZZLE_POSITIVE_X_NV = 0x9350;
+ public const int VIEWPORT_SWIZZLE_POSITIVE_Y_NV = 0x9352;
+ public const int VIEWPORT_SWIZZLE_POSITIVE_Z_NV = 0x9354;
+ public const int VIEWPORT_SWIZZLE_W_NV = 0x935B;
+ public const int VIEWPORT_SWIZZLE_X_NV = 0x9358;
+ public const int VIEWPORT_SWIZZLE_Y_NV = 0x9359;
+ public const int VIEWPORT_SWIZZLE_Z_NV = 0x935A;
+ public const int VIEW_CLASS_128_BITS = 0x82C4;
+ public const int VIEW_CLASS_16_BITS = 0x82CA;
+ public const int VIEW_CLASS_24_BITS = 0x82C9;
+ public const int VIEW_CLASS_32_BITS = 0x82C8;
+ public const int VIEW_CLASS_48_BITS = 0x82C7;
+ public const int VIEW_CLASS_64_BITS = 0x82C6;
+ public const int VIEW_CLASS_8_BITS = 0x82CB;
+ public const int VIEW_CLASS_96_BITS = 0x82C5;
+ public const int VIEW_CLASS_ASTC_10x10_RGBA = 0x9393;
+ public const int VIEW_CLASS_ASTC_10x5_RGBA = 0x9390;
+ public const int VIEW_CLASS_ASTC_10x6_RGBA = 0x9391;
+ public const int VIEW_CLASS_ASTC_10x8_RGBA = 0x9392;
+ public const int VIEW_CLASS_ASTC_12x10_RGBA = 0x9394;
+ public const int VIEW_CLASS_ASTC_12x12_RGBA = 0x9395;
+ public const int VIEW_CLASS_ASTC_4x4_RGBA = 0x9388;
+ public const int VIEW_CLASS_ASTC_5x4_RGBA = 0x9389;
+ public const int VIEW_CLASS_ASTC_5x5_RGBA = 0x938A;
+ public const int VIEW_CLASS_ASTC_6x5_RGBA = 0x938B;
+ public const int VIEW_CLASS_ASTC_6x6_RGBA = 0x938C;
+ public const int VIEW_CLASS_ASTC_8x5_RGBA = 0x938D;
+ public const int VIEW_CLASS_ASTC_8x6_RGBA = 0x938E;
+ public const int VIEW_CLASS_ASTC_8x8_RGBA = 0x938F;
+ public const int VIEW_CLASS_BPTC_FLOAT = 0x82D3;
+ public const int VIEW_CLASS_BPTC_UNORM = 0x82D2;
+ public const int VIEW_CLASS_EAC_R11 = 0x9383;
+ public const int VIEW_CLASS_EAC_RG11 = 0x9384;
+ public const int VIEW_CLASS_ETC2_EAC_RGBA = 0x9387;
+ public const int VIEW_CLASS_ETC2_RGB = 0x9385;
+ public const int VIEW_CLASS_ETC2_RGBA = 0x9386;
+ public const int VIEW_CLASS_RGTC1_RED = 0x82D0;
+ public const int VIEW_CLASS_RGTC2_RG = 0x82D1;
+ public const int VIEW_CLASS_S3TC_DXT1_RGB = 0x82CC;
+ public const int VIEW_CLASS_S3TC_DXT1_RGBA = 0x82CD;
+ public const int VIEW_CLASS_S3TC_DXT3_RGBA = 0x82CE;
+ public const int VIEW_CLASS_S3TC_DXT5_RGBA = 0x82CF;
+ public const int VIEW_COMPATIBILITY_CLASS = 0x82B6;
+ public const int VIRTUAL_PAGE_SIZE_INDEX_ARB = 0x91A7;
+ public const int VIRTUAL_PAGE_SIZE_X_AMD = 0x9195;
+ public const int VIRTUAL_PAGE_SIZE_X_ARB = 0x9195;
+ public const int VIRTUAL_PAGE_SIZE_Y_AMD = 0x9196;
+ public const int VIRTUAL_PAGE_SIZE_Y_ARB = 0x9196;
+ public const int VIRTUAL_PAGE_SIZE_Z_AMD = 0x9197;
+ public const int VIRTUAL_PAGE_SIZE_Z_ARB = 0x9197;
+ public const int VIVIDLIGHT_NV = 0x92A6;
+ public const int VOLATILE_APPLE = 0x8A1A;
+ public const int WAIT_FAILED = 0x911D;
+ public const int WARPS_PER_SM_NV = 0x933A;
+ public const int WARP_SIZE_NV = 0x9339;
+ public const int WEIGHTED_AVERAGE_ARB = 0x9367;
+ public const int WEIGHTED_AVERAGE_EXT = 0x9367;
+ public const int WEIGHT_ARRAY_ARB = 0x86AD;
+ public const int WEIGHT_ARRAY_BUFFER_BINDING_ARB = 0x889E;
+ public const int WEIGHT_ARRAY_POINTER_ARB = 0x86AC;
+ public const int WEIGHT_ARRAY_SIZE_ARB = 0x86AB;
+ public const int WEIGHT_ARRAY_STRIDE_ARB = 0x86AA;
+ public const int WEIGHT_ARRAY_TYPE_ARB = 0x86A9;
+ public const int WEIGHT_SUM_UNITY_ARB = 0x86A6;
+ public const int WIDE_LINE_HINT_PGI = 0x1A222;
+ public const int WINDOW_RECTANGLE_EXT = 0x8F12;
+ public const int WINDOW_RECTANGLE_MODE_EXT = 0x8F13;
+ public const int WRAP_BORDER_SUN = 0x81D4;
+ public const int WRITE_DISCARD_NV = 0x88BE;
+ public const int WRITE_ONLY = 0x88B9;
+ public const int WRITE_ONLY_ARB = 0x88B9;
+ public const int WRITE_PIXEL_DATA_RANGE_LENGTH_NV = 0x887A;
+ public const int WRITE_PIXEL_DATA_RANGE_NV = 0x8878;
+ public const int WRITE_PIXEL_DATA_RANGE_POINTER_NV = 0x887C;
+ public const int W_EXT = 0x87D8;
+ public const int XOR = 0x1506;
+ public const int XOR_NV = 0x1506;
+ public const int X_EXT = 0x87D5;
+ public const int YCBAYCR8A_4224_NV = 0x9032;
+ public const int YCBCR_422_APPLE = 0x85B9;
+ public const int YCBCR_MESA = 0x8757;
+ public const int YCBYCR8_422_NV = 0x9031;
+ public const int YCRCBA_SGIX = 0x8319;
+ public const int YCRCB_422_SGIX = 0x81BB;
+ public const int YCRCB_444_SGIX = 0x81BC;
+ public const int YCRCB_SGIX = 0x8318;
+ public const int Y_EXT = 0x87D6;
+ public const int Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV = 0x9036;
+ public const int Z4Y12Z4CB12Z4CR12_444_NV = 0x9037;
+ public const int Z4Y12Z4CB12Z4Y12Z4CR12_422_NV = 0x9035;
+ public const int Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV = 0x9034;
+ public const int Z6Y10Z6CB10Z6Y10Z6CR10_422_NV = 0x9033;
+ public const int ZERO = 0;
+ public const int ZERO_EXT = 0x87DD;
+ public const int ZERO_TO_ONE = 0x935F;
+ public const int Z_EXT = 0x87D7;
+
+ #endregion
+ }
+
+ public static class glAttachment
+ {
+
+ public const uint Depth = glConst.DEPTH_ATTACHMENT;
+ public const uint DepthAndStencil = glConst.DEPTH_STENCIL_ATTACHMENT;
+ public const uint Stencil = glConst.STENCIL_ATTACHMENT;
+
+ public static uint Color(int i)
+ {
+ #if DEBUG
+ if ((i > OpenGLFunction.CurrentGL.AttachmentColorRange) || (i < 0))
+ {
+ throw new ArgumentOutOfRangeException();
+ }
+ #endif
+ return (uint)(glConst.COLOR_ATTACHMENT0 + i);
+ }
+
+ }
+}
diff --git a/StgSharp.Common/Graphics/OpenGL/glContext.cs b/StgSharp.Common/Graphics/OpenGL/glContext.cs
new file mode 100644
index 00000000..53cb8614
--- /dev/null
+++ b/StgSharp.Common/Graphics/OpenGL/glContext.cs
@@ -0,0 +1,2603 @@
+//-----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// file="glContext"
+// Project: StgSharp
+// AuthorGroup: Nitload
+// Copyright (c) Nitload. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+using StgSharp.HighPerformance;
+using StgSharp.Internal;
+using StgSharp.Internal.Intrinsic;
+
+using System;
+using System.Collections.Generic;
+
+using System.Runtime.InteropServices;
+using System.Text;
+
+namespace StgSharp.Graphics.OpenGL
+{
+ [StructLayout(LayoutKind.Sequential)]
+ public struct OpenglContext
+ {
+
+ public override bool Equals(object obj)
+ {
+ return false;
+ }
+
+ public override unsafe int GetHashCode()
+ {
+ fixed (OpenglContext* sptr = &this) {
+ return sptr->GetHashCode();
+ }
+ }
+
+ public static bool operator !=(OpenglContext left, OpenglContext right)
+ {
+ return !(left == right);
+ }
+
+ public static bool operator ==(OpenglContext left, OpenglContext right)
+ {
+ return left.Equals(right);
+ }
+
+ #region glapi
+
+ internal unsafe delegate* glAccumxOES;
+ internal unsafe delegate* glAcquireKeyedMutexWin32EXT;
+ internal unsafe delegate* glActiveProgramEXT;
+ internal unsafe delegate* glActiveShaderProgram;
+ internal unsafe delegate* glActiveStencilFaceEXT;
+ internal unsafe delegate* glActiveTexture;
+ internal unsafe delegate* glActiveTextureARB;
+ internal unsafe delegate* glActiveVaryingNV;
+ internal unsafe delegate* glAlphaFragmentOp1ATI;
+ internal unsafe delegate* glAlphaFragmentOp2ATI;
+ internal unsafe delegate* glAlphaFragmentOp3ATI;
+ internal unsafe delegate* glAlphaFuncxOES;
+ internal unsafe delegate* glAlphaToCoverageDitherControlNV;
+ internal unsafe delegate*